我的标签是:
\documentclass{book}
\usepackage{csquotes}
\usepackage[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}
@inproceedings{acerbi2017practical,
title = {Practical Bayesian optimization for model fitting with Bayesian adaptive direct search},
author = {Acerbi, Luigi and Ma, Wei Ji},
booktitle = {Proceedings of the 31st International Conference on Neural Information Processing Systems},
pages = {1834--1844},
year = {2017},
}
@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}
}
@book{lucretius2007nature,
title={The Nature of Things},
author={Lucretius [Titus Lucretius Carus]},
year={2007},
publisher={Translated by A. E. Stallings. London: Penguin}
}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
%\DefineBibliographyStrings{english}{%
% backrefpage = {test},
% backrefpages= {test},
%}
\DeclareFieldFormat[inproceedings, incollection, unpublished]{pages}{#1} % no word 'pages' for articles in the bibliography (print as is)
\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}
\cite{acerbi2017practical} and \cite{acerbi2014origins} and \cite{lucretius2007nature}
\clearpage
\printbibliography
\end{document}
产生的输出为:
我需要删除period
之后的部分(cited on page...).
并放置period
之前的部分(cited...)
,例如输出应该是1834--1844. (cited on page 1)
我尝试使用backrefpage
命令,但无法成功,请指教
非常感谢moewe
他对...的大力支持biblatex
和biblatex-chicago
支持。
答案1
我们可以使用如何在参考书目中每一项末尾的句号后添加 biblatex backref。
\documentclass{article}
\usepackage{csquotes}
\usepackage[
backend=biber,
style=numeric,
sorting=nyt,
sortcites=true,
autopunct=true,
autolang=hyphen,
abbreviate=false,
backref=true,
]{biblatex}
\renewcommand*{\bibpagerefpunct}{%
\finentrypunct\space}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext[parens]{%
\ifnumgreater{\value{pageref}}{1}
{\bibncpstring{backrefpages}\ppspace}
{\bibncpstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}%
\renewcommand*{\finentrypunct}{}}}
\begin{filecontents*}{\jobname.bib}
@inproceedings{acerbi2017practical,
title = {Practical Bayesian optimization for model fitting with Bayesian adaptive direct search},
author = {Acerbi, Luigi and Ma, Wei Ji},
booktitle = {Proceedings of the 31st International Conference on Neural Information Processing Systems},
pages = {1834--1844},
year = {2017},
}
@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}
}
@book{lucretius2007nature,
title = {The Nature of Things},
author = {Lucretius [Titus Lucretius Carus]},
year = {2007},
publisher = {Translated by A. E. Stallings. London: Penguin}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
\cite{acerbi2017practical} and \cite{acerbi2014origins} and \cite{lucretius2007nature}
\printbibliography
\end{document}
答案2
通过使用以下标签:
\DefineBibliographyStrings{english}{%
backrefpage = {\protect\lowercase{cited on page}},
backrefpages= {\protect\lowercase{cited on pages}},
}
\def\fullstop{.}
\renewcommand*{\bibpagerefpunct}{\fullstop\space}
\renewcommand*{\finentrypunct}{}
我得到了所需的输出,其内容为:
但是,请专家(如moewe
,,egreg
以及其他许多人)确认这是正确的方法吗?