我想知道如何改变参考文献的列出方式,使其格式为 1. 而不是 [1]?我给出了一个稍微复杂的例子,其中我还反转了数字并添加了前缀。因此,我希望 [J1] 改为显示为 J1。
下面的例子产生...
[J2] John C. Doe 和 Jane Smith。“文章”。刊于:期刊(2013 年 9 月 10 日)。
[J1] Shelly Jones。“另一篇文章”。载于:Another Journal(2013 年 8 月 14 日)。
但我希望它是...
J2. John C. Doe 和 Jane Smith。“文章”。刊于:期刊(2013 年 9 月 10 日)。
J1. Shelly Jones。“另一篇文章”。刊于:Another Journal(2013 年 8 月 14 日)。
\documentclass{article}
\begin{filecontents}{\jobname.bib}
@article{B,
author = {Shelly Jones},
title = {Another article},
journal = {Another Journal},
date = {2013-08-14},
}
@article{C,
author = {John C. Doe and Jane Smith},
title = {The article},
journal = {Journal},
date = {2013-09-10},
}
\end{filecontents}
\usepackage[style=numeric,sorting=nyt,backend=biber]{biblatex}
% 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}}
\newrobustcmd*{\mkbibdesc}[1]{%
\number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography[sorting=nyt,title={Bibliography},prefixnumbers={J}]
\end{document}
答案1
我认为您只需按如下方式更改字段格式即可:
\documentclass{article}
\begin{filecontents}{\jobname.bib}
@article{B,
author = {Shelly Jones},
title = {Another article},
journal = {Another Journal},
date = {2013-08-14},
}
@article{C,
author = {John C. Doe and Jane Smith},
title = {The article},
journal = {Journal},
date = {2013-09-10},
}
\end{filecontents}
\usepackage[style=numeric,sorting=nyt,backend=biber]{biblatex}
% 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}}
\newrobustcmd*{\mkbibdesc}[1]{%
\number\numexpr\csuse{entrycount:\therefsection}+1-#1\relax}
\DeclareFieldFormat{labelnumberwidth}{#1.}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography[sorting=nyt,title={Bibliography},prefixnumbers={J}]
\end{document}