latex-wochenende/slides/packages.en.md

4.5 KiB
Raw Blame History

@slide(layout=chapter-slide)

@number 13

@title Package in sight!

@slide(layout=content-and-preview)

@title Creating an index

@content

\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

@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.

\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

@slide(layout=content-and-preview)

@title Drawing images

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

% …
\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

@slide(layout=content-and-preview)

@title Linguistics

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

\Tree [.S [.NP LaTeX ]
[.VP [.V is ] [.NP fun ] ] ]

@preview

@slide(layout=content-and-preview)

@title Mathematical proofs

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

\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

@slide(layout=content-only)

@title Other useful packages

@content

Package Use case
xcolor colours
todonotes todo annotations and index
pdfpages embedding PDF files
subcaption Nested figures and fine-tuned captions
colortbl, tabularx, multirow, makecell Table tuning