LaTeX forum ⇒ GeneralFirst Letter of an Acronym as Capital

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 2
Joined: Mon Jul 11, 2011 8:16 pm

First Letter of an Acronym as Capital

Postby mvd » Mon Jul 11, 2011 8:24 pm

Hi all,

I have all acronyms defined with lower case, e.g.,
\acro{TEDC}{tunable electrical dispersion compensation}.

However, when I start a new sentence:
  1. (...) dispersion compensation. \ac{TEDC} using (.)))

in the output pdf file I get
(...) dispersion compensation. tunable electrical dispersion compensation (TEDC) (...)

What should I do to set the first character of an acronym to Capital size in the beginning of a sentence, i.e.,

(...) dispersion compensation. Tunable electrical dispersion compensation (TEDC) (...)


Thanks for your help!
Last edited by cgnieder on Fri Oct 05, 2012 12:36 am, edited 1 time in total.
Reason: added code markup

User avatar
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Mon Jul 11, 2011 10:18 pm

I suppose you're using acronym package. I'm not sure if there is an easy way to do that. However, you might try glossaries package, which has implemented this feature. E.g.:

  1. \documentclass{book}
  3. \usepackage[acronym,shortcuts]{glossaries}
  5. \makeglossaries
  7. %%% Glossaries/Acronyms
  8. \newacronym{tedc}{TEDC}{tunable electrical dispersion compensation}
  10. \begin{document}
  12. Some text. \Ac{tedc}.
  14. \printglossaries
  16. \end{document}

As you can see, \Ac command makes sure that first letter is capitalized.

Note that, if your file is named, e.g., myfile.tex, you'll need to run the sequence:
1. latex myfile
2. makeglossaries myfile
3. latex myfile
to get glossaries/acronyms displayed correctly.

You'll need to change \acro commands for defining acronyms, but, thanks to shortcuts package option, you don't have to change \ac commands in text.

Posts: 2
Joined: Mon Jul 11, 2011 8:16 pm

Postby mvd » Tue Jul 12, 2011 10:02 am

Thanks! I'll give it a try ASAP.

User avatar
Site Moderator
Posts: 1990
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Fri Oct 05, 2012 12:43 am

I'm normally not jumping on old topics. In this case however I want to present an alternative solution: the acro package:
  1. \documentclass{book}
  2. \usepackage{acro}
  4. \DeclareAcronym{tedc}{TEDC}{tunable electrical dispersion compensation}
  6. \begin{document}
  8. Some text. \Ac{tedc}.
  9. \printacronyms
  11. \end{document}

site moderator & package author

Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests