-
Notifications
You must be signed in to change notification settings - Fork 2
Introduction
Consider the types of documents we might want to produce; they often have the following properties:
- Varying lengths from a few pages to hundreds
- Methodical structure, with a need for reliable cross-referencing
- Many mathematical equations
- Long bibliographies with a need for citation support
General purpose word-processors are designed to be easy to use by the general public, to produce a wide range of different documents. As such, the do not fit the bill for scientific manuscripts, and suffer from a plethora of issues:
- Mixing content with formatting
- Lack of stability dealing with large complex documents
- Poor support for typesetting mathematics
- Citations only reliably possible using external software
- Encourage “cheating” on formatting that can cause problems later
No real scientist uses word processors to create documents, and neither should you. We aim to introduce you to LaTeX, the de-facto standard for creating scientific documents, and show you that it can be easy, while producing beautiful documents.
LaTeX (lah-tekh or lay-tekh) is the most common dialect of the TeX (tekh) typesetting system. It defines a large number of macros that help us typeset structured documents. A number of engines produce different output files, the most common today is pdfLaTeX, which takes a LaTeX source document and produces a PDF output. (Previously popular engines would produce a DVI file that could turned into a postscript file, and then PDF, but that approach should not be used in our context.)
Here's a simple document to get you started:
\documentclass[a4paper,11pt]{article}
\begin{document}
There are many ways to write a document, and using word processors is not one of them. They are painful exercises in frustration, and I would personally not be caught dead using one out of choice. Choice, ah, that elusive force...
Just as long as you always remember $E=mc^{2}$.
\end{document}
That source file contains your text, and some special commands that LaTeX uses to typeset your document. To do that, you would call the pdfLaTeX engine on the file: $ pdflatex first.tex
. This “compiles” the document, generating a PDF, in this case on A4 paper.
Exercise
Check out the above file and compile it on the command line.