Introduction
A .tex file is the source of a document typeset by TeX, the typesetting
system Donald Knuth wrote from 1978, or, far more often today, by LaTeX, the set of
macros Leslie Lamport built on top of it in the 1980s. The author writes plain text with
commands for structure and maths, and a TeX engine turns it into a finished
PDF. It is the standard way to write
papers in mathematics, physics and computer science, and is used for many books and
theses.
Structure
A LaTeX file is plain text. Commands start with a backslash, such as
\section{Results} or \emph{word}, with required arguments in
braces and optional ones in square brackets. The preamble chooses a document class with
\documentclass and loads packages with \usepackage; the text
itself sits between \begin{document} and \end{document}.
Maths is written between dollar signs or in environments such as
equation, and % starts a comment. Larger documents are split
into several .tex files joined with \input or
\include, with references in a separate .bib file.
\documentclass{article}
\usepackage{amsmath}
\title{A Short Note}
\begin{document}
\maketitle
\section{Introduction}
Euler's identity is $e^{i\pi} + 1 = 0$.
\end{document}
Links
Software
Reference
- The LaTeX Project, with documentation of LaTeX
- TeX Users Group