我无法让hyperref
与我的TeXLive安装一起使用。这是一个简单的示例:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\href{www.jamescurran.co.nz}{www.jamescurran.co.nz}
\end{document}
这将导致此错误
Package hyperref Error: Version mismatch!(hyperref) * 2018/11/30 v6.88e: hpdftex.def. \Hy@VersionCheck{hpdftex.def}
Google搜索只能返回TeXLive 2016中的错误-我有TeXLive2019。
编辑,这是我的日志文件:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.6.8) 23 JUN 2019 14:34
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**document.tex
(./document.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/Users/jcur002/Library/texmf/tex/latex/kranz/hyperref.sty
Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX
(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO)
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO)
Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
Package: pdftexcmds 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO
)
Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO)
Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO)
)
Package hobsub Info: Skipping package `hobsub' (already loaded).
Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO)
Package: xcolor-patch 2016/05/16 xcolor patch
Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO)
Package atveryend Info: \enddocument detected (standard20110627).
Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO)
Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO)
Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/auxhook.sty
Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO)
)
(/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
)
\@linkdim=\dimen103
\Hy@linkcounter=\count88
\Hy@pagecounter=\count89
(/usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/pd1enc.def
File: pd1enc.def 2018/11/30 v6.88e Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
)
\Hy@SavedSpaceFactor=\count90
(/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/hyperref.cfg
File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
)
Package hyperref Info: Hyper figures OFF on input line 4262.
Package hyperref Info: Link nesting OFF on input line 4267.
Package hyperref Info: Hyper index ON on input line 4270.
Package hyperref Info: Plain pages OFF on input line 4277.
Package hyperref Info: Backreferencing OFF on input line 4282.
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line 4500.
\c@Hy@tempcnt=\count91
(/usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip10
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 4853.
\Fld@menulength=\count92
\Field@Width=\dimen104
\Fld@charsize=\dimen105
Package hyperref Info: Hyper figures OFF on input line 6043.
Package hyperref Info: Link nesting OFF on input line 6048.
Package hyperref Info: Hyper index ON on input line 6051.
Package hyperref Info: backreferencing OFF on input line 6058.
Package hyperref Info: Link coloring OFF on input line 6063.
Package hyperref Info: Link coloring with OCG OFF on input line 6068.
Package hyperref Info: PDF/A mode OFF on input line 6073.
LaTeX Info: Redefining \ref on input line 6113.
LaTeX Info: Redefining \pageref on input line 6117.
\Hy@abspage=\count93
\c@Item=\count94
\c@Hfootnote=\count95
)
Package hyperref Message: Driver (autodetected): hpdftex.
(/usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/hpdftex.def
File: hpdftex.def 2018/11/30 v6.88e Hyperref driver for pdfTeX
! Package hyperref Error: Version mismatch!
(hyperref) * 2012/11/06 v6.83m: hyperref.sty
(hyperref) * 2018/11/30 v6.88e: hpdftex.def.
See the hyperref package documentation for explanation.
Type H <return> for immediate help.
...
l.36 \Hy@VersionCheck{hpdftex.def}
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
\Fld@listcount=\count96
\c@bookmark@seq@number=\count97
(/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty
Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2
82.
)
\Hy@SectionHShift=\skip43
)
No file document.aux.
\openout1 = `document.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 3.
LaTeX Font Info: ... okay on input line 3.
\AtBeginShipoutBox=\box27
Package hyperref Info: Link coloring OFF on input line 3.
(/usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section
(/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/gettitlestring.sty
Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO)
)
\c@section@level=\count98
)
LaTeX Info: Redefining \ref on input line 3.
LaTeX Info: Redefining \pageref on input line 3.
LaTeX Info: Redefining \nameref on input line 3.
\@outlinefile=\write3
\openout3 = `document.out'.
! Undefined control sequence.
\hyper@linkurl ...etpdfborder \Hy@setpdfhighlight
\ifx \@urlbordercolor \rel...
l.4 ...w.jamescurran.co.nz}{www.jamescurran.co.nz}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 5.
[1
{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
Package atveryend Info: Empty hook `AfterLastShipout' on input line 5.
(./document.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 5.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 5.
Package rerunfilecheck Warning: File `document.out' has changed.
(rerunfilecheck) Rerun to get outlines right
(rerunfilecheck) or use package `bookmark'.
Package rerunfilecheck Info: Checksums for `document.out':
(rerunfilecheck) Before: <no file>
(rerunfilecheck) After: D41D8CD98F00B204E9800998ECF8427E;0.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 5.
)
Here is how much of TeX's memory you used:
4148 strings out of 492609
62608 string characters out of 6129049
146228 words of memory out of 5000000
8107 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
28i,4n,21p,176b,317s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on document.pdf (1 page, 13264 bytes).
PDF statistics:
18 PDF objects out of 1000 (max. 8388607)
13 compressed objects within 1 object stream
2 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
答案 0 :(得分:2)
问题似乎是您的个人texmf树中安装的hyperref的旧版本:<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
<span id="icon">< ></span>
此软件包版本与其他软件包文件冲突。删除此文件后,应使用texlive树的最新版本并解决版本不匹配的问题。