我最近更换了操作系统(从 Ubuntu 14.04 换成了 Fedora 22),这意味着我现在有了更新版本的 pgf 软件包。准确地说,是这个版本:(texlive-pgf-svn33057.3.0.0-8.fc22.noarch
和\pgfversion
显示 3.00),而我的 Ubuntu 有\pgfversion
2.10。在编辑我以前的论文时,我不断遇到以下问题:
(/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65
.sty)
(/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18
.sty)) (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
(/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex))
(/usr/share/texlive/texmf-dist/tex/latex/pgf/math/pgfmath.sty
(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))
(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)))
(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
(/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers
.code.tex
! Undefined control sequence.
l.24 \pgfdeclareplothandler
{\pgfplothandlercurveto}{}{%
? X
No pages of output.
Transcript written on subjective-logic.log.
我尝试查找有关此错误的文档,但找不到任何与此特定控制序列实际相关的文档。起初我以为只是缺少一个包,但我尝试安装所有可用的 texlive-tikz 包和 pgf 相关包,并删除除 texlive-pgf 之外的所有包,但这些似乎都无济于事。使用rpm -qf
,我确定上面提到的文件确实是 texlive-pgf 包的一部分。我的一位同事也在运行 Fedora 22,可以毫无问题地编译相同的文档。我不太确定如何进一步缩小这个问题的范围。我确实尝试创建一个最小示例;我采取了这并将其缩小到以下代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\node[main node] (1) {1};
\path[every node/.style={font=\sffamily\small}]
edge [loop above] node {0.1} (1);
\end{tikzpicture}
\end{document}
我确实进行了快速搜索,看看是否可以找到应该定义 pgflibraryplothandlers 的位置,这给了我以下输出:
$grep -r 'pgflibraryplothandlers' /usr/share/texlive/
/usr/share/texlive/texlive.tlpdb: RELOC/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
/usr/share/texlive/texlive.tlpdb: RELOC/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
/usr/share/texlive/texlive.tlpdb: RELOC/tex/latex/pgf/compatibility/pgflibraryplothandlers.sty
/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex:\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplothandlers.code.tex,v 1.20 2013/08/31 13:02:59 ludewich Exp $
/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex:% More handlers are defined in pgflibraryplothandlers
/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgflibraryplothandlers.sty:\input{pgflibraryplothandlers.code.tex}
/usr/share/texlive/texmf-dist/ls-R:pgflibraryplothandlers.code.tex
/usr/share/texlive/texmf-dist/ls-R:pgflibraryplothandlers.sty
会不会是 TeX 搜索文件的方式发生了变化,导致我的内容~/texmf
出现问题?