@slide(layout=chapter-slide) @title Graphics @slide(layout=content-only) @title Including graphics 🖼️ @content To display graphics, we need the `graphicx` package. ``` {.lang-tex .hljs} \begin{figure} \includegraphics{} \caption[] {} \end{figure} ``` Specifying the size: ``` {.lang-tex .hljs} \includegraphics[width=0.5\textwidth, height=5cm]{} ``` @slide(layout=content-only) @title Layout on the page @content ``` {.lang-tex .hljs} \begin{figure}[] ``` LaTeX places graphics automatically. With position codes, we can express our preferences (they can be combined as well).
code position
h here, if you don’t mind
t top of the page
b bottom of the page
p on its own page
H Here, for God’s sake!
(`float` package required)
@slide(layout=content-only) @title Centred alignment @content ``` {.lang-tex .hljs} \begin{figure}[] \begin{center} \includegraphics{} \end{center} \end{figure} ``` Alternatively: ``` {.lang-tex .hljs} \begin{figure}[] \centering \includegraphics{} \end{figure} ``` @slide(layout=task) @task-number 10 @title Inserting graphics @content * Include the file `bilder.tex`. * Section 5 contains a small **image.** Use this image and embed it once more increased to a larger size (width: `\textwidth`) at the end of the section.