This lesson is about what LaTeX is and how to use it.
What is LaTeX?
LaTeX is used to typeset scientific documents. It is based on the
programming language TeX, which is designed for writing mathematical
texts. There are fundamental differences between LaTeX and other word
processors such as MS Word and Pages.
One can concentrate on the structure and content of the document,
without worrying about the layout.
The layout is consistent.
Mathematical expressions can be inserted easily.
It is easy to number and refer to equations.
One is forced to structure every document well.
In most editors is not possible to see the result of your
One has to learn LaTeX commands.
Some layout elements cannot be edited easily.
The approach LaTeX used is called What You See Is What You Mean; when
writing the document you can’t see the final result. Instead you see the
structure of the document.
In this course you will learn to work with TeXworks. However, everything
you learn about LaTeX itself is independent of your LaTeX editor.
A simple editor which is included in the LaTeX distributions MikTeX
and TeX Live.
An online editor where you can collaborate with others. It is
convenient to use this on computers where LaTeX isn’t installed.
Nowadays lots of students use ShareLaTeX, but to learn LaTeX we start using TeXworks.
Afterwards students are free to use ShareLaTeX.
In the first exercise we will assume that you use TeXworks. To install
this, see Installing LaTeX.
Open ‘TeXworks’ on your computer.
Paste the following code in an empty document and save it as
‘helloworld.tex’. The extension of a TeX file always is ‘.tex’.
Select ‘pdfLaTeX’ in the menu to the right of the green button and
press the green button afterwards. We call this typesetting. LaTeX
turns your code into a PDF document which you will see in a new window.
Useful: Select ‘Format -> Syntax Coloring -> LaTeX’ to colour
Useful: To jump from the code to the output in TeXworks you can
right-click and choose ‘Jump to PDF’. In the same way it is possible
to switch from the pdf to the code.
On your computer create a folder LaTeX (a subfolder of the computeralgebra/latex-folder)
Place the example file created above in this folder.
Do the same with all the LaTeX-files you will use in this course.