
私は Windows 10 コンピューターを持っており、minted
パッケージを使用して LaTeX ファイルに vhdl コードを挿入しようとしています。Python と Pygments をインストールし、Python/scripts をパスに追加しました。また、TeXmaker のコマンド ラインを に変更します-shell-escape
。次のような小さな例を実行しようとすると:
\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}
エラーが発生します...
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.
答え1
Linux でも同様の問題が発生しましたが、_minted*
ディレクトリを削除することで問題は解決しました。別の方法としては、minted
オプション を指定してパッケージを含めることです。の代わりにcache=false
を使用することでこれを行うことができます。\usepackage[cache=false]{minted}
\usepackage{minted}
ソース:Githubの問題