Open amarcu5 opened 11 months ago
Yes, I can reproduce the error.
I'm not familiar with tex4ht. The \@extra@b@citeb
is provided in the hyperref
package but tex4ht doesn't seem to read it. It still produces another undefined command error (\@skiphyperreftrue
) after I patch \providecommand\@extra@b@citeb
.
I just find the documentation https://www.kodymirus.cz/tex4ht-doc/ForDevelopers.html but it's not trivial to provide support for tex4t. It should take time to resolve this.
I've created a basic configuration file for citeproc-lua
, citation-style-language.4ht
% fix problems with \bibitem in the bibliography
\def\setb:anc#1{\def\bib:anc{\def\bib:anc{#1}\ifx \bib:anc\empty \else
\a:bibitem{}{\a:bibanchor#1}\b:bibitem\fi \gdef\bib:anc{}}%
\def\AnchorLabel{\bib:anc}
}
\ExplSyntaxOn
% add links to bibliography around citations
\cs_set:Npn \__csl_print_citation:N #1
{
\bool_if:NT \l__csl_regression_test_bool
{ \tl_show:N #1 }
\bool_if:NTF \l__csl_note_bool
{ \footnote {\a:cite\cIteLink{X\l__csl_cite_keys_tl}{bk-\l__csl_citation_id_tl}#1\EndcIteLink\b:cite} }
{\a:cite\cIteLink{X\l__csl_cite_keys_tl}{bk-\l__csl_citation_id_tl}#1\EndcIteLink\b:cite}
}
\ExplSyntaxOff
\Hinput{citation-style-language}
\endinput
It resuses the default bibliography support in TeX4ht and fixes two things: the compilation error reported in this bug report, and it also inserts links pointing to the bibliography around citations.
Describe the bug Compiling example.tex in TeX4ht fails and produces the following error:
Additional information
citation-style-language
version: 0.4.2To Reproduce
If you have a full texlive installation, compile example.tex with the commands:
Alternatively, if you have docker installed: