diff --git a/kapitoly/ipsum.tex b/kapitoly/ipsum.tex index 1c89e3e..3bf7336 100644 --- a/kapitoly/ipsum.tex +++ b/kapitoly/ipsum.tex @@ -1,3 +1,14 @@ \chapter{Ipsum} -... +\begin{listing}[!ht] +\caption{Code example} +\label{lst:example} +\begin{minted}{c} +#include + +int main(void) { + printf("Hello World\n"); + return 0; +} +\end{minted} +\end{listing} diff --git a/makefile b/makefile index 3328327..2d33e8e 100644 --- a/makefile +++ b/makefile @@ -5,15 +5,14 @@ PRACE=prace.tex all: vlna pdf pdf: - latexmk -pdflua $(PRACE) - #latexmk -pdf $(PRACE) + latexmk -quiet -shell-escape -pdflua $(PRACE) clean: - latexmk -c - rm -f pdfa.xmpi prace.bbl prace.run.xml + latexmk -quiet -c + rm -rf pdfa.xmpi prace.bbl prace.run.xml _minted-prace/ cleanall: clean - latexmk -C + latexmk -quiet -C vlna: vlna -l -r *.tex diff --git a/prace.tex b/prace.tex index 5a18aa3..e870f12 100644 --- a/prace.tex +++ b/prace.tex @@ -40,6 +40,17 @@ \setlength{\footnotesep}{0.5cm} \renewcommand{\footnoterule}{\vfill\kern -3pt \hrule width 0.4\columnwidth \kern 2.6pt} +% Source code +\usepackage{minted} +\setminted{ + frame=lines, + framesep=2mm, + baselinestretch=1.2, + fontsize=\footnotesize, + linenos +} +\renewcommand{\listingscaption}{Kód} +\renewcommand\listoflistingscaption{Seznam ukázek zdrojového kódu} \def\Title{Název práce v~čestině} \def\TitleEN{Title of the publication in english} @@ -67,5 +78,6 @@ \newpage \printbibliography +\listoflistings \end{document}