MakeIndex, Nomenclature, Glossaries and Acronymsglossaries | Column Width

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
Clavigo
Posts: 2
Joined: Mon Jul 16, 2012 11:23 pm

glossaries | Column Width

Post by Clavigo »

Hi folks,

I am using the "glossaries" package in order to generate a symbols list for my thesis. This symbols list is supposed to be divided into sub-categories (parents) and it should also display units of each referenced symbol.
I was able to comply both requirements by defining a new "longtable"-style. However, I am not yet pleased with the current style of my symbols list because the width of the headline of my first sub-category defines the entire width of the first column of my table. For this reason the unit is not indented which means it is always located to the "right" in respect to the headline of the sub-category (parent). I would like to indent the entire column that belongs to the units in order to generate more space for the description-column.

The following minimal working example illustrates this issue:

Code: Select all

Code, edit and compile here:
\documentclass[12pt,oneside,a4paper,fleqn]{book}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[nonumberlist,acronym,toc]{glossaries}
\newglossary[slg]{symbolslist}{syi}{syg}{Symbols List} % user-defined symbols list
\renewcommand*{\glspostdescription}{}
%
% -- Glossary-Style -- %%
%
% -- Symbols List -- %%
\newglossarystyle{symbol}{
\renewenvironment{theglossary}
{\begin{longtable}[l]{lp{2.5cm}p{\glsdescwidth}}}
{\end{longtable}}
\renewcommand*{\glossaryheader}{}
\renewcommand*{\glossaryentryfield}[4]{
\vspace{0.2cm}%
\glstarget{##1}{##2} & & \\%
}
\renewcommand*{\glossarysubentryfield}[5]{
\hspace{1.0cm} \glstarget{##2}{##3} & ##5 & ##4\glspostdescription\space \\%
}
\renewcommand*{\glsgroupskip}{}
}
%
% -- Glossary-Groups -- %%%
%
% Sub-Category Greek Letters
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Unfortunately I have to admit that I am no expert when it comes to LaTeX so I would highly appreciate any useful tips.

Thank you very much for your help!

Greetings,
Clavigo

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

glossaries | Column Width

Post by nlct »

Maybe make the first level span all three columns. For example:

Code: Select all

Code, edit and compile here:
\renewcommand*{\glossaryentryfield}[4]{%
\vspace{0.2cm}\\%
\multicolumn{3}{l}{\glstarget{##1}{##2}}\\%
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Regards
Nicola Talbot
Clavigo
Posts: 2
Joined: Mon Jul 16, 2012 11:23 pm

Re: glossaries | Column Width

Post by Clavigo »

Great! Thank you very much!!! :D

Your advice helped me a lot. I was able to tweak the style a little bit and now the glossary looks exactly the way I want it! ;)
dieter
Posts: 1
Joined: Thu Sep 06, 2012 5:04 pm

glossaries | Column Width

Post by dieter »

Hi Clavigo,

I could make use of your working example to produce a similar list of symbols. Thanks for that. However, I noticed it produces very little space between both groups (roman and greek letters).
I would like to increase a blank row after each group using
\renewcommand*{\glsgroupskip}{&&&\\}
but this does not work.
Do you have an idea how to do this?

Thanks,

Dieter
Post Reply