I'm trying to get some source code into my tex-document but only get the error message mentioned in the thread title. I disabled nearly all of the other packages I use but it did not work.
\documentclass[a4paper, 13pt, twosides, openany, liststotoc]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[footnote, nohyperlinks, printonlyused, withpage, smaller]{acronym}
\usepackage[top=30mm, left=25mm, right=25mm, bottom=30mm, headsep=10mm, footskip=12mm]{geometry}
\usepackage{amsmath, graphicx, lmodern, fancyhdr, listings, xcolor, acronym, etoolbox, calc, setspace, tabto, enumitem, microtype, chngcntr, xcolor, pdfpages, minted}
\begin{document}
\begin{minted}{csharp}
public static void Main (string[] args)
{
Console.WriteLine ("Hello World!");
}
\end{minted}
\end{document}
I'm actually using all of these packages so I'd really want to find a posibility to include my code in addition to all the other packages. It don't really need to be coloured like what the minted package does but I'd prefer so.
Thanks for every help or useful thougth.
Greetings
.logfile. The complete error message could be, e.g., "Package minted Error: You must invoke LaTeX with the -shell-escape flag." In this case see: What are \immediate & \write18 and how does one use them? and, e.g., How to invoke latex with the -shell-escape flag in TeXMakerX? or How to enable shell-escape in TeXworks? – Schweinebacke Nov 07 '17 at 08:54pdflatex -shell-escape <your-file-name>, as the error message tells you. If you do not use the command line, you can start looking here: https://tex.stackexchange.com/questions/82699/how-to-enable-shell-escape-in-texworks – Rmano Nov 07 '17 at 08:55