When I set polyglossia
as a required package in my class, the following error arises when compiling with make4ht
:
[ERROR] htlatex: Compilation errors in the htlatex run
[ERROR] htlatex: Filename Line Message
[ERROR] htlatex: /usr/share/texlive/texmf-dist/tex/generic/tex4ht/fontspec-xetex.4ht 23 Undefined control sequence.
In the .log
is written the following error message:
)) (/usr/share/texlive/texmf-dist/tex/generic/tex4ht/fontspec-xetex.4ht
version 2021-09-28-22:56
! Undefined control sequence.
<argument> \fontspec_ht_scripts
l.23 ...{\typeout{use block #1}\xeuniuseblock{#1}}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Here are the example class:
\ProvidesClass{myclass}[2021/10/23]
\ProcessOptions\relax
\ExecuteOptions{}
\LoadClass{article}
\RequirePackage{polyglossia}
and a the .tex
file:
\documentclass{myclass}
%\usepackage{polyglossia}
\begin{document}
test
\end{document}
Note that, by loading the polyglossia
inside the .tex
file, no error is generated.
make4ht
update, as it now loads.4ht
files in classes. Do you have the latestmake4ht
update installed?make4ht
version v0.3j from CTAN.-l
and-x
options and they seem to work.-x
option. Although there are those error messages, thehtml
is generated. Using the-l
option, the messages are gone but still got this message:attempt to call a nil value (field 'exit_status')
.exit_status
error, then you may have older version ofmake4ht
installed somewhere on your system. Or some other issue with the installation. I had to deal with this issue few months ago, but it should be fixed now.