cgnieder / acro

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

"list-caps = true" implementation in acro 3.5 #203

Closed KiprasR closed 3 years ago

KiprasR commented 3 years ago

The first letter capitalization option seems to be absent in acro 3.5. What is the correct way of implementing it in new version of the package?

cgnieder commented 3 years ago

You can use format/list:

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

\begin{document}

\acuse{ufo}

\printacronyms
\acsetup{format/list=\ecapitalisewords}
\printacronyms

\end{document}

image

KiprasR commented 3 years ago

This approach capitalizes all first letters of the phrase. The "list-caps = true" option used to capitalize only the first letter of the first word.

cgnieder commented 3 years ago

Well, yes. I just made some arbitrary example… If you open the manual to mfirstuc you will also find \emakefirstuc. Exchange \ecapitalisewords by \emakefirstuc and there you are. You could also do

\documentclass{article}
\usepackage{acro,acro-examples}

\ExplSyntaxOn
\NewDocumentCommand \upperfirst {m} { \text_titlecase:n {#1} }
\ExplSyntaxOff

\begin{document}

\acuse{ufo}

\printacronyms
\acsetup{format/list=\upperfirst}
\printacronyms

\end{document}
KiprasR commented 3 years ago

This seems to be what I was looking for. Thanks.