3

TL 2016. There seems to be a bug here.

This MWE fails to compile with tex4ht because there is blank line in footnote

\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}

Error is

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.}
                          ,
? 

The file compiles OK with lualatex and pdflatex. Changing the class to article instead of scrartcl the error goes away.

Is there a workaround?

TL 2016 on Linux mint.

update:

This problem affects all koma-script classes with tex4ht and not just the scrartcl. Same problem happens when using scrbook and scrreprt

  • since you use luatex you could use \suppresslongerror = 1 to disable this error – David Carlisle Jul 16 '16 at 14:17
  • You can use \endgraf instead of a blank line. But imho it is a bug in tex4ht that \@makefntext seems not to be \long. – Ulrike Fischer Jul 16 '16 at 15:18
2

This seems like a bug in configuration for scrartcl in tex4ht. At the bottom of scrartcl.4ht, there is this configuration:

\pend:defI\@makefntext{\IgnorePar}

this put \IgnorePar at the beginning of \@makefntext macro by redefining it. Unfortunately, this redefinition uses normal \def, which causes compilation error when the argument contains paragraph. It should be redefined using \long\def. One possible solution could look like:

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

make local copy of scrartcl.4ht and replace line \pend:defI\@makefntext{\IgnorePar} with this code. It should compile without errors.

  • thanks this fixes it. But this problem affects all the koma classes and not just article. It also gives same error with scrbook and scrreprt. Could your fix be applied to all affected tex4ht files? Would this fix be put in the source control eventually so that when one does TL update it will be there? . – Nasser Jul 16 '16 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.