LaTeX: Formulas

This page was translated from German with AI. It has not been checked by a native speaker. Original page in German

TeX was invented for formulas. Variables in the text, displayed formulas with a number and references to them – this is how the formulas in the Facharbeit look like those in a textbook.

The video

In the video you see TeXstudio under Linux. The orange frame always shows the spot in question. Under Windows and macOS TeXstudio looks exactly the same. The practice file above is the state at the start of the video – so you can follow along with each part separately.

Subtitles are available in ten languages. Choose them at the bottom right of the video.

Contents of the video

  1. 0:00 What it is about
  2. 0:16 Formulas as text
  3. 0:35 Formula in the text
  4. 0:55 Displayed formula
  5. 1:30 Referring to a formula
  6. 2:14 The most important commands
  7. 2:36 Help in TeXstudio
  8. 2:45 Units
  9. 3:00 Summary

The most important points

Formulas

Preamble: \usepackage{amsmath}. In the text between dollar signs: $T$. Displayed and numbered: \begin{equation} T = 2\pi\sqrt{\frac{l}{g}}, \label{eq:pendel} \end{equation}. Reference: Gleichung~\eqref{eq:pendel} → “Gleichung (1)”.

Formula (1): centred on a line of its own, the number on the right; the sentence continues afterwards.
Formula (1): centred on a line of its own, the number on the right; the sentence continues afterwards.

The most important commands: a^2 superscript, x_1 subscript, \frac{a}{b} fraction, \sqrt{x} root, \pi, \Delta, \cdot, \approx. Many word processors and GeoGebra understand the same notation. Units with siunitx: \usepackage[locale=DE,per-mode=symbol]{siunitx}, then \qty{9,81}{\metre\per\second\squared}.

The most important commands at a glance.
The most important commands at a glance.
The Math menu in TeXstudio inserts the commands with a click.
The Math menu in TeXstudio inserts the commands with a click.

The worksheet

Here you can see the worksheet for the video (in German). You download the practice files above and work in your own editor. The hints are printed upside down – turn the sheet only when you cannot get on by yourself. You can also open it as a PDF.

📄 Open worksheet (PDF, German)

The worksheet – Page 1
Page 1/3
The worksheet – Page 2
Page 2/3
Show the worksheet solutions
The worksheet – Page 3
Page 3/3

Try it yourself

Task

Set in LaTeX notation: the slope of the line through the origin is 4π²/g, so g = 4π² · l / T² (displayed, with a number).

Show solution

In the text $4\pi^2/g$, displayed \begin{equation} g = \frac{4\pi^2 l}{T^2} \end{equation}.

Keep learning with a language model

Here is a formula from my Facharbeit in words: [formula in words]. Help me write it in LaTeX: tell me the commands I need, and let me put the formula together myself. Then check my attempt.

How this was made: The idea and the choice of topics are mine. A language model (LLM) drafted the script, the sample paper, the tasks and this page following my instructions. The screen recordings were made automatically by a script in TeXstudio under Linux, which checked the finished PDF after every step: are margins, font, numbers and references right, are there warnings? The voice was generated with Qwen3-TTS, modelled on my own voice.

The sample paper about the thread pendulum is invented, and so are the person “Alex Beispiel” and the two sources in the bibliography.

The videos, worksheets, practice files, texts and prompts in this series are licensed under CC BY 4.0: you may use, change and share them if you name the source.