Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing Master thesis in LaTeX and want to use minted package for source code syntax highlighting. I have installed it successfully and minimal example from minted documentation works just fine.

The problem is when I use document class predefined at Prague Technical University called FITthesis. I believe it is a Fitthesis.cls file (attached).

After command pdflatex -shell-escape MintedTest I get an error:

! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color 
                                                  }\aftergroup \reset@color 
l.8 \begin{document}

This is minimal example:

\documentclass[thesis=M,english]{FITthesis}[2012/10/20]

\usepackage{minted}

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

Any ideas what to do? I am LaTeX newbie. I didn't even find the file where this error is.

share|improve this question
    
Welcome to TeX.sx! Try adding \usepackage{xcolor} –  egreg Apr 13 '13 at 19:49
    
Thank you, but it didn't help. Same error. :-/ –  Macejkou Apr 13 '13 at 19:51
1  
it is a problem with your document class. With the standard class article you won't get an error –  Herbert Apr 13 '13 at 20:01
    
The error happens when LaTeX is processing \begin{document} and has nothing to do with minted. –  egreg Apr 13 '13 at 20:02
    
When I remove Minted everything works fine. –  Macejkou Apr 13 '13 at 20:19

2 Answers 2

up vote 6 down vote accepted

This runs without the internal color error, just errors about not supplying keywords and other data.

\documentclass[thesis=M,english]{FITthesis}[2012/10/20]

\usepackage{color}
\usepackage{graphicx}

\makeatletter
\color{black}
\let\default@color\current@color
\makeatother

\department{ddd}
\title{ttt}
\supervisor{sss}
\author{aaa}
\authorFN{aaa}
\authorGN{aaa}

\begin{document}

aaa

\end{document}
share|improve this answer

If you insert \RequirePackage{color} before \AtBeginDocument{ ... }

in the class FITthesis.cls it will work as well ;-)

share|improve this answer
    
Welcome to TeX.SX! You may have a look on our starter guide. –  texenthusiast May 11 '13 at 2:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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