The following example, despite a the generated HTML
seems okay, shows an error message.
Example file:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{lin_impressions_1936,
address = {Berkeley},
title = {Impressions on {Reaching} {America}},
booktitle = {Land without {Ghosts}: {Chinese} {Impressions} of {America} from the {MidNineteenth} {Century} to the {Present}},
publisher = {University of California Press},
author = {Lin, Y. T.},
editor = {Arkush, R. D. and Lee, L. O.},
year = {1936},
pages = {160--63},
}
\end{filecontents}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Lorem ipsum~\cite{lin_impressions_1936}.
Dolor sit amet~\textcite{lin_impressions_1936}.
\printbibliography
\end{document}
Compiled with:
make4ht -x -u article
Generated HTML
:
Error message:
[ERROR] htlatex: Compilation errors in the htlatex run
[ERROR] htlatex: Filename Line Message
[ERROR] htlatex: ./article.aux 10 Package etoolbox Error: Boolean '\ifrefcontextdefaults' undefined.
[ERROR] htlatex: ./article.aux 12 Package etoolbox Error: Boolean '\ifrefcontextdefaults' undefined.
Content of .log
file:
! Package etoolbox Error: Boolean '\ifrefcontextdefaults' undefined.
See the etoolbox package documentation for explanation.
Type H <return> for immediate help.
...
l.12 ...pressions_1936}{nty/global//global/global}
Your command was ignored.
Best Answer
It seems that this is an error in
biblatex.4ht
which happens only in the XeTeX mode. This is the culprit:It redefines some internal macro when XeTeX is active, adding additional
\detokenize
to protect special characters. It seems that therefcontextdefaults
boolean variable is not used by BibLaTeX anymore, so we can just remove this line. It seems to fix the issue.Here is the full
biblatex.4ht
with the fix: