\documentclass[a4paper,10pt]{article}
\usepackage{palatino}
\usepackage[pdftex]{graphicx}  % for pdflatex, graphics files .png or .pdf
\usepackage{amsmath}
\usepackage{natbib}
\usepackage[margin=1.5cm,
    vmargin={0pt,1cm},
    includefoot]{geometry}

\newcommand\Bold[1]{{\bf #1}}

% text on a line after a % is a comment and is just ignored by LaTeX

\title{Demonstration Document}
\author{M. Y. Self\\
        At Home}
\date{October 22, 2015}

\begin{document}

\maketitle

\section{Introduction}

\subsection{Simple text}
This first section contains simple text. 
On input, lines can be broken wherever one pleases,
  with extra spacing included to improve legibility,
  but the output lines will be broken to fit the
  line width available. Even additional    spacing
     between    words   does   not    affect
        the output. 

A new paragraph in indicated with a \Bold{blank} line.

\subsection{Highlighting text}

It is possible to {\it emphasize} text by setting it in
\emph{italic} or in \textbf{bold face}, which can
be done in {\bf variety } of ways.

\begin{quote}
Another possibility is to offset a piece of text in a
\texttt{quote} environment, like this with increased
margins on either side.
\end{quote}

\section{Sophistications}

\subsection{Mathematics}

There are special rules \citep[see][chap 16]{texguide} for entering math, and many
commands that only exist in math mode. An in-line math
formula like $x^2+\beta$ has automatic spacing between
variables and operators, while displayed equations like
\begin{equation}
  \vec{A} \times (\vec{B}\times\vec{C}) =
  (\vec{A}\cdot\vec{C})\vec{B} -
  (\vec{A}\cdot\vec{B})\vec{C}
\end{equation}
and
\begin{equation}
  \vec{A}\cdot(\vec{B}\times\vec{C}) =
  \begin{vmatrix}
    A_x & A_y & A_y \\
    B_x & B_y & B_y \\
    C_x & C_y & C_y
  \end{vmatrix}
\end{equation}
are given automatic numbers. One can avoid numbering displayed equations,
\begin{equation*}
  \vec{E} = - \vec{\nabla} \Phi,
\end{equation*}
by using a slight variant of the equation environment.
Sometimes in-line
equations, such as $\frac{(x+1)^2}{2}$, can look too cramped.
You can avoid this by writing the equation in a different way,
$(x+1)^2/2$ or telling LaTeX to set the equation,
$\displaystyle{\frac{(x+1)^2}{2}}$, with the same size characters
and symbols as it uses in displaystyle \citep{texguide,latexguide}.


\subsection{Lists}

Various lists are possible with default numbering schemes
\begin{enumerate}
\item Elephant
\item Panda
\item Eagle
\end{enumerate}

your own numbering

\begin{itemize}
\item[i)]   Cake
\item[ii)]  Biscuit
\item[iv)]  Cookie
\end{itemize}
 or just with bullets

\begin{itemize}
\item Star 
\item Galaxy
\item Universe
\end{itemize}

\begin{figure}
\includegraphics[width=5cm]{fig}
\caption{ Cedric's star.}
\label{fig:star}
\end{figure}

\subsection{Adding graphics}

Pictures and graphics
\includegraphics[width=1cm]{fig}
produced by other programs are easily inserted either direct into the
text or with its own space and a caption (See Fig.~\ref{fig:star}).

\begin{thebibliography}{}

\bibitem[Knuth 1987]{texguide}
Knuth, D.E. (1987) ``The TeXBook'', Addison and Wesley.

\bibitem[Lamport 1987]{latexguide}
Lamport, L. (1994) ``LaTeX: a Document Preparation System'', Addison and Wesley.

\end{thebibliography}
\end{document}
