143 lines
3.1 KiB
Markdown
143 lines
3.1 KiB
Markdown
@slide(layout=chapter-slide)
|
|
|
|
@number
|
|
2
|
|
|
|
@title
|
|
How does <br/>L<sup style="font-weight: bold; font-size: 73%; margin-left: -.25em; margin-right: -.05em; position: relative; top: .2em">A</sup>T<sub style="font-size: 100%; margin-left: -.1em">E</sub>X work?
|
|
|
|
|
|
@slide(layout=content-and-preview)
|
|
|
|
@title
|
|
WYSIWhat?
|
|
|
|
@content
|
|
### What You See Is What You Get {data-category=Word}
|
|
|
|
* Formatting with immediate visual feedback
|
|
|
|
<div class="fragment">
|
|
### What You See Is What You Mean {data-category=LaTeX}
|
|
|
|
* Separation of content and structure
|
|
* Formatting only visible afterwards
|
|
</div>
|
|
|
|
<p style="margin-top:calc(.25 * var(--square));">
|
|
Image source: <a href="https://xkcd.com/1341/">xkcd</a>
|
|
</p>
|
|
|
|
@preview
|
|

|
|
|
|
|
|
@slide(layout=preview-only)
|
|
|
|
@preview
|
|
{}
|
|
|
|
|
|
@slide(layout=two-columns)
|
|
|
|
@title
|
|
What do we need?
|
|
|
|
@column-one
|
|
### Editor
|
|
writing our source code including all the commands that structure the text semantically
|
|
|
|
[TeXstudio](http://www.texstudio.org/), [TeXMaker](https://www.xm1math.net/texmaker/)
|
|
|
|
@column-two
|
|
### Compiler
|
|
takes the source code and creates a PDF document ready for publication
|
|
|
|
[MiKTeX](http://miktex.org/), [MacTeX](http://tug.org/mactex/), [TeX Live](https://tug.org/texlive/)
|
|
|
|
|
|
@slide(layout=wide-content)
|
|
|
|
@title
|
|
Commands
|
|
|
|
@content
|
|
General structure of a command:
|
|
|
|
``` {.lang-tex .tex .hljs}
|
|
\<command>[<optional_parameters>]{<obligatory_parameters>}
|
|
```
|
|
|
|
++ A few examples:
|
|
|
|
``` {.lang-tex .tex .hljs .fragment}
|
|
\newpage % inserts a new page
|
|
\textbf{<text>} % formats the text bold
|
|
\usepackage[utf8]{inputenc} % configures the character encoding
|
|
\frac{<numerator>}{<denominator>} % inserts a mathematical fraction
|
|
```
|
|
|
|
|
|
@slide(layout=content-only)
|
|
|
|
@title
|
|
Backslash
|
|
|
|
@content
|
|
You get the backslash by pressing
|
|
|
|
<kbd>AltGr</kbd> + <kbd>ß</kbd> (Windows/Linux)
|
|
|
|
<kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> (MacOS)
|
|
|
|
|
|
@slide(layout=wide-content)
|
|
|
|
@title
|
|
Optional parameters
|
|
|
|
@content
|
|
Square brackets may contain different numbers of optional parameters:
|
|
|
|
``` {.lang-tex .hljs}
|
|
\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-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.
|
|
|
|
* MikTeX (Windows): <https://miktex.org/>
|
|
* MacTeX (MacOS): <http://tug.org/mactex/>
|
|
* TeX Live (Linux/all OS): <https://tug.org/texlive/>
|
|
* TeXstudio: <https://www.texstudio.org/>
|
|
|
|
|
|
@slide(layout=task)
|
|
|
|
@task-number
|
|
2
|
|
|
|
@title
|
|
First steps with LaTeX
|
|
|
|
@content
|
|
* If necessary: Install now!
|
|
* Download the project archive from the VC. Unzip the archive.
|
|
* Open the file `main.tex` in TeXstudio. It is located in the root directory of the archive.
|
|
* Compile `main.tex` by pressing <span class="emoji">⏩</span>.
|
|
* What happened to the folder that contains the file?
|
|
|