0

I got a problem with my acronyms. I try to use one acronym for two words. I don't get any warnings or errors but it does not really work. The following is a minimalistic example.

\begin{document}
  \begin{acronym}[Acronyms]
     \acro{ac1} {Acronym}
     \acro{ex} {Example}
     \acro{BA} [BA] {Bank Analyzer}
     \acro{BAL} [BA] {Balance Analyzer}
  \end{acronym}
  \section{\acl{BA}}
  \subsection{Balancing in \acl{BA}}
  The \ac{BA} is not the \ac{BAL}.
\end{document}

My output is like this:

Bank Analyzer

Balancing in Bank Analyzer

The BA is is not the Balance Analyzer (BA).

But the last line should be:

The Bank Analyzer (BA) is not the Balance Analyzer (BA).

Hope I could explain my problem good enough that you can help me :D. If you need additional information, please tell me.

Edit:

Firstly I had a confusing post. I edited it in hope to make it more clear.

5
  • Using this complete version of your snippet: \documentclass{article} \usepackage{acronym} \begin{document} \begin{acronym}[Acronyms] \acro{ac1} {Acronym} \acro{ex} {Example} \newacro{BA}[BA]{Bank Analyzer} \newacro{BAL}[BA]{Balance Analyzer} \end{acronym} \section{\acl{BA}} subsection{Balancing in \acl{BA}} The \ac{BA} is ... \end{document} \end{document} I get the desired result. Do you get something different with the exact code I just gave? May 10, 2013 at 17:55
  • There are some typos in your snippet: there's a missing closing brace in \section{\acl{BA} and there's a missing backslash in subsection{Balancing in \acl{BA}}. May 10, 2013 at 17:56
  • Thanks for your reply. The brackets are all closed in my original document. And your version works for me except that the acronyms are not listed in the acronym area (I mean th eBA acronyms the ac1 and ex are displyed).
    – j0chn
    May 10, 2013 at 18:12
  • And why should it be listed in the acronyms list? \newacro doesn't automatically add acronyms to the acronym list. If you want to include it, you need to use \acro instead. May 10, 2013 at 18:45
  • I need it in the acro list. With \acro it works fine, but than I don' get my result (long and short version) with "\ac{BA}". SO I tried to get it with \newacro. But it doesn't work as well. So it was a try. But I don't know how to solve my problem else.
    – j0chn
    May 10, 2013 at 19:05

1 Answer 1

1

The following does work for me.

\documentclass{article}

\usepackage{acronym}

\begin{document}
\begin{acronym}[Acronyms]
  \acro{ac1}{Acronym}
  \acro{ex}{Example}
  \acro{BA}{Bank Analyzer}
  \acro{BAL}{Balance Analyzer}
\end{acronym}

\section{\acl{BA}}
\subsection{Balancing in \acl{BA}}

The \ac{BA} is \ldots \ac{BA}

\end{document}

enter image description here

5
  • If your last lines output is: The Bank Analyzer (BA) is .... Than it is how it should be. If it is The BA is ... than you got my problem ;)
    – j0chn
    May 10, 2013 at 19:57
  • @j0chn I added a picture in the solution for you to see the result. Note that \ac-variant commands once used will mark the acronym as used, therefore, in the second call it becomes only BA. In terminal do texdoc acronym to see documentation.
    – cacamailg
    May 10, 2013 at 21:25
  • So you mean that it is marked as used so it will automatically use the short form when I use \ac, right? In the documentation I saw that I should use \acl* before \ac so that \acl doesn't mark it as used and \ac will output it correctly. But that doesn't work. I changed the headlines to \acl*{BA} and then \ac{BA} still uses the shortform. And except in the acronym environment I never use the acronym BA.
    – j0chn
    May 10, 2013 at 21:42
  • 1
    @j0chn I don't understand what is the problem, rather the version of LaTeX you are using. I use the latest TeXLive 2012, which does correctly the job. It also works if I place acl*{} in sections/subsections. Also try to remove all auxiliary *.aux files that are produced during the compilation. Try to build the same example but with other acronym and see if behaves the same way. Alternatively, place an \acresetall after section, as doc says: Afterwards, \ac will print the full name of any acronym and the acronym in brackets the next time it is used.
    – cacamailg
    May 10, 2013 at 21:54
  • My problem was that I couldn't use \ac to get the long and short form of BA, but the \acresetall helped pretty good. Thank you for your patience!
    – j0chn
    May 10, 2013 at 22:20

You must log in to answer this question.

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