在标题中使用 % 制作 4ht

在标题中使用 % 制作 4ht

下面的 LaTeX 文件在使用时运行良好,pdflatex但在中显示错误make4ht。如何纠正这个问题?当我%在图片标题中使用时,它会写入aux文件并显示错误。

\documentclass{book}
\usepackage{lipsum,hyperref}
\begin{document}
\chapter{Chapter Title}

\lipsum[3]

Nominal data are usually used with count and frequencies, such as to find out the total number of left-handed participants in a study. Figure~\hyperref[fig-001]{1.1} illustrates an excerpt from a questionnaire that collected nominal data.

\begin{figure*}
\caption{Excerpt 95\% from a questionnaire used in an actual user study of Section~\ref{sec:1} and Subsection~\ref{subsec:1-1} to collect nominal \index{demographics} data [\protect\hyperlink{ch2-ref48}{Shang et\,\,al. 2020}].\label{fig-001}}
\end{figure*}

With this approach, the lowest, the middle, and the highest points of the actual scale are anchored to the lowest, the middle, and the highest points of the target scale, respectively, then the intervening scale points are inserted at equal numerical intervals.

The European Union-wide framework known as the General Data Protection Regulation \footnote{{\href{https://ec.europa.eu/commission/priorities/justice-and-fundamental-rights/data-protection/2018-reform-eu-data-protection-rules_en}{https://ec.europa.eu/commission/priorities/justice-and-fundamental-rights/data-protection/2018-reform-eu-data-protection-rules{\_}en}.}} EU approach data privacy. The purpose of GDPR is to protect personal data at large.

\end{document}

在此处输入图片描述

更新2:

\ref并且\index使用时也显示错误make4ht。请参阅更新的问题\caption

答案1

此问题似乎是由 TeX4ht 源中的命令定义引起的\%。您可以将其恢复为原始定义,使用以下配置文件似乎可以解决问题:

\Preamble{xhtml}
\chardef\%=`\%
\begin{document}
\EndPreamble

结果如下:

相关内容