LaTeX forum ⇒ Othersglossaries | 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

Postby novoid » Wed Jul 11, 2012 1:43 pm

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.

  1. \documentclass[a4paper]{scrartcl}
  2. \usepackage{ucs}
  3. \usepackage[utf8x]{inputenc}
  4. \newcommand{\myacro}[1]{\textsc{\lowercase{#1}}} %% I use this to format TLAs
  5. \usepackage[toc,smaller]{glossaries} %% option "smaller" is to be able to change acronym font
  6. \renewcommand*{\acronymfont}[1]{\myacro{#1}} %% changes the format of the acronyms
  7. \makeglossaries
  8.  
  9. \begin{document}
  10.  
  11. \newglossaryentry{partition}
  12. {
  13. name={partition},
  14. description={Physical hard disks\ldots}
  15. }
  16.  
  17. \newglossaryentry{inode}
  18. {
  19. name=inode,
  20. plural=inodes,
  21. description={The smallest file- or directory-related information
  22. entity managed by a file system. Usually, a file is stored in a set
  23. of linear linked inodes. A link or a directory consists of a single
  24. inode. The actual size of an inode is defined by the chunk
  25. size of a specific file system while being instantiated. Typically
  26. an inode is 4,096 Bytes big. A file system is only able to store
  27. files multiples of inode size quantities. This means that a file
  28. which holds 42 Bytes also uses up 4,096 Bytes on the hard
  29. drive. This unused occupied 4.052 Bytes are part of the
  30. ``internal fragmentation''. In extreme cases this could lead
  31. to a full hard drive partition while only storing a fraction of the
  32. disk capacity. Most file systems have a hard limit on the number of
  33. inodes.\footnote{There are some exceptions to this fact. For example
  34. in \myacro{XFS}, inodes are assigned dynamically and therefore can
  35. hold much more entities.}}
  36. }
  37.  
  38. \newacronym{lvm}{LVM}{Logical Volume Manager}
  39.  
  40. My problem:\\
  41. \gls{partition} is having brackets\\
  42. \gls{lvm} is fine but is in small characters in the glossary\\
  43. \gls{lvm} is fine but is in small characters in the glossary\\
  44. \gls{inode} is having brackets and its entry never gets printed in the glossary.
  45.  
  46. \printglossaries
  47.  
  48. %% compiled with: (on Ubuntu 10.04)
  49. %% pdflatex main.tex && makeglossaries main && pdflatex main && pdflatex main && okular main.pdf
  50. %% pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)
  51. %% Makeglossaries Version 1.7 (2009-09-23)
  52.  
  53. \end{document}


The makeglossaries-output looks fine:
  1. vk@gary ~2d % makeglossaries 2012-07-07-glossaries-problems
  2. added glossary type 'main' (glg,gls,glo)
  3. 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"
  4. This is makeindex, version 2.15 [TeX Live 2009] (kpathsea + Thai support).
  5. Scanning style file ./2012-07-07-glossaries-problems.ist...........................done (27 attributes redefined, 0 ignored).
  6. Scanning input file 2012-07-07-glossaries-problems.glo....done (4 entries accepted, 1 rejected).
  7. Sorting entries....done (9 comparisons).
  8. Generating output file 2012-07-07-glossaries-problems.gls....done (12 lines written, 0 warnings).
  9. Output written in 2012-07-07-glossaries-problems.gls.
  10. 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:

Postby novoid » Thu Jul 12, 2012 1:39 pm

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!

User avatar
nlct
Posts: 266
Joined: Thu Nov 06, 2008 11:15 am
Contact:

Postby nlct » Sat Jul 14, 2012 2:03 pm

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
  1. \documentclass[a4paper]{scrartcl}
  2. \usepackage{ucs}
  3. \usepackage[utf8x]{inputenc}
  4. \DeclareRobustCommand{\myacro}[1]{\textsc{\lowercase{#1}}} %% I use this to format TLAs
  5. \usepackage[toc,smaller]{glossaries} %% option "smaller" is to be able to change acronym font
  6.  
  7. \makeglossaries
  8.  
  9. \SetCustomStyle
  10.  
  11. \renewcommand*{\CustomAcronymFields}{%
  12. sort={\the\glsshorttok},
  13. name={\MakeUppercase{\the\glsshorttok}},%
  14. description={\the\glslongtok},%
  15. first={\the\glslongtok\space(\myacro{\the\glsshorttok})},%
  16. firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space(\myacro{\the\glsshorttok})}%
  17. text={\myacro{\the\glsshorttok}},%
  18. plural={\myacro{\the\glsshorttok\noexpand\acrpluralsuffix}}%
  19. }
  20.  
  21. \begin{document}
  22.  
  23. \newglossaryentry{partition}
  24. {
  25. name={partition},
  26. description={Physical hard disks\ldots}
  27. }
  28.  
  29. \newglossaryentry{inode}
  30. {
  31. name=inode,
  32. plural=inodes,
  33. description={The smallest file- or directory-related
  34. information
  35. entity managed by a file system. Usually, a file is stored in
  36. a set
  37. of linear linked inodes. A link or a directory consists of a
  38. single
  39. inode. The actual size of an inode is defined by the chunk
  40. size of a specific file system while being instantiated.
  41. Typically
  42. an inode is 4,096 Bytes big. A file system is only able to
  43. store
  44. files multiples of inode size quantities. This means that a
  45. file
  46. which holds 42 Bytes also uses up 4,096 Bytes on the hard
  47. drive. This unused occupied 4.052 Bytes are part of the
  48. ``internal fragmentation''. In extreme cases this could lead
  49. to a full hard drive partition while only storing a fraction
  50. of the
  51. disk capacity. Most file systems have a hard limit on the
  52. number of
  53. inodes.\footnote{There are some exceptions to this fact. For
  54. example
  55. in \myacro{XFS}, inodes are assigned dynamically and
  56. therefore can
  57. hold much more entities.}}
  58. }
  59.  
  60. \newacronym{lvm}{LVM}{Logical Volume Manager}
  61.  
  62. My problem:\\
  63. \gls{partition} is having brackets\\
  64. \gls{lvm} is fine but is in small characters in the glossary\\
  65. \gls{lvm} is fine but is in small characters in the glossary\\
  66. \gls{inode} is having brackets and its entry never gets printed
  67. in the glossary.
  68.  
  69. \printglossaries
  70.  
  71. \end{document}


Regards
Nicola Talbot

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

Postby novoid » Mon Jul 23, 2012 1:54 pm

Hi Nicola!

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

nlct wrote:
  1. \SetCustomStyle



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

Thanks for any hint!

User avatar
nlct
Posts: 266
Joined: Thu Nov 06, 2008 11:15 am
Contact:

Postby nlct » Wed Jul 25, 2012 11:10 pm

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:

Postby novoid » Sat Jul 28, 2012 12:04 am

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:

  1. \documentclass[a4paper]{scrartcl}
  2. \usepackage{ucs}
  3. \usepackage[utf8x]{inputenc}
  4. \DeclareRobustCommand{\myacro}[1]{\textsc{\lowercase{#1}}} %% I use this to format TLAs
  5. \usepackage[toc,smaller]{glossaries} %% option "smaller" is to be able to change acronym font
  6.  
  7. \makeglossaries
  8.  
  9. \SetCustomStyle
  10.  
  11. \renewcommand*{\CustomAcronymFields}{%
  12. sort={\the\glsshorttok},
  13. name={\MakeUppercase{\the\glsshorttok}},%
  14. description={\the\glslongtok},%
  15. first={\the\glslongtok\space(\myacro{\the\glsshorttok})},%
  16. firstplural={\the\glslongtok\noexpand\acrpluralsuffix\space(\myacro{\the\glsshorttok})}%
  17. text={\myacro{\the\glsshorttok}},%
  18. plural={\myacro{\the\glsshorttok\noexpand\acrpluralsuffix}}%
  19. }
  20.  
  21. \begin{document}
  22.  
  23. \newglossaryentry{partition}
  24. { name={partition}, description={Physical hard disks\ldots} }
  25.  
  26. \newglossaryentry{inode}
  27. { name=inode, plural=inodes,
  28. description={The smallest\ldots} }
  29.  
  30. \newacronym{lvm}{LVM}{Logical Volume Manager}
  31.  
  32. \gls{partition} = partition \\
  33. gls: \gls{lvm} = Logical Volume Manager (\myacro{LVM})\\
  34. gls: \gls{lvm} != \myacro{LVM}\\
  35. Gls: \Gls{lvm} != \myacro{LVM}\\
  36. glspl: \glspl{lvm} = \myacro{LVM}\\
  37. \gls{inode} = inode
  38.  
  39. \printglossaries
  40.  
  41. \end{document}

User avatar
nlct
Posts: 266
Joined: Thu Nov 06, 2008 11:15 am
Contact:

Postby nlct » Mon Aug 13, 2012 8:27 pm

Sorry, I missed a comma at the end of a line:
  1. 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:

Postby novoid » Wed Aug 15, 2012 6:48 pm

Thank you very much, Nicola!


Return to “Others”

Who is online

Users browsing this forum: No registered users and 1 guest