cgnieder / acro

acronyms for LaTeX
LaTeX Project Public License v1.3c
40 stars 9 forks source link

Change `\capitalisewords` to `\ecapitalisewords` in the documentation #262

Open jonasc opened 8 months ago

jonasc commented 8 months ago

I tried to have title casing for a command and followed the suggestion in the documentation to use \capitalisewords from mfirstuc. However, it doesn't work as expected, as it doesn't change anything. Some example I found in issue https://github.com/cgnieder/acro/issues/86#issuecomment-596238533 also does not work (anymore?).

However, after thinking and fiddling around, I saw that mfirstuc also has a command \ecapitalisewords which expands the provided argument before capitalizing it. And it actually works. Thus, to save future readers the hassle of having to find it out on their own, I propose to change the command referenced in the documentation to \ecapitalisewords.

jonasc commented 8 months ago

Here is an example showing what works and what not:

\documentclass{article}
\usepackage{acro,mfirstuc}

\DeclareAcronym{foobar}{
  short = funny objective obsolete BAR,
  long = funny objective obsolete business around rice
}

\begin{document}
  \paragraph{\texttt{ecapitalisewords}}
  \Acl[uppercase/cmd=\ecapitalisewords]{foobar} is title cased.
  \Acs[uppercase/cmd=\ecapitalisewords]{foobar} is title cased.
  \par
  \paragraph{\texttt{capitalisewords}}
  \Acl[uppercase/cmd=\capitalisewords]{foobar} is NOT title cased.
  \Acs[uppercase/cmd=\capitalisewords]{foobar} is NOT title cased.
\end{document}

2023-10-17T10:06:52,254762213+02:00