10

I have a Windows 10 computer and try to use the minted package to insert vhdl code into my LaTeX file. I did install Python and Pygments and added Python/scripts to the path. I also change the command lines of TeXmaker with -shell-escape. When I try to run a little example like this :

\documentclass[%
    a4paper,            % Papierformat
    oneside,            % einseitiger Druck
    %twoside,           % zweiseitiger Druck
    12pt,               % Schriftgröße
    onecolumn,          % einspaltiger Text
    %twocolumn,         % zweispaltiger Text
    openright,          % Kapitel dürfen nur auf einer rechten Seite beginnen
    openany,            % Kapitel dürfen rechts oder links beginnen
    parskip=half,       % eine halbe Zeile Abstand zw. Absätzen
    headsepline,        % Kopfzeilenlinie
    footsepline,        % Fußzeilenlinie
    bibliography=totoc, % Bibliographie im Inhaltsverzeichnis
    %idxtotoc           % Index im Inhaltsverzeichnis
    ]{scrbook}
\usepackage{minted}
\begin{document}
\begin{minted} {vhdl}
process
begin
  CLK <= '1'; wait for 10 NS;
  CLK <= '0'; wait for 10 NS;
end process;
\end{minted}
\end{document}

I get the error...

Undefined control sequence. \PYG #1#2->\FV@PYG
{#1}{\FancyVerbBreakStart #2\FancyVerbBreakStop } l.2 \PYG{k}{process}
The control sequence at the end of the top line of your error message
was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I'
and the correct spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
  • Well this works for me. Which distribution do you run (MikTeX, Texlive)? – TeXnician Apr 29 '17 at 9:44
  • Works for me (TeX Live 2016, Pygments version 2.0.2). – egreg Apr 29 '17 at 9:44
  • MikTeX, and I have no clue what i did wrong... – s kop Apr 29 '17 at 9:49
  • Have you tried to update your distribution miktex.org/howto/update-miktex? – CarLaTeX Apr 29 '17 at 10:28
  • Thanks for this comment, but that didn't work either... – s kop Apr 29 '17 at 10:57
27

I had a similar issue in Linux and removing _minted* directory solved the problem. Other option could be include the minted package with the option cache=false.
Source: Github issue

  • And how do you add this option ? – ThePassenger Jul 31 '17 at 15:40
  • 2
    @Marine1 As written inside the GitHub issue: Write \usepackage[cache=false]{minted} instead of \usepackage{minted}. – epR8GaYuh Jul 31 '17 at 18:12

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.