Skip to main content

Learning Latex

Recommended Week

Year 1 : All Weeks

Originator

Dan Page

Aim

To learn prepapre documents in Latex (learning this early will help students produce any written work, particularly if it has any maths in it).

Task

In order to learn Latex, you need to have something to typeset. Please decide on something yourself, maybe this is a CV or a bit of maths courswork or a letter ... whatever you want as long as it is a bit of a challenge. Everyone should come for the tutorial with at least some sort of effort at producting a couple of pages of LaTeX generated document.

This might therefore be a bit of a short tutorial unless you have a good go at something and turn up with some questions about things you couldn't get to work or the best way to achieve something. Please try and save up these questions and we can work together at how to solve them ... LaTeX is another one of those languages where there isn't often a single, best way to do things !

There are a couple of okayish online tutorials at:

In short, you need to fire up an editor and edit a file, lets call is test.tex. The most basic document looks something like this:

\documentclass[a4paper,12pt]{article}
\begin{document}

this is a test document, fill in stuff here.

\end{document}

so type that in and save the file. Next, run the command:

latex test

to compile the document, you should see something like:

[page@brainiac tmp:289]$ latex test
This is TeX, Version 3.14159 (Web2C 7.3.1)
(test.tex
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, i
talian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo))
No file test.aux.
[1] (test.aux) )
Output written on test.dvi (1 page, 264 bytes).
Transcript written on test.log.

this has produced a dvi file which you can view with the command

xdvi test.dvi

or convert to postscript via:

dvips -o test.ps test.dvi

and view using ggv.

See also

Raphael Clifford suggested that learning Latex can be combined with learning presentation skills, see here. The students can be also asked to install Linux and Latex on their laptops.

Nigel Smart made available some materials for learning Latex in his directory: /home/staff/nigel/linux/teaching/LaTeX