[Tex/LaTex] Citation alias with multibib and natbib

bibliographiesmultibibnatbibsubdividing

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.

Best Answer

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}
    

    leads to the commands:

    \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
%: Start Header
\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}

enter image description here

Related Question