如何使用 biblatex.sty 在数字标签前插入文本“no.”

如何使用 biblatex.sty 在数字标签前插入文本“no.”

我的标签如下:

\documentclass{book}

\usepackage{csquotes}
\usepackage[maxbibnames=99,style=numeric,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,autolang=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}
% BibTeX bibliography file
\makeatletter
\defbibheading{bibempty}{}
\setlength{\bibhang}{5\p@}%
\setlength{\bibitemsep}{3\p@}%
\def\bibfont{\fontsize{8}{9}\selectfont}%
\renewcommand{\RNfont}{}
\makeatother

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{acerbi2014origins,
  title={On the Origins of Suboptimality in Human Probabilistic Inference},
  author={Acerbi, Luigi and Vijayakumar, Sethu and Wolpert, Daniel M.},
  journal={PLoS Computational Biology},
  volume={10},
  number={6},
  pages={e1003661},
  year={2014},
  publisher={Public Library of Science San Francisco, USA}
}
}

\end{filecontents*}

\addbibresource{\jobname.bib} 

\DefineBibliographyStrings{english}{%
  backrefpage = {\protect\lowercase{cited on page}},
  backrefpages= {\protect\lowercase{cited on pages}},
}
\DeclareFieldFormat[inproceedings, incollection, unpublished]{pages}{#1} % no word 'pages' for articles in the bibliography (print as is)

%\DeclareFieldFormat{number}{#1}% number in a series
%\DeclareFieldFormat{part}{.vol#1}% physical part of a logical volume
%\DeclareFieldFormat[article,periodical]{number}{no\addperiod\space#1}% number of a journal

\begin{document}

\renewcommand*{\intitlepunct}{%
  \ifentrytype{inproceedings}
    {\addspace}
    {\addcolon\space}}

%\renewcommand*{\intitlepunct}{%
%  \ifentrytype{article}
%    {\addspace}
%    {\addspace}}

%%\renewbibmacro*{in:}{%
%%  \setunit{\addcomma\space}%
%%  \ifentrytype{article}
%%    {}
%%    {\printtext{%
%%       \bibstring{In}\intitlepunct}}}
%\renewbibmacro*{in:}{%
%\ifentrytype{article}{}{\printtext{\intitlepunct}}
%  \bibstring{in}%
%  \printunit{\intitlepunct}}

\DeclareFieldFormat[incollection]{title}{\enquote{#1}}

\renewbibmacro*{in:}{%
  \setunit{\addcomma\space}%
  \ifentrytype{article}
    {}
    {\printtext{%
       \bibstring{In}\intitlepunct}}}

%\renewcommand*{\intitlepunct}{\addspace}
\def\fullstop{.}
\renewcommand*{\bibpagerefpunct}{\fullstop\space}
\renewcommand*{\finentrypunct}{}

\cite{acerbi2017practical} and \cite{acerbi2014origins} and
\cite{lucretius2007nature} test \cite{acuna2010structure}
test \cite{tenenbaum2011grow}
\clearpage

\printbibliography

\end{document}

它产生的输出如下:

在此处输入图片描述

我需要的输出应该是从....10.6 (2014).......10, no. 6 (2014)...,请参阅下面标记的屏幕截图以获得更好的说明:

在此处输入图片描述

请指教...

答案1

使用biblatex-ext(在您的情况下style=ext-numeric,而不是style=numeric,)来访问一些更可自定义的标点符号命令,例如\volnumdelim。然后,这就像重新定义所述\volnumdelim并更改number字段格式一样简单。

我删除了所有与问题无关的自定义代码,以便更容易看到解决方案。

\documentclass{article}

\usepackage{csquotes}
\usepackage[
  backend=biber,
  style=ext-numeric,
  sorting=nyt,
  sortcites=true,
  autopunct=true,
  autolang=hyphen,
  abbreviate=false,
  backref=true,
]{biblatex}

\renewcommand*{\volnumdelim}{\addcomma\space}
\DeclareFieldFormat[article,periodical]{number}{\bibsstring{number}~#1}

\begin{filecontents*}{\jobname.bib}
@article{acerbi2014origins,
  title   = {On the Origins of Suboptimality in Human Probabilistic Inference},
  author  = {Acerbi, Luigi and Vijayakumar, Sethu and Wolpert, Daniel M.},
  journal = {PLoS Computational Biology},
  volume  = {10},
  number  = {6},
  pages   = {e1003661},
  year    = {2014},
}
\end{filecontents*}
\addbibresource{\jobname.bib} 


\begin{document}
Lorem \autocite{acerbi2014origins}

\printbibliography
\end{document}

Luigi Acerbi、Sethu Vijayakumar 和 Daniel M. Wolpert。“论人类概率推理次优性的起源”。载于:PLoS Computational Biology 10,第 6 期(2014 年),e1003661(第 1 页引用)。

相关内容