我曾经能够编译以下 LaTeX:
\documentclass{article}
\usepackage{tikz}
%\usetikzlibrary{arrows,backgrounds,plotmarks} % even simpler
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\end{document}
但是,我注意到我使用的是 tikz 1.68,所以我尝试将 tikz 更新到版本 2.1。现在,此示例不起作用,错误是:
! Undefined control sequence.
l.875 \pgfsetsnakesegmenttransformation
{\pgf@snake@mirror\pgf@snake@raise}
为了更新 tikz,我下载了前列腺素作为 pgf_2.10.tds.zip 文件,将其解压到 /usr/share/texmf/ 中,替换旧文件,然后运行 texhash。
什么地方出了错?
答案1
我的错误是在安装新版本之前没有删除旧目录。
> diff -r /user/wok/home/Downloads/pgf/tex/generic/ /usr/share/texmf/tex/generic/
Only in /usr/share/texmf/tex/generic/pgf/basiclayer: pgfbaseimage.code.tex
Only in /usr/share/texmf/tex/generic/pgf/basiclayer: pgfbaselayers.code.tex
Only in /usr/share/texmf/tex/generic/pgf/basiclayer: pgfbasepatterns.code.tex
Only in /usr/share/texmf/tex/generic/pgf/basiclayer: pgfbaseplot.code.tex
Only in /usr/share/texmf/tex/generic/pgf/basiclayer: pgfbaseshapes.code.tex
Only in /usr/share/texmf/tex/generic/pgf/basiclayer: pgfbasesnakes.code.tex
Only in /usr/share/texmf/tex/generic/pgf/basiclayer: pgfcoremath.code.tex
Only in /usr/share/texmf/tex/generic/pgf/frontendlayer: tikz.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibraryshapes.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikz3d.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzarrows.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzautomata.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzbackgrounds.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzer.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzmindmap.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzpatterns.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzpetri.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzplothandlers.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzplotmarks.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzshapes.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikzsnakes.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikztopaths.code.tex
Only in /usr/share/texmf/tex/generic/pgf/libraries: pgflibrarytikztrees.code.tex