Back to overview Forward to Shortdocumentation 1
Examples of Latex
Here an example of a very small Latex document
\documentclass{article}
\begin{document} example for a very \tiny{tiny} \normalsize \LaTeX \ document
\end{document}
Example 1
A small Latex document
\documentclass[12pt,twoside,a4paper]{article}
\begin{document}
a small \LaTeX document
\end{document}
Example 2
Class options
12pt | Character size 12 points |
twoside | Reciprocally front and back |
a4paper | DIN A4 format |
There are four standard document letting.
- book
- report
- article
- letter (normally American format)
Each document use exactly one document class.
so
\documentclass{article} or \documentclass{report}
Not
\documentclass{article, report}
Tables in Latex
\documentclass[12pt,twoside,a4paper]{article}
\begin{document}
\begin{tabular}{|c|c|c|}
\hline
A & B & C \\
\hline
1 & 2 & 3 \\
\hline
4 & 5 & 6
\\
\hline
\end{tabular}
\end{document}
Example 3
Still another table
\documentclass[12pt,twoside,a4paper]{article}
\begin{document}
\begin{tabular}{c|c|c}
A & B & C \\
\hline
1 & 2 & 3 \\
\hline
4 & 5 & 6 \\
\end{tabular}
\end{document}
Example 4
A third table
\documentclass[12pt,twoside,a4paper]{article}
\begin{document}
\begin{tabular}{|c|c|c|l|r|}
\hline
\multicolumn{3}{|l|}{test} & A & B \\
\hline
1 & 2 & 3 & 4 & 5 \\
\hline
\end{tabular}
\end{document}
Example 5
Something mathe with Latex
Are $a, b \in \mathbb{R}, then applies (a+b)^{2} = a^{2} + ab + b^{2} $ \\
better \\
are $a, b \in \mathbb{R}, \textrm{then apply} \, (a+b)^{2 } = a^{2 } + ab + b^{2}$\\
Example 6 source code
Example 6 pdf
In mathe blanks and line changes are ignored.
Instructions | Effect | Area of application (where I use it) |
\ ! | space character | after ss in "daß" |
\, | narrow distance | little text in mathe |
\: | somewhat broad distance | I don't use it |
\; | somewhat broad distance | I don't use it |
\quad | broad distance | in mathe |
\qquad | large distance | in mathe |
Use \textrm{...} to set normal text within the mathematical text.
It is advisable to insert forwards and after \textrm{... } a spacer.
Short texts, essays and summaries with structure.
Example 7 source code
Example 7 pdf
Back to overview Forward to Shortdocumentation 1
Sascha Frank
Last modified: Wed Aug 31 20:33:47 MEST 2005