Antichronological ordering of references in moderncv using apacite

I'm using the moderncv documentclass to create my CV and I need the reference list to adhere to the APA guidelines. I know biblatex provides sorting options but unfortunately moderncv does not support biblatex. I'm using multibib with apacite to split my references into different sublists.

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{grey}
\usepackage{apacite}
\usepackage[scale=0.75]{geometry}

\firstname{John}
\familyname{Doe}

\makeatletter                           % subheadings in multibib as \subsection
\renewenvironment{thebibliography}[1]
{\subsection*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty thebibliography' environment}}%
\endlist}
\makeatother

\usepackage{multibib}
\newcites{articles,conferences}{{Articles},{Conference contributions}}

\begin{document}
\maketitle

\section{References}
\nocitearticles{article1,article2}
\bibliographystylearticles{apacite}
\bibliographyarticles{articles}
\nociteconferences{conference1,conference2}
\bibliographystyleconferences{apacite}
\bibliographyconferences{conferences}

\end{document}


Is there any way to get apacite to sort the publications by year? I've tried manually by assigning numbers from 1 to n to the key-attributes of each publication in the bib-file but the it is used only for citations. Also adding \phantom-characters to the author names did not work.

Furthermore, the references stretch across the entire width of the page instead of being printed in the right column only. Any ideas how this can be fixed?

• Okay, I have found a way to get the sorting right manually with the use of the key-attribute in the bib-file. This will work for me since my list of publications is still managable.
– crsh
Mar 16, 2012 at 11:52
• My bad, this worked in biblatex but the key-attribute is only used in citations in apacite.
– crsh
Mar 16, 2012 at 12:25

I haven't found an automated way to solve this problem, but to manually order an apacite reference list \APACSortNoop is a possibility. To sort the entries add {{\APACSortNoop{x}} in front of the name of your first authors and replace x with numbers from 1 to n. The references will be sorted in ascending order, as they appear in this example:

@article{article1,
Author = {{\APACSortNoop{1}}Doe, John and Jane, Doe},
Title = {Title},
Year = {2012},
Journal = {Journal},
Pages = {1--2},
Volume = {1}
}

@article{article2,
Author = {{\APACSortNoop{2}}Doe, John and Bar, Foo},
Title = {Title},
Year = {2009},
Journal = {Journal},
Pages = {1--2},
Volume = {1}
}


I have also found a solution to the problem, that the reference lists spans across both columns. This is all pretty dirty though. I'm sure there must be a better way to handle this.

Embedding each reference list in a minipage, manually setting subections and paddings like this will work for the standard description column width on DIN A4 paper:

\usepackage{multibib}
\newcites{articles,conferences}{{},{}}

\section{References}
\vspace{-0.1cm}\subsection{Publications}
\vspace{-0.45cm}\hspace{3.15cm}\begin{minipage}{12.6cm}
\nocitearticles{article1,article2}
\bibliographystylearticles{apacite}
\bibliographyarticles{articles}
\end{minipage}

\vspace{0.2cm}\subsection{Conference contributions}
\vspace{-0.45cm}\hspace{3.15cm}\begin{minipage}{12.6cm}
\nociteconferences{conference1,conference2}
\bibliographystyleconferences{apacite}
\bibliographyconferences{conferences}
\end{minipage}

• The \APACSortNoop workaround does its job, thanks. But it is quite cumbersome to update every single entry if I want to update my reference list with a new item, which would get \APACSortNoop{1}. Any more suggestions? (Of course, I could start with \APACSortNoop{99} and then climb up, but still this is a lot of manual, error-prone work.) May 20, 2014 at 12:07

Just for those of us still coming across this question: moderncv seems to be compatible with biblatex-apa nowadays. This makes it possible to sort bibliographies in descending order (sorting=ydnt) without the hacks proposed by @crash.

Moreover, instead of using multibib for multiple bibliographies (e.g., "Papers", "Books"), I prefer the so-called subdivided bibliographies (§3.11.4 of the biblatex manual). Very straightforward. Here comes my MWE:

\documentclass{moderncv}
\moderncvstyle{classic}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,sortcites=true,sorting=ydnt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\bibliography{test}

\usepackage{filecontents}
\begin{filecontents}{test.bib}
@article{citation01,
Author = {Doe, John and Roe, Jane},
Journal = {Fancy Journal},
Pages = {123--145},
Title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit},
Volume = {2},
Year = {2012}}
@article{citation02,
Author = {Doe, John and Roe, Jane},
Journal = {Fancy Journal},
Pages = {12--34},
Title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.},
Volume = {1},
Year = {2014}}
@book{citation03,
Author = {Doe, John and Roe, Jane},
Title = {Lorem ipsum dolor sit amet, consectetur adipiscing elit.},
publisher = {Company},
location = {Somewhere},
Year = {2013}}
\end{filecontents}

\name{John}{Doe}
\title{CV}
\email{john@doe.com}

\begin{document}
\makecvtitle

\section{Education}

\nocite{*}

\end{document}

• This is a great solution, which works really well! One might change the type=article to keyword=..., to allow for more custom sections. One problem I encountered though, is that @inproceedings entries are not listed in the bibliography using this method. Can you replicate that issue?
– Mil
May 24, 2014 at 9:43
• It works for me, for example, with \printbibliography[type=inproceedings,...]. Can you give more details about your error? May 26, 2014 at 7:18
• It works for me now too! My mistake. :)
– Mil
May 28, 2014 at 15:25

To elaborate on the \APACSortNoop shortcut provided by @crsh:

The command is actually more powerful than that. If you only want to fix the order of the few references that have the same first author, it is not necessary to include \APACSortNoop within every single entry to sort the whole list from start to finish. What the command does is fool BibTeX into treating its argument as part of the author name string, although the argument string itself won't be printed as output in the bibliography. So the command will only affect the sorting: in this particular case, entries will be sorted as if the argument string were prefixed to the first author's name.

Here is one way you can use \APACSortNoop to get entries with the same first author to be listed in chronological order by publication year (adapting @crsh's example):

@article{article1,
Author = {{\APACSortNoop{Doe2012}}Doe, John and Jane, Doe},
Title = {Title},
Year = {2012},
Journal = {Journal},
Pages = {1--2},
Volume = {1}
}

@article{article2,
Author = {{\APACSortNoop{Doe2009}}Doe, John and Bar, Foo},
Title = {Title},
Year = {2009},
Journal = {Journal},
Pages = {1--2},
Volume = {1}
}

@article{article3,
Author = {Smith, John and Foo, Bar},
Title = {Title},
Year = {2009},
Journal = {Journal},
Pages = {1--2},
Volume = {1}
}


This way you are telling BibTeX to sort alphanumerically by (1) author's last name and (2) ascending year of publication. Note that you don't need the command for entries where the same-author problem does not occur (as in article3), although it would not hurt to include it (in case you wanted to automate the whole thing, for instance).