1

I have problem about use minted package, my mwe like this :

\documentclass{article}
\usepackage{minted}
\usepackage{xcolor}
\definecolor{Rub}{HTML}{061089}
\begin{document}
\begin{minted}[frame=lines,rulecolor=Rub]{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}

After i use rulecolor =red and others color, i get like this :

error

How to solve it ?

  • 1
    The optional argument is in the wrong place: \begin{minted}[...] – Joseph Wright Nov 2 '14 at 16:55
  • @JosephWright Thank for your comment but i replace my question. – Hirwanto Nov 2 '14 at 17:04
7

enter image description here

You need to put the optional argument in the right place, and slightly oddly the value of rulecolor is apparently a command not a colour name

\documentclass{article}

\usepackage{minted}
\definecolor{red}{rgb}{1,0,0}
\begin{document}

%\tracingall
\begin{minted}[rulecolor=\color{red},frame=lines]{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.