One possibility would be to switch to the acro
package. It provides what you need:
\documentclass{article}
\usepackage{acro}
\acsetup{list-long-format=\capitalisewords}
\usepackage{mfirstuc}% provides \capitalisewords
\DeclareAcronym{SRS}{
short = SRS ,
long = spatial reference system
}
\DeclareAcronym{DC}{
short = DC ,
long = direct current
}
\begin{document}
Batteries run on \ac{DC} and \ac{SRS} are different things.
Batteries run on \ac{DC} and \ac{SRS} are different things.
\Acl{DC} bla ...
\printacronyms
\end{document}
Here's an alternative approach that uses glossaries-extra
(an extension to the glossaries
package):
\documentclass[a4paper,oneside,12pt]{report}
% Abbreviations
\usepackage[acronym,style=super,nogroupskip,nonumberlist]{glossaries-extra}
\makeglossaries
\setabbreviationstyle[acronym]{long-short}
\loadglsentries{def_abr} % file with acronyms
\glssetcategoryattribute{acronym}{glossdesc}{title}
\begin{document}
% abstract, toc, list of figures here
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\printglossary[type=\acronymtype,title={List of Abbreviations}]
\chapter*{Example Usage}
\gls{brdf}, \gls{awgn}, \gls{psnr}, \gls{cnn}
% chapters
\end{document}
(I've omitted the toc
option as it's the default for glossaries-extra
).
This produces on page 1:
and page 2:
The glossaries
package automatically loads mfirstuc
(which was originally developed as part of the glossaries
package). The title
attribute uses \capitalisewords
to convert the case. You can control whether or not to capitalise the hyphenated parts of words using \MFUhyphentrue
and \MFUhyphenfalse
. The default is the false setting, which is why the above has "Peak-signal-to-noise".
The following switches it on:
\documentclass[a4paper,oneside,12pt]{report}
% Abbreviations
\usepackage[acronym,style=super,nogroupskip,nonumberlist]{glossaries-extra}
\makeglossaries
\setabbreviationstyle[acronym]{long-short}
\loadglsentries{def_abr} % file with acronyms
\glssetcategoryattribute{acronym}{glossdesc}{title}
\MFUhyphentrue
\begin{document}
% abstract, toc, list of figures here
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\printglossary[type=\acronymtype,title={List of Abbreviations}]
\chapter*{Example Usage}
\gls{brdf}, \gls{awgn}, \gls{psnr}, \gls{cnn}
% chapters
\end{document}
This produces:
To prevent words like "to" from being changed use the mfirstuc-english
package or set up exceptions with \MFUnocap
(for example, \MFUnocap{to}
).
Best Answer
You have to tell
acronym
both spellings:The macro
\LU
just takes the alternate forms as its arguments; the\AtBeginEnvironment
instruction tells this macro that the first argument is to be used, since the conditional\if@in@acrolist
returns true. In normal text the conditional returns false (note that at the end of theacronym
environment the setting of the conditional will be automatically reverted, because environments form groups).I've added a macro
\ACF
that acts similarly to\acf
(printing the full version along with the acronym) that uses the uppercase version.