This page aims to help you take the first step with LaTeX, a document preparation system designed to produce high-quality typeset output.
- 1 What is LaTeX ?
Unlike common word processor such as Microsoft Word, LaTeX usually does not provide WYSIWYG (What you see is what you get). LaTeX takes plain text and enriches it with markup, similar to the way HTML does.
In HTML the element <h2> indicates a new section in an HTML document
LaTEX would use \section command
- The LaTeX workflow
LaTeX files are not the document itself, so you don’t normally give other people your LaTeX file itself. Instead, after writing your LaTeX source, you run LaTex to create a PDF file. This PDF is then what you send to others.
- 2 Working with LaTeX
LaTeX is not a single application containing everything in one. Instead, there are separate programs that work together. We can divide them into two things: a TeX system and a text editor.
There are several powerful online sites nowadays that allow you to avoid the need to install a TeX system and LaTeX editor at all.
https://latexcgi.xyz/
https://www.overleaf.com/
https://papeeria.com/
- 3 First LaTeX document
\documentclass{article}
\usepackage[T1]{fontenc}\begin{document}
Hey world!This is a first document.
\end{document}
A \
starts an instruction to LaTeX: a ‘command’.
The curly brace characters {
and }
are used to show mandatory arguments: information that commands require. See more
- 4 Logical structure
LaTeX provides ways to concentrate on the logical structure, \emph
simply makes something italic.
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
Some text with \emph{emphasis and \emph{nested} content}.Some text in \textit{italic and \textit{nested} content}.
\end{document}
- Lists
The other very common place you’ll want logical markup is writing lists.
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}Ordered
\begin{enumerate}
\item An entry
\item Another One
\item Wow! Three entries
\end{enumerate}Unordered
\begin{itemize}
\item An entry
\item Another One
\item Wow! Three entries
\end{itemize}\end{document}
Notice that we use \item
to start each entry, and that the marker used for each type of list is added automatically.
- 5 Using document classes to influence design
LaTeX is supplied with a set of standard classes, all of which look similar but with some variations:
article
: short documents without chaptersreport
: longer documents with chapters, single-sided printingbook
: longer documents with chapters, double-sided printing, with front- and back-matter (for example an index)letter
: correspondence with no sectionsslides
: for presentations