我在使用词汇表包处理一些使用 \libertineGlyph 和 \makebox 的自建希伯来字符时遇到了麻烦。条目如下所示:
\newglossaryentry{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}}{name={\RL{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}},description={‘Peace be with her’ oleho hascholaum}}}
例子:
\documentclass[10pt,a5paper,twoside]{scrbook}
\usepackage[onehalfspacing]{setspace}
\usepackage[bmargin=2.25cm]{geometry}
\usepackage{polyglossia, xunicode}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot
\ihead{\headmark}
\ohead{\pagemark}
\setheadsepline{0.4pt}
\setkomafont{pageheadfoot}{\normalfont\normalcolor\small}\setkomafont{pagenumber}{\normalfont}
\addtokomafont{pagehead}{\normalfont}
\setkomafont{disposition}{\normalcolor\bfseries}
\clubpenalty=10000
\widowpenalty=10000
\usepackage{color}
\usepackage{multicol,multirow, bigdelim} %%deleted times
%%%FONTS AND LANGUAGES
\usepackage{fontspec}
\usepackage{libertine}
\setmainfont[Ligatures=TeX]{Linux Libertine}
\setmainlanguage{german}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}
\usepackage[parfill]{parskip}
\usepackage[series={A,B,C}]{reledmac}
\usepackage{reledpar}
\setgoalfraction{0.85}
\lineation{section}
\linenummargin{right}
%\setRlineflag{}
\linenumincrement*{5}
\firstlinenum*{0}
\maxchunks{10000}
%START GLOSSAR%%%%%%%%%%%%%%%
\usepackage[xindy]{glossaries}
\makeglossaries
\input{../glossaries.tex}
\setglossarystyle{tree}
%% Glossary Entry
\newglossaryentry{glosse1}{name={\RL{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}},description={‘Peace be with her’ oleho hascholaum}}}
%END GLOSSAR%%%%%%%%%%%%%%
\usepackage{metalogo,hyperref}
\Xendbeforepagenumber{S.\,}
\Xendafterpagenumber{:\,}
\Xendlineprefixsingle{Z.\,}
\renewcommand{\thefootnoteA}{\fnsymbol{footnoteA}}
\newcommand\einzugjid{\hangindent=5mm\hangafter=1}
\newcommand\speaker[1]{\noindent{#1} \einzugjid
}
\newcommand\einzug{\hangindent=5mm\hangafter=1}
\newcommand\speakerd[1]{\noindent
{\textsc{#1}} \einzug
}
\usepackage[normalem]{ulem}
\begin{document}
\begin{pages}
\begin{Leftside}\begin{hebrew}
\setRTL
\beginnumbering
\pstart {\RL{\speaker{יוקב.}
געלטע דאָס גִיט אָבער לאָסטיג
\edgls{האנאָרים}
?}} \pend
\pstart {\RL{\speaker{בויער.}
יאָ, דאָס גלעב אייך. הויא פערדיענסט דוא אַהך ניט פֵֿיעל. }}
\pend
\pstart {\RL{\speaker{יוקב.}
פֿערדיענט אייכס דאָך אין אַה פֿירטעל יאָהר, וואָהס מייכ‘ס הויא \edgls{glosse1} און מאָר קאָסט.
\textit{)}\textit{זייפצט}.\textit{(}
}} \pend
\endnumbering
\end{hebrew}
\end{Leftside}
\begin{Rightside}
\beginnumbering
\pstart \speakerd{Person1.} {Gell}, Text…? \pend
\pstart \speakerd{Person 2.} Text… \pend
\pstart \speakerd{Person1.} Text…. \textit{(Seufzt.)} \pend
\endnumbering
\end{Rightside}
\end{pages}
\Pages
\printnoidxglossaries
\end{document}
答案1
您的代码
\newglossaryentry{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}}{name={\RL{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}},description={‘Peace be with her’ oleho hascholaum}}}
有一个严重的问题。第一个参数是标签。它从未排版,但用作参考(\ref
与和非常相似\cite
),因此标签中不应有任何特殊字符。使用 XeLaTeX,可以使用扩展字符(只要它们不活跃)。因此从第一个参数中删除所有标记:
\newglossaryentry{עה}{name={ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה},
description={‘Peace be with her’ oleho hascholaum}}
xindy
自动删除命令和括号,因此\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}
最终会变成(-1,8)[r]uni02DC
,这会使排序混乱。最好使用键sort
设置一个xindy
可以理解的适当排序值。例如:
\newglossaryentry{עה}{name={ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה},
sort={ע˜ה},
description={‘Peace be with her’ oleho hascholaum}}
要不就
\newglossaryentry{עה}{name={ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה},
sort={עה},
description={‘Peace be with her’ oleho hascholaum}}
继我对你上一个问题的回答,这是 MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{libertine}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\setmainlanguage{german}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{Keter YG}
\usepackage[xindy={language=hebrew,glsnumbers=false},nosuper,nolong]{glossaries}
\makeglossaries
\newglossarystyle{germanhebrew}
{% base it on the tree style:
\setglossarystyle{tree}%
% switch to german
\renewenvironment{theglossary}%
{\setlength{\parindent}{0pt}%
\setlength{\parskip}{0pt plus 0.3pt}%
\begin{german}
}%
{\end{german}}%
\renewcommand{\glossentry}[2]{%
\hangindent0pt\relax
\parindent0pt\relax
\glsentryitem{##1}\glstreenamefmt{\glstarget{##1}{%
\texthebrew{\glossentryname{##1}}}}%
\ifglshassymbol{##1}{\space(\glossentrysymbol{##1})}{}%
\glstreepredesc\glossentrydesc{##1}\glspostdescription\space##2\par
}%
}
\newglossaryentry{עה}{name={ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה},
sort={עה},
description={‘Peace be with her’ oleho hascholaum}}
\begin{document}
Deutsche
\begin{hebrew}
עִברִית
\gls{עה}
\end{hebrew}
\printglossary[style=germanhebrew]
\end{document}