1

Update: I've found an adequate answer - see below. I have many occurrences of certain glossary items spread out over a 100 page document. My output has two entries per line

GF Game force 14, 19,
42, 61,
65, 68,
75, 96,
99, 100,
107–109

and I want it to show e.g. five entries per line

GF Game force 14, 19, 42, 61, 65, 
68, 75, 96, 99, 100,
107–109

I'm using a custom format My_Glossary but I don't see what parameter controls the maximum number of items per line.

Update: Changing widths gives enough space for more than two items, but still only two print i.e.

\setlength\glsdescwidth{0.3\linewidth}

Also changing another parameter gives me what I want though e.g.

\setlength\glspagelistwidth{0.6\linewidth} 

The MWE seems to include all entries in a page range and that's different from my live system but I don't see why.

\documentclass{book}
\usepackage[xindy,automake=true]{glossaries-extra}
\usepackage{blindtext}



 \newglossarystyle{My_Glossary}
    {
        \setglossarystyle{long3colheader}%
        \renewcommand*{\glossaryheader}{}%  
\setlength\glsdescwidth{0.5\linewidth}
        \renewcommand{\glossentry}[2]{%
            \textbf{\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}}}
            & \glossentrydesc{##1}
            & ##2
            \tabularnewline}%
    }

    \newglossaryentry{gf}{name={GF},  description={Game force}, first={First game forcing bid}}%

    \makeglossaries

    \begin{document}
    \chapter{Ch One}

    \gls{gf}
    \blindtext
    \gls{gf}

    \Blindtext
    \gls{gf}

    \blindtext
    \gls{gf}

    \Blindtext
    \gls{gf}

    \Blindtext
    \gls{gf}

    \blindtext
\gls{gf}

\Blindtext
\gls{gf}

\printglossary[type=main,style=My_Glossary]

\end{document}
  • When I try your example, I just get the page range 1--6 (since there's a reference on every page from 1 to 6). My TeX Live setup uses A4 paper by default. Adding \usepackage[letterpaper]{geometry} results in the page range 1--5 instead. So the difference you observe when you switch to TeX Live may be due to different default page settings. Incidentally, you have spurious spaces in your glossary style caused by uncommented end of line characters. These can cause unwanted spaces when you set the style, although I don't think it's noticeable in your particular case. – Nicola Talbot Jul 1 '18 at 11:30
  • Thanks Nicola. My original is properly commented. I started with the misconception that there would be an explicit number of pages shown and finally in desperation read the documentation and discovered that setting the lengths did what I wanted :-) – DLyons Jul 1 '18 at 11:41
  • Okay :-) If you've found the solution then you can self-answer otherwise the question will linger on the unanswered list. – Nicola Talbot Jul 1 '18 at 12:11
0

Answer is now included in the original question i.e. read the excellent documentation and set the column widths appropriately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.