Here is a concise fix that does reverse numbering for "thebibliography" environment in my CV, using only plain latex without any external package.
EDITS:
- write the value of the counter to the aux-file, so you don't need to input the number of publications manually. It was surprisingly concise and straightforward actually.
- added commands to get the standard "[1]" (I realized my first answer was not actually doing it)
Original post:
I just input the total number of publications and defined a wrapper around \bibitem (redefining it is a bit more tricky). Because it just modifies the counter value of \bibitem, it has the standard "[1]" bracket style and it works with hyperref.
\begin{thebibliography}{99}
\makeatletter
\newcounter{num}
\newcommand{\MyNbOfPub}{24}%input your number of publications here
\newcommand{\mybibitem}[1]{\stepcounter{num}\setcounter{\@listctr}{\MyNbOfPub-\value{num}}\bibitem{#1}}
\makeatother
\mybibitem{Myfirstref}
...
\mybibitem{Mysecondref}
...
etc...
NB: counters start at 0 thus bibitem automatically labels ref as [N+1] so that a value of "0" in the counter gives ref [1] (and not [0]). Stepping the num counter first takes care of that +1
EDITS (continued):
here is a working example
\documentclass[11pt,letterpaper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{orange}
\usepackage[colorlinks=true,urlcolor=blue,citecolor=blue,unicode]{hyperref}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.9]{geometry}
% Macros
% if \NbOfPub is defined in aux file
% the value is automatically read from the aux file
% else (first run)
% create counter which will be wrote to the aux file at the end of the document
% (note that we just use this counter as a fixed variable)
\ifdefined\NbOfPub
\else
\newcount\NbOfPub
\NbOfPub 0\relax
\fi
\makeatletter
% make square brackets numerical labels
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
% bibitems margins formatting
\setlength\bibindent{2em}
\renewcommand\@openbib@code{%
\leftmargin 2em %push bib to the right by that amount
\itemindent 0em %push item 1st line to the right by that amount
\listparindent \parindent
\parsep \z@
\labelsep 1em %push label to the left from 1st line by that amount
}
% bibliography counter
\newcounter{num}
% define "\metibib", a \bibitem wrapper that counts in reverse
\newcommand{\metibib}[1]{%
\stepcounter{num}
\setcounter{\@listctr}{\NbOfPub-\value{num}}
\bibitem{#1}
}
\makeatother
% document
\setlength{\hintscolumnwidth}{2cm}
\firstname{John}
\familyname{Doe}
\namespacing{1cm}{1cm}
\begin{document}
\makecvtitle
\section{Career Summary}
Here are my publications on A\cite{refA} and B\cite{refB}.
% change bibliography standard name
\renewcommand{\refname}{List of Publications}
% the bibliography
\begin{thebibliography}{9}
\item[] You have \the\NbOfPub\ publications in the .aux file
\item[\textbf{2018}]
\metibib{refA}
\underline{\textbf{J.~Doe}} \textit{et al.}\\
\textit{On topic A}\\
\textbf{Great Journal A}, xx, yyy\\
\url{https://doi.org/xxyyy}
\item[\textbf{2017}]
\metibib{refB}
\underline{\textbf{J.~Doe}} \textit{et al.}\\
\textit{On topic B}\\
\textbf{Great Journal B}, xx, yyy\\
\url{https://doi.org/xxyyy}
\end{thebibliography}
%write number of publications to aux-file
\makeatletter
\write\@auxout{\noexpand\newcount\NbOfPub}
\write\@auxout{\global\NbOfPub \arabic{num}\relax}
\makeatother
\end{document}
and here is the result I get
Zwicky
(and numbered, say,[125]
) and the last one to be byAaberg
and numbered[1]
)?