22 Nov 2018

A Practical Introduction to LaTeX

Problem Session

What is LaTeX

LaTex is a document preparation system which might not tell you a lot all you need to know is that it makes all your texts look absolutely stunning whilst easily handling hundreds of images without ruining your whole document -looking at you microsoft word-. If that is not enough reason for you to try it out, the online platform Overleaf which we will be using here easily lets you handle version control (restoring past documents), collaboration and provides you with an endless well of possible templates. Want your report to look like a nature publication? Just choose it as a template and change the text and pictures and the formatting will look just like the real thing. On top of that Overleaf also saves your document continuously and let’s you access all your documents in one convenient online place from every computer in the world. This lecture was held as career development session on the 22nd of November 2018 and was aimed to be very practical. So instead of writing an all out report we have provided a document here to play around in.

The general surface of Overleaf is very simple, the menu is at the top with your project folder on the left, the code in the middle and the resulting pdf on the right. The project folder contains all your code but also all the pictures that go into your document. Usually your main document you should be editing is called main.tex. On the upper right corner you can turn on review where other people with access can comment on your code (similar to the google docs feature). You can also share with collaborators, submit to a journal, save a specific version of your document or chat to your collaborators. Once you have created an account and opened our document select copy project from the menu button in the upper left corner and make it your own. Now you can easily play around in the code on the left and press control + enter to see what it does in your pdf on the right. If you are lost as to what position in the pdf corresponds to the line of code you are editing click the little arrow button between the code and the pdf. If you are not very used to reading and writing code you can switch from source to rich text in the upper left corner of your code, but be aware that you now cannot see our explanations anymore. The explanations for the code are always directly above in comments (comments are introduced by a % sign which makes LaTeX ignore the whole line) or written in the text itself. The document starts out with the preamble where you load all necessary packages for your document and define the type of the document. This is not very relevant for you as we have loaded most of the relevant packages for your convenience. The main part of the document begins with the \begin{document}. The basic structuring of any LaTeX document is always Chapter, section, subsection, subsubsection, subsubsubsection, etc. and will be automatically picked up by your table of contents when you edit the document. The rest is better to be experienced yourself by reading the code and the documents and playing around with it to see how the pdf changes. So go out and explore and if you have any questions have quick google. If that does not help feel free to contact me under nicolas.arning@bdi.ox.ac.uk and I will see what I can do.

Report written by Nicolas Arning, Overleaf script created by Thomas Pak and Nicolas Arning