## LaTeX forum ⇒ Others ⇒ glossaries | Item does not appear and unwanted Brackets Topic is solved

Information and discussion about other tools not listed above.
novoid
Posts: 5
Joined: Wed Jul 11, 2012 1:24 pm
Location: Austria
Contact:

### glossaries | Item does not appear and unwanted Brackets

Hi!

I do have two problems using the glossaries package:

What I want to accomplish:

Normal glossary entries as usual but the abbreviated acronyms should be set in \textsc (using my \myacro{} command if possible).

What I got:

When I am using the "smaller" option in order to do the \renewcommand*{\acronymfont} trick (as mentioned in the glossaries FAQs), I get brackets after each normal glossary word in the main text.

Second problem:

I have got an entry (myinode) which does not get printed in the glossary. I could not generate a minimal example because whenever I remove a part of its text, it suddenly appears in the glossary. Perhaps you can find my problem with this entry.


The makeglossaries-output looks fine:
vk@gary ~2d % makeglossaries 2012-07-07-glossaries-problemsadded glossary type 'main' (glg,gls,glo)makeindex  -s "2012-07-07-glossaries-problems.ist" -t "2012-07-07-glossaries-problems.glg" -o "2012-07-07-glossaries-problems.gls" "2012-07-07-glossaries-problems.glo"This is makeindex, version 2.15 [TeX Live 2009] (kpathsea + Thai support).Scanning style file ./2012-07-07-glossaries-problems.ist...........................done (27 attributes redefined, 0 ignored).Scanning input file 2012-07-07-glossaries-problems.glo....done (4 entries accepted, 1 rejected).Sorting entries....done (9 comparisons).Generating output file 2012-07-07-glossaries-problems.gls....done (12 lines written, 0 warnings).Output written in 2012-07-07-glossaries-problems.gls.Transcript written in 2012-07-07-glossaries-problems.glg.

Thanks for any hint!

novoid
Posts: 5
Joined: Wed Jul 11, 2012 1:24 pm
Location: Austria
Contact:
What I found out in the meantime: when I am using the "acronym" option of the glossaries package, the brackets are gone. The list of acronyms is now separated from the glossary which is not what I wanted but which is acceptable to a certain point.

BUT:

There seems to be a contradiction between "having small caps for acronyms in the text" and "using uppercase letters (or small caps) for acronyms in the list of acronyms".

Can you confirm this?

Or even better: please show me how to achieve following things:

Thank you very much!

nlct
Posts: 266
Joined: Thu Nov 06, 2008 11:15 am
Contact:
If you want to mix acronyms and glossary terms in a single glossary (rather than having a separate main glossary and list of acronyms) you're better off using the custom acronym style, like this
\documentclass[a4paper]{scrartcl}\usepackage{ucs}\usepackage[utf8x]{inputenc}\DeclareRobustCommand{\myacro}[1]{\textsc{\lowercase{#1}}}  %% I use this to format TLAs\usepackage[toc,smaller]{glossaries} %% option "smaller" is to be able to change acronym font \makeglossaries \SetCustomStyle \renewcommand*{\CustomAcronymFields}{%   sort={\the\glsshorttok},   name={\MakeUppercase{\the\glsshorttok}},%   description={\the\glslongtok},%   first={\the\glslongtok\space(\myacro{\the\glsshorttok})},%   firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space(\myacro{\the\glsshorttok})}%   text={\myacro{\the\glsshorttok}},%   plural={\myacro{\the\glsshorttok\noexpand\acrpluralsuffix}}%} \begin{document} \newglossaryentry{partition}{   name={partition},   description={Physical hard disks\ldots}} \newglossaryentry{inode}{   name=inode,   plural=inodes,   description={The smallest file- or directory-relatedinformation   entity managed by a file system. Usually, a file is stored ina set   of linear linked inodes. A link or a directory consists of asingle   inode.  The actual size of an inode is defined by the chunk   size of a specific file system while being instantiated.Typically   an inode is 4,096 Bytes big. A file system is only able tostore   files multiples of inode size quantities. This means that afile   which holds 42 Bytes also uses up 4,096 Bytes on the hard   drive. This unused occupied 4.052 Bytes are part of the   internal fragmentation''. In extreme cases this could lead   to a full hard drive partition while only storing a fractionof the   disk capacity. Most file systems have a hard limit on thenumber of   inodes.\footnote{There are some exceptions to this fact. Forexample   in \myacro{XFS}, inodes are assigned dynamically andtherefore can   hold much more entities.}}     } \newacronym{lvm}{LVM}{Logical Volume Manager} My problem:\\\gls{partition} is having brackets\\\gls{lvm} is fine but is in small characters in the glossary\\\gls{lvm} is fine but is in small characters in the glossary\\\gls{inode} is having brackets and its entry never gets printedin the glossary. \printglossaries \end{document}

Regards
Nicola Talbot

novoid
Posts: 5
Joined: Wed Jul 11, 2012 1:24 pm
Location: Austria
Contact:
Hi Nicola!

I wnated to try your code snippet but unfortunately I get an "Undefined control sequence." at following line:

nlct wrote:
\SetCustomStyle

I could not find "SetCustomStyle" in the glossaries documentation.

Thanks for any hint!

nlct
Posts: 266
Joined: Thu Nov 06, 2008 11:15 am
Contact:
Sounds like you're using an old version of glossaries. Try updating it.

Regards
Nicola Talbot

novoid
Posts: 5
Joined: Wed Jul 11, 2012 1:24 pm
Location: Austria
Contact:
Hi Nicola!

nlct wrote:Sounds like you're using an old version of glossaries. Try updating it.

Yep, I manually installed glossaries from http://tug.ctan.org/tex-archive/macros/ ... glossaries and now your example works fine. (My Ubuntu 11.04 seems to have an older glossaries package version in its repository.)

It also resembles my requirements with one exception: the second \gls{lvm} is not yet set with \myacro{}. I tried to fix it by myself but so far I could not succeed.

Would you please so kind and help me with this one again?

Thank you very much!

My current example file demonstrating my problem:

\documentclass[a4paper]{scrartcl}\usepackage{ucs}\usepackage[utf8x]{inputenc}\DeclareRobustCommand{\myacro}[1]{\textsc{\lowercase{#1}}}  %% I use this to format TLAs\usepackage[toc,smaller]{glossaries} %% option "smaller" is to be able to change acronym font \makeglossaries \SetCustomStyle \renewcommand*{\CustomAcronymFields}{%   sort={\the\glsshorttok},   name={\MakeUppercase{\the\glsshorttok}},%   description={\the\glslongtok},%   first={\the\glslongtok\space(\myacro{\the\glsshorttok})},%   firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space(\myacro{\the\glsshorttok})}%   text={\myacro{\the\glsshorttok}},%   plural={\myacro{\the\glsshorttok\noexpand\acrpluralsuffix}}%} \begin{document} \newglossaryentry{partition}{ name={partition}, description={Physical hard disks\ldots} } \newglossaryentry{inode}{ name=inode,  plural=inodes,   description={The smallest\ldots} } \newacronym{lvm}{LVM}{Logical Volume Manager} \gls{partition} = partition \\gls: \gls{lvm} = Logical Volume Manager (\myacro{LVM})\\gls: \gls{lvm} != \myacro{LVM}\\Gls: \Gls{lvm} != \myacro{LVM}\\glspl: \glspl{lvm} = \myacro{LVM}\\\gls{inode} = inode \printglossaries \end{document}

nlct
Posts: 266
Joined: Thu Nov 06, 2008 11:15 am
Contact:
Sorry, I missed a comma at the end of a line:
  firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space(\myacro{\the\glsshorttok})},% <- comma here

This should fix subsequent use of \gls{lvm}. \Gls{lvm} won't behave the same as \myacro{LVM} as it's equivalent to \myacro{\MakeUppercase{L}VM}. If you don't want that effect, just use \gls instead of \Gls.

Regards
Nicola Talbot

novoid
Posts: 5
Joined: Wed Jul 11, 2012 1:24 pm
Location: Austria
Contact:
Thank you very much, Nicola!