0

I am using BibLaTex extension named "publist" for publishing a numbered list of my publications. It numbers the items in ascending order (see the picture below).

DPF

What if I want them numbered in reverse order? Therefore, starting from the number [4] assigned to Smith 2020, down to [1] assigned to Smith 2017.

This would immediately show the total number of my papers at the present day.

No such option is described in the package documentation. However, I wonder whether it could be done easily by changing the source code of the publist package.

EDIT As requested I add the source code of my TeX files.

\documentclass[11pt]{article}


\usepackage[bibstyle=publist,marginyear=true]{biblatex} 
\omitname[John][]{Smith}
\plauthorname[John][]{Smyth}
\addbibresource{publist.bib} 


\begin{document}
\title{List of publications} 
\author{John Smith}
\date{\today}
\maketitle

\nocite{*} 
\printbibliography[heading=none]
\end{document}  

publist.bib file:

@phdthesis{Smith:2017,
    Author = {John Smith},
    Publisher = {TheGruiter},
    School = {Hogwarts school of magic},
    Title = {Investigation on interesting topics},
    Year = {2017}}

@book{Smith:2019b,
    Address = {Blondon},
    Author = {John Smith},
    Pages = {23--45},
    Publisher = {TheGruiter},
    Title = {Funny book},
    Year = {2019}}

@article{Smith:2019a,
    Author = {John Smith},
    Journal = {Journal of interesting papers},
    Number = {1},
    Pages = {23--45},
    Title = {More or less interesting paper},
    Volume = {18},
    Year = {2019}}

@article{Smith:2020,
    Author = {John Smith},
    Journal = {Journal of interesting papers},
    Number = {3},
    Pages = {23--45},
    Title = {Very interesting new paper},
    Volume = {19},
    Year = {2020}}
2
  • It would be much easier to get started helping you if you could post a short example document (along with a few example .bib entries) that shows what you have so far. That way we all know that we are talking about the same thing and those trying to help you don't have to make up code on the spot that you (more or less) have in front of you already.
    – moewe
    Sep 19, 2020 at 11:47
  • @moewe I've added the source code Sep 19, 2020 at 12:50

1 Answer 1

1

For most intents and purposes the code from biblatex: Reverse numbering (i.e., count down) should work here as well.

Since biblatex has its own version of \mkbibdesc you just need to change \newrobustcmd to \renewrobustcmd.

Note that this code will probably not work as desired if you make heavy use of filtering and multiple bibliographies (see also the caveats mentioned in the answer to biblatex: Reverse numbering (i.e., count down)).

\documentclass[11pt]{article}


\usepackage[bibstyle=publist,marginyear=true]{biblatex} 
\omitname[John][]{Smith}
\plauthorname[John][]{Smyth}

% Count total number of entries in each refsection
\AtDataInput{%
  \csnumgdef{entrycount:\therefsection}{%
    \csuse{entrycount:\therefsection}+1}}

% Print the labelnumber as the total number of entries in the
% current refsection, minus the actual labelnumber, plus one
\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}    
\renewrobustcmd*{\mkbibdesc}[1]{%
  \number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}


\begin{filecontents}{\jobname.bib}
@phdthesis{Smith:2017,
    Author = {John Smith},
    Publisher = {TheGruiter},
    School = {Hogwarts school of magic},
    Title = {Investigation on interesting topics},
    Year = {2017}}

@book{Smith:2019b,
    Address = {Blondon},
    Author = {John Smith},
    Pages = {23--45},
    Publisher = {TheGruiter},
    Title = {Funny book},
    Year = {2019}}

@article{Smith:2019a,
    Author = {John Smith},
    Journal = {Journal of interesting papers},
    Number = {1},
    Pages = {23--45},
    Title = {More or less interesting paper},
    Volume = {18},
    Year = {2019}}

@article{Smith:2020,
    Author = {John Smith},
    Journal = {Journal of interesting papers},
    Number = {3},
    Pages = {23--45},
    Title = {Very interesting new paper},
    Volume = {19},
    Year = {2020}}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
\title{List of publications} 
\author{John Smith}
\date{\today}
\maketitle

\nocite{*} 
\printbibliography[heading=none]
\end{document}

Bibliography counting down.

Since this appears to be a popular feature for publication lists you may want to suggest this to the developer directly at https://github.com/jspitz/biblatex-publist/issues.

2
  • Thank you so much! You've been incredibly fast with this answer! Sep 19, 2020 at 12:59
  • 1
    Feature request has reached me and the feature (new option reversenumbering) will be in biblatex-publist 1.21. It turned out to be a bit more tricky than the above when multiple refsections, filtering or plnumbering=reset were involved. All that seems to work now, though.
    – JSpitzm
    Sep 20, 2020 at 9:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .