Add minted example
This commit is contained in:
parent
c98f3a272c
commit
2283ada9c5
@ -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>
|
||||
|
||||
|
||||
@ -9,12 +9,10 @@
|
||||
Weitere Umgebungen
|
||||
|
||||
* Abstracts (für Paper)
|
||||
* Algorithmen
|
||||
* Blockquotes
|
||||
* Chemische Strukturformeln
|
||||
* Konstituentenbäume
|
||||
* Abhängigkeitsbäume
|
||||
* Indizes
|
||||
|
||||
---
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user