LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and AcronymsCapital first letter in acronym list using glossaries.sty

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
OLi
Posts: 2
Joined: Wed Feb 17, 2016 6:00 pm

Capital first letter in acronym list using glossaries.sty

Postby OLi » Wed Feb 17, 2016 6:55 pm

Hallo,

I created a list of acronyms using the gossaries package. After updating my MikTeX to the very last version everything works fine. The list is showing the abbreviation on the left and the corresponding explanation on the right. Now, I just want to have the first letter of the explanation capitalized but cannot figure out how to achieve this. This question was already answerred here http://www.latex-community.org/forum/viewtopic.php?f=5&t=9966 but the solution did not work for me.

My code Looks like this
  1. \documentclass[10pt,twoside,headinclude,
  2. headings=small,fleqn,leqno,english,
  3. final,bibliography=totocnumbered
  4. ]{scrartcl}
  5.  
  6. \usepackage{etex}
  7. \usepackage[english]{babel}
  8. \usepackage{babelbib}
  9. \usepackage{graphicx}
  10. \usepackage[left=2.5cm,right=2.5cm,top=3.17cm,bottom=2.22cm]{geometry}
  11. \usepackage{indent}
  12. \usepackage{textcomp}
  13. \usepackage{prelim2e}
  14. \usepackage[mediumspace]{SIunits}
  15. \usepackage[all]{xy}
  16. \usepackage{pgf}
  17. \usepackage{circuitikz}
  18. \usepackage{booktabs}
  19. \usepackage[caption=false,font=footnotesize]{subfig}
  20. \usepackage{paralist}
  21. \usepackage{multirow}
  22. \usepackage{calc}
  23. \usepackage{rotating}
  24. \usepackage{colortbl}
  25. \usepackage[bookmarks=true]{hyperref}
  26.  
  27. \usepackage[acronym,nonumberlist,toc,nopostdot]{glossaries}
  28. \setglossarystyle{long}
  29. \setacronymstyle{long-short}
  30. \makeglossaries
  31.  
  32. \newacronym{TW}{TW}{this word}
  33.  
  34. \begin{document}
  35. \tableofcontents
  36. \printglossary[type=\acronymtype]
  37.  
  38. Within the text \gls{TW} should appear in small letters. In the list of acronyms, the Long form of \acrshort{TW} should appear with a capital first letter.
  39.  
  40. \end{document}
  41.  

User avatar
Johannes_B
Site Moderator
Posts: 3725
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Feb 17, 2016 7:13 pm

Welcome,
you are loading a bunch of very old packages there.

I would argue that the description is a sentence and hence should start with a capital letter, also in the input.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

OLi
Posts: 2
Joined: Wed Feb 17, 2016 6:00 pm

Postby OLi » Wed Feb 17, 2016 7:19 pm

I would argue that the description is a sentence and hence should start with a capital letter, also in the input.

But then I have it with a capital letter within my text.

you are loading a bunch of very old packages there.

I did not get any error Messages. But could there be compatibility problems?

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

Postby nlct » Sat Apr 30, 2016 1:34 pm

With the basic glossaries package, you'd need to define a new glossary style that uses \Glossentrydesc instead of \glossentrydesc.

  1. \documentclass{article}
  2.  
  3. \usepackage{hyperref}
  4. \usepackage[acronym,nonumberlist,toc,nopostdot]{glossaries}
  5.  
  6. \newglossarystyle{longuc}%
  7. {%
  8. \setglossarystyle{long}%
  9. \renewcommand{\glossentry}[2]{%
  10. \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
  11. \Glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
  12. }%
  13. }
  14.  
  15. \setglossarystyle{longuc}
  16. \setacronymstyle{long-short}
  17. \makeglossaries
  18.  
  19. \newacronym{TW}{TW}{this word}
  20.  
  21. \begin{document}
  22. \tableofcontents
  23. \printglossary[type=\acronymtype]
  24.  
  25. Within the text \gls{TW} should appear in small letters. In the list
  26. of acronyms, the Long form of \acrshort{TW} should appear with a
  27. capital first letter.
  28.  
  29. \end{document}


With the extension package glossaries-extra it's easier to make these minor adjustments using the category attributes. For example:

  1. \documentclass{article}
  2.  
  3. \usepackage{hyperref}
  4. \usepackage[acronym,nonumberlist]{glossaries-extra}
  5.  
  6. \setglossarystyle{long}
  7. \setabbreviationstyle[acronym]{long-short}
  8. \makeglossaries
  9.  
  10. \glssetcategoryattribute{acronym}{glossdesc}{firstuc}
  11.  
  12. \newacronym{TW}{TW}{this word}
  13.  
  14. \begin{document}
  15. \tableofcontents
  16. \printglossary[type=\acronymtype]
  17.  
  18. Within the text \gls{TW} should appear in small letters. In the list
  19. of acronyms, the Long form of \acrshort{TW} should appear with a
  20. capital first letter.
  21.  
  22. \end{document}


Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 1 guest