![我们如何编写双语或双语主题索引?例如英语和波斯语索引](https://linux22.com/image/454035/%E6%88%91%E4%BB%AC%E5%A6%82%E4%BD%95%E7%BC%96%E5%86%99%E5%8F%8C%E8%AF%AD%E6%88%96%E5%8F%8C%E8%AF%AD%E4%B8%BB%E9%A2%98%E7%B4%A2%E5%BC%95%EF%BC%9F%E4%BE%8B%E5%A6%82%E8%8B%B1%E8%AF%AD%E5%92%8C%E6%B3%A2%E6%96%AF%E8%AF%AD%E7%B4%A2%E5%BC%95.png)
我正在使用 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}