2

MWE:

\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{minted}{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}

enter image description here

Bobyandbob
  • 4,899
  • 2
    as the message says, you need to use pdflatex --shell-escape document not pdflatex document to allow pdftex to call pygmentize to style the code. – David Carlisle Nov 02 '18 at 09:39
  • 2
    See https://tex.stackexchange.com/questions/99475/how-to-invoke-latex-with-the-shell-escape-flag-in-texmakerx for instructions how to do this in TeXstudio. – Marijn Nov 02 '18 at 10:30
  • This question is already answered. Would you please check it here? – Rodo-Singh Jul 14 '21 at 05:00

0 Answers0