我正在尝试从moderncv
包中编译一个示例,但出现以下错误:
velle@velle-s200e:~/texlive/texmf-dist/doc/latex/moderncv/examples$ latex template.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./template.tex
LaTeX2e <2015/10/01> patch level 2
(/home/velle/texlive/texmf-dist/tex/latex/moderncv/moderncv.cls
Document Class: moderncv 2015/07/28 v2.0.0 modern curriculum vitae and letter d
ocument class
(/home/velle/texlive/texmf-dist/tex/latex/base/size11.clo)
(/home/velle/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/home/velle/texlive/texmf-dist/tex/latex/base/ifthen.sty)
(/home/velle/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/home/velle/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
! LaTeX Error: File `dvips.def' not found.
软件包 dvips 已安装:
我以“最小(纯)”方式安装了 texlive。它似乎自带了 dvips。Dvips 的位置如下所示:
velle@velle-s200e:~$ tlmgr install dvips
tlmgr: package repository http://ftp.snt.utwente.nl/pub/software/tex/systems/texlive/tlnet
tlmgr install: package already present: dvips
dvips 文件存在
velle@velle-s200e:~$ find ~/texlive/ -name "*dvips*"
/home/velle/texlive/bin/x86_64-linux/dvips
/home/velle/texlive/texmf-local/dvips
/home/velle/texlive/texmf-dist/tex/generic/dvips
/home/velle/texlive/texmf-dist/dvips
/home/velle/texlive/texmf-dist/doc/dvips
/home/velle/texlive/texmf-dist/doc/dvips/dvips.html
/home/velle/texlive/texmf-dist/doc/dvips/dvips.pdf
/home/velle/texlive/texmf-dist/doc/info/dvips.info
/home/velle/texlive/texmf-dist/doc/man/man1/dvips.1
/home/velle/texlive/texmf-dist/doc/man/man1/dvips.man1.pdf
/home/velle/texlive/texmf-dist/fonts/map/dvips
/home/velle/texlive/texmf-dist/fonts/map/dvips/tetex/dvips35.map
/home/velle/texlive/texmf-dist/fonts/enc/dvips
/home/velle/texlive/texmf-dist/fonts/enc/dvips/base/dvips.enc
/home/velle/texlive/texmf-dist/fonts/enc/dvips/base/odvips.enc
/home/velle/texlive/texmf-var/fonts/map/dvips
/home/velle/texlive/tlpkg/tlpobj/dvips.x86_64-linux.tlpobj
/home/velle/texlive/tlpkg/tlpobj/dvips.tlpob
那么为什么找不到 dvips?我该如何修复这个问题?
答案1
该文件dvips.def
是该graphics
包的一部分。
如果您有一个可以成功编译示例的系统,则可以使用 来定位文件kpsewhich dvips.def
,例如。否则,请尝试使用 CTAN 的搜索功能,该功能也允许搜索文件名,或者使用 grep ftp://ftp.ctan.org/pub/tex/FILES.byname.gz
。但是,这样您就无法在档案中查找文件(例如dvips.def
提供的/install/macros/latex/required/graphics.tds.zip
)。