make4ht (または htlatex) を使用して biblatex 参考文献を含む .tex ファイルをコンパイルすると、次のエラーが発生します。
! Illegal parameter number in definition of \blx@tempa.
<to be read again>
1
l.19 \printbibliography[heading=bibintoc]
このエラーは、.bib ファイルの参考文献レコードに URL が含まれている場合に発生し (私は \url{link is here} を使用します)、タイトル、公開 (または @ の場合は howpublishedこれは、多くのフィールドを持たない単純な書誌レコードを作成した場合には、このエラーが発生しないためです。
また、latex 用にコンパイルするときに参考文献に問題はありません。
MWE (main_test_file.tex):
\documentclass[11pt]{article}
% Use Chicago Manual of Style:
\usepackage[authordate,autocite=inline,backend=biber,natbib]{biblatex-chicago}
\usepackage[colorlinks]{hyperref}
% References file:
\addbibresource{bib_test_file.bib}
%
\begin{document}
Some writing stuff: \autocite{trialurl1} works with make4ht when no extra stuff before $\backslash$url, but doesn't work when add another feature, like a title or howpublished, etc.
% Uncomment the following line, and the make4ht fails:
, as in \cite{trialurl2}.
More interesting stuff: \autocite{vanier} should have no problems with make4ht.
% The list of references is printed:
\printbibliography[heading=bibintoc]
\end{document}
以下は、trialurl2 が引用されている場合、上記のエラーで失敗します。
make4ht -ue mybuild.mk4 main_test_file.tex
しかし、trialurl2 が引用されていない場合は問題なく動作します。どちらの場合も、\cite、\autocite、\citeauthor などを使用するかどうかは問題ではありません。同じ動作が発生します。
また、latex、biber、latex、latex の順に使用すると、trialurl2 が引用されている場合でも問題なく動作します。
bib_test_file.bib ファイルは次のとおりです。
@misc{trialurl1,
author = {George, Birdie},
note = {\url{https://mail.yahoo.com/} Accessed 24 July 2020},
year = {2020},
}
@misc{trialurl2,
author = {George, Birdie},
title = {Hi},
note = {\url{https://mail.yahoo.com/} Accessed 24 July 2020},
year = {2020},
}
@book{vanier,
title = {Living Gently in a Violent World: The Prophetic Witness of Weakness},
author = {Vanier, Jean and Hauerwas, Stanley},
edition = {Second},
year = {2018},
publisher = {InterVarsity Press},
}
そして mybuild.mk4 は
Make:add("biber","biber ${input}")
if mode=="draft" then
Make:htlatex {}
else
Make:htlatex {}
Make:biber {}
Make:htlatex {}
Make:htlatex {}
Make:htlatex {}
end
mybuild.mk4 は、ここの michael.h21 による回答から取得され ます https://tex.stackexchange.com/questions/244828/illegal-parameter-with-biblatex
ちなみに、michael.h21 の回答は、他のいくつかの問題を解決するのに役立ちましたが、現在の問題は解決しませんでした。