我正在使用 XePersian 软件包准备一本波斯语书籍。我想为这本书创建波斯语和英语的索引。使用现有的 latex 软件包执行此操作的最佳方法是什么?
答案1
该类memoir
提供多个索引。请参阅手册中的第 17.2 节索引 ( texdoc memoir
)。我不了解不同的语言。
答案2
这是一个使用 的简单示例imakeidx
。索引生成(使用makeindex
)是自行完成的imakeidx
,因此无需makeindex
单独运行。
注意:我本人不懂任何波斯语。
\documentclass{article}
\usepackage{imakeidx}
\usepackage{polyglossia}
\usepackage{xepersian}
\settextfont[Mapping={}]{Amiri}
\setdefaultlanguage{english}
\makeindex[name=english,title={English Index}]
\makeindex[name=persian,title={Farsi Index}]
\begin{document}
\begin{latin}
\section{Omar Khayyam}
\index[english]{Omar Khayyam} \index[persian]{\rl{عمر خیّام}}
Ghiyāth al-Dīn Abū al-Fatḥ ʿUmar ibn Ibrāhīm Nīsābūrī (18 May 1048
– 4 December 1131), commonly known as Omar Khayyam (Persian:
\rl{عمر خیّام}), was a polymath, known for his contributions to
mathematics, astronomy, philosophy, and Persian poetry. He was born in
Nishapur, the initial capital of the Seljuk Empire. As a scholar, he
was contemporary with the rule of the Seljuk dynasty around the time
of the First Crusade (Source: Wikipedia).
\printindex[english]
\end{latin}
\printindex[persian]
\end{document}