LaTeX - Tips

From XennisWiki
Jump to: navigation, search

Some tips for LaTeX



Further information: LaTeX-Wörterbuch: url

Link to the Google homepage \url{}.


% ...
My example text here\footnote{Test, and here my footnote}.

Use footnotes in a table (further information: Using footnote in tables)

% ...
            Hello & World\footnote{Here is my footnote.} \\
            % ...

Include tex File

Include the file example.tex from the directory path/to/the/file:


Include the example.tex, which has to be in the same directory


Define a command


Example with one parameter (packet color is required)



Further information: LaTeX/ Akzente und Sonderzeichen

Command Symbol
\varphi $ \varphi $
\mathcal O $ \mathcal O $
\R, \mathbb N $ \R, \mathbb N $
\mathrm i $ \mathrm i $
\dot{s}, \ddot{s} $ \dot{s}, \ddot{s} $
\to $ \to $
\mapsto $ \mapsto $
\verb!C++! $ \verb!C++! $
\overline c, \hat c, \widehat C $ \overline c, \hat c, \widehat C $
\int_0^n $ \int_0^n $
\infty $ \infty $
Commando Symbol
\& $ \& $
\le, \ge $ \le, \ge $
\lceil x \rceil, \lfloor x \rfloor $ \lceil x \rceil, \lfloor x \rfloor $
\langle x, y \rangle $ \langle x, y \rangle $
\subseteq, \sqsubseteq $ \subseteq, \sqsubseteq $
\vee, \wedge $ \vee, \wedge $
n \times m $ n \times m $

Format text


The following text {\color{blue}{appears in blue}}.

Underline, strike through, etc.

Further information: LaTeX-Wörterbuch: ulem, Unterstreichen und durchstreichen von Text in Latex

\sout{strike through}
\uuline{double underlined}
\uwave{wavy underline}

Background color

This text is \colorbox{yellow!50}{yellow}!


All packages you find in the

Cross references (cleveref)

% E.g. for German:

Cleverref outputs fig. 1 (or for German Abb. 1)

Like shown in~\cref{fig:full_system}

Index of abbreviations (nomencl)

% Index of abbreviations
   \renewcommand{\nomlabel}[1]{#1 \dotfill}
% Custom command
\abk{XML}{Extensible Markup Language}


To create the index of abbreviations, execute the following command

makeindex %.nlo -s -o %.nls


Figures command

% Usage: \xefig[5cm]{path/file}{Label}{Caption}
% Usage: \myfigtwo2[Column width]{path/file}{Label}{Caption}{Caption subfigure a}{Caption subfigure b}
          { \includegraphics[width=.#1\columnwidth]{#2-a} \label{fig:#3-a} }
          { \includegraphics[width=.#1\columnwidth]{#2-b} \label{fig:#3-b} }


Seitenränder einstellen

\geometry{a4paper,left=5mm,right=5mm, top=5mm, bottom=5mm}

Keine Absatzeinzug



siehe Creating pdf-forms with LaTeX

PDF (seitenfüllend und im Querformat) einbinden

Ausführliche Hilfe: LaTeX-Wörterbuch: includepdf


Guillemets (Anführungszeichen)

\newcommand{\xf}[1]{\frqq #1\flqq}

See also