publist による逆番号付け

publist による逆番号付け

私は、自分の出版物の番号付きリストを公開するために、「publist」という BibLaTex 拡張機能を使用しています。これは、項目を昇順に番号付けします (下の図を参照)。

DP-F の

逆の順序で番号を付けたい場合はどうすればよいでしょうか。つまり、Smith 2020 に割り当てられた番号 [4] から始めて、Smith 2017 に割り当てられた番号 [1] までとなります。

これにより、現時点での私の論文の総数がすぐに表示されます。

パッケージのドキュメントにはそのようなオプションは記載されていません。しかし、ソースコードを変更することで簡単に実現できるのではないかと思います。出版者パッケージ。

編集 リクエストに応じて、TeX ファイルのソース コードを追加します。

\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 ファイル:

@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}}

答え1

ほとんどの場合、biblatex: 逆番号付け(つまりカウントダウン)ここでも動作するはずです。

にはbiblatex独自のバージョンの があるので、に\mkbibdesc変更するだけです。\newrobustcmd\renewrobustcmd

このコードは、フィルタリングや複数の参考文献を多用すると期待通りに動作しない可能性があることに注意してください(回答に記載されている注意事項も参照してください)。biblatex: 逆番号付け(つまりカウントダウン))。

\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}

参考文献のカウントダウン。

これは出版物リストで人気のある機能のようですので、開発者に直接提案することをお勧めします。https://github.com/jspitz/biblatex-publist/issues

関連情報