为什么 htlatex 不能按预期工作?

为什么 htlatex 不能按预期工作?

我正在尝试使用 htlatex 获取我的论文的 HTML 版本。当我使用 TexStudio 编译 .tex 文件时,pdflatex 才起作用。因此,我从命令行运行了以下命令:

htlatex main.tex

我的论文的入口点在哪里main.tex。从那里,包含了其他几个文件(可能包括进一步的 .tex 文件)。htlatex 的输出如下:

C:\Users\Bastian\Desktop\github-master\Thesis>latex  \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 .a.b.c.\input  main
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9)
entering extended mode
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
(C:\Users\Bastian\Desktop\github-master\Thesis\main.tex
(C:\devel\latex\tuddesign\tex\latex\tuddesign\tudthesis.cls
Document Class: tudthesis 2009/05/15 0.96 Joe Werner's TUD-Design-Manual packag
e
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\xkeyval\xkeyval.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\xkeyval\xkeyval.tex"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\xkeyval\keyval.tex")))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\tudreport.cls
Document Class: tudreport 2009/11/17 1.13 Clemens von Loewenich's and Joe Werne
r's TUD-Design package
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ifthen.sty")
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrreprt.cls
Document Class: scrreprt 2013/12/19 v3.12 KOMA-Script document class (report)

(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrkbase.sty
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrbase.sty
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrlfile.sty
Package scrlfile, 2013/12/19 v3.12 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

)))
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\tocbasic.sty
)

Class scrreprt Warning: You've used obsolete option `bibtotoc'.
(scrreprt)              Usage of this option indicates an old document and
(scrreprt)              is deprecated.
(scrreprt)              You should simply replace
(scrreprt)              usage of option `bibtotoc' by `bibliography=totoc'.


Class scrreprt Warning: You've used obsolete option `liststotoc'.
(scrreprt)              Usage of this option indicates an old document and
(scrreprt)              is deprecated.
(scrreprt)              You should simply replace
(scrreprt)              usage of option `liststotoc' by `listof=totoc'.


(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrsize11pt.
clo)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\typearea.sty
Package typearea, 2013/12/19 v3.12 KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\tex4ht.sty)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\usepackage.4ht)
 ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\calc.sty")
(C:\devel\latex\tuddesign\tex\latex\tuddesign\colours\tudcolours.sty
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\xcolor\xcolor.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\color.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\dvips.def"))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\colours\tudcolours.cfg)
(C:\devel\latex\tuddesign\tex\latex\tuddesign\colours\tudcolours.def))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\report\tudreprt_fonts.sty
(C:\devel\latex\tuddesign\tex\latex\tuddesign\base\tudfonts.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\t1enc.def"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\textcomp.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1enc.def"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\fix-cm.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1enc.def"))
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mathdesign.st
y
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdbch\mdbch.c
fg)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdbch\mdbch.s
ty (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdfont.def
)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdsffont.def)
 (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdttfont.def
)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\mathdesign\mdbch\t1mdbch
.fd)) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\fontenc.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\t1enc.def")))))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\base\tudpage.sty
(C:\devel\latex\tuddesign\tex\latex\tuddesign\base\tudpaper.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")))
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\eso-pic\eso-pic.sty
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\atbegshi.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\base\tudrules.sty)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.cfg")))

Class scrreprt Warning: Usage of package `fancyhdr' together
(scrreprt)              with a KOMA-Script class is not recommended.
(scrreprt)              I'd suggest to use
(scrreprt)              package `scrpage2' or `scrlayer-scrpage'.
(scrreprt)              Nevertheless, using requested
(scrreprt)              package `fancyhdr' on input line 47.

(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\fancyhdr\fancyhdr.sty))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\base\tudheading.sty

Class scrreprt Warning: Usage of package `titlesec' together
(scrreprt)              with a KOMA-Script class is not recommended.
(scrreprt)              I'd suggest to use the package only
(scrreprt)              if you really need it, because it breaks several
(scrreprt)              KOMA-Script features, i.e., option `headings' and
(scrreprt)              the extended optional argument of the section
(scrreprt)              commands .
(scrreprt)              Nevertheless, using requested
(scrreprt)              package `titlesec' on input line 12.

(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\titlesec\titlesec.sty)
(C:\devel\latex\tuddesign\tex\latex\tuddesign\base\tudheading.def)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\titlesec\block.tss)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\titlesec\titletoc.sty))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\base\tudredef.sty)
(C:\devel\latex\tuddesign\tex\latex\tuddesign\report\tudreprt_title.sty))
(C:\devel\latex\tuddesign\tex\latex\tuddesign\thesis\tudthess_title.sty))
(C:\Users\Bastian\Desktop\github-master\Thesis\config/package-import.tex
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\inputenc.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\latin1.def"))
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\german\german.sty
v2.5e 1998-07-08)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrtime.sty)
 ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty"

Package auxhook Warning: Cannot patch \document,
(auxhook)                using \AtBeginDocument instead.

) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\url\url.sty)

Package hyperref Message: Stopped early.

)

Package hyperref Message: Driver: htex4ht.

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\htex4ht.def")
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\enumitem\enumitem.sty)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\listings\listings.sty
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\listings\lstmisc.sty)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\listings\listings.cfg))
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\soul\soul.sty)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\multirow\multirow.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ltxmisc\varwidth.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\tabularx.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\array.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"
For additional information on amsmath, use the `?' option.
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"))
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\semantic\semantic.sty
Semantic Package v2.0(epsilon) [2003/10/28]
CVSId: $Id: semantic.dtx,v 1.11 2003/10/28 13:45:57 turtle Exp $
Loading features:
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\semantic\ligature.sty)
 math mode ligatures,
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\semantic\infernce.sty)
 inference rules,
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\semantic\tdiagram.sty)
 T diagrams,
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\semantic\reserved.sty)
 reserved words,
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\semantic\shrthand.sty)
 short hands,
and general definitions.

)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\adjustbox.sty
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\adjcalc.sty)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\trimclip.sty
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\collectbox\collectbox.st
y)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\adjustbox\tc-dvips.def))
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\latex\ifoddpage\ifoddpage.sty)
)) (C:\Users\Bastian\Desktop\github-master\Thesis\config/macros.tex)
(C:\Users\Bastian\Desktop\github-master\Thesis\config/code-formatting.tex)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\tex4ht.4ht
::::::::::::::::::::::::::::::::::::::::::
 TeX4ht info is available in the log file
::::::::::::::::::::::::::::::::::::::::::
) (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\tex4ht.sty
--- needs --- tex4ht main ---
(C:\Users\Bastian\Desktop\github-master\Thesis\main.tmp)
(C:\Users\Bastian\Desktop\github-master\Thesis\main.xref)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4-math.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4-math.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4-math.4ht)
 (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\latex.4ht
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4-math.4ht)
) (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\fontmath.4ht
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4-math.4ht)
) (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\ifthen.4ht
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4.4ht)
(C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\html4-math.4ht)
) (C:\Users\Bastian\AppData\Roaming\MiKTeX\2.9\tex\generic\tex4ht\scrreprt.4ht
! Missing \endcsname inserted.
<to be read again>
                   \MessageBreak
l.272 \:temp{rm}

?

我现在该怎么办?工作目录之后不包含任何 .html 文件。但是,终端中的输出没有显示任何我认为是错误消息的消息。

答案1

坏消息:该消息是由于错误导致的。

编辑:正如 Ulrike 今天(2014 年 7 月 31 日)所写,tex4ht 中的错误尚未被消除。

好消息:您可以简单地告诉 tex4ht 继续。只需输入“R”(或者是 Ctrl-R?),编译就会继续。

相关内容