使用 eledmac 和 eledpar 进行索引

使用 eledmac 和 eledpar 进行索引

使用 eledmac 和 eledpar 排版关键版本时,我想用该\edindex[]{}命令制作分割索引。虽然我认为包以正确的顺序加载,并且 \edindex 的语法正确,但 latex 返回以下错误消息:

./test2.tex:36: Undefined control sequence.`
<argument> \string \indexentry {\@index@txt 
                                            \@edindex@hyperref }{\thepageline }
l.36 ...iae Iovis\edindex[persons]{Manubiae Iovis}
                                                   tres creduntur esse, quar...

以下 MWE 会产生此错误。如果您能提供任何有关源错误的信息,我将不胜感激。

\documentclass[11pt,a4paper]{scrbook}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{typearea}
\usepackage[ngerman,latin]{babel}

%\renewcommand*{\chapterheadendvskip}{\vspace{0.725\baselineskip plus 0.115\baselineskip minus 0.192\baselineskip}}

\usepackage{imakeidx} 
\usepackage{eledmac}
\usepackage{eledpar}

\footparagraph{A}
\footparagraph{B}
\footparagraph{C}
%\makeindex[title=Index,columns=2]
\newcommand{\AAp}[4]{\edtext{#1}{\lemma{#2}\Afootnote{#3 \textit{#4}}}}
\newcommand{\BAp}[4]{\edtext{#1}{\lemma{#2}\Bfootnote{#3 \textit{#4}}}}
\newcommand{\CAp}[4]{\edtext{#1}{\lemma{#2}\Cfootnote{#3 \textit{#4}}}}

\makeindex[title=Allgemeinindex,columns=2]{}
\makeindex[name=persons, title=Index of names,columns=2]{}

\begin{document}
\begin{pages}
\begin{Leftside}
\beginnumbering
\pstart
\eledchapter*{blabla}
\pend\pstart
Manubiae Iovis\edindex[persons]{Manubiae Iovis} tres creduntur esse, quarum unae sint minimae, quae moneant placataeque sint. Alterae quae maiores\edindex{maiores} sint, ac veniant cum fragore, discutiantque aut divellant, quae a Iove \AAp{sint}{sint}{}{lacuna post sint ind. Porson\edindex{lacuna}}, et consilio deorum mitti existimentur.
\pend

\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\pstart
\eledchapter*{bla}
\pend\pstart
Maeson\edindex[persons]{Maeson} persona comica appellatur, aut coci, aut nautae, aut eius generis. Dici ab inventore eius Maesone comoedo\edindex[persons]{Maeson comoedus} , ut ait Aristophanes Grammaticus\edindex[persons]{Aristophanes Gram.}
\pend
\endnumbering
\end{Rightside}
\end{pages}
\Pages

%\printindex
%\printindex[persons]
\end{document}

答案1

正如@Andrew Swann 所说,这是 eledmac 中的一个错误。我刚刚在 CTAN 上发布了针对这三个错误的更正。

非常感谢@Andre Swann 和@mxordn。

答案2

eledmac我认为最新版本的( )中出现了一些错误eledmac 2014/08/15 v1.12.3。无论如何,如果您加载包,您发现的错误就会消失hyperref。但是,随后会出现一个由包含空格的索引条目引起的新错误。这可以通过编写一对额外的括号来纠正

 \edindex[persons]{{Manubiae Iovis}}

但这肯定不是预期的行为(错误来自xstring包使用的解析)。最后,即使考虑到这两点,makeindex现在也会在第二次运行时拒绝索引中的四个条目中的三个persons。我认为你应该向维护人员报告这一点。

\documentclass[11pt,a4paper]{scrbook}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{typearea}
\usepackage[ngerman,latin]{babel}

\usepackage{imakeidx} 
\usepackage{eledmac}
\usepackage{eledpar}
\usepackage{hyperref}

\footparagraph{A}
\footparagraph{B}
\footparagraph{C}

\newcommand{\AAp}[4]{\edtext{#1}{\lemma{#2}\Afootnote{#3 \textit{#4}}}}
\newcommand{\BAp}[4]{\edtext{#1}{\lemma{#2}\Bfootnote{#3 \textit{#4}}}}
\newcommand{\CAp}[4]{\edtext{#1}{\lemma{#2}\Cfootnote{#3 \textit{#4}}}}

\makeindex[title=Allgemeinindex,columns=2]
\makeindex[name=persons,title=Index of names,columns=2]

\begin{document}
\begin{pages}
\begin{Leftside}
\beginnumbering
\pstart
\eledchapter*{blabla}
\pend\pstart
Manubiae Iovis\edindex[persons]{{Manubiae Iovis}} tres creduntur esse,
quarum unae sint minimae, quae moneant placataeque sint. Alterae quae
maiores\edindex{maiores} sint, ac veniant cum fragore, discutiantque
aut divellant, quae a Iove \AAp{sint}{sint}{}{lacuna post sint
ind. Porson\edindex{lacuna}}, et consilio deorum mitti existimentur. 
\pend

\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\pstart
\eledchapter*{bla}
\pend\pstart
Maeson\edindex[persons]{Maeson} persona comica appellatur, aut coci,
aut nautae, aut eius generis. Dici ab inventore eius Maesone
comoedo\edindex[persons]{{Maeson comoedus}}, ut ait Aristophanes
Grammaticus\edindex[persons]{{Aristophanes Gram.}} 
\pend
\endnumbering
\end{Rightside}
\end{pages}
\Pages

\printindex
\printindex[persons]
\end{document}

生成仅包含以下内容的人员索引:

示例输出

pdflatex -shell-escapepersons.ilg报告

This is makeindex, version 2.15 [TeX Live 2014] (kpathsea + Thai support).
Scanning input file persons.idx....
!! Input index error (file = persons.idx, line = 2):
   -- Illegal Arabic digit: position 2 in 2R.
!! Input index error (file = persons.idx, line = 3):
   -- Illegal Arabic digit: position 2 in 3R.
!! Input index error (file = persons.idx, line = 4):
   -- Illegal Arabic digit: position 2 in 3R.
done (1 entries accepted, 3 rejected).
Sorting entries...done (0 comparisons).
Generating output file persons.ind....done (5 lines written, 0 warnings).
Output written in persons.ind.
Transcript written in persons.ilg.

相关内容