將 Polyglossia 的 \greeknumeral 與 endnotes 包一起使用

將 Polyglossia 的 \greeknumeral 與 endnotes 包一起使用

我想用希臘數字為尾註編號。為此,我加載了該polyglossia包並創建了一個命令來環繞其\greeknumeral命令。

我發現這一切都完全按照腳註的要求工作,但對於尾註卻令人困惑地不合作。具體來說,XeLaTeX 抱怨其\@xendnote使用方式與其定義不符。但是,我\endnote[num]{text}根本不使用該命令的版本,因此我不確定\greeknumerals 會如何\@xendnote認為它有用。

如果有任何有關問題所在的提示,或有關如何使尾註與希臘數字一起使用的建議,我將不勝感激。我的最小(非)工作示例如下。

%!TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{endnotes,polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{greek}
\newfontfamily{\greekfont}[Script=Greek]{CMU Serif}

\renewcommand\thefootnote{\greek{footnote}}%greek numerals - works fine  
\renewcommand\theendnote{\greek{endnote}}%greek numerals - doesn't work

\makeatletter
\def\greek#1{\expandafter\@greek\csname c@#1\endcsname} %in analogy with \roman
\def\@greek#1{\greekfont\greeknumeral #1}
\makeatother

\begin{document}
Lorem ipsum dolor sit amet,\endnote{en1}...
\theendnotes
\end{document}

相關內容