Babel Arabia + bidi 导致 TexStudio 中的 Make4ht + PdfLaTex 崩溃

Babel Arabia + bidi 导致 TexStudio 中的 Make4ht + PdfLaTex 崩溃

我正在尝试将多语言文档(阿拉伯语、俄语、英语)转换为 HTML 或 ODT。

我调用make4ht dummy.tex,可以从命令行或 TexStudio 自定义命令。

dummy.tex包含以下内容:

\documentclass[12pt]{report}

\usepackage[style=authoryear-ibid,backend=biber]{biblatex}
\addbibresource{references/references.bib}

\usepackage{cleveref}

\usepackage[shortlabels]{enumitem}

\usepackage{yfonts}
\usepackage[T1,T2A]{fontenc}
\usepackage{newunicodechar}
\usepackage{arabtex}
\usepackage[utf8]{inputenc}
\usepackage[arabic,russian,british, bidi=default]{babel}
\usepackage[encapsulated]{CJK}

\usepackage{csquotes}

\usepackage{graphicx}
\graphicspath{{images/}}

\usepackage{pgfplots}
\pgfplotsset{compat=1.16}

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{4}

\usepackage[toc,page]{appendix}

\usepackage{booktabs,cfr-lm, makecell}
\usepackage[referable]{threeparttablex}

\newcommand{\righthalfring}{\begingroup\arabfalse\transtrue
    \raisebox{1pt}{\scalebox{1}[1.3]{\RL{'}}\kern-3pt}\endgroup}

\newunicodechar{ʾ}{\righthalfring}

\title{Pav's Thesis}
\author{Pavel Gudoshnikov}

\begin{document}
    \maketitle
    \input{chapters/dummy-1/dummy-1}
\end{document}

该文件的内容dummy-1如下:

\chapter{My chapter}
\section{My section}
\subsection{My subsection}
some text

这导致运行失败:

[STATUS]  make4ht: Conversion started
[STATUS]  make4ht: Input file: dummy.tex

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7050 64-bit)

entering extended mode

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7050 64-bit)

entering extended mode

[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename Line    Message
[ERROR]   htlatex: ?    811  Missing \endcsname inserted.
[ERROR]   htlatex: ?    5    Undefined control sequence.
[ERROR]   htlatex: ?    5    Undefined control sequence.
[ERROR]   htlatex: ?    5    Undefined control sequence.
...
[ERROR]   htlatex: ?    5    Undefined control sequence.
[ERROR]   htlatex: ?    5    Undefined control sequence.
[FATAL]   make4ht-lib: Fatal error. Command htlatex returned exit code 1

Process exited with error(s)

我可以将“未定义的控制序列”追踪到 .xref 文件中的最后两个条目。

\:CrossWord{)F1F-}{dummy.html}{1}%
\:CrossWord{TITLE+}{Pav's Thesis}{1}%
\:CrossWord{)M1x0}{;}{1}%
\:CrossWord{)Qx1-10001}{1}{2}%
\:CrossWord{)Qx1-2000\protect \bgroup \o:beginL: \protect \edef T1{T1}\let \enc@update \relax \xdef \T1/clm2j/m/n/12 {\T1/clm2j/m/n/12 }\T1/clm2j/m/n/12 \size@update \enc@update \def T1{T1}1.1\o:endL: \egroup }{1}{2}%
\:CrossWord{)Qx1-3000\protect \bgroup \o:beginL: \protect \edef T1{T1}\let \enc@update \relax \xdef \T1/clm2j/m/n/12 {\T1/clm2j/m/n/12 }\T1/clm2j/m/n/12 \size@update \enc@update \def T1{T1}1.1.1\o:endL: \egroup }{1}{2}%

我对 shell 脚本完全陌生。我读过 make4ht 手册。我在 Google 上搜索过。我已经研究了好几个小时了……简直是摆脱它,arabic而且bidi=default似乎有帮助。

我尝试过尝试使用 Babel 指令的措辞并使用 LuaLaTex 进行编译,但这会破坏其他方面。如果可能的话,我想使用 PdfLaTex 来做到这一点。看起来在 LuaLaTex 或 XeLaTex 中执行此操作将涉及大量重写(大约 150 页!)。

有人能帮忙吗?我将不胜感激。

相关内容