LaTeX forum ⇒ Text Formattingacro package: Italicize first occurance of term Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
JustA_LaTeXusr
Posts: 42
Joined: Tue Jul 23, 2013 6:48 pm

acro package: Italicize first occurance of term

Postby JustA_LaTeXusr » Tue Sep 17, 2013 12:48 am

I am using the acro package for acronyms because, for a phrase that is not a proper name, I can have the first letter of each word uncapitalized except when it starts off a sentence, in which case the very first letter of the phrase is capitalized. Like other packages, it allows user-specification of plural forms for the acronym and the long phrase. Unlike other packages, it provides these capabilities without having to externally make an index. It is not a full fledge glossary package, but it meets my needs for acronyms.

For the acro package, is there a way to italicize the first occurance of the phrase, when the acronym is introduced, but without italicizing the acronym itself? The vanilla way of introducing a phrase and its acronym is \ac{label}, which expands to the phrase followed by its acronym in brackets. The command \textit{\ac{label}} causes both the phrase and the acronym to be italicized.

I know that the acronym package (as opposed to the acro package) does the proper italicization with \acfi{label}, at least according to
ftp://ftp.tex.ac.uk/pub//tex/macros/lat ... cronym.pdf. However, this is not recognized using the acro package. I have gotten the acronym package to work by modifying the LaTeX processing steps to use makeindex, but the solution is not straightforward enough for me to have request that my co-author use the same solution. Hopefully, the italication can be done within the acro package.

Tags:

JustA_LaTeXusr
Posts: 42
Joined: Tue Jul 23, 2013 6:48 pm

Postby JustA_LaTeXusr » Tue Sep 17, 2013 1:10 am

CORRECTION: I said that I got the acronym package to work by modifying the LaTeX processing steps, and it was not elegant enough to insist that a co-author use it. In fact, this applies to the glossaries package, not the acronym package. I had to move to the glossaries package to get all the functionality that I described above, but the solution is much less elegant than simply using the acro package (and I don't need full glossary functionality). The only thing I'm missing (or rather, haven't figured out) is how to italicize only long phrase using the acro package.

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Tue Sep 17, 2013 9:18 am

Please always give a link if you are cross-posting questions! (Have a look at our board rules for reasons.)

On TeX.sx gmedina already gave the answer: use the first-long-format option:

  1. \acsetup{first-long-format=\itshape}


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

JustA_LaTeXusr
Posts: 42
Joined: Tue Jul 23, 2013 6:48 pm

Postby JustA_LaTeXusr » Tue Sep 17, 2013 5:24 pm

Thanks for pointing that out, cgnieder.


Return to “Text Formatting”

Who is online

Users browsing this forum: macjo16, MSN [Bot] and 13 guests