如何从 CTAN 构建超链接?

如何从 CTAN 构建超链接?

当我跑步时

rm -rf /tmp/foo; mkdir /tmp/foo; cd /tmp/foo
wget http://mirrors.ctan.org/macros/latex/contrib/hyperref.zip
unzip hyperref; cd hyperref
latex hyperref.ins

我明白了

--2018-02-06 16:26:40--  http://mirrors.ctan.org/macros/latex/contrib/hyperref.zip
Resolving mirrors.ctan.org (mirrors.ctan.org)... 176.28.54.184, 2a01:488:67:1000:b01c:36b8:0:1
Connecting to mirrors.ctan.org (mirrors.ctan.org)|176.28.54.184|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/hyperref.zip [following]
--2018-02-06 16:26:41--  http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/hyperref.zip
Resolving ctan.math.washington.edu (ctan.math.washington.edu)... 128.95.224.254
Connecting to ctan.math.washington.edu (ctan.math.washington.edu)|128.95.224.254|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4385385 (4.2M) [application/zip]
Saving to: ‘hyperref.zip’

...

2018-02-06 16:26:41 (7.88 MB/s) - ‘hyperref.zip’ saved [4385385/4385385]

Archive:  hyperref.zip
   creating: hyperref/
  inflating: hyperref/nameref.pdf    
  inflating: hyperref/ntheorem-hyper.sty  
  inflating: hyperref/xr-hyper.sty   
  inflating: hyperref/README.pdf     
  inflating: hyperref/backref.dtx    
  inflating: hyperref/hyperref.pdf   
  inflating: hyperref/manifest.txt   
  inflating: hyperref/psdmapshortnames.pl  
  inflating: hyperref/nameref.dtx    
  inflating: hyperref/ChangeLog      
  inflating: hyperref/ChangeLog.pdf  
  inflating: hyperref/hylatex.ltx    
  inflating: hyperref/bmhydoc.sty    
  inflating: hyperref/README         
   creating: hyperref/doc/
  inflating: hyperref/doc/spell.dict  
  inflating: hyperref/doc/cmsy10-21.gif  
  inflating: hyperref/doc/options-ctan.pdf  
  inflating: hyperref/doc/paper.pdf  
  inflating: hyperref/doc/manual.pdf  
  inflating: hyperref/doc/manual2.html  
  inflating: hyperref/doc/manual.html  
  inflating: hyperref/doc/manual-pdftex.pdf  
  inflating: hyperref/doc/manual.css  
  inflating: hyperref/doc/options.pdf  
 extracting: hyperref/doc/cmmi10-22.gif  
  inflating: hyperref/doc/ab.pdf     
  inflating: hyperref/doc/manual3.html  
  inflating: hyperref/doc/slides.pdf  
  inflating: hyperref/backref.pdf    
  inflating: hyperref/minitoc-hyper.sty  
  inflating: hyperref/hyperref.dtx   
   creating: hyperref/test/
  inflating: hyperref/test/files.xml  
  inflating: hyperref/test/test6.tex  
  inflating: hyperref/test/picture.png  
  inflating: hyperref/test/test2.tex  
  inflating: hyperref/test/testurl.bib  
  inflating: hyperref/test/hog.eps   
  inflating: hyperref/test/hog.pdf   
  inflating: hyperref/test/testnb.tex  
  inflating: hyperref/test/phys2.jpg  
  inflating: hyperref/test/testinfo.tex  
  inflating: hyperref/test/picture.pdf  
  inflating: hyperref/test/testbmgl.tex  
  inflating: hyperref/test/testams.tex  
  inflating: hyperref/test/testfor2.tex  
  inflating: hyperref/test/test3.tex  
  inflating: hyperref/test/test1.tex  
  inflating: hyperref/test/testbib.bbl  
  inflating: hyperref/test/testbmu.tex  
  inflating: hyperref/test/test8.tex  
  inflating: hyperref/test/test4.tex  
  inflating: hyperref/test/test0.tex  
  inflating: hyperref/test/testbookmark.tex  
  inflating: hyperref/test/testslide.tex  
  inflating: hyperref/test/test-bm-pu-licr.tex  
  inflating: hyperref/test/testbib.tex  
  inflating: hyperref/test/picture.eps  
  inflating: hyperref/test/bit.tex   
  inflating: hyperref/test/testurl.bbl  
  inflating: hyperref/test/test7.tex  
  inflating: hyperref/test/phys1.jpg  
  inflating: hyperref/test/testurl.tex  
  inflating: hyperref/test/testoz.tex  
  inflating: hyperref/test/testbib.bib  
  inflating: hyperref/test/testform.tex  
  inflating: hyperref/test/Makefile  
  inflating: hyperref/hyperref.ins   
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./hyperref.ins
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 3 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/docstrip.tex
Utility: `docstrip' 2.5e <2014/09/29>
English documentation    <2014/09/29>

**********************************************************
* This program converts documented macro-files into fast *
* loadable files by stripping off (nearly) all comments! *
**********************************************************

********************************************************
* No Configuration file found, using default settings. *
********************************************************

(./hyperref.ins

Generating file(s) ./hyperref.drv ./hycheck.tex ./backref.drv ./nameref.drv ./b
ackref.sty ./nameref.sty ./hyperref.sty ./hypertex.def ./pdfmark.def ./hvtexmrk
.def ./htexture.def ./hdvipson.def ./hdvips.def ./hpdftex.def ./hluatex.def ./h
dviwind.def ./htex4ht.def ./htex4ht.cfg ./hvtex.def ./hvtexhtm.def ./hdvipdfm.d
ef ./hxetex.def ./pd1enc.def ./puenc.def ./puvnenc.def ./puarenc.def ./psdextra
.def ./nohyperref.sty 

Processing file hyperref.dtx (driver) -> hyperref.drv
                             (check) -> hycheck.tex
                             (package) -> hyperref.sty
                             (hypertex) -> hypertex.def
                             (pdfmark,pdfmarkbase,pdfform,outlines) -> pdfmark.
.def ./htexture.def ./hdvipson.def ./hdvips.def ./hpdftex.def ./hluatex.def ./h
dviwind.def ./htex4ht.def ./htex4ht.cfg ./hvtex.def ./hvtexhtm.def ./hdvipdfm.d
ef ./hxetex.def ./pd1enc.def ./puenc.def ./puvnenc.def ./puarenc.def ./psdextra
.def ./nohyperref.sty 

Processing file hyperref.dtx (driver) -> hyperref.drv
                             (check) -> hycheck.tex
                             (package) -> hyperref.sty
                             (hypertex) -> hypertex.def
                             (pdfmark,pdfmarkbase,pdfform,outlines) -> pdfmark.
def
                             (vtexpdfmark) -> hvtexmrk.def
                             (textures) -> htexture.def
                             (dvipsone) -> hdvipson.def
                             (dvips) -> hdvips.def
                             (pdftex,pdfform,outlines) -> hpdftex.def
                             (luatex) -> hluatex.def
                             (dviwindo,pdfmarkbase) -> hdviwind.def
                             (tex4ht) -> htex4ht.def
                             (tex4htcfg) -> htex4ht.cfg
                             (vtex,outlines) -> hvtex.def
                             (vtexhtml) -> hvtexhtm.def
File hyperref.dtx ended by \endinput.
Lines  processed: 27661
Comments removed: 8341
Comments  passed: 24
Codelines passed: 19072


Processing file backref.dtx (driver) -> backref.drv
                            (package) -> backref.sty
File backref.dtx ended by \endinput.
Lines  processed: 946
Comments removed: 460
Comments  passed: 23
Codelines passed: 454


Processing file nameref.dtx (driver) -> nameref.drv
                            (package) -> nameref.sty
File nameref.dtx ended by \endinput.
Lines  processed: 902
Comments removed: 346
Comments  passed: 24
Codelines passed: 523

! Cannot find file hluatex.dtx.
\readsource ...ot find file \uptospace #1 \qStop }
                                                  \else \processedLines \z@ ...
l.88 }
      ^^M
? 
! Emergency stop.
\readsource ...ot find file \uptospace #1 \qStop }
                                                  \else \processedLines \z@ ...
l.88 }
      ^^M
No pages of output.
Transcript written on hyperref.log.

我该hluatex.dtx从哪里出发?

答案1

这是将包上传到 ctan 时的一个错误(已于 2018-02-07 更新修复)。hluatex.dtx未包括在内。 该文件可从

https://github.com/ho-tex/hyperref

实际上,这不会影响任何用户,因为生成的文件hluatex.def中的hyperref.tds.zip所有内容都已“解压”,该文件也可以从 ctan 中获取,并用作 tex 分布中 hyperref 的基础。

用户永远不需要从 ctan 获取 hyperref,它应该作为 tex 发行版的一部分安装(因此tlmgr对于 texlive,从 linux 存储库分发的 texlive 变体的 linux 发行版包管理器,或使用 miktex 包系统。然而,这显然是 ctan 包上传中的一个错误,所以感谢您的报告。

相关内容