46 lines
1.3 KiB
TeX
46 lines
1.3 KiB
TeX
\documentclass[a4paper]{article}
|
|
\usepackage{lmodern}
|
|
\usepackage{amssymb,amsmath}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{hyperref}
|
|
\usepackage{minted}
|
|
\begin{document}
|
|
\thispagestyle{empty}
|
|
|
|
\begin{minted}[
|
|
fontfamily=tt,
|
|
linenos=true,
|
|
numberblanklines=true,
|
|
numbersep=12pt,
|
|
numbersep=5pt,
|
|
gobble=0,
|
|
frame=leftline,
|
|
framerule=0.4pt,
|
|
framesep=2mm,
|
|
funcnamehighlighting=true,
|
|
tabsize=4,
|
|
breaklines=true,
|
|
texcl=false,
|
|
]{html}
|
|
<div class="layout-content-and-preview">
|
|
<div class="layout-content">
|
|
<h2>Installation</h2>
|
|
<p>
|
|
<code>Minted</code>, another LaTeX package, is very useful to display source code. It requires the Python programming language.
|
|
</p>
|
|
<p>
|
|
As soon as <strong><a href="https://www.python.org/">Python is installed</a></strong>, we can download the corresponding Python package <strong><a href="http://pygments.org/"><code>Pygments</code></a></strong> using a command prompt:
|
|
</p>
|
|
<pre class="lang-sh hljs"><code>pip install Pygments</code></pre>
|
|
<p>Add the LaTeX package and we are good to go:</p>
|
|
<pre class="lang-tex hljs"><code>\usepackage{minted}</code></pre>
|
|
</div>
|
|
<div class="layout-preview">
|
|
<img src="svg/chapter-10/minted-overview-crop.svg" class="thin-padding">
|
|
</div>
|
|
</div>
|
|
\end{minted}
|
|
|
|
\end{document}
|