A brief guide to LaTeX
What is LaTeX?
LaTeX is a document preparation and typesetting package. It has a number of big advantages over ordinary word-processing software, such as Microsoft Word or OpenOffice:
- It does all the layout and typesetting for you, enabling you to concentrate on the content and structure.
- It has much better support for typesetting mathematical formulae than any word processor.
- It is the de facto standard for articles in mathematics and most areas of physics. LaTeX notation is widely used in other places (including in Python!) so it is a good idea to get used to it.
- LaTeX files are plain text, they can be shared by your colleagues without problems and you do not need any special software to read them.
- It is free and non-proprietary. You will not have to shell out money to buy software to use it, and it does not depend on a vendor who will change the standards on a whim.
- It is not WYSIWYG (What You See Is What You Get). You have to go through a two-step process (outlined below) to get output which you can view.
- It takes a little bit of time to learn and get used to.
How do I use LaTeX?
- Prepare your document in a plain text file. Make sure you use a plain text editor (such as pico, emacs or kedit), and that your filename ends in .tex (for example myfile.tex). You can use this template (and the associated figure) as a starting point.
- Type pdflatex myfile
You may have to do this twice to get everything correct. This will produce a file myfile.pdf which you can view with your favourite pdf reader.
More information
- A template LaTeX file You can use this as your starting point for writing your report.
- LaTeX information from UPenn
- Overleaf, an online LaTeX editor and document-sharing environment. It includes a lot of LaTeX documentation.