1

This question is related to the following question.

I would like to know if there exists a way to configure the command \acroauthor so that it's generate (Organization for the Advancement of Structured Information Standards, 2012) when it is used once and (OASIS, 2012) from the second time it is used?

1

You have to slightly amend the macro \acroauthor to get that right:

    \begin{filecontents*}{\jobname.bib}
    @article{oasis,
     author={{\acroauthor{Organization for the Advancement of Structured Information Standards}{OASIS}}},
     title={Some title},
     journal={J. Something},
     year={2012},
    }
    \end{filecontents*}
    \documentclass{article}
    \usepackage[authoryear]{natbib}

    \usepackage{etoolbox}

    \newif\ifabbreviation
    \pretocmd{\thebibliography}{\global\abbreviationfalse}{}{}
    \AtBeginDocument{\global\abbreviationfalse}
    \DeclareRobustCommand\acroauthor[2]{%
      \ifabbreviation #2\else #1\global\abbreviationtrue\fi}

    \begin{document}

    Here it is \citep{oasis}

    A second time \citep{oasis}

    \bibliographystyle{plainnat}
    \bibliography{\jobname}

    \end{document}

This will get the desired output.

enter image description here

| improve this answer | |
  • How can I add the acronym (OASIS) after Organization for the Advancement of Structured Information Standards in the references? Without changing how the first quote is appearing, that is, [Organization for the Advancement of Structured Information Standards, 2012]. – Victor Hugo Apr 29 at 15:40
  • @VictorHugo you can use the acro package or the acronym package, define a suitable abbreviation with the package and use author = {\ac{OASIS}} (or similar) in the bib file – cgnieder May 1 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.