Chair of Computer Graphics and Visualization

Getting Started with LaTeX

A short guide for DSA students

Why LaTeX?

LaTeX is a document preparation system for high-quality typesetting and scientific documents. It is free and open source, and it is used widely in mathematics, computer science, and many other academic fields.

For our course, LaTeX is useful because it handles formulas, tables, references, and structured documents very well. It also works across Windows, macOS, and Linux, so the same source file can usually be used everywhere with only minor changes.

If you continue in computer science, you will very likely encounter LaTeX again in lecture notes, seminar papers, theses, and research projects. Learning the basics now is therefore a good investment, even if you only use a small subset at first.

The Simplest Workflow

  1. Download the provided answers.tex template from the assignment page.
  2. Open it in a LaTeX editor.
  3. Write your answers in the prepared sections.
  4. Compile the file to create a PDF.
  5. Upload the PDF to Moodle.

If you prefer, you can also submit plain text files instead of LaTeX documents. LaTeX is recommended, not required.

Windows

Recommended installation: MiKTeX. The official MiKTeX guide recommends the Basic MiKTeX Installer for a standard TeX/LaTeX setup.

  1. Open the MiKTeX installation guide.
  2. Download the Basic MiKTeX Installer from the official download page.
  3. Run the installer.
  4. Choose a private per-user installation unless you specifically need a system-wide setup.
  5. Leave automatic package installation enabled, ideally with Ask me first or Always.
  6. After installation, open TeXworks or another editor and compile your .tex file.

Useful official links: Install MiKTeX on Windows, MiKTeX prerequisites.

macOS

Recommended installation: MacTeX. MacTeX installs the full TeX Live distribution and is configured specifically for macOS.

  1. Open the official MacTeX page.
  2. Download MacTeX.
  3. Run the installer package.
  4. Open TeXShop from /Applications/TeX.
  5. Load your answers.tex file and compile it to PDF.

If you want a smaller installation first, the MacTeX page also offers BasicTeX. For most students, however, the full MacTeX installation is the easiest option because course examples are more likely to work immediately.

Useful official links: MacTeX, TeX Live quick install.

Linux

Recommended installation: TeX Live. For a consistent LaTeX environment across systems, the official TeX Live quick-install guide is the safest reference.

  1. Open the TeX Live quick-install guide.
  2. Download the Unix installer archive.
  3. Extract it and run perl ./install-tl or the non-interactive installation command from the guide.
  4. Add the TeX Live binary directory to your PATH if needed.
  5. Compile your file with an editor or directly in the terminal.

Example command-line compilation:

pdflatex answers.tex

After installation, test your setup with a small document. The TeX Live guide also explains how to adjust your PATH and where the binaries are installed.

How to Compile a File

If you already have a LaTeX installation, the basic workflow is always the same.

pdflatex answers.tex

This creates a PDF file, usually named answers.pdf. For the provided answer templates, one compilation run is usually enough.

If you use a graphical editor such as TeXworks or TeXShop, you usually only need to open the file and click Typeset, Build, or Compile.

Optional: Overleaf

If you do not want to install anything immediately, you can also use Overleaf. Overleaf automatically compiles LaTeX projects in the browser, so there is nothing to install locally.

This is a good option for beginners who want to get started quickly. Later, you can still move to a local installation if you prefer.

Good Learning Resources

A Good Way to Start

If this is your first contact with LaTeX, a practical path is:

  1. Start from one of the provided answers.tex templates.
  2. Change only the text in the prepared sections.
  3. Compile the template and make sure the PDF appears.
  4. Only then begin adding tables, formulas, or your own formatting.

You do not need to learn all of LaTeX at once. For this course, a very small subset is already enough.