Minor changes for coherence reasons

This commit is contained in:
Knoch 2019-05-09 21:15:31 +02:00
parent 200e5d1f86
commit 113cee8115
2 changed files with 27 additions and 27 deletions

View File

@ -1,6 +1,6 @@
<div class="layout-content-only">
<div class="layout-content">
<h1><span class="emoji">🖥️</span><br/>Quelltext-Listings</h1>
<h1>Quelltext-Listings</h1>
</div>
</div>
@ -8,16 +8,16 @@
<div class="layout-content-and-preview">
<div class="layout-content">
<h2>Installation</h2>
<p>
Mit dem Paket <code>minted</code> lässt sich Quelltext gut darstellen. Dafür wird die Programmiersprache Python benötigt.
</p>
<p>
Nach der <a href="https://www.python.org/">Installation von Python</a> kann das zugehörige Paket <a href="http://pygments.org/"><code>Pygments</code></a> in der Eingabeaufforderung installiert werden durch:
</p>
<pre class="lang-bash hljs"><code>pip install Pygments</code></pre>
<p>Anschließend muss das LaTeX-Paket nur noch eingebunden werden:</p>
<pre class="lang-tex hljs"><code>\usepackage{minted}</code></pre>
<h2>Installation <span class="emoji">🖥️</span></h2>
<p>
Mit dem Paket <code>minted</code> lässt sich Quelltext gut darstellen. Dafür wird die Programmiersprache Python benötigt.
</p>
<p>
Nach der <a href="https://www.python.org/">Installation von Python</a> kann das zugehörige Paket <a href="http://pygments.org/"><code>Pygments</code></a> in der Eingabeaufforderung installiert werden durch:
</p>
<pre class="lang-bash hljs"><code>pip install Pygments</code></pre>
<p>Anschließend muss das LaTeX-Paket nur noch eingebunden werden:</p>
<pre class="lang-tex hljs"><code>\usepackage{minted}</code></pre>
</div>
<div class="layout-preview">
<img src="sections/german/10/minted-overview-crop.svg" style="padding: 2rem;">
@ -39,7 +39,7 @@
bei <code>PdfLaTeX</code> vor <code>%.tex</code> ergänzt werden:
</p>
<p>
<code style="hyphens: auto; font-size:85%;">pdflatex -syntex=1 -interaction=nonstopmode <b>--shell-escape</b> %.tex</code></pre>
<code style="font-size:85%;">pdflatex -syntex=1 -interaction=nonstopmode <b>--shell-escape</b> %.tex</code></pre>
</p>
</div>
</div>
@ -51,7 +51,7 @@
<h2>Code im LaTeX-Quelltext</h2>
<p class="fragment">In einer eigenen Umgebung:</p>
<pre class="lang-tex hljs fragment"><code>\section\*{Haskell-Magie}
Quadrate aller geraden Zahlen zwischen 1 und 200:
Quadrate aller geraden % …
\begin{minted}{haskell}
[x^2 | x <- [1..200], even x]
\end{minted}</code></pre>
@ -69,19 +69,19 @@ Eine Überschrift wird so ausgezeichnet:
<div class="layout-content-and-preview">
<div class="layout-content">
<h2>Code aus externen Dateien</h2>
<p>Um Redundanz zu vermeiden, ist es manchmal praktisch, den Quelltext direkt aus der Quelldatei einzulesen.</p>
<pre class="lang-tex hljs"><code>\section\*{Einfache Java-Anwendung}
\inputminted{java}{Test.java}</code></pre>
<pre class="lang-java hljs" data-sourcefile="Test.java"><code>public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}</code></pre>
</div>
<div class="layout-preview">
<img src="sections/german/10/minted-java-crop.svg">
</div>
<h2>Code aus externen Dateien</h2>
<p>Um Redundanz zu vermeiden, ist es manchmal praktisch, den Quelltext direkt aus der Quelldatei einzulesen.</p>
<pre class="lang-tex hljs"><code>\section\*{Einfache Java-Anwendung}
\inputminted{java}{Test.java}</code></pre>
<pre class="lang-java hljs" data-sourcefile="Test.java"><code>public class HelloWorld {
public static void main(/\*…\*/) {
System.out.println("Hello, World!");
}
}</code></pre>
</div>
<div class="layout-preview">
<img src="sections/german/10/minted-java-crop.svg">
</div>
</div>
---

View File

@ -25,7 +25,7 @@ texcl=false,
]{html}
<div class="layout-content-and-preview">
<div class="layout-content">
<h2>Installation</h2>
<h2>Installation <span class="emoji">🖥️</span></h2>
<p>
Mit dem Paket <code>minted</code> lässt sich Quelltext gut darstellen. Dafür wird die Programmiersprache Python benötigt.
</p>