如何在 MikTeX 中获取 pgfSweave 包的依赖项(例如当前的 PGF)?
我在 LaTeX 文档中安装了用于颜色语法的 pgfSweave 包,但是当涉及到 LaTeX 依赖项时我陷入了困境。我已经通过 MikTeX 的 Package Manager (Admin)
安装了 pgf
软件包,并且相信是最新的(我已经在我的 MiKTeX 安装文件夹中的 package 文件夹,但我没有看到任何版本号)。我缺少什么?
> library(pgfSweave)
Loading required package: stashR
Loading required package: filehash
filehash: Simple key-value database (2.1-1 2010-10-04)
A Set of Tools for Administering SHared Repositories (0.3-3 2009-03-26)
Loading required package: highlight
Loading required package: tools
Loading required package: codetools
Loading required package: parser
Loading required package: Rcpp
Loading required package: optparse
Loading required package: getopt
Loading required package: formatR
tikzDevice: A Device for R Graphics Output in PGF/TikZ Format (v0.5.3)
Checking for a LaTeX compiler...
A working LaTeX compiler was found by checking:
The PATH using the command pdflatex
Global option tikzLatex set to:
C:\PROGRA~2\MIKTEX~1.9\miktex\bin\pdflatex.exe
MiKTeX-pdfTeX 2.9.4052 (1.40.11) (MiKTeX 2.9)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh
Error : .onLoad failed in loadNamespace() for 'pgfSweave', details:
call: requirePGFVersion("2.10")
error: PGF >= 2.10 is required to use pgfSweave
In addition: Warning message:
running command 'C:\PROGRA~2\MIKTEX~1.9\miktex\bin\pdflatex.exe -interaction=batchmode -output-directory C:\Users\romunov\AppData\Local\Temp\Rtmply4jAb test-for-pgf.tex' had status 1
Error: package/namespace load failed for 'pgfSweave'
I installed the pgfSweave
package for color syntax in LaTeX documents, but I ran aground when it comes to a LaTeX dependency. I've installed the pgf
package via MikTeX's Package Manager (Admin)
and believe to be up to date (I've looked around in the package folder in my MiKTeX install folder, but I have not seen any version numbers). What am I missing?
> library(pgfSweave)
Loading required package: stashR
Loading required package: filehash
filehash: Simple key-value database (2.1-1 2010-10-04)
A Set of Tools for Administering SHared Repositories (0.3-3 2009-03-26)
Loading required package: highlight
Loading required package: tools
Loading required package: codetools
Loading required package: parser
Loading required package: Rcpp
Loading required package: optparse
Loading required package: getopt
Loading required package: formatR
tikzDevice: A Device for R Graphics Output in PGF/TikZ Format (v0.5.3)
Checking for a LaTeX compiler...
A working LaTeX compiler was found by checking:
The PATH using the command pdflatex
Global option tikzLatex set to:
C:\PROGRA~2\MIKTEX~1.9\miktex\bin\pdflatex.exe
MiKTeX-pdfTeX 2.9.4052 (1.40.11) (MiKTeX 2.9)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh
Error : .onLoad failed in loadNamespace() for 'pgfSweave', details:
call: requirePGFVersion("2.10")
error: PGF >= 2.10 is required to use pgfSweave
In addition: Warning message:
running command 'C:\PROGRA~2\MIKTEX~1.9\miktex\bin\pdflatex.exe -interaction=batchmode -output-directory C:\Users\romunov\AppData\Local\Temp\Rtmply4jAb test-for-pgf.tex' had status 1
Error: package/namespace load failed for 'pgfSweave'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 MikTex 存储库上,使用的版本显然是 2.00。最新版本 2.10 可以在此处下载。安装说明可以在
...\pgf_2.10.tds\doc\generic\pgf
下的 zip 文件中包含的手册中找到。如果您按照安装说明移动整个文件夹。归根结底就是将 zip 文件中的目录结构中的相关 gpf 文件夹复制到 miktex 安装中的目录结构中。最好的方法是尝试符合 TDS 的安装,将安装说明中的 texmf/ 替换为 miktex 安装文件夹。
不要忘记通过 miktex 设置应用程序刷新 FNDB(文件名数据库)。
或者,您可以卸载 pgf 包并将解压后的目录树放置在 Tex 可以找到的地方。再次强调,不要忘记刷新 FNDB。请注意,安装的 pgf 包将在 MikTex 目录树的不同位置具有文件夹。因此,不要将您找到的所有内容都粘贴到目录系统中找到的一个文件夹中。
编辑:
要了解 tex 发行版中加载的 pgf 版本,请尝试以下小文档:
On MikTex repositories, the used version is apparently 2.00. The latest version 2.10 can be downloaded here. The installation instructions can be find in the manual that is included in the zip file under
...\pgf_2.10.tds\doc\generic\pgf
.If you move the complete folder according to the installation instructions. It boils down to copy the relevant gpf folders from the directory structure in the zip file to the directory structure in you miktex installation. Best is to try a TDS-compliant installation, where you replace the
texmf/
in the installation instruction with your miktex installation folder.Don't forget to refresh the FNDB (filename database) in via the miktex settings app.
Alternatively, you can uninstall the pgf package and place the unzipped directory tree somewhere where Tex can find it. Again, don't forget to refresh the FNDB. Note though that the installed pgf package will have folders in different places of the directory tree of MikTex. So don't just paste everything you find on one folder you find in the directory system.
EDIT :
To know the pgf version that is loaded in your tex distribution, try following small document :