mirror of
https://github.com/Relintai/elteikthesis.git
synced 2024-11-10 07:42:09 +01:00
33 lines
528 B
TeX
33 lines
528 B
TeX
\documentclass{elteikthesis}[2023/04/10]
|
|
|
|
\usepackage[newfloat]{minted}
|
|
|
|
\begin{document}
|
|
\documentlang{english}
|
|
|
|
\chapter{Minted source code example}
|
|
\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} |