2023-11-18 01:26:09 +01:00

215 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@slide(layout=chapter-slide)
@number
14
@title
Paket in Sicht!
@slide(layout=content-and-preview)
@title
Stichwortverzeichnis anlegen
@content
```{.lang-tex .hljs}
\usepackage{makeidx}
\makeindex
\begin{document}
\maketitle
\section{Was ist LaTeX\index{LaTeX}?}
LaTeX\index{LaTeX} ist ein
Textsatzsystem\index{Textsatzsystem}.
\newpage \section{TeX\index{TeX} vs.
LaTeX\index{LaTeX}} Es basiert auf
TeX\index{TeX}, einer Erfindung von
Donald Knuth\index{Knuth, Donald}.
Da TeX\index{TeX} in seiner Syntax sehr
viel komplexer als LaTeX\index{LaTeX}
ist, ist LaTeX\index{LaTeX} wesentlich
weiter verbreitet.
\printindex
```
@preview
![](svg/chapter-15/index.png)
@slide(layout=content-and-preview)
@title
Präsentationen gestalten
@content
Für Präsentationen gibt es die Dokumentenklasse `beamer` sowie zahlreiche [Vorlagen und Themes](https://www.overleaf.com/learn/latex/Beamer).
```{.lang-tex .hljs .small-text}
\documentclass{beamer}
\usetheme{Frankfurt}
\usecolortheme{seahorse}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{frame}
\frametitle{Zitronensorbet}
\framesubtitle{Inkarnation des Guten?}
\begin{definition}
Ein Zitronensorbet ist eine
halbgefrorene \textbf{Speiseeiscreme}
auf Basis von \textit{Zitronen}.
\end{definition}
\end{frame}
\end{document}
```
@preview
<img src="svg/chapter-15/beamer-orig.svg" style="width: 100%; margin: 0;"/>
@slide(layout=content-and-preview)
@title
Grafiken erstellen
@content
`TikZ` (»TikZ ist kein Zeichenprogramm«) ist ein umfangreiches Paket zur Erstellung von Vektorgrafiken.
```{.lang-tex .hljs .small-text .scroll-one-half}
% …
\tikzstyle{every node}=[draw=black,thick,anchor=west]
\tikzstyle{selected}=[draw=red,fill=red!30]
\tikzstyle{dir}=[fill=gray!50]
\tikzstyle{relativeTo}=[fill=blue!70]
\begin{tikzpicture}[%
grow via
three points={one child at (0.5,-0.7) and
two children at
(0.5,-0.7) and (0.5,-1.4)},
edge from
parent path={(\tikzparentnode.south)
|- (\tikzchildnode.west)}]
\node {/ oder C:}
child { node {home}
child { node {knut}
child { node {pictures}}
child { node {docs}
child { node [dir] {latex}
child { node [relativeTo] {main.tex}
child { node [selected] {part1.tex}
}
}
}
};
\end{tikzpicture}
```
@preview
![](svg/chapter-04/relative-path-crop.svg)
@slide(layout=content-and-preview)
@title
Linguistik
@content
Mit dem Paket `qtree` lassen sich Konstituentenbäume erstellen:
```{.lang-tex .hljs}
\Tree [.S [.NP LaTeX ]
[.VP [.V is ] [.NP fun ] ] ]
```
@preview
![](svg/chapter-15/constituency-tree-crop.svg)
@slide(layout=content-and-preview)
@title
Mathematische Beweisführung
@content
Beweisbäume lassen sich mit dem Paket `prftree` einwandfrei darstellen.
```{.hljs .lang-tex .small-text .scroll-one-half}
\begin{displaymath}
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[comp$\_{ns}$]}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{m:=a}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,\bot}
}
}
{
\prftree[l,r]{}{[ass$\_{ns}$]}
{
-
}
{
(\texttt{n:=b}, \sigma\_{48,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
(\texttt{m:=a; n:=b}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{48,18}
}
}
{
\prftree[l,r]{}{}
{
\dots
}
{
\textbf{[1]}\ (\texttt{LOOP}, \sigma\_{48,18})
\rightarrow \sigma\_{6,6}
}
}
{
(\texttt{m:=a; n:=b; LOOP}, \sigma\_{\bot,\bot})
\rightarrow \sigma\_{6,6}
}
\end{displaymath}
```
@preview
<img class="thin-padding" src="svg/chapter-15/prftree-crop.svg"/>
@slide(layout=content-only)
@title
Weitere nützliche Pakete
@content
<table>
<tr>
<th>Paket</th>
<th>Anwendung</th>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/xcolor"><code>xcolor</code></a></td>
<td>Machs mit Farbe</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/todonotes"><code>todonotes</code></a></td>
<td>ToDo-Markierungen und Liste der ToDos</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/pdfpages"><code>pdfpages</code></a></td>
<td>Einbinden von PDF-Dateien</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/subcaption"><code>subcaption</code></a></td>
<td>Verschachtelte Abbildungen und ausgefeilte Bildunterschriften</td>
</tr>
<tr class="fragment">
<td><a href="https://www.ctan.org/pkg/colortbl"><code>colortbl</code></a>, <a href="https://www.ctan.org/pkg/tabularx"><code>tabularx</code></a>, <a href="https://www.ctan.org/pkg/multirow"><code>multirow</code></a>, <a href="https://www.ctan.org/pkg/makecell"><code>makecell</code></a></td>
<td>Gestalten von Tabellen</td>
</tr>
</table>