This lesson is being piloted (Beta version)

Introduction to Latex: Glossary

Key Points

What is LaTeX?
  • LaTeX is a document preparation and typesetting system

  • It uses markup language

  • Separates style from contents

  • (Usually) Does a good job of typesetting

  • Outputs to a PDF or Postscript file

Running LaTeX
  • LaTeX is compiled by running the pdflatex command

  • There are lots of editors which include a button to run pdflatex

  • Some editors like Overleaf include a preview of your document

LaTeX Commands
  • LaTeX uses a series of commands all beginning with a \ character

  • Some commands take additional arguments between a { and } character

  • Some commands, known as environments lots of additional content between begin and end commands

Structuring LaTeX Documents
  • LaTeX lets us split up documents into sections, subsections, subsubsections etc.

  • Some document classes allow extra commands like chapters, tables of contents etc.

  • We can label parts of the document with the label command and reference them with the \ref{} command

Styling Documents and Lists
  • We can style text with bold, underline, italic, superscript etc

  • Some characters such as accented characters, £ signs, percent signs need special LaTeX commands to appear.

  • Extra spaces don’t get shown by LaTeX, use the space command if you want extra spaces or newline to get a newline

  • Some extra characters can be added by using some extra packages. The Siunitx is one such package, it provides SI units.

  • We can make numbered lists with the enumerate environment.

  • We can make un-numbered lists with the itemize environment.

Figues and Tables
  • Images are inserted with the figure environment.

  • Tables are created with the tablular environment.

  • Locations can be specified with the [h] option meaning here, of [ht] meaning here, top.

  • Tables and images can have labels to make their referencing easier.

  • Tables and images can have captions.

Mathematical Equations and Computer Code
  • Equations can be entered inline by starting and ending with a $

  • Equations can be placed on their own with the \begin{equation} command

  • There are lots of specialist symbols like greek letters available as their own commands

  • Computer code can be included with the verbatim or listings environments

Bibliographies
  • LaTeX needs bibliography information to be stored in a separate BibTeX database.

  • Each bibtex entry needs a unique key

  • We cite bibtex entries with the \cite{} command

  • We make LaTeX display the bibliography with the \bibliography{} command, this also specifies the name of the bibtex database

  • We can choose the style of the bibliography with the \bibliographystyle{} command. Common ones are unsrt, plain or named

  • Many journals will offer you the option to download the BibTeX for a paper

Common Problems and useful tips
  • Use the hyperref package and url command to handle URLs. Some characters might need escaping.

  • LaTeX has lots of commands for common special characters you might type in on the keyboard.

  • Images often appear in the wrong place, use [ht!], resize the image or move the reference to the image to a different place in the LaTeX code.

  • LaTeX can be hassle especially on smaller documents but really comes into its own on big documents.

Glossary

The glossary would go here, formatted as:

{:auto_ids}
key word 1
:   explanation 1

key word 2
:   explanation 2

({:auto_ids} is needed at the start so that Jekyll will automatically generate a unique ID for each item to allow other pages to hyperlink to specific glossary entries.) This renders as:

key word 1
explanation 1
key word 2
explanation 2