![biblatex 通过类别进行连续反向编号](https://linux22.com/image/254470/biblatex%20%E9%80%9A%E8%BF%87%E7%B1%BB%E5%88%AB%E8%BF%9B%E8%A1%8C%E8%BF%9E%E7%BB%AD%E5%8F%8D%E5%90%91%E7%BC%96%E5%8F%B7.png)
答案引用某种类型的参考...几乎完美地解决了我的问题,但我想对我的简历进行连续计数排序:
**Articles**
[5] great Article 2
[4] great Article 1
**Presentations**
[3] great Presentation 2
[2] great Presentation 1
**Thesis**
[1] great Thesis
答案1
从链接开始回答您需要一个计数器,而不是每个类别一个计数器。基本上您只需要bbx@itemtotal
。
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=numeric,sorting=ydnt,defernumbers]{biblatex}
\DeclareFieldFormat{labelnumber}{\mkbibdesc{#1}}
\makeatletter
% Print labelnumber as actual number, plus item total, minus one
\newrobustcmd{\mkbibdesc}[1]{%
\number\numexpr\csuse{bbx@itemtotal}+1-#1\relax}
% Increment item total, add entries to categories
\def\bbx@itemtotalcategory#1{%
\iftoggle{blx@skipbib}{\listbreak}{}%
\ifentrytype{#1}
{\csnumgdef{bbx@itemtotal}{\csuse{bbx@itemtotal}+1}%
\addtocategory{#1}{\thefield{entrykey}}%
\listbreak}
{}}
\AtDataInput{\forlistloop{\bbx@itemtotalcategory}{\blx@categories}}
\csnumgdef{bbx@itemtotal}{0}
\makeatother
\DeclareBibliographyCategory{article}
\DeclareBibliographyCategory{report}
\DeclareBibliographyCategory{inproceedings}
\defbibheading{bibliography}{\section*{Publications and Presentations}}
\defbibheading{article}{\subsection*{Journal Articles}}
\defbibheading{report}{\subsection*{Reports}}
\defbibheading{inproceedings}{\subsection*{Presentations}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\nocite{aksin,bertram,chiu,companion,padhye,angenendt,moraux}
\printbibheading
\bibbycategory
\end{document}
\nocite
同样的警告也适用于此 -即使biblatex
没有告诉您需要,该方法也仅适用于并且需要额外的 LaTeX 运行。