LaTeX: Setting up the page
This page was translated from German with AI. It has not been checked by a native speaker. Original page in German
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.
Contents of the video
- 0:00 What it is about
- 0:22 Starting point
- 0:53 Document class
- 1:16 Page margins
- 1:32 Font
- 2:04 Line spacing and justified text
- 2:22 Result
- 2:36 Other compilers
- 3:00 Summary
The most important points
The preamble
\documentclass[a4paper,12pt]{scrartcl} · \usepackage[ngerman]{babel} · \usepackage[margin=2.5cm]{geometry} · \usepackage[T1]{fontenc} · \usepackage{lmodern} · \usepackage{tgtermes} · \usepackage[onehalfspacing]{setspace}. Your teacher's requirement comes first – usually you only change one number.
lmodern provides a complete font family (it supplies e.g. the headings, sharp in print too), tgtermes the text font Termes. LaTeX does justified text and hyphenation by itself. More margin on the left: [margin=2.5cm,left=3cm].
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)
Show the worksheet solutions
Try it yourself
Task
Your school requires 3 cm margin on the left, otherwise 2.5 cm, and font size 11 pt. Which two lines of the preamble do you change, and how?
Show solution
\documentclass[a4paper,11pt]{scrartcl} and \usepackage[margin=2.5cm,left=3cm]{geometry}.
Keep learning with a language model
My school specifies for the Facharbeit: [enter requirements, e.g. margins, font, line spacing]. Here is my LaTeX preamble: [insert preamble]. Check whether it meets the requirements and explain to me every necessary change instead of just giving me the finished preamble.
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.