latex-wochenende/slides/chapter-02.en.md

3.4 KiB

@slide(layout=chapter-slide)

@title How does
LATEX work?

@slide(layout=content-and-preview)

@title [TODO: Heading]

@content

What You See Is What You Get

  • Formatting with immediate visual Feedback
### What You See Is What You Mean {data-category=LaTeX}
  • Separation of content and structure
  • Formatting only visible afterwards

Image source: xkcd

@preview

@slide(layout=preview-only)

@preview How to get the final document{}

@slide(layout=two-columns)

@title What do we need?

@column-one

Editor

provides our source code with all the commands that structure the text semantically

TeXstudio, TeXMaker

@column-two

Compiler

takes the source code and creates a PDF document ready for publication

MiKTeX, TeX Live, MacTeX

@slide(layout=wide-content)

@title Commands

@content General structure of a command:

\<command>[<optional_parameters>]{<obligatory_parameters>}

++A few examples:

\newpage % inserts a new page
\textbf{<text>} % formats the text bold
\usepackage[utf8]{inputenc} % configures the character encoding
\frac{<zähler>}{<nenner>} % inserts a mathematical fraction

@slide(layout=content-only)

@title Backslash

@content You get the backslash by pressing

AltGr + ß (Windows/Linux)

Alt + Shift + 7 (MacOS)

@slide(layout=wide-content)

@title Optional parameters

@content Square brackets can contain different numbers of optional parameters:

\usepackage[utf8]{inputenc}
% configures the text encoding

\documentclass[a4paper,12pt]{article}
% configures the document class

\includegraphics[width=12cm,height=4cm]{image.png}
% embeds the image file "image.png"

@slide(layout=content-and-preview)

@title Comments

@content After a percent sign, the rest of the line is ignored by the compiler. It is called a comment and does not appear in the resulting document.

% profile start
Name: Donald Knuth \\
Geburtsdatum: \\ % TODO: insert
Geburtsort: Milwaukee, Wisconsin
% profile end

Shortcuts: Ctrl + T and Ctrl + U

@preview

@slide(layout=content-only)

@title Software installation

@content Please install the compiler first (MikTeX on Windows, MacTeX on MacOS, TeX Live on Linux), followed by the editor. In this workshop, we use TeXstudio.

@slide(layout=task)

@task-number 1

@title First steps with LaTeX

@content

  • ++If necessary: Install now!
  • ++Download the file aufgabe01.tex from the VC and put it into a new folder.
  • ++Open it in TeXstudio.
  • ++Comile it by pressing .
  • ++What happened to the folder that contains the file?