# Citation alias with multibib and natbib

I need a bibliography that presents citation as (Surname, year), for which I am using natbib, and that allows two different bibliographies at the end of the document, for which I am using multibib.

Point is: I'd like to use the "alias" command of natbib for the secondary bibliography, but it doesn't work. MWE:

\documentclass[a4paper]{article}

\usepackage{natbib}
\usepackage{multibib}

\newcites{sec}{Other bibliographic references}
\defcitealias{intlog}{International journal of logistics, issue 91}

\begin{document}

Something something something and then \citetalias{intlog}.

\bibliographystyle{plainnat}
\bibliography{bibliography}
\bibliographystyle{plainnat}
\bibliography{bibliography}

\end{document}


with a proper entry in the file bibliography.bib.

How to make the command citetalias{intlog} work in the secondary bibliography?

What do I know:

• \citetaliassec{intlog} doesn't work
• \defcitetaliassec{intlog} doesn't work as well (ok, that was a long shot)

that makes me think the alias system is not compatible with multibib...

Of course whatever other solution different from the alias system is absolutely welcomed.

-

Of course whatever other solution different from the alias system is absolutely welcomed.

As often I recommend biblatex. However the solution below doesn't use biblatex.

Your example has some errors listed below.

Errors related to multibib

• If you define a new bibliography with \newcites{<ext>}{<headind>}, the new commands \bibliographystyle<ext>, \bibliography<ext> and \cite<ext> will be defined. So in your case the line

\newcites{sec}{Other bibliographic references}


\bibliographystylesec
\bibliographysec


and a new file <ext>.aux will be created. This new file needs his own bibtex run.

Errors related to your bibliography style plainnat

• your style writes the following lines to your included bbl file (included by \bibliography).

\newcommand{\noopsort}[1]{}
\newcommand{\printfirst}[2]{#1}
\newcommand{\singleletter}[1]{#1}
\newcommand{\switchargs}[2]{#2#1}


You want to have two bibliographies and so the definition of the commands are done twice. This occurs to the error that the commands are defined. One approach would be to set the commands undefined before including the second bibliography.

\bibliographystyle{plainnat}
\bibliography{xampl}

\let\noopsort\undefined
\let\printfirst\undefined
\let\singleletter\undefined
\let\switchargs\undefined

\bibliographystylesec{plainnat}
\bibliographysec{xampl}

• the style plainnat is a numerical citation style. The manual of natbib provides the following information

By default, natbib is in author–year mode. This can be changed by

1. selecting a numerical bibliography style with predefined citation style, defined either in the package or in the local configuration file;

Errors related to natbib's \defcitealias

• the command \defcitealias is described in the documentation with the following sentence:

Sometimes one wants to refer to a reference with a special designation, rather than by the authors

• that means your key of \defcitealias must be a given entry of you bib file. You doesn't show us your bib file so I used the file xampl.bib which is located in your texmf tree.

• the command \defcitealias makes no differences between the different bibliographies, so you can use it as described in the documentation.

• multibib defines the command \citep<ext> etc. The defined commands are all listed in the command \@mb@citenamelist. In the documentation of multibib you find the following hint:

Packages which define new cite commands can add these commands using \@mb@citenamelist. The default definition, which already includes natbib’s cite variants, is given below.

\def\@mb@citenamelist{cite,citep,citet,citealp,citealt}

• You see the commands citepalias and citetalias are missed. So before the package multibib is loaded add the following lines:

\makeatletter
\def\@mb@citenamelist{cite,citep,citet,citealp,citealt,citepalias,citetalias}
\makeatother


Based on the given information here the result as a minimal example with the resulting output. The compilation steps are done by the great tool arara:

% arara: pdflatex
% arara: bibtex : { files :[test , sec] }
% arara: pdflatex
% arara: pdflatex
\documentclass[a4paper]{article}
\usepackage[numbers]{natbib}

\makeatletter
\def\@mb@citenamelist{cite,citep,citet,citealp,citealt,citepalias,citetalias}
\makeatother
\usepackage{multibib}
\newcites{sec}{Other bibliographic references}

\defcitealias{manual-full}{International journal of logistics, issue 91}

\begin{document}

\cite{article-full}

\citesec{booklet-full}

Something something something and then \citepaliassec{manual-full}.

\bibliographystyle{plainnat}
\bibliography{xampl}

\let\noopsort\undefined
\let\printfirst\undefined
\let\singleletter\undefined
\let\switchargs\undefined

\bibliographystylesec{plainnat}
\bibliographysec{xampl}

\end{document}


-
I see I made some avoidable mistakes in the MWE, and I apologize for that. I've started to think I should begin to use biblatex, but right now I simply don't have time to dig in it (but with all the time wasted for this and other issues... who knows?) As regards the issue: I followed your exhaustive suggestions and got the aliased citation to appear correctly in the secondary bibliography. Unfortunately, it still appears in the primary bibligraphy :D Is this because I am not compiling with arara? (I deleted the aux files) –  scannerdarkly Aug 12 '12 at 13:09
@scannerdarkly: arara is only a tool I ran pdfaltex, bibtex bibtex pdflatex pdflatex. So there is something else odd. –  Marco Daniel Aug 12 '12 at 13:14
OK I don't exactly know what but I moved the four \let commands before calling the first bibliography and it works; strange thing is, I moved them back, and it still works.... so probably it's something else (but don't know what, I run everything the correct number of times). I'm lost, but it's absolutely not a problem right now!thanks! –  scannerdarkly Aug 12 '12 at 14:12