# Natbib cite with abbreviation

I have a webpage I need to cite, whose author is a company (no real person specified). Its full name is Organization for the Advancement of Structured Information Standards, abbreviated OASIS. I want to have the OASIS in citations (OASIS, 2006), for example, but include the full company name in the list of references.

I tried

author = "{OASIS}, {Organization for the Advancement of Structured Information Standards}"


that prints OASIS in the citations, but prints "OASIS, O.", in the list of references. If I do

author = "{OASIS, Organization for the Advancement of Structured Information Standards}"


then I have the full name in the list of references, but also in citations, which looks ugly.

How can I have OASIS in citations and Organization for the Advancement of Structured Information Standards in the list of references?

Another example I need is the World Wide Web Consortium. I would like to have it cited like W3C, for example: "(W3C, 2009)", but have the full name in the list of references: "The World Wide Web Consortium".

Here's a way, that requires special formatting of the author field in the .bib file.

\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}{\abbreviationfalse}{}{}
\AtBeginDocument{\abbreviationtrue}
\DeclareRobustCommand\acroauthor[2]{%
\ifabbreviation #2\else #1 (\mbox{#2})\fi}

\begin{document}

Here it is \citep{oasis}

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}


Notes: the filecontents* is just to keep the example selfcontained; if you want only the expanded name in the references section, change

#1 (\mbox{#2})\fi


into

#1\fi


Important: don't forget the additional braces around \acroauthor{...}{...}, which are essential for the correct sorting by author.

This can be modified to expand the acronym the first time it is used in a citation. Remove the first % in the line marked <----- if you want to show the acronym also the first time, together with the expanded text, which is what's done usually to help readers.

\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}{\abbreviationfalse}{}{}
\AtBeginDocument{\abbreviationtrue}
\DeclareRobustCommand\acroauthor[2]{%
\ifabbreviation
\ifcsname acroused@#2\endcsname
#2%
\else
#1%
%~(\mbox{#2})% <----
\expandafter\gdef\csname acroused@#2\endcsname{}%
\fi
\else
(\mbox{#2})%
\fi
}

\begin{document}

Here it is \citep{oasis}

A second time \citep{oasis}

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}


• This almost works. The problem is that I am using a bibliography style that capitalizes surnames of authors and it is currently broken (capitalizes only characters without any punctuation. E.a. "Müller" becomes "MüLLER" instead of "MÜLLER"). I cannot change my bibliography style. So far I avoided this capitalization by enclosing the surname in brackets {}, but this no longer works with \acroauthor. – Jakub Zaverka Dec 16 '12 at 18:47
• OK I managed to get the capitalization fixed by including the whole command into yet another set of brackets: {{{\acroauthor{Organization for the Advancement of Structured Information Standards}{OASIS}}}}. But now the alphabetic ordering of bibliography is broken, \acroauthor going first. – Jakub Zaverka Dec 16 '12 at 18:52
• @JakubZaverka Did you try with M{\"u}ller? – egreg Dec 16 '12 at 19:01
• Insanely complex! This capability should be built into the standard. I imagine this is a very common need/desire. – robguinness May 2 '13 at 12:46
• @VictorHugo I've reworked the implementation – egreg Apr 29 at 16:18