add section on switching listings mode
This commit is contained in:
parent
56db9b28d7
commit
bf2194d534
@ -13,3 +13,11 @@ There are very helpful resources\footnote{If you would like to specify your own
|
||||
|
||||
\input{./content/source-code-listings-minted}
|
||||
\input{./content/source-code-listings-listings}
|
||||
|
||||
\section{Source code listings within this script}
|
||||
|
||||
This script uses the package \pkg{listings} as default way for displaying source code listings, since, as mentioned above, it causes less installation overhead and headache, especially on macOS. As we introduced \pkg{minted} as an alternative package, naturally, this script can also display source code listings rendered by \pkg{minted}. If you want to experience more appealing source code renderings, you can change the listings mode to \pkg{minted} like so: First of all, follow the respective installation instructions. Afterwards, create a new file, called \file{listings-mode.tex}, in the root directory of this project, and insert the following command into the newly created file:
|
||||
|
||||
\codeblock{latex}{./listings/source-code-listings/change-listings-mode.tex}
|
||||
|
||||
After compiling the script, you should see differently rendered source code listings. If you want to return to \pkg{listings} as package for rendering your source code listings, just replace \sh{minted} with \sh{default} in the \file{listings-mode.tex} file. Source code listings within this script are then displayed using the \pkg{listings} package again.
|
||||
1
listings/source-code-listings/change-listings-mode.tex
Normal file
1
listings/source-code-listings/change-listings-mode.tex
Normal file
@ -0,0 +1 @@
|
||||
\newcommand\listingsmode{minted}
|
||||
Loading…
x
Reference in New Issue
Block a user