1

using the cite and cite-cmd features of the acro package seems to have at least two problems for me.

  1. When an acronym occurs only once, it is spelled out without the abbreviation, which is fine. However, I would like the citation to still be printed (the first time at least)!

  2. When using the author-year citation style, two consecutive parenthesis aren't particularly pleasing. I'd like to have something like (AIS, Neal 2009) instead of (AIS) (Neal 2009). Is this possible?

The points are illustrated by the following MWE:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{sample.bib}
@article{neal2001annealed,
    title = {{Annealed importance sampling}},
    author = {Neal, R},
    journal = {Statistics and Computing},
    year = {2001},
}
\end{filecontents*}

\usepackage[natbib,citestyle=authoryear,backend=bibtex]{biblatex}
\addbibresource{sample.bib}
\usepackage{acro}
\acsetup{single,sort,cite-cmd=\citep}
\DeclareAcronym{AIS}{
  short=AIS,long=Annealed Importance Sampling,cite={neal2001annealed}
}
\DeclareAcronym{AIS2}{
  short=AIS,long=Annealed Importance Sampling,cite={neal2001annealed}
}
\begin{document}
   This \ac{AIS} lacks the citation, because it only occurs once!

   This \ac{AIS2} occurs twice (\ac{AIS2}), but has double parenthesis, I'd prefer (AIS, \textbackslash \texttt{citealp\{key\}})

   \printacronyms
\end{document}

result of mwe

2
  • Both is not possible with acro with the current version – at least not without redefining internal macros. But I'll gladly try to add support (and will post an answer here once I've done so). You can follow the progress here bitbucket.org/cgnieder/acro/issue/39 and here bitbucket.org/cgnieder/acro/issue/40
    – cgnieder
    Commented Jun 14, 2015 at 17:01
  • This will be possible in v2.0. I'll add an answer once it's published
    – cgnieder
    Commented Jul 28, 2015 at 17:02

1 Answer 1

2

Since v2.0 (2015/08/17) there are the options group-citation and group-cite-cmd:

\acsetup{
  group-citation = true ,
  group-cite-cmd = \citealp
}

acro now (since v2.0) also adds the citation to a single use (IMHO this makes a lot more sense than omitting it).

A full example:

enter image description here

% http://tex.stackexchange.com/q/246008/
\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{neal2001annealed,
  title   = {Annealed importance sampling} ,
  author  = {Neal, R} ,
  journal = {Statistics and Computing} ,
  year    = {2001}
}
\end{filecontents*}

\usepackage[natbib,citestyle=authoryear,backend=biber]{biblatex}
\addbibresource{\jobname.bib}

\usepackage{acro}[2015/08/16]
\acsetup{
  single         = true ,
  sort           = true ,
  cite-cmd       = \citep ,
  group-citation = true ,
  group-cite-cmd = \citealp
}

\DeclareAcronym{AIS}{
  short = AIS,
  long = Annealed Importance Sampling,
  cite = {neal2001annealed}
}
\DeclareAcronym{AIS2}{
  short = AIS,
  long = Annealed Importance Sampling,
  cite = {neal2001annealed}
}

\begin{document}

\ac{AIS} -- only used once

\ac{AIS2} and \ac{AIS2} -- used twice

\printacronyms

\end{document}

You must log in to answer this question.

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