Reviewed sections 10–11.
This commit is contained in:
parent
0e22caed01
commit
6f7554f748
@ -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}.
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user