当 scrartcl 类中有空行时,tex4ht 无法编译脚注

当 scrartcl 类中有空行时,tex4ht 无法编译脚注

TL 2016. 这里似乎有一个错误。

由于脚注中有空行,此 MWE 无法使用 tex4ht 进行编译

\documentclass[11pt]{scrartcl}
%\documentclass[11pt]{article}
\IfFileExists{luatex85.sty}{\usepackage{luatex85}}{}
\begin{document}

Then \footnote{Another way to find particular 

solution is by gussing.}, 

\end{document}

错误是

HW7>make4ht --lua -u HW7_solution.tex
Output dir:     
Compiler:   dvilualatex
Latex options:   -jobname=HW7_solution 
tex4ht.sty :    xhtml,,charset=utf-8
tex4ht   -cmozhtf -utf8
build_file  HW7_solution.mk4
Cannot open config file HW7_solution.mk4
setting param correct_exit
setting param correct_exit
setting param correct_exit
setting param ext
Adding:     ext dvi
LaTeX call: dvilualatex  -jobname=HW7_solution  '\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 xhtml,,charset=utf-8.a.b.c.\input HW7_solution'
This is LuaTeX, Version 0.95.0 (TeX Live 2016) 
 restricted system commands enabled.
LaTeX2e <2016/03/31> patch level 2
Babel <3.9r> and hyphenation patterns for 1 language(s) loaded.
(./HW7_solution.tex
(/usr/local/texlive/2016/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2016/06/14 v3.21 KOMA-Script document class (article)
(/usr/local/texlive/2016/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package scrlfile, 2016/06/14 v3.21 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

))) (/usr/local/texlive/2016/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2016/texmf-dist/tex/latex/koma-script/typearea.sty
Package typearea, 2016/06/14 v3.21 KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/tex4ht.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/usepackage.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/luatex85/luatex85.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/tex4ht.4ht
::::::::::::::::::::::::::::::::::::::::::
 TeX4ht info is available in the log file 
::::::::::::::::::::::::::::::::::::::::::
) (/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/tex4ht.sty
--- needs --- tex4ht HW7_solution ---
(./HW7_solution.tmp) (./HW7_solution.xref)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/latex.4ht
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/fontmath.4ht
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/scrartcl.4ht
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/article.4ht
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2016/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(./HW7_solution.aux)
Runaway argument?
{\b:footnotetext \csname a:footnotebody\endcsname {\ignorespaces Anot\ETC.
! Paragraph ended before \o:@makefntext: was complete.
<to be read again> 
\par 
l.8 solution is by gussing.}
                          ,
? 

文件使用lualatex和编译成功pdflatex。将类更改为article而不是 ,scrartcl错误就会消失。

有解决方法吗?

Linux mint 上的 TL 2016。

更新:

此问题影响所有使用 tex4ht 的 koma-script 类,而不仅仅是。使用和 scrartcl时也会发生同样的问题scrbookscrreprt

答案1

scrartcl这似乎是中的配置错误tex4ht。在 的底部scrartcl.4ht,有这样的配置:

\pend:defI\@makefntext{\IgnorePar}

通过重新定义,将其放在宏\IgnorePar的开头\@makefntext。不幸的是,此重新定义使用了 normal \def,当参数包含段落时会导致编译错误。应使用 重新定义它\long\def。一种可能的解决方案可能如下所示:

\let\old:makefntext\@makefntext
\long\def\@makefntext#1{\IgnorePar\old:makefntext{#1}} 

制作本地副本scrartcl.4ht并用此代码替换行\pend:defI\@makefntext{\IgnorePar}。它应该可以编译而不会出现错误。

相关内容