Page Layoutglossary wider than page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

glossary wider than page

Post by alicehs »

I have had to change from using the far better 'glossaries' package to the (I know, 'now obsolete'...) 'glossary' package. I have many page references for various entries, and using the following style:

Code: Select all

\usepackage[style=long,header=plain,border=none,cols=3,hypertoc=true,
hyper=true]{glossary}
I have the inevitable problem that my page numbers flow off the right hand side of my page. When consulting the manual, it suggests "redefine \glossaryalignment to change the column specifications". I'm not really sure how to go about doing this, and can't find any more instruction. Any ideas?

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossary wider than page

Post by nlct »

Try changing \glsdescwidth (the width of the description column) or \glspagelistwidth (the width of the number list column). These are both lengths so you need to use \setlength. For example:

Code: Select all

\setlength{\glsdescwidth}{0.5\linewidth}
Regards
Nicola Talbot
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: glossary wider than page

Post by alicehs »

Thanks for the suggestion, unfortunately, all I get is:

!Undefined control sequence

looks like LaTeX doesn't recognize \glsdescwidth or \glspagelistwidth :(
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossary wider than page

Post by nlct »

Sorry, I didn't notice that you were using the obsolete glossary package. I mistook it for the glossaries package. You'd be better off updating to glossaries as it's far more flexible.

Regards
Nicola Talbot
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: glossary wider than page

Post by alicehs »

I know I know :-(

Unfortunatly due to the constraints of the work I am doing I have been forced to 'downgrade' to the old-school "glossary" package and have no choice on the matter. My hands are tied!

Can anyone help..?
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossary wider than page

Post by nlct »

Try changing \descriptionwidth. For example

Code: Select all

\setlength{\descriptionwidth}{0.5\linewidth}
or

Code: Select all

\setlength{\descriptionwidth}{3in}
(Sorry I didn't read your first sentence properly!)

Regards
Nicola Talbot
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: glossary wider than page

Post by alicehs »

Thank you thank you!

Don't spose there's a similar command for the width of the 'page number' column that you know of? Couldn't find anything in the glossary.sty file... although maybe its not set - probably why the page numbers flow freely of the right hand side normally!

No worries if not. They'll just have to deal with having narrow descriptions and loooong lists of page numbers if they want the glossary package ;-)

Thanks again. Much help.
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossary wider than page

Post by nlct »

With the help of caffine I think I might be able to answer your original question ;) Try the following somewhere before the glossary is printed

Code: Select all

\renewcommand\glossaryalignment{%
@{\hspace{\tabcolsep}\bfseries}lp{\descriptionwidth}p{1cm}}
Change 1cm as required. Hopefully that should do the trick.

Regards
Nicola Talbot
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: glossary wider than page

Post by alicehs »

absolutely beautiful!
thank you so much! :D
Post Reply