tufte-book 和阿拉伯语文本(bidi 问题?)

tufte-book 和阿拉伯语文本(bidi 问题?)

我正在使用 XeLaTeX 排版一份包含英语和阿拉伯语文本的文档。无论我使用还是tufte-book软件包,Tufte 风格的标题页始终出现问题。我怀疑与底层软件包存在冲突。arabxetextpolyglossiabidi

这是一个最小的例子arabxetex

\documentclass[nols,justified]{tufte-book}
\usepackage{lipsum}
\usepackage{arabxetex}
\title{Some Book}
\author[Series]{\textit{ John Doe}}
\publisher{World Publisher}
\begin{document}
\maketitle
\section{Foo Bar}
\begin{arab}
بعد هامش وإقامة المتحدة و، أم السادس وبالرغم فقد.
\end{arab}
\lipsum[1-2]
\end{document} 

下面是一个最小的例子polyglossia

\documentclass[nols,justified]{tufte-book}
\usepackage{lipsum}
\usepackage{polyglossia}
\usepackage{fontspec,xltxtra,xunicode}
\setdefaultlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.5] {Amiri Quran}
\title{Some Book}
\author[Series]{\textit{ John Doe}}
\publisher{World Publisher}
\begin{document}
\maketitle
\newpage
\section{New Section}
\begin{Arabic}
بعد هامش وإقامة المتحدة و، أم السادس وبالرغم فقد.     
\end{Arabic}  

\lipsum[1-2]
\end{document} 

两者都会出现以下错误:

LaTeX Error: Command \XeTeX already defined.
XeLaTeX Error: Command \XeTeX already defined.

有没有办法将英语/阿拉伯语混合文本与tufte-book文档类结合使用?我尝试过 biditufte 类,但发现它是为 RTL 文本设计的。

标题页编译不正确。以下示例演示了标题页应有的样子:

\documentclass[nols,justified]{tufte-book}
\usepackage{lipsum}
\title{Some Book}
\author[Series]{\textit{John Doe}}
\publisher{World Publisher}
\begin{document}
\maketitle
\section{Foo Bar}
\lipsum
\end{document} 

在此处输入图片描述

答案1

在此处输入图片描述

哈哈!

% !TeX program = xelatex
\documentclass[nols,justified]{biditufte-book}
\usepackage{lipsum}
\usepackage{polyglossia}
\usepackage{fontspec,xltxtra,xunicode}
\setdefaultlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.5] {Amiri Quran}
\title{Some Book}
\author[Series]{\textit{ John Doe}}
\publisher{World Publisher}
\begin{document}
\maketitle
\newpage
\section{New Section}
\begin{Arabic}
بعد هامش وإقامة المتحدة و، أم السادس وبالرغم فقد.     
\end{Arabic}  

\lipsum[1-2]
\end{document} 

答案2

\documentclass[nols,justified]{biditufte-book}确实解决了问题,但是[LTRgeometry]如果文档主要使用从左到右的语言(如英语)编写,则需要此选项。[justified]对于该类,此选项也是不必要的biditufte-book。文档类 book 的部分文档biditufte-book可在文档中找到bidi

相关内容