# Howto achieve capitalized description in glossary table?

I use the glossaries package to generate my acronym list. Since I use the acronyms in the text I have to write the description lowercase. Thus, I have a lowercase description in the acronym list. Can I change that behaviour?

\documentclass[a4paper]{article}
%
\setlength{\parindent}{0pt}
%
\usepackage{xcolor}
\usepackage{hyperref}% Must now be the second-last package that is loaded
\usepackage[acronym]{glossaries}% Must be last package, loaded after hyperref
%
\newglossaryentry{htdoc}{name={hypertext document},description={Text file with references to other content via hyperlinks}}
%
\newglossaryentry{web}{name={World Wide Web},first={World Wide Web (WWW)}, text={WWW},description={A distributed system of linked hypertext documents}}
%
\newacronym{test}{Test}{Lowercase is what I want}
%
\makeglossaries

\begin{document}

% Test of glossary entries
% 1. Capitalization
Here is the acronym in the text \gls{test}
% HTML should not appear in acronym list because not cited and not added
%
\printglossaries
%
\end{document}


That is what I get:

-
I don't really get your point. Could you post a minimal working example (MWE), please? –  Benedikt Bauer Oct 31 '12 at 20:53
@BenediktBauer I edited the incomplete description so you don't need an MWE hopefully since I am in a reall hurry (some hours left to finalize 300 pages). Sorry about that. –  louis cypher Oct 31 '12 at 21:12
If you are in a hurry it is far better to provide a complete small document as that makes it much easier to answer the question so makes it more likely you get a timely reply. –  David Carlisle Oct 31 '12 at 21:19

Something like this probably works

\let\firstchar\lowercase

\let\oldprintglossaries\printglossaries

\def\printglossaries{\let\firstchar\uppercase\oldprintglossaries}

\newacronym{test}{Test}{\firstchar{t}his is a test}


Now there's a NWE:-)

\documentclass[a4paper]{article}
%
\setlength{\parindent}{0pt}
%
\usepackage{xcolor}
\usepackage{hyperref}% Must now be the second-last package that is loaded
\usepackage[acronym]{glossaries}% Must be last package, loaded after hyperref
%
\newglossaryentry{htdoc}{name={hypertext document},description={Text file with references to other content via hyperlinks}}
%
\newglossaryentry{web}{name={World Wide Web},first={World Wide Web (WWW)}, text={WWW},description={A distributed system of linked hypertext documents}}
%
\let\firstchar\lowercase
\let\oldprintglossaries\printglossaries
\def\printglossaries{\let\firstchar\uppercase\oldprintglossaries}

\newacronym{test}{Test}{\firstchar{L}owercase is what I want}
%
\makeglossaries

\begin{document}

% Test of glossary entries
% 1. Capitalization
Here is the acronym in the text \gls{test}
% HTML should not appear in acronym list because not cited and not added
%
\printglossaries
%
\end{document}

-
Thanks very much! Can you explain why the first letter is in parens? (I'm actually preparing a MWE). I do not get it completely –  louis cypher Oct 31 '12 at 21:32
You mean \firstchar{t} ? the {} delimits the argument to \firstchar which is either \lowercase or \uppercase depending if it is executed in the main document or in the glossary. –  David Carlisle Oct 31 '12 at 21:38
Now I get it: you redefine printglossaries to oldprintglossaries and "pipe" it through your macro –  louis cypher Oct 31 '12 at 21:40
Actually the otherway round: oldprintglossaries is the orignal saved definition (the \let assignment) then redefine \printglossaries to switch the definition of \firstchar then call the original saved definition of printglossaries under its new name \oldprintglossaries –  David Carlisle Oct 31 '12 at 21:54
That works like a charm! –  louis cypher Oct 31 '12 at 21:54

You could use the description option of glossaries which is probably meant to add a different description to the list of acronyms than the long form of the acronym. But this means it also works if description and long form only differ in the first letter. This is obviously not as handy as David's solution since you have to type each form twice...

\documentclass[12pt]{article}
\usepackage[acronym,description]{glossaries}
\makeglossaries

\newacronym[description=This is a test]{test}{Test}{this is a test}

\newglossaryentry{web}{
name={World Wide Web},
first={World Wide Web (WWW)},
text={WWW},
description={A distributed system of linked hypertext documents}
}
\begin{document}

Here comes \gls{test}

Here comes \gls{web}

\printglossary[type=\acronymtype]

\printglossary
\end{document}

-
Thanks also for that one. That solves another problem of mine! –  louis cypher Oct 31 '12 at 21:55