LaTeX: Difference between revisions
imported>Morten Juhl-Johansen Zölde-Fejér No edit summary |
imported>Morten Juhl-Johansen Zölde-Fejér No edit summary |
||
Line 5: | Line 5: | ||
== How it works == | == How it works == | ||
A LaTeX document structure is split in two: There is a preamble, which indicates some basic, overall features of the document, and there is the main document with the relevant markup for formatting.<br/> | A LaTeX document structure is split in two: There is a preamble, which indicates some basic, overall features of the document, and there is the main document with the relevant markup for formatting.<br/> | ||
The document is initially created as a flat file | The document is initially created as a flat file, meaning that one can use any non-formatting editor of choice. Som editors like [[http://notepad-plus.sourceforge.net/ Notepad++]] and [[http://www.xm1math.net/texmaker/ TeXmaker]] will syntax color the LaTeX code.<br/> | ||
As the code is a flat file, the output file will be small compared to files from many standard word processing applications. | |||
=== Code example === | === Code example === | ||
Line 26: | Line 27: | ||
\end{document} | \end{document} | ||
Output:<br/> | '''Output:'''<br/> | ||
[[Image:Latex-eksempel.png]] | [[Image:Latex-eksempel.png]] | ||
Revision as of 01:38, 13 August 2007
LaTeX is a markup language for generating print-quality typesetting.
It is mostly used academic circles, primarily in the natural sciences, for creating material for scientific publications. LaTeX is very well-equipped for displaying formulae and diagrams.
How it works
A LaTeX document structure is split in two: There is a preamble, which indicates some basic, overall features of the document, and there is the main document with the relevant markup for formatting.
The document is initially created as a flat file, meaning that one can use any non-formatting editor of choice. Som editors like [Notepad++] and [TeXmaker] will syntax color the LaTeX code.
As the code is a flat file, the output file will be small compared to files from many standard word processing applications.
Code example
\documentclass[12pt,a4paper,notitlepage]{article} \usepackage[utf8x]{inputenc} \usepackage{ucs} \usepackage{amsmath} \usepackage{amsfonts} \author{Morten Juhl Johansen} \title{LaTeX article} \begin{document} This is the beginning of an article on \LaTeX!\\ There are \textbf{bold text}, \textit{italics}, \underline{underscoring}, footnotes\footnote{this is a footnote}\\ - and lots of other goodies. A math example: \begin{equation*} \sum_{n=1}^\infty \frac{1}{n^2}= \frac{\pi^2}{6}. \end{equation*} \end{document}
Literature
- Kopka, Helmut; Daly, Patrick W.: Guide to LaTeX. 4th edition. Addison-Wesley Professional, 2003. ISBN 0-321-17385-6.
- Lamport, Leslie: LaTeX: A document preparation system: User's guide and reference. 2nd edition, Reading, Mass. Addison-Wesley Professional, 1994. ISBN 0-201-52983-1.