Add minted example

This commit is contained in:
Sauer 2019-05-06 14:50:23 +02:00
parent c98f3a272c
commit 2283ada9c5
2 changed files with 31 additions and 3 deletions

View File

@ -1 +1,31 @@
TODO: Listings
TODO: Listings
---
<div class="layout-content-and-preview">
<div class="layout-content">
<h2>Codeblöcke mit Syntaxhighlighting</h2>
<p>Paket <code>minted</code></p>
<p>Voraussetzungen: das Python-Paket <code>Pygments</code></p>
<p>--shell-escape Flag hinzufügen (TeXstudio: Options > Configure TeXstudio > Commands "pdflatex -syntex=1 -interaction=nonstopmode %.tex" in "pdflatex -syntex=1 -interaction=nonstopmode --shell-escape %.tex" ändern)</p>
<pre class="lang-tex hljs">
<code>
\begin{minted}{java}
public class Duck {
public static void main(String[] args) {
System.out.println("Hallo,Welt!");
}
}
\end{minted}
\begin{minted}{python}
def printHello:
print("Hallo, Welt!")
\end{minted}
</code>
</pre>
</div>
<div class="preview-layout">
<img src="sections/german/10/minted.png">
</div>

View File

@ -9,12 +9,10 @@
Weitere Umgebungen
* Abstracts (für Paper)
* Algorithmen
* Blockquotes
* Chemische Strukturformeln
* Konstituentenbäume
* Abhängigkeitsbäume
* Indizes
---