@slide(layout=chapter-slide)

@number
14

@title
Package in sight!

@slide(layout=content-and-preview)

@title
Creating an index

@content
```{.lang-tex .hljs}
\usepackage{makeidx}
\makeindex
\begin{document}
\maketitle
\section{What is LaTeX\index{LaTeX}?}
LaTeX\index{LaTeX} is a typesetting
system\index{Typesetting system}.
\newpage \section{TeX\index{TeX} vs.
LaTeX\index{LaTeX}} It is based on
TeX\index{TeX}, an invention by 
Donald Knuth\index{Knuth, Donald}.
As TeX\index{TeX} is way more complex
syntactically than LaTeX\index{LaTeX},
LaTeX\index{LaTeX} is much more 
popular.
\printindex
```

@preview
![](svg/chapter-15/index_en-crop.svg)

@slide(layout=content-and-preview)

@title
Designing presentation slides

@content
For slides, there is the `beamer` document class, as well as numerous [templates and 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{Lemon sorbet}
	\framesubtitle{Incarnation of good?}
	\begin{definition}
		A lemon sorbet is a
		semi-frozen \textbf{dessert}
		on \textit{lemon} base.
	\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
Drawing images

@content
`TikZ` (“TikZ ist kein Zeichenprogramm”&thinsp;—&thinsp;“TikZ is no drawing software”) is a powerful package for drawing vector graphics.

```{.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 {/ or 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
Linguistics

@content
The `qtree` package can render constituent-based parse trees:

```{.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
Mathematical proofs

@content
Logical tableaux can be renderd using the `prftree` package.

```{.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
Other useful packages

@content
<table>
  <tr>
    <th>Package</th>
    <th>Use case</th>
  </tr>
  <tr class="fragment">
    <td><a href="https://www.ctan.org/pkg/xcolor"><code>xcolor</code></a></td>
    <td>colours</td>
  </tr>
  <tr class="fragment">
    <td><a href="https://www.ctan.org/pkg/todonotes"><code>todonotes</code></a></td>
    <td>todo&nbsp;annotations&nbsp;and&nbsp;index</td>
  </tr>
  <tr class="fragment">
    <td><a href="https://www.ctan.org/pkg/pdfpages"><code>pdfpages</code></a></td>
    <td>embedding PDF files</td>
  </tr>
  <tr class="fragment">
    <td><a href="https://www.ctan.org/pkg/subcaption"><code>subcaption</code></a></td>
    <td>Nested figures and fine-tuned captions</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>Table tuning</td>
  </tr>
</table>

