In some fields, especially mathematical and physical sciences, the LaTeX document preparation system is very common. It is not widely used outside these fields.
LaTeX is a tool for writing documents. LaTeX files are plain text files. A LaTeX file does not look like the final text – it is not ‘what you see is what you get’ like a word processor. Instead, you tag each bit of content, and the LaTeX program reads them in, formats them according to rules stored in a class file, and puts out a formatted document. Custom-built editors mean that you do not have to directly edit the code if you do not want to.
Here is an example of LaTeX code:
The quantity $p_i$ is the `magnetic scattering amplitude' of the $i$th atom~\cite{bacon}, and is written
\begin{equation}
\label{pi}
p=\left( \frac{e^2\gamma}{2mc^2} \right) gJf.
\end{equation}
Here, $g$ is the Land\'e splitting factor, $J$ is the angular momentum of the ion, such that $gJ$ is its moment, and $f$ is the form factor for magnetic scattering\ldots
Here is an extract from the PDF that this gives:
Before trying LaTeX think about your needs and whether they are best met by LaTeX or another type of software (eg you word processor’s built-in equation editor or MathType).
Why use LaTeX?
|
Why not use LaTeX?
|
- It handles mathematics better than anything else (it was designed to!).
- It can automatically number, label and style your citations, footnotes, endnotes, figure captions, table captions, equations, index entries, etc.
- LaTeX input files are plain text, which means they are completely cross-platform and work equally well on Mac, Linux, Windows, ChromeOS and Android.
- It is completely free and open source.
- In some fields in mathematical and physical sciences, it is very common and much infrastructure (eg templates and styles, bibliographic databases) already exists.
- It can be installed locally (on your computer) or in the cloud (running in a browser).
|
- It has a steep and daunting learning curve.
- It is not common outside academia.
- It lacks the built-in grammar, spelling and accessibility checkers that come with modern word processors.
- Tracking changes is not as easy as when using a word processor.
- For most people, the idea of having to write a document using markup language and then process it to get the final result seems alien and difficult.
- Its basic aim is to design document pages, so it is not ideal for production to HTML and other reflowable formats.
- Making an accessible PDF from a LaTeX file is not simple (see Making PDFs accessible).
|
Use LaTeX if ...
|
Do not use LaTeX if ...
|
- you need to present a lot of mathematics
- the journal you want to publish in requires it (and provides a style file and template to make it easier)
- your final output will be a print or PDF document
- you like working with computers, and like the results that LaTeX produces
- your collaborators use it
- the project is a big one (such as a thesis) and the time spent learning LaTeX will be a good investment.
|
- you work with simple (or no) mathematics
- you are already a ‘power user’ of another program and know how to automatically number equations, figures, citations, footnotes and so on, and how to insert mathematics effectively
- you already have established workflows and collaborations that use other tools, such as Word (with track changes) and PerfectIt
- you have a single, small project to do and the time spent learning LaTeX would not be a wise investment
- accessibility (see Making PDFs accessible) and production to HTML are high priorities.
|
You can install LaTeX on your computer or use it from the cloud. There are many online communities; one of the largest is the TeX page at StackExchange. The Mathematics writing resources section lists some useful places to start learning about LaTeX.