From 6f7554f7487333cb2fa055f8c7bd7a6a9e4e0f63 Mon Sep 17 00:00:00 2001 From: Christian Kremitzl Date: Fri, 10 Sep 2021 13:58:09 +0200 Subject: [PATCH] =?UTF-8?q?Reviewed=20sections=2010=E2=80=9311.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/graphics.tex | 2 +- content/source-code-listings.tex | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/graphics.tex b/content/graphics.tex index 728bbe5..c2d702c 100644 --- a/content/graphics.tex +++ b/content/graphics.tex @@ -24,7 +24,7 @@ In order to be able to reference graphics, the package \texttt{graphicx} has to \section{Positioning} \label{sec:graphics-placement} One interesting aspect of the what-you-get-is-what-you-mean paradigm is the way how graphics can be positioned. -By default, the graphic is placed at the potentially optimal position that is calculated by the compiler. It creates multiple layouts and evaluates them. By moving graphics, typographic blemishes, like widows and orphans\footnote{The first (last) line of a paragraph appears alone as last (first) line on the previous (next) page, cf. \url{https://en.wikipedia.org/wiki/Widows_and_orphans}.}, can be avoided. +By default, the graphic is placed at the potentially optimal position that is calculated by the compiler. \todo{Bezüge etwas unklar. Evtl. Reihenfolge der Sätze überdenken?}It creates multiple layouts and evaluates them. By moving graphics, typographic blemishes, like widows and orphans\footnote{The first (last) line of a paragraph appears alone as last (first) line on the previous (next) page, cf. \url{https://en.wikipedia.org/wiki/Widows_and_orphans}.}, can be avoided. As a consequence, graphics are not necessarily placed between the two text blocks that we specify, but at another position. In order to reference a picture, that possibly is placed on another page, we can use labels, which are covered in \cref{sec:references}. diff --git a/content/source-code-listings.tex b/content/source-code-listings.tex index 2a22c0e..c647409 100644 --- a/content/source-code-listings.tex +++ b/content/source-code-listings.tex @@ -38,7 +38,7 @@ Out of the box, your editor will probably execute the following command after yo $ pdflatex main.tex \end{minted} -\noindent The exact command can be found and configured in \TeX{}studio under \enquote{Options → Configure \TeX{}studio → Commands}. +\noindent The exact command can be found and configured in \TeX{}studio under Options → Configure \TeX{}studio → Commands. It is stated next to the label Pdf\LaTeX{}. The file that is to be compiled will replace the placeholder \mintinline{bash}{%.tex} upon compilation. Additionally, there are typically two additional options configured. @@ -69,9 +69,9 @@ You can define listings using a dedicated environment: \example{lst:minted-variants}{source-code-listings/minted-variants}{Shorthand and inline listing} -\noindent There is also a shorthand and an inline variant of the command (cf. \cref{lst:minted-variants}). +\noindent There is also a shorthand and an inline variant of the command (cf.\ \cref{lst:minted-variants}). To avoid redundancy, it may be practical to import source code directly from the source file. -To accomplish this, we only have to pass the programming language and the file path to the \mintinline{latex}{\inputminted} command (cf. \cref{lst:minted-external}). +To accomplish this, we only have to pass the programming language and the file path to the \mintinline{latex}{\inputminted} command (cf.\ \cref{lst:minted-external}). \example{lst:minted-external}{source-code-listings/minted-import}{Including from a separate file} @@ -80,7 +80,7 @@ To accomplish this, we only have to pass the programming language and the file p \section{Configuring minted} Optional parameters allow us to add line numbers, line breaks, and colors. -Moreover, there are numerous themes available (\cref{lst:minted-external-styled}). +Moreover, there are numerous themes available (\todo{Anscheinend sind crefs nicht wirklich mit english spacing kompatibel. Können wir das abschalten? Gibt eigentlich eh keinen guten Grund dafür.)}\cref{lst:minted-external-styled}). The introduction on Overleaf and the package documentation\footnote{Available at \url{https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted} and \url{https://ctan.kako-dev.de/macros/latex/contrib/minted/minted.pdf}, respectively.} give an extensive overview. \example{lst:minted-external-styled}{source-code-listings/minted-import-styled}{Themes and further options}