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 ?

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

1 Answer 1

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .