MikTex的latex.exe生成的file.4ct和file.4tc是什么关系

发布于 2024-09-11 03:09:25 字数 1819 浏览 11 评论 0原文

我目前正在调查我们的脚本文档生成(.tex -> .pdf 和 .chm)的问题,我必须承认我在生成 LaTeX 时非常无能。

长话短说:

  1. 通过 pdflatex -output-format=pdf -interaction=batchmode ourfile.tex 正确生成 PDF

  2. 脚本然后继续调用 3 次:

    latex -interaction=batchmode \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1 }\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.abc{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\ documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode }{\documentstyle[tex4ht]}}}\makeatother\HCode html,5.abc\input ourfile.tex

  3. 这会生成以下文件: 我们的文件.4ct 我们的文件.4tc 我们的文件.aux 我们的文件.dvi 我们的文件.idx 我们的文件.log ourfile.xref

  4. 脚本然后继续处理 .4ct 文件,该文件似乎是某种包含标题和参考文献的 TOC 文件。该脚本使用此数据生成 chm 项目文件(hhp 文件)的 TOC 数据。

但是,当我第四次、第五次、第六次交替运行 (2) 中的命令时,我可以看到每次运行该命令时 .4ct 和 .4tc 文件的内容都会交换。那就是:

a)运行乳胶...... => ourfile.4ct = 126 行 / ourfile.4tc = 793 行

b) 运行 Latex ... => ourfile.4ct = 793 行 / ourfile.4tc = 126 行

c) 运行 Latex ... => ourfile.4ct = 126 行 / ourfile.4tc = 793 行

d) 等。

生成的 .log 文件仅引用 ourfile.4ct,第一次出现时我会看到以下警告……

---------------------------------------------------------
l.1 --- TeX4ht warning --- If not done so, the index is to be processed by
  tex '\def\filename{{Td_g}{idx}{4dx}{ind}} \input  idxmake.4ht'
  makeindex -o Td_g.ind Td_g.4dx
instead of
  makeindex -o Td_g.ind Td_g.idx
On some platforms, the quotation marks ' should be
 replaced by double quotation marks " or eliminated.
---------------------------------------------------------  ---

如果有任何用处的话。

感谢您的指点!

I'm currently investigation problems with our scripted documentation generation (.tex -> .pdf and .chm) and I have to admit that I'm pretty clueless when it comes to generating LaTeX.

Long story short:

  1. PDF is correctly generated via pdflatex -output-format=pdf -interaction=batchmode ourfile.tex

  2. Script then goes on to call 3 times:

    latex -interaction=batchmode \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode html,5.a.b.c.\input ourfile.tex

  3. This generates the following files:
    ourfile.4ct
    ourfile.4tc
    ourfile.aux
    ourfile.dvi
    ourfile.idx
    ourfile.log
    ourfile.xref

  4. Script then goes on to process the .4ct file which seems to be some kind of TOC file containing titles and references. The script uses this data to generate the TOC data for the chm project file (hhp file).

However, when I alternately ran the command from (2) a 4th, 5th, 6th time I could see that the contents of the .4ct and .4tc file would swap each time I ran the command. That is:

a) run latex ...
=> ourfile.4ct = 126 lines / ourfile.4tc = 793 lines

b) run latex ...
=> ourfile.4ct = 793 lines / ourfile.4tc = 126 lines

c) run latex ...
=> ourfile.4ct = 126 lines / ourfile.4tc = 793 lines

d) etc.

The generated .log file only refers to ourfile.4ct and at the first occurrence I see the following warning ...

---------------------------------------------------------
l.1 --- TeX4ht warning --- If not done so, the index is to be processed by
  tex '\def\filename{{Td_g}{idx}{4dx}{ind}} \input  idxmake.4ht'
  makeindex -o Td_g.ind Td_g.4dx
instead of
  makeindex -o Td_g.ind Td_g.idx
On some platforms, the quotation marks ' should be
 replaced by double quotation marks " or eliminated.
---------------------------------------------------------  ---

... if that's of any use.

Thanks for any pointers!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

世界如花海般美丽 2024-09-18 03:09:25

这些文件并非特定于 MikTeX,而是特定于 tex4ht 包(超文本生成器)。它们没有记录,因此它们可能包含生成最终结果(HTML)所需的临时数据。您对输出有任何不满意吗?如果是这样,您需要询问 Tex4ht 作者您的 HTML 输出有什么问题,而不是中间文件 - 他们可能只会告诉您,“哦,这些是内部文件,不用担心它们。”

Those files aren't specific to MikTeX, but to the tex4ht package (the hypertext generator). They're not documented, so they probably contain temporary data needed to produce the end result (the HTML). Are you in any way unhappy with the output? If so, you need to ask the Tex4ht authors in terms of what is wrong with your HTML output, not the intermediary files - they would probably just tell you, "Oh, those are internal files, don't worry about them."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文