
%
%     Example mini tex file
%     showing a few features you'll need for writing an article.
%
%     Just cut-and-paste everything until "\begin{document}",
%     then paste your text after that.
%
%     For LaTeX newbies:
%     Everything starting with a \ is a Latex command, everything else will
%     be typeset.
%     Everything up to "\begin{document}" is called the "preamble";
%     it contains all the set-ups for this document. For instance, the
%     \usepackage command loads additional commands (usually).
%     This file is called the "source" of the document.
%     A percent character marks the beginning of  a comment; everything
%     from the percent char up to the end of the line will be ignored by LaTeX.
%
% GZ, 2000
%


%\documentclass[draft,twoside]{article}
\documentclass[twoside]{article}

\usepackage{mylayout}		% my personal layout choices
%\usepackage[german]{babel}
\usepackage{documentation}	% contains some personal utility macros
\usepackage{picture}		% loads graphicx.sty, color.sty, eepic.sty
%\usepackage[draft]{picture}
%\usepackage{booktabs}		% typographically much better
%\usepackage{math}			% included amssymb.sty
%\usepackage{pslatex}		% use Times (times.sty) and MathTimes (mathptm.sty)
%\usepackage{mathpple}		% use Palatino and mathpple

% the following is only needed if you intend to create PDF
\ifx\dvipdfm\undefined		% defined by my 'ltx' script
%\usepackage[monochrome]{color}
%\usepackage[dvips]{hyperref}
\usepackage[T1]{url}
\urlstyle{tt}
\else
% include the hyperref package *last*!
\definecolor{linkcolor}{rgb}{0.6,0.0,0.0}
\definecolor{citecolor}{rgb}{0.0,0.4,0.0}
\usepackage[dvipdfm,
            colorlinks=true,
            linkcolor=linkcolor,
            urlcolor=linkcolor,
			citecolor=citecolor,
			pagebackref=true,
            bookmarks=true]{hyperref}
\hypersetup{
	pdftitle={},
	pdfauthor={Gabriel Zachmann},
	pdfsubject={},
	pdfkeywords={},
}
% my \url command
%\renewcommand{\url}[1]{\href{#1}{\nolinkurl{#1}}}
\fi


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                          page layout


\usepackage[a4paper,dvips]{geometry}
% using the option 'dvips' tells dvips what paper size it should
% assume - you don't need to specify it with "-t a4" with dvips!
% doesn't understand the dvipdfm option.
% left/right = left/right margin for even pages.
% using option 'twoside' will swap these for odd pages.


%\twocolumn

%\usepackage{setspace}
%\doublespacing %\onehalfspacing
%\setstretch{1.7}

%   following is for good layout as proposed by Jan Tschichold
%   (s. docu for KOMA)
%\usepackage{typearea}
%\typearea{0}

%   following is for "packed" layout
%\usepackage{vmargin}
%\setmargins{30mm}{5mm}{16cm}{23.5cm}{3\baselineskip}{10mm}{0mm}{15mm}
% \setmargins{leftmargin}{topmargin}{textwidth}{textheight}% 
%            {headheight}{headsep}{footheight}{footskip}


%   "fuzzy" layout (also handles marginpars correctly)
%\usepackage{rmpage}
%\usepackage[widest,noheaders,longer,a4paper]{rmpage}


%\tolerance 500				% if you get too many overfull hboxes
% if there are only a few overfull hoboxes in a few singular paragraphs,
% enclose those by \begin{sloppypar} ... \end{sloppypar}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                title


\title{Title}
\author{\parbox{\textwidth}{\centering
Gabriel Zachmann\\
\small
Fraunhofer Institute for Computer Graphics \\
Rundeturmstraße 6 \\
64283 Darmstadt, Germany \\
email: Gabriel.Zachmann@igd.fhg.de
}}
\date{\today}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                commands



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                document 


\begin{document}


%   At this point the title will be set
\maketitle


%   This will include the table of contents
%\tableofcontents



%   If there is an abstract, it usually goes right after the title

\begin{abstract}
Bla
\end{abstract}

%   Keywords ...

\paragraph{Keywords:} Key




%    This is how you make first-level headings
%    Heading numbering is done automagically by latex, 
%    how it is done depends on the style (or class)

\section{Heading}


%    Emphasizing, slanting, bold-face, and typewriter-style text.

\emph{Emphasized text for putting emphasis on a word or phrase.}
\textsl{Slanted text (yes, there is a difference), for introducing new terms.}
\textbf{Bold} text, use economically.
\texttt{Typewriter text (for computer output, for instance).}

%    Paragraphs are marked by an empty line
%    All other line-breaks in the "source" are ignored.

This is a new paragraph,
because there is a blank line in the input text before it.
All other whitespace in the source is ignored.

%    Umlauts are no big deal

If you have a German keyboard, you can just write them in their common
form, like äöü ÄÖÜ ß.
If your keyboard doesn't feature them, you can write
\"A \"O \"U \"a \"o \"u, \ss.
Zum Beispiel: \"Apfel, \"Ofen, \"Urmel, m\"ude, s\"u\ss, m\"u\ss ig.
%    I suggest that you create mappings in your favorite editor
%    (or abbreviation, shortcut, or macro) for typing umlauts.
%    (Anyone using an editor lacking such features? Shame on you!)

The following characters have to be ``escaped'' in order to print them:
\_, \% !

%    This is how to make cross-references to other sections
In Section~\ref{sc:next} bla bla bla.
%    ... and cross-references to sub-section
In Section~\ref{sc:next-sub} blub blub blub.



\section{Next section} 

%   This attaches the label "next" with the latest \section{..},
%   \subsection, etc., so that it can be cross-referenced by \ref.
\label{sc:next}



%   This makes a second-level heading

\subsection{A subheading}
\label{sc:next-sub}


This section shows how to include pictures in a LaTeX document.


%    This is how you can include drawings.
%    Actually, "\eepic" is a convenience macro defined in my style file
%    "picture.sty", which has been included in the preamble.
%    The following command includes the file "drawing.eepic"
%    and creates a figure with the caption
%    and a label "fg:drawing".

\eepic{drawing}
      {The caption of your gorgeous picture.}

%    This would make two pictures which will always stay side by side;
%    the two pictures each have a figure number and a caption.
%    Both also have labels (see below).
%    Since these are not drawings, I have made different convenience macros.

\twoepspicx{snapshot1}
           {caption of 1st pic.}
           {snapshot2}
           {caption of 2nd pic.}

And this is how you can refer to Figure~\ref{fg:drawing},
Figure~\ref{fg:snapshot1},
and Figure~\ref{fg:snapshot2}.


%    The following are two ways how to make new paragraphs
%    with a big skip to the previous text.
%    The text in {} can be omitted, of course, but not the braces {}!

Bla bla bla
Bla bla bla
Bla bla bla

\paragraph{Keywords of paragraph.}

For larger sections within a subsection \ldots


%    second way. slightly different result

Bla bla bla
Bla bla bla
Bla bla bla

\subparagraph{Keywords of paragraph}

Another way of creating a larger ``break'' within a subscetion.
Within a document I tend to use either \verb:\paragraph: or
\verb:\subparagraph:, especially in smaller ones.

Note again, that we specify only the \emph{semantics} of the break,
not its appearance! If you load a different style, e.g., the style supplied
by a publisher, the appearance of sectioning commands (and almost
everything else) might look completely differently.


%    Tables
%    Each "c" adds a column to the table, the contents of which will be centered
%    "l" or "r" would make them left- or right-justified.
%    The | create vertical lines; you can omit them.

Here is a table, horizontally  centered:
\begin{center}
\begin{tabular}{lr}

	\hline					% this makes a horizontal line.
	numbers	& description\\
	\hline
	1		& bla			% text of different columns is separated by '&'.
	\\						% marks the end of a row; don't forget it!
	2		& blub \\
	\hline

\end{tabular}
\end{center}

If you want to create typographically good tables, get
\texttt{booktabs.sty} from CTAN and read the documentation which comes with
it.


%    Here is how to cite somebody's work.
As \cite{Knuth81} has pointed out, blubber blubber blubber.

%    In one of the bibliography files there has to be an entry of the form:
%    @INPROCEEDINGS{Zach,  <- this is the key as used in the "\cite" command.
%    author="Gabriel Zachmann",
%    ....
%    }
%    The bibliography files are specified with the \bibliography command
%    (see below). For computer science, you can find lots of them on the net.


\section{How to create drawings}

I usually include only eps files in Latex.
I'm not sure this is the most convenient way on Windozes, but it works
well on Unixes.

In order to create drawings (lines, boxes, arrows, arcs, text, etc.)
I use the program \texttt{xfig}. Start it with
\texttt{fig pic}%
\footnote{
\texttt{fig} is an alias defined in
\texttt{tex-so}, which I found practical. Of course, you can start
\texttt{xfig} by typing 'xfig', too.
};
this creates a file \texttt{pic.fig}, if it doesn't exist yet.
\texttt{xfig} is pretty much self-explanatory.
After creating the file \texttt{pic.fig}, you can convert
it into an eepic file by the command 
\texttt{gmake -f Makefile-Fig}%
\footnote{
\texttt{Makefile-Fig} is a makefile included in the \texttt{example} directory
}.
You can get \texttt{xfig} at 
\texttt{ftp://ftp.x.org/\-contrib/\-applications/\-drawing\_tools/xfig/}.

Snapshots (Bitmaps) can be included as well.
You start with an rgb, tiff, gif, or jpeg file.
This file can also be \texttt{gzip}ed (saves disk space).
With the command \texttt{gmake -f Makefile-Img eps} it will be converted
to an eps file (level 2). 
\texttt{Makefile-Img} is included in the \texttt{example} directory.
However, it needs the program \texttt{convert} and \texttt{jpeg2ps}.



\section{Typesetting the document}

\begin{itemize}

	\item
\texttt{latex example} creates \texttt{example.dvi}, \\
	\item
\texttt{xdvi example} shows a preview, \\
	\item
\texttt{dvips example} creates a postscript file from the dvi file.
\end{itemize}




\subsubsection{How to make the bibliography}

\begin{enumerate}

	\item
	\texttt{latex example},
	\item
	\texttt{bibtex example} (no suffix here!),
	this extracts all citations
	from the bibliography files specified in \verb:\bibliography:
	\item
	\texttt{latex example},
	\item
	\texttt{latex example},
	\item
	bibliography is completely set.
\end{enumerate}

If the bibliography gets long, you might want to "shrink" it
with \verb:\small: or \verb:\footnotesize:.


%    Put the shrinking commands here
%\small
%    or
%\footnotesize


%    The style in which citations and the bibliography will be set.
\bibliographystyle{abbrv}

%    The bibliography will go here
%    The files specify the bibliography data bases (.bib files)
\bibliography{example}
%\bibliography{siggraph,own,other}



\end{document}

