From 2e400611719e4572d69abc8d0a517441ee154e02 Mon Sep 17 00:00:00 2001 From: Christian Kremitzl Date: Thu, 26 Mar 2020 19:54:10 +0100 Subject: [PATCH] onpoint conversion and english translation for chapter 11. --- sections/german/11/11.md | 88 ------------------------------- slides.yml | 2 + slides/chapter-02.de.md | 5 +- slides/chapter-02.en.md | 5 +- slides/chapter-10.de.md | 9 ++-- slides/chapter-10.en.md | 9 ++-- slides/chapter-11.de.md | 108 +++++++++++++++++++++++++++++++++++++++ slides/chapter-11.en.md | 108 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 238 insertions(+), 96 deletions(-) delete mode 100644 sections/german/11/11.md create mode 100644 slides/chapter-11.de.md create mode 100644 slides/chapter-11.en.md diff --git a/sections/german/11/11.md b/sections/german/11/11.md deleted file mode 100644 index 571d8e5..0000000 --- a/sections/german/11/11.md +++ /dev/null @@ -1,88 +0,0 @@ -
-
-

Grafiken

-
-
- ---- - -
-
-

Grafiken abbilden 🖼️

-

Um Grafiken darzustellen, muss das Paket graphicx eingebunden werden.

-
\begin{figure}
-    \includegraphics{<dateipfad>}
-    \caption[<kurztitel>]
-            {<bildunterschrift>}
-\end{figure}
-

Bildgröße angeben:

-
\includegraphics[width=0.5\textwidth,
-height=5cm]{<dateipfad>}
-
-
- ---- - -
-
-

Positionierung auf der Seite

-
\begin{figure}[<positionskürzel>]
-

LaTeX positioniert Grafiken automatisch. Durch Kürzel können wir unsere Präferenzen (auch in Kombination) angeben.

- - - - - - - - - - - - - - - - - - - - - - - - - -
KürzelPosition
h(bitte) hier
toberer Seitenrand
bunterer Seitenrand
pauf einer eigenen Seite
H(definitiv) hier (benötigt Paket float)
-
-
- ---- - -
-
-

Zentrierte Anordnung

-
\begin{figure}[<position>]
-    \begin{center}
-        \includegraphics{<dateipfad>}
-    \end{center}
-\end{figure}
-

Alternativ:

-
\begin{figure}[<position>]
-    \centering
-    \includegraphics{<dateipfad>}
-\end{figure}
-
-
- ---- - -
-
-

Grafiken einfügen

-
    -
  • Bindet die Datei bilder.tex ein.
  • -
  • Abschnitt 5 enthält ein kleines **Bild.** Setzt dasselbe Bild nochmal größer (Breite: `\textwidth`) ans Ende des Abschnitts.
  • -
-
-
diff --git a/slides.yml b/slides.yml index d59e812..b6a4146 100644 --- a/slides.yml +++ b/slides.yml @@ -9,3 +9,5 @@ - chapter-08 - chapter-09 - chapter-10 +- chapter-11 + diff --git a/slides/chapter-02.de.md b/slides/chapter-02.de.md index 2fd4ca8..225d2c9 100644 --- a/slides/chapter-02.de.md +++ b/slides/chapter-02.de.md @@ -6,8 +6,11 @@ Wie funktioniert L -In TeXstudio muss diese unter **`Optionen > TeXstudio konfigurieren > Befehle`** bei PdfLaTeX vor `%.tex` ergänzt werden: +In TeXstudio muss diese unter **`Optionen → TeXstudio konfigurieren → Befehle`** bei PdfLaTeX vor `%.tex` ergänzt werden: - pdflatex -syntex=1 -interaction=nonstopmode **--shell-escape** %.tex +pdflatex -syntex=1 -interaction=nonstopmode **\-\-shell-escape** %.tex @slide(layout=content-and-preview) @@ -124,4 +127,4 @@ Quelltext einbinden * ++ Bindet zunächst das **Paket `minted`** an der richtigen Stelle ein. * ++ Nutzt die **`minted`-Umgebung**, um das erste Listing mit Syntax Highlighting zu versehen. * ++ Lagert das zweite Listing in eine **neue Datei** aus und bindet sie mit `\inputminted` ein. -* ++ Ändert das **Farbschema** zu `borland`. \ No newline at end of file +* ++ Ändert das **Farbschema** zu `borland`. diff --git a/slides/chapter-10.en.md b/slides/chapter-10.en.md index 451ff0b..dd454b1 100644 --- a/slides/chapter-10.en.md +++ b/slides/chapter-10.en.md @@ -23,6 +23,9 @@ Add the LaTeX package and we are good to go: \usepackage{minted} ``` +@todo +Update source code? + @preview ![](svg/chapter-10/minted-overview-english-crop.svg){ .thin-padding } @@ -36,9 +39,9 @@ Compiler settings We need to pass the additional flag `--shell-escape` to our compiler in order to use `minted`. -In TeXstudio, go to **`Options > Configure TeXstudio > Commands`** and add the flag in the PdfLaTeX row before `%.tex`: +In TeXstudio, go to **`Options → Configure TeXstudio → Commands`** and add the flag in the PdfLaTeX row before `%.tex`: - pdflatex -syntex=1 -interaction=nonstopmode **--shell-escape** %.tex +pdflatex -syntex=1 -interaction=nonstopmode **\-\-shell-escape** %.tex @slide(layout=content-and-preview) @@ -124,4 +127,4 @@ Listing source code * ++ Include the **`minted` package** in the right place. * ++ Make use of the **`minted` environment** to activate syntax highlighting for the first listing. * ++ Move the second listing to a **new file** and include it using `\inputminted`. -* ++ Change the **color scheme** to `borland`. \ No newline at end of file +* ++ Change the **color scheme** to `borland`. diff --git a/slides/chapter-11.de.md b/slides/chapter-11.de.md new file mode 100644 index 0000000..48241d6 --- /dev/null +++ b/slides/chapter-11.de.md @@ -0,0 +1,108 @@ +@slide(layout=chapter-slide) + +@title +Grafiken + + +@slide(layout=content-only) + +@title +Grafiken abbilden 🖼️ + +@content +Um Grafiken darzustellen, muss das Paket `graphicx` eingebunden werden. + +``` {.lang-tex .hljs} +\begin{figure} + \includegraphics{} + \caption[] + {} +\end{figure} +``` + +Bildgröße angeben: + +``` {.lang-tex .hljs} +\includegraphics[width=0.5\textwidth, +height=5cm]{} +``` + + +@slide(layout=content-only) + +@title +Positionierung auf der Seite + +@content + +``` {.lang-tex .hljs} +\begin{figure}[] +``` + +LaTeX positioniert Grafiken automatisch. Durch Kürzel können wir unsere Präferenzen (auch in Kombination) angeben. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KürzelPosition
hhier, wenn es dir recht ist
toberer Seitenrand (top)
bunterer Seitenrand (bottom)
pauf einer eigenen Seite (page)
HHier, verdammt noch mal!
(benötigt Paket `float`)
+ + +@slide(layout=content-only) + +@title +Zentrierte Anordnung + +@content +``` {.lang-tex .hljs} +\begin{figure}[] + \begin{center} + \includegraphics{} + \end{center} +\end{figure} +``` + +Alternativ: + +``` {.lang-tex .hljs} +\begin{figure}[] + \centering + \includegraphics{} +\end{figure} +``` + + +@slide(layout=task) + +@task-number +10 + +@title +Grafiken einfügen + +@content +* Bindet die Datei `bilder.tex` ein. +* Abschnitt 5 enthält ein kleines **Bild.** Setzt dasselbe Bild nochmal größer (Breite: `\textwidth`) ans Ende des Abschnitts. + diff --git a/slides/chapter-11.en.md b/slides/chapter-11.en.md new file mode 100644 index 0000000..a5da7a6 --- /dev/null +++ b/slides/chapter-11.en.md @@ -0,0 +1,108 @@ +@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). + + + + + + + + + + + + + + + + + + + + + + + + + + + +
codeposition
hhere, if you don’t mind
ttop of the page
bbottom of the page
pon its own page
HHere, for God’s sake!
(`float` package required)
+ + +@slide(layout=content-only) + +@title +Centered 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 in a larger size (width: `\textwidth`) at the end of the section. +