4

I'm dealing with my acronyms using acro package and I want to know how to capitalize all the long acronym form.

The MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{acro}
\DeclareAcronym{FiME}{
short=FiME,
long=Filtração em Múltiplas Etapas,
}
\begin{document}
I want to capitalize this \Ac{FiME}
with something like this FILTRAÇÃO EM MÚLTIPLAS ETAPAS (FiME)
\end{document}
2
  • Why don't you write the long form all in uppercase? Commented Sep 19, 2017 at 15:14
  • @NathanaelFarley Because I just need this form once Commented Sep 19, 2017 at 15:16

2 Answers 2

2

From the acro manual, you can use \acflike to manually change a one off first-use like so:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{acro}
\DeclareAcronym{FiME}{
short=FiME,
long=Filtração em Múltiplas Etapas,
}

\begin{document}
I want to capitalize this \acflike{FiME}{FILTRAÇÃO EM MÚLTIPLAS ETAPAS}
with something like this FILTRAÇÃO EM MÚLTIPLAS ETAPAS (FiME)
\end{document}

I would prefer an automatic method that can be made into a macro, but this method will work for occasional use.

preview of tex code.


OLD ANSWER:

The acro package only shows the long form once (at least by default), so you can make the long form uppercase manually.

E.g.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{acro}
\DeclareAcronym{FiME}{
short=FiME,
long=FILTRAÇÃO EM MÚLTIPLAS ETAPAS,
}
\begin{document}
I want to capitalize this \Ac{FiME}
with something like this FILTRAÇÃO EM MÚLTIPLAS ETAPAS (FiME)

Then the second time it's used, it's just an acronym, e.g. \Ac{FiME}.
\end{document}

Example output of tex code.

3
  • 1
    It's O.K. However, if in other section of the document I want to show the long form again, without the capitalization?. Every document section I have to use \acresetall Commented Sep 19, 2017 at 15:25
  • Edited with a possible way to use \acflike. Commented Sep 19, 2017 at 16:24
  • @DanielValencia Personally I would consider going for clemens' answer as it's more complete. Commented Sep 19, 2017 at 21:21
6

You can use the optional argument of \Ac to change the format locally:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{acro}
\DeclareAcronym{FiME}{
short=FiME,
long=Filtração em Múltiplas Etapas,
}
\begin{document}
I want to capitalize this \Ac[long-format=\MakeUppercase]{FiME}
with something like this FILTRAÇÃO EM MÚLTIPLAS ETAPAS (FiME)

\acresetall

\Ac{FiME}

\end{document}

enter image description here

You must log in to answer this question.

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