我最近安装了一个完整版TeXLive 2012
(大约 3.2 GB 安装)。以下是LaTeX
我无法编译的简单代码:
\listfiles
\documentclass{article}
\usepackage{hyperref}
\title{\LaTeX\ Document}
\author{Joe the Student}
\date{\today}
\begin{document}
\maketitle
Hello world!
My email is \href{mailto:[email protected]}{my\[email protected]}
\end{document}
当我尝试使用以下方法进行编译时出现以下错误pdflatex
:
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
restricted \write18 enabled.
entering extended mode
(./tex.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
! LaTeX Error: File `url.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
)
Package hyperref Message: Driver (autodetected): hpdftex.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(./tex.aux) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./tex.out) (./tex.out) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
(./tex.aux)
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
hyperref.sty 2012/05/13 v6.82q Hypertext links for LaTeX
hobsub-hyperref.sty 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
hobsub.sty 2012/05/28 v1.13 Construct package bundles (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
intcalc.sty 2007/09/27 v1.1 Expandable calculations with integers (HO)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty 2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty 2012/04/08 v1.3 Expandable calculations on big integers (HO)
bitset.sty 2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty 2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty 2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
hopatch.sty 2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty 2011/01/30 xcolor patch
atveryend.sty 2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty 2011/10/16 v3.4 Data extraction from label references (HO)
hycolor.sty 2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
pd1enc.def 2012/05/13 v6.82q Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
hpdftex.def 2012/05/13 v6.82q Hyperref driver for pdfTeX
rerunfilecheck.sty 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
nameref.sty 2010/04/30 v2.40 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
tex.out
tex.out
***********
)</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr1
0.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb><
/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb>
Output written on tex.pdf (1 page, 34458 bytes).
Transcript written on tex.log.
编译在提示符处停止:
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
然后继续确实创造了pdf 和预期的一样。但是我不明白为什么我会得到编译错误。
我成功验证这些软件包hyperref
和url
安装使用命令:
tlmgr show <pkg-name>
但是,我读到过一些文章,其中url
有ltxmisc
ls /usr/share/texlive/texmf-dist/tex/latex/ltxmisc/
已url.sty
失踪。
请让我知道可能出了什么问题。
答案1
url.sty
是 TeX Live 包的一部分url
,安装为
/usr/share/texlive/texmf-dist/tex/latex/url/url.sty
如果文件存在,则应列在
/usr/share/texlive/texmf-dist/ls-R
有两行:
./tex/latex/url:
url.sty
如果没有,则以用户身份 (具有权限的用户)ls-R
运行来重新生成。texhash /usr/share/texlive
root
/usr/share/texlive/
url.sty
如果此位置缺少该文件,那么您可以尝试
$ find /usr/share/texlive/texmf-dist/ -name url.sty
来找到它。
手动安装
CTAN:宏/latex/contrib/url/包含包的文件url
。它们应该被分类到以下texmf
位置TDS
:
TDS:doc/latex/url/miscdoc.sty TDS:doc/latex/url/url.pdf TDS:doc/latex/url/url.tex TDS:tex/latex/url/url.sty
通常,附加软件包会安装在本地或主目录texmf
树中。但在本例中,它会将它们放入分发树中:
TDS: ≡ /usr/share/texlive/texmf-dist/
texhash
再次奔跑。
我不知道你的完整安装为什么会遗漏软件包url
,或者为什么无法重新安装。tlmgr
如果可用,请启用详细/调试选项并发布输出,也许有人可以看到原因。还有一个邮件列表texlive
有关的问题/错误报告tlmgr
。