我正在尝试编译几个包含以下内容的 .dtx 文件\PrintChanges
命令的 .dtx 文件,但它们从未产生变更历史章节。例如,我尝试过Joseph Wright 的自解压 demopkg.dtx:
tex demopkg.dtx
pdflatex demopkg.dtx
makeindex -s gind.ist demopkg.idx
pdflatex demopkg.dtx
再次:没有更改历史记录部分,尽管有两次调用\changes
;我做错了什么?
答案1
您需要单独运行来对这些更改进行操作,这些更改将通过makeindex
写入文件。.glo
pdflatex
编译顺序:
pdflatex demopkg.dtx
makeindex -s gind.ist demopkg.idx
makeindex -s gglo.ist demopkg.glo -o demopkg.gls
pdflatex demopkg.dtx
请注意,该\PrintChanges
命令需要一个.gls
文件,您需要在第二个makeindex
命令中明确指定该文件作为输出文件。
两次makeindex
运行的输出:
$ makeindex -s gind.ist demopkg.idx
This is makeindex, version 2.15 [TeX Live 2019] (kpathsea + Thai support).
Scanning style file /usr/share/texlive/texmf-dist/makeindex/latex/gind.ist.............done (13 attributes redefined, 3 ignored).
Scanning input file demopkg.idx....done (3 entries accepted, 0 rejected).
Sorting entries....done (5 comparisons).
Generating output file demopkg.ind....done (14 lines written, 0 warnings).
Output written in demopkg.ind.
Transcript written in demopkg.ilg.
$ makeindex -s gglo.ist demopkg.glo -o demopkg.gls
This is makeindex, version 2.15 [TeX Live 2019] (kpathsea + Thai support).
Scanning style file /usr/share/texlive/texmf-dist/makeindex/latex/gglo.ist..............done (14 attributes redefined, 3 ignored).
Scanning input file demopkg.glo....done (2 entries accepted, 0 rejected).
Sorting entries....done (2 comparisons).
Generating output file demopkg.gls....done (10 lines written, 0 warnings).
Output written in demopkg.gls.
Transcript written in demopkg.ilg.
文档输出: