LaTex
On this page I noted some information and examples about LaTeX. This is a document preparation system.
Interesting Packages
Language Related
American:
Make Umlauts possible (2. variant with Unicode):
usepackage[utf8]{inputenc}
Include Pictures
Display Soure-Code of Programs
Tables Over Several Pages
Several figures side by side
begin{figure}
begin{center}
subfigure[foo]
{
...
}
subfigure[bar]
{
...
}
caption{foo bar}
label{fig1}
end{center}
end{figure}
User-Defined Commands
Include a Graphic
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
newcommand{schoen}[1]{mathbb{#1}}
newcommand{mschoen}[1]{$schoen{#1}$}
mschoen{S}
$schoen{S}$
see ...
see{fig1}
Comment Over Multiple Lines
mycomment{
THIS AREA WILL BE IGNORED
}
Lists
itemize
item foo
item bar
end{itemize}
- foo
- bar
enumerate
item foo
item bar
end{enumerate}
- foo
- bar
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
BLA BLA
begin{itemize}
item foo
item bar
end{itemize}
BLA BLA
end{samepage}
Tables
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 Beamer
Create slides for your presentation with LaTeX Beamer directly from you LaTeX sources.
Choose a layout:
%usetheme{PaloAlto}
%usetheme{Malmoe}
usetheme{Warsaw}
Start a new (sub-) section:
%subsection{Bar}
Create a new page:
{
frametitle{Foo}
...
}
Create the index:
Show the following content not before the next slide:
Let items appear successively
Manually select on which slide a item will appear:
item<1-> AA
item<2-3> BB
item<3-> CC
item<4-> DD
end{itemize}
1. | 2. | 3. | 4. |
---|---|---|---|
AA | AABB | AABBCC | AACCDD |
Elements won't be only invisible on some pages but also won't use any space there:
item<only@1-> FOO
...
The items will appear successively (unless otherwise noted):
item AA
item BB
item CC
item<2-3> DD
item EE
end{itemize}
1. | 2. | 3. | 4. |
---|---|---|---|
AA | AABBDD | AABBCCDD | AABBCCEE |
Highlight the current item:
item AA
item BB
item CC
end{itemize}
1. | 2. | 3. |
---|---|---|
AA | AABB | AABBCC |
%alert<4>{Foo}
Elements which are not yet uncovered are shown transparent
Show a block with the title FOO and the content BAR:
BAR
end{block}
The block will only a appear on some slides:
%begin{exampleblock}{Example}<only@2->
Include a graphics:
%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):
column{5cm}
Foo
column[T]{5cm}
Bar
end{columns}
begin{column}[t]{5cm}
FOO
end{column}
begin{column}[t]{5cm}
BAR
end{column}
end{columns}
View presentation in xpdf in fullscreen mode:
gbrief
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: ,
Miscellaneous
References
Links
Latex Makefile with latexmk
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 $< $@