Contact:
Thorsten Gunkel
63456 Hanau
Germany
Mail
Vote to help me to improve this page!
Did this page satisfy your expectations?
vote3 Yes
vote2 Partly
vote1 No
Short comment?
Do not change this:
Add your comment to the
guestbook.
Last modified: 25-11-2007 12.13
NO ePATENTS

LaTeX Notepad

On this page I noted some information and examples about LaTeX.
16-01-2006 01.49

Interesting Packages

Language Related

American:
\usepackage[american]{babel}

Make Umlauts possible (2. variant with Unicode):
\usepackage[latin2]{inputenc}
\usepackage[utf8]{inputenc}

Include Pictures

\usepackage{graphicx}

Display Soure-Code of Programs

\usepackage{listings}

Tables Over Several Pages

\usepackage{longtable}

Several figures side by side

\usepackage{subfigure}
\begin{figure}
\begin{center}
\subfigure[foo]
{
...
}
\subfigure[bar]
{
...
}
\caption{foo bar}
\label{fig1}
\end{center}
\end{figure}
16-01-2006 01.52

User-Defined Commands


Include a Graphic

\newcommand{\einbild}[3]{
\begin{figure}
\begin{center}
\includegraphics[scale=0.75]{#1}
\caption{#2}
\label{fig:#3}
\end{center}
\end{figure}
}
\einbild{pic1.eps}{This is figure 1}{fig1}

"Beautiful" Characters

\usepackage{amsfonts}
\newcommand{\schoen}[1]{\mathbb{#1}}
\newcommand{\mschoen}[1]{$\schoen{#1}$}
\mschoen{S}
$\schoen{S}$

see ...

\newcommand{\see}[1]{{\it(see #1 section~\ref{#1}, page~\pageref{#1})}}
\see{fig1}

Comment Over Multiple Lines

\newcommand{\mycomment}[1]{}

\mycomment{

THIS AREA WILL BE IGNORED

}
20-01-2007 16.15

Lists

itemize

\begin{itemize}
\item foo
\item bar
\end{itemize}
  • foo
  • bar

enumerate

\begin{enumerate}
\item foo
\item bar
\end{enumerate}
  1. foo
  2. bar

description

\begin{description}
\item[foo] This is foo
\item[bar] This is bar
\end{description}
  • foo This is foo
  • bar This is bar

Content Should Appear on the Same Page

\begin{samepage}
BLA BLA
\begin{itemize}
\item foo
\item bar
\end{itemize}
BLA BLA
\end{samepage}
23-12-2006 00.09

Tables

 \begin{table}
\label{table1}
\begin{tabular}[ht]{|l|l||l|l|}
\hline
A & B & C & D\\
\hline
1 & 2 & 3 & 4\\
\hline
5 & 6 & \multicolumn{2}{|l|}{7 8}\\
\hline
\hline
9 & 10 & 11 & 12\\
\hline
13 & 14 & 15 & 16\\
\hline
\end{tabular}
\caption{A Table}
\end{table}
LaTeX table
21-12-2006 18.36

LaTeX Beamer

Create slides for your presentation with LaTeX Beamer directly from you LaTeX sources.

LaTeX Beamer
Choose a layout:
%\usetheme{default}
%\usetheme{PaloAlto}
%\usetheme{Malmoe}
\usetheme{Warsaw}

Start a new (sub-) section:
\section{Foo}
%\subsection{Bar}

Create a new page:
\frame
{
\frametitle{Foo}
...
}

Create the index:
\frame{\tableofcontents}

Show the following content not before the next slide:
foo \pause bar

Let items appear successively

Manually select on which slide a item will appear:
\begin{itemize}
\item<1-> AA
\item<2-3> BB
\item<3-> CC
\item<4-> DD
\end{itemize}

1.2.3.4.
AA



AA
BB


AA
BB
CC

AA

CC
DD

Elements won't be only invisible on some pages but also won't use any space there:
\only<2-3>{FOO}

...
\item<only@1-> FOO
...

The items will appear successively (unless otherwise noted):
\begin{itemize}[<+->]
\item AA
\item BB
\item CC
\item<2-3> DD
\item EE
\end{itemize}

1.2.3.4.
AA



AA
BB

DD
AA
BB
CC
DD
AA
BB
CC
EE

Highlight the current item:
\begin{itemize}[<+-| alert@+>]
\item AA
\item BB
\item CC
\end{itemize}

1.2.3.
AA


AA
BB

AA
BB
CC

\item<3-| alert@3> Foo
%\alert<4>{Foo}

Elements which are not yet uncovered are shown transparent
\setbeamercovered{transparent}

Show a block with the title FOO and the content BAR:
\begin{block}{FOO}
BAR
\end{block}

The block will only a appear on some slides:
\begin{exampleblock}{Example}<2->
%\begin{exampleblock}{Example}<only@2->

Include a graphics:
\includegraphics[width=7cm,height=3cm]{foo.jpg}
%\includegraphics<1>[height=2cm]{foo.pdf}%

Split a slide in two columns (The parameter indicates how to vertically arrange the two columns: b last line, c center, t (T) first line):
\begin{columns}[t]
\column{5cm}
Foo
\column[T]{5cm}
Bar
\end{columns}

\begin{columns}
\begin{column}[t]{5cm}
FOO
\end{column}
\begin{column}[t]{5cm}
BAR
\end{column}
\end{columns}

View presentation in xpdf in fullscreen mode:
xpdf -fullscreen presentation.pdf
25-11-2007 12.13

gbrief

\documentclass[german]{g-brief}
\usepackage[T1]{fontenc}
\usepackage[latin2]{inputenc}
\usepackage{babel}
\makeatletter
\lochermarke
\faltmarken
\fenstermarken
\trennlinien
%% \klassisch
\makeatother
\begin{document}
\Name{}
\Unterschrift{}
\Strasse{}
\Zusatz{}
\Ort{}
\Land{}
\RetourAdresse{}
\Telefon{}
\Telefax{}
\Telex{}
\EMail{}
\HTTP{}
\Bank{}
\BLZ{}
\Konto{}
\Betreff{}
%\Postvermerk{}
\MeinZeichen{}
\IhrZeichen{}
\IhrSchreiben{}
\Anlagen{}
\Verteiler{}
\Datum{\today}
\Anrede{}

\begin{g-brief}

...

\end{g-brief}
\end{document}

Example: gbrief.tex, gbrief.pdf
23-12-2006 00.09

Miscellaneous


References

BibTeX
\cite{q1,q2}
20-01-2007 16.21

Latex Makefile with latexmk

latexmk Debian latexmk
myfile:=foo.tex

all: dvi pdf ps

dvi:
latexmk -dvi ${myfile}

pdf:
latexmk -pdf ${myfile}

ps:
latexmk -ps ${myfile}

force:
latexmk -g ${myfile}

view:
latexmk -pvc ${myfile}

clean:
latexml -c


figurelist=\
foo\
bar

figurelist := $(figurelist:%=figures/rendered/%.pdf)

figures: ${figurelist}

figures/rendered/%.pdf: figures/%.fig
fig2dev -L pdf $< $@

22-12-2006 23.33
Powered by PHP Created with Xemacs Valid XHTML 1.0! Valid CSS!