# 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. –  crash Mar 16 '12 at 11:52
My bad, this worked in biblatex but the key-attribute is only used in citations in apacite. –  crash Mar 16 '12 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 possiblity. 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 descending order.

@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.) –  hplieninger May 20 '14 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{*}


It works for me, for example, with \printbibliography[type=inproceedings,...]. Can you give more details about your error? –  hplieninger May 26 '14 at 7:18