# Glossaries and \libertineGlyph and \makebox

I am having troubles using the Glossaries Package with some self-built hebrew characters using \libertineGlyph and \makebox. An entry looks like this:

\newglossaryentry{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}}{name={\RL{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}},description={‘Peace be with her’ oleho hascholaum}}}


Example:

 \documentclass[10pt,a5paper,twoside]{scrbook}
\usepackage[onehalfspacing]{setspace}

\usepackage[bmargin=2.25cm]{geometry}

\usepackage{polyglossia, xunicode}

\usepackage{scrpage2}

\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}

• The first argument of \newglossaryentry must be a label. It can't contain any code in it. The label is used as a reference and is not typeset anywhere. – Nicola Talbot Jul 30 '17 at 10:51
• This can be – but it also has troubles when I have code inside the specification-part like "name=" or "description=" Is there any idea how I can fix that? – לאה פּאַסטעך Jul 30 '17 at 16:01
• You need to provide a minimal working example (MWE). Something like \documentclass{article}\usepackage[xindy]{glossaries}\makeglossaries \newglossaryentry{label}{name={\RL{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}},description={‘Peace be with her’ oleho hascholaum}}}}\begin{document}\gls{label}\printglossaries\end{document} and add the packages that provide \RL and \libertineGlyph. – Nicola Talbot Jul 30 '17 at 16:14
• Off-topic. Don't load times. It is deprecated anyway and certainly irrelevant here. As @NicolaTalbot said, your label is bad. You need a simple text label here. Note that you aren't making it easy to help because anybody trying to help is going to get errors which are irrelevant. For example, your code requires a glossaries.tex in the directory above the working one, which most people won't have and won't be the same as yours anyhow. Also, if the problem can only be reproduced with that font, we'll need a link. Otherwise, try to use something people are likely to have already. – cfr Jul 30 '17 at 20:50
• You need to load polyglossia before setting the languages. Surely you get an error from this? Also hyperref is being loaded too early. Can you not make your example smaller? Do you need the Biblatex and critical edition stuff? (This requests at least one more file only you have and nobody here can access.) I guess you know that geometry is not recommended with KOMA. – cfr Jul 30 '17 at 20:57

\newglossaryentry{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}}{name={\RL{{ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה}},description={‘Peace be with her’ oleho hascholaum}}}


has a serious problem. The first argument is a label. It's never typeset but is used as a reference (much like \ref and \cite), so there should never be any special characters in the label. With XeLaTeX, it's possible to use extended characters (as long as they're not active). So strip all markup from the first argument:

\newglossaryentry{עה}{name={ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה},
description={‘Peace be with her’ oleho hascholaum}}


xindy automatically strips commands and braces, so \makebox(-1,8)[r]{\libertineGlyph{uni02DC}} will end up as (-1,8)[r]uni02DC, which is going to confuse the sorting. It's better to use the sort key to set an appropriate sort value that xindy can understand. For example:

\newglossaryentry{עה}{name={ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה},
sort={ע˜ה},
description={‘Peace be with her’ oleho hascholaum}}


or just

\newglossaryentry{עה}{name={ע\makebox(-1,8)[r]{\libertineGlyph{uni02DC}}ה},
sort={עה},
description={‘Peace be with her’ oleho hascholaum}}


Following on from my answer to your previous question, here's a 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}


• thank you so much for your work! It would be nice if this would work, but unfortunately it doesn't. Your minimal example as well as when I put it into my document; see: overleaf.com/10443287pndzdjcfndjy (wich editor do you use? With TexShop (latest updates) this doesn't work :( ) – לאה פּאַסטעך Jul 31 '17 at 16:41
• @לאהפּאַסטעך That link isn't my minimal example. What happened when you tried to compile my example (without adding extra code to it)? In what way didn't it work? Any error messages? (I just use vim and run xelatex and makeglossaries from the terminal.) Have you tried building up my example from the start like I did? At what point did it stop working? – Nicola Talbot Jul 31 '17 at 17:02
• with TexShop it doesn't give an error-message with your code above; but it also doesn't print a glossarie. But I get this Package glossaries Warning: No language module detected for 'hebrew'. (glossaries) Language modules need to be installed separately. (glossaries) Please check on CTAN for a bundle called (glossaries) 'glossaries-hebrew' or similar.  With overleaf I get errors (overleaf.com/10443287pndzdjcfndjy) – but that is an overleaf problem I think – לאה פּאַסטעך Jul 31 '17 at 17:38
• @לאהפּאַסטעך No, it's not an error. It's a warning. You can ignore it and provide your own translation through the title option (as I did in one of my examples). If you still can't get the glossary to appear, try What can interfere with glossaries to prevent printing? – Nicola Talbot Aug 1 '17 at 12:32
• @לאהפּאַסטעך Using a terminal on Linux (should be much the same as on a Mac) and assuming the file is called test.tex: xelatex test; makeglossaries test; xelatex test. Principle dependencies: glossaries v4.30 2017-06-11, makeglossaries v2.21, glossaries-german.ldf v1.0, tracklang v1.3.4 2017/03/25, polyglossia v1.42.4 2015/03/25, Perl v5.18.4 (add \listfiles to the document to get a summary at the end of the transcript) – Nicola Talbot Aug 4 '17 at 12:57