2023-04-10 13:27:51 +02:00
|
|
|
\documentclass{elteikthesis}[2023/04/10]
|
2021-08-21 14:14:17 +02:00
|
|
|
|
|
|
|
\usepackage[newfloat]{minted}
|
|
|
|
|
|
|
|
\begin{document}
|
2022-04-30 14:10:26 +02:00
|
|
|
\documentlang{english}
|
2021-08-21 14:14:17 +02:00
|
|
|
|
2022-04-30 14:10:26 +02:00
|
|
|
\chapter{Minted source code example}
|
2021-08-21 14:14:17 +02:00
|
|
|
\label{ch:chapter}
|
|
|
|
|
|
|
|
\begin{listing}[H]
|
|
|
|
\begin{minted}{cpp}
|
|
|
|
#include <stdio>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
int c;
|
|
|
|
std::cout << "Hello World!" << std::endl;
|
|
|
|
|
|
|
|
std::cout << "Press any key to exit." << std::endl;
|
|
|
|
std::cin >> c;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
\end{minted}
|
|
|
|
\caption{Hello World in C++}
|
|
|
|
\end{listing}
|
|
|
|
|
|
|
|
\phantomsection
|
|
|
|
\addcontentsline{toc}{chapter}{\lstcodelabel}
|
|
|
|
\listoflistings
|
|
|
|
|
|
|
|
\end{document}
|