1

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}
    \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
    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
  • thank you for your notes. But I still have the problem with the glossarie. (I deleted the bibligraphy, this makes no trouble and isn't importand here). – לאה פּאַסטעך Jul 31 '17 at 09:45

1 Answers1

4

Your code

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

image of document

Nicola Talbot
  • 41,153
  • 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: https://www.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 (https://www.overleaf.com/10443287pndzdjcfndjy) – but that is an overleaf problem I think – לאה פּאַסטעך Jul 31 '17 at 17:38
  • @לאהפּאַסטעך I've added TeXshop instructions. I've already mentioned that warning in my answer. There's currently no Hebrew support with glossaries. You'll have to provide your own translations. – Nicola Talbot Jul 31 '17 at 17:55
  • thanks again! I've made such a file and but it in "Engine" order of TexShop. But still I don't get a Glossarie :( – לאה פּאַסטעך Jul 31 '17 at 18:21
  • @לאהפּאַסטעך Did you make the glossaries.engine file executable (using chmod)? Did you restart TeXShop and select glossaries from the engine list? Is there a file with the extension .glg in your document directory (with all the other temporary files like the .log and .aux file)? – Nicola Talbot Jul 31 '17 at 18:34
  • what did you mean with "select glossaries from the engine list" ? (sorry) – לאה פּאַסטעך Jul 31 '17 at 20:37
  • @לאהפּאַסטעך I'm sorry, I don't have TeXshop so I was just guessing from what I'd read. If you look at this image of TeXshop next to the "Typeset" button there's a dropdown menu (showing "LaTeX" in the picture). If you click on that, it should list all the available engines, so the new glossaries.engine should show up there. (I expect you probably have XeLaTeX currently selected.) – Nicola Talbot Aug 01 '17 at 07:56
  • thank you again. Now I see. But even if I am running the document with glossaries I don't get a glossarie – I will try some other things… – לאה פּאַסטעך Aug 01 '17 at 11:47
  • there is still the error Package glossaries Warning: No language module detected forhebrew'.` – לאה פּאַסטעך Aug 01 '17 at 12:10
  • 1
    @לאהפּאַסטעך 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 01 '17 at 12:32
  • Sorry, but I can't get the output you have. Could you tell me how you compile it (via terminal and Perl)? Are you using XeLaTeX? It would be sad if all your work would be for nothing just because I am too dump compiling it :( – לאה פּאַסטעך Aug 04 '17 at 12:50
  • 1
    @לאהפּאַסטעך 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 04 '17 at 12:57
  • I think it might be better if I move most of this answer to your other question. – Nicola Talbot Aug 04 '17 at 13:06
  • thank you! It works like this perfectly :) Maybe you move it to the answer too! (I am so relieved, that it works!) – לאה פּאַסטעך Aug 04 '17 at 13:11
  • just one more thing: If I want to include a bibliography how do I compile biblatex (biber) with the terminal? – לאה פּאַסטעך Aug 04 '17 at 13:24
  • @לאהפּאַסטעך I'm sorry I realise that I missed a comma between the sort and description. That might have been causing a problem. I've moved most of the answer to the other question and I've included a bibliography at the end of it. You can adapt it from bibtex to biblatex. – Nicola Talbot Aug 04 '17 at 13:58