我正在使用 MiKTeX 的最新版本。上次更新後,我意識到 TikZ 庫hobby
不再運作。正如答案所建議的這個問題,我又從那裡下載了這裡但是當我編譯文件時tex hobby.dtx
出現錯誤:
======================================================================
! LaTeX Error: File `l3doc.cls' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)
Enter file name:
我再次更新 MiKTeX 但仍然有相同的錯誤。當我編譯包含愛好庫的 Latex 檔案時,出現錯誤
!...............................................
l.185 ...riant:Nn \__msg_show_variable:Nnn { Nno }
|'''''''''''''''''''''''''''''''''''''''''''''''
| This is a coding error.
|
| LaTeX has been asked to use a control sequence '\__msg_show_variable:Nnn':
| this has not been defined yet.
|...............................................
)
.................................................
這是我編譯的範例:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{hobby,decorations.markings}
\begin{document}
\begin{tikzpicture}[use Hobby shortcut]
% middle crossing loop
% \draw (3,-1) .. (2,0) .. (0,0.93) .. (-0.93,0) .. (0,-0.93) .. (2,0) .. (3,1);
\begin{scope}
\clip (3,-1) rectangle (2,1);
\draw[thick, blue, fill=blue!30] (3,-1) .. (2,0) .. (0,0.93) .. (-0.93,0) .. (0,-0.93) .. (2,0) .. (3,1);
\end{scope}
\begin{scope}
\clip (2,1) rectangle (-1,-1);
\draw[thick, red, fill=red!30] (3,-1) .. (2,0) .. (0,0.93) .. (-0.93,0) .. (0,-0.93) .. (2,0) .. (3,1);
\end{scope}
% filled points
\fill (0,0) circle (1pt);
\fill (2,0) circle (1pt);
\end{tikzpicture}
\end{document}