Learning Material on Data Science


Introduction to LaTeX

by Markus Mößler


What is LaTeX?


LaTeX


Basics

LaTeX is a software system or a TeX-macro-package (see later) for document preparation originally authored by Leslie Lamport and released in 1984.

LaTeX is based on plain text as opposed to formatted text in “What You See Is What You Get” (WYSIWYG style) word processors such as Microsoft Word, LibreOffice or Writer.

Thus, LaTeX is based on the separation of content and formatting.

The idea is when you write your document, you can concentrate on the content without worrying about the formatting. This can be done later.


Advantages

  • Professional formatting, i.e., figures, tables etc. are positioned with typesetting sense.
  • Easy entry and neat appearance of mathematical expressions.
  • Elegant handling of citations via BibTeX (see later).
  • LaTeX documents can be easily scaled from a one-page letter to a 200 page book.
  • Comments can be used for the writing process which do not appear in the final document.
  • LaTeX is for free!

Back to Start of LaTex


TeX


Basics

TeX is a typesetting system which was designed and written by Donald Knuth and first released in 1978. It is the “core” for other systems, e.g., LaTeX, to solve different typesetting tasks.

TeX is a free software, and thus, accessible to a wide range of users.

A TeX-document is saved with the file extension .tex.


Goals

TeX was designed with two main goals:

  1. To allow anybody to produce high-quality books with minimal effort
  2. To provide a system that would give exactly the same results on any computer any time.

Back to Start of LaTex


TeX-distribution


Basics

TeX is usually provided in the form of an easy-to-install “bundle” consisting of TeX and all other necessary fonts, document formats, and utilities needed to use the typesetting system.

This “bundle” is called TeX-distribution.


Available TeX-distributions

TeX-distributions available for free are:

Download and installation of MikTeX will be explained under: Installations to use LaTeX.


Back to Start of LaTex


TeX-editor


Basics

In general, it is possible to generate LaTeX documents without a TeX-editor.

E.g., one can use a simple text editor, e.g., Windows Notepad on Windows and an command line interface, e.g., command prompt on Windows.

However, special TeX-editor make the process of generating documents a lot easier.


Available TeX-editors

TeX-editors available for free are:

Download and installation of TeXstudio will be explained under: Installations to use LaTeX.


Back to Start of LaTex


TeX-compiler


Basics

The program or the .exe-file which generates your final document from your .tex-file, e.g., a .pdf-file, is also called TeX-compiler.

A compiler specialized on creating .pdf-files is the pdfLaTeX-compiler.

For additional features, new TeX-compiler were developed, e.g., the XeLaTex-compiler.

To include bibliographies a special compiler, called BibTeX-compiler, is available (see later).

Most of these additional compiler are either part of the TeX-distribution or are downloaded automatically after being invoked.

Approach to invoke additional compiler:

  • TeXstudio: “Tools”“Commands”
  • Overleaf: See (also for additional information on compiler)

Available Compiler

Common used TeX-compiler available for free are:

  • BibTeX for bibliographies
  • pdfLaTeX, a TeX-compiler to produce .pdf files directly.
  • XeTeX, a TeX-compiler that supports Unicode and OpenType.
  • LuaTeX, a TeX-compiler with additional extensions.

TeX extensions are available for free from the Comprehensive TeX Archive Network (CTAN).


Back to Start of LaTex


Help


Help can be found here:

or, in general, via Google, or, ChatGPT if you don’t mind!


Back to Start of LaTex