1

This is probably a very simple formatting issue with the "see" field. After I run "makeglossaries mwe" on mwe.tex below, the list of acronyms contains misformatted entries like

EC Espoir de chelem. 1, Glossary: ECGlossary:]SansECg

I've tried adding extra brackets around the "see" field without success.

MWE is

\documentclass[a4paper, 11pt, book]{memoir}

\RequirePackage[xindy,acronym]{glossaries}%

\makeglossaries
\newglossaryentry{ECg}{name={EC},description={Espoir de chelem}}
\newglossaryentry{EC}{type=\acronymtype,name={EC},description={Espoir de chelem},first={Espoir de chelem (EC)\glsadd{ECg}},see=[Glossary:]{ECg}}

\newglossaryentry{SansECg}{name={\ensuremath{\sim}EC}, description={Sans espoir de chelem}}
\newglossaryentry{SansEC}{type=\acronymtype,name={\ensuremath{\sim}EC},description={Sans espoir de chelem},first={Sans espoir de chelem (\ensuremath{\sim}EC)\glsadd{SansECg}},see=[Glossary:]{SansECg}}

\begin{document} 

First use \gls{EC}\\
Subsequent use \gls{EC}\\

First use \gls{SansEC}\\
Subsequent use \gls{SansEC}\\

\printglossary[type=\acronymtype]
\printglossary[type=main]

\end{document}

Edit: I've tried reformatting the entries and now I've a version of the MWE that works (MWE1 below). The problem still remains though because when I paste the item definitions below into my live glossary, delete all the associated glossary files and do what should be a clean re-run of my live system, the misformat still appears :-(

MWE1:

\documentclass[a4paper, 11pt, book]{memoir}

%\RequirePackage[pdftex,unicode=true,psdextra,colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=blue,hyperfootnotes=false,linktoc=all]{hyperref}%

\RequirePackage[xindy,acronym]{glossaries}%

\makeglossaries
\newglossaryentry{ecg}{name={EC}, description={Espoir de chelem}}
\newglossaryentry{ec}{type=\acronymtype, name={EC}, description={Espoir de chelem}, first={Espoir de chelem (EC)\glsadd{ecg}}, see=[Glossary:]{ecg}}

\begin{document} 

First use \gls{ec}\\
Subsequent use \gls{ec}\\
\newpage 
Subsequent use \gls{ec}\\


\printglossary[type=\acronymtype]
\printglossary[type=main]

\end{document} 

I thought for a while it was related to an interaction with hyperref, but that doesn't seem to be the case. Initially, I thought there might be a language issue but the first MWE is only English and the live log file shows the French language module automatically being loaded.

2
  • I hadn't noticed that before but it seems that xindy has a problem with see starting with the optional part. It works fine with makeindex. If all your cross-references start with Glossary: then a simple workaround is to omit the [Glossary:] part and just redefine \seename before the glossaries (\renewcommand{\seename}{Glossary:}). Commented Apr 14, 2018 at 10:35
  • Thanks Nicola. As you say, it works fine with makeindex!
    – DLyons
    Commented Apr 14, 2018 at 10:56

1 Answer 1

1

This problem only occurs with xindy and not with makeindex. It's not immediately obvious, but it's caused by xindy merging two entries. The .acn file shows the input that xindy is processing. The first two lines are:

(indexentry :tkey (("EC" "\\glossentry{EC}") ) :xref ("[Glossary:]{ECg}") :attr "see" )
(indexentry :tkey (("\\ensuremath {\\sim }EC" "\\glossentry{SansEC}") ) :xref ("[Glossary:]{SansECg}") :attr "see" )

In the first case, the sort value is EC (the first element in the :tkey list). In the second case, the sort value is \\ensuremath {\\sim }EC, but xindy discards LaTeX markup so this sort value is converted into EC. This is identical to the first entry, so xindy merges them, and the location list ends up with

\glsseeformat[Glossary:]{ECg}[Glossary:]{SansECg}{}

The syntax for \glsseeformat is [tag]{label}{location} so the [ following {ECg} is treated as the location part, which is ignored. The remainder is the trailing text you found in your document. This merging of entries with duplicate sort values is a quirk of xindy. To avoid it, you need to make sure that the sort value is different by adding the sort key. For example:

\newglossaryentry{SansEC}{
 sort={~EC},
 type=\acronymtype,
 name={\ensuremath{\sim}EC},
 description={Sans espoir de chelem},
 first={Sans espoir de chelem (\ensuremath{\sim}EC)\glsadd{SansECg}},
 see=[Glossary:]{SansECg}}
1
  • Excellent answer - much appreciated.
    – DLyons
    Commented Apr 14, 2018 at 23:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .