3

When the acronym package creates a footnote, it inserts the definition of the acronym provided with the acro macro. I have a conflict whether to capitalize the definition or not, see the MWE.

A demonstration of my capitalization conflict

\documentclass{article}
\usepackage[footnote]{acronym}
\usepackage{a4wide}

\title{Capitalization issues}
\author{Dohn Joe}

\begin{document}
\maketitle

\section*{My problem}

I would like the long form of the acronyms to be in lower case, since this 
supports the use of the \verb+\acl+ macro. However, footnotes\footnote{Like 
this example.} should start with a capital letter. \\[3ex]
%
Is there a way to enforce the capitalization of the first letter in a 
footnote?\\[5ex]
%
A sentence containing \ac{CCM} and \acl{CCM}. \\[3ex]
%
Another sentence containing \ac{CFD} and \acl{CFD}.

\section*{Acronyms}
\begin{acronym}
    \acro{CCM}{Computational continuum mechanics}
    \acro{CFD}{computational fluid dynamics}
\end{acronym}
\end{document}

1 Answer 1

3

You can patch the command \@acf. It has a line

\footnote{\AC@placelabel{#1}\AC@acl{#1}{}}

which can be changed into

\footnote{\AC@placelabel{#1}\@firstupper{\AC@acl{#1}}{}}

The command \@firstupper is defined by the acronym package. The patching can be done with etoolbox's \patchcmd.

\documentclass{article}
\usepackage[footnote]{acronym}
\usepackage{a4wide}

\title{Capitalization issues}
\author{Dohn Joe}

\usepackage{etoolbox}
\makeatletter
\patchcmd\@acf
  {\footnote{\AC@placelabel{#1}\AC@acl{#1}{}}} % search
  {\footnote{\AC@placelabel{#1}\@firstupper{\AC@acl{#1}}{}}} % replace
  {} % success
  {} % failure
\makeatother

\begin{document}
\maketitle

\section*{My problem}

I would like the long form of the acronyms to be in lower case, since this 
supports the use of the \verb+\acl+ macro. However, footnotes\footnote{Like 
this example.} should start with a capital letter.

Is there a way to enforce the capitalization of the first letter in a 
footnote?

A sentence containing \ac{CCM} and \acl{CCM}.

Another sentence containing \ac{CFD} and \acl{CFD}.

\section*{Acronyms}
\begin{acronym}
    \acro{CCM}{Computational continuum mechanics}
    \acro{CFD}{computational fluid dynamics}
\end{acronym}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .