这是来自更改 backref 中的格式
到
梅威瑟:
\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber,backref=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\DefineBibliographyStrings{english}{
notcited = {not cited},
backrefpage={Cited on page},
backrefpages={Cited on pages}
}
\renewcommand{\bibpagerefpunct}{\addperiod\space}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
\begin{document}
\fullcite{knuth:ct:e}
testing \textcite{knuth:ct:e}
\clearpage
testing \textcite{knuth:ct:e}
\printbibliography
\end{document}
基本上从
Knuth, Donald E. (1986)。计算机与排版。E 卷:计算机现代字体。马萨诸塞州雷丁:Addison-Wesley。引自第 1、2 页。
到
Knuth, Donald E. (1986)。计算机与排版。E 卷:计算机现代字体。马萨诸塞州雷丁:Addison-Wesley。第 1 页和第 2 页引用。
答案1
您可以尝试以下方法。它仅适用于backrefstyle=none
否则列表将被动态压缩,并且很难确定哪个项目位于倒数第二位。
\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber,backref=true,backrefstyle=none]{biblatex}
\NewBibliographyString{notcited}
\DefineBibliographyStrings{english}{
notcited = {not cited},
backrefpage = {cited on page},
backrefpages = {cited on pages}
}
\makeatletter
\DeclareListFormat{pageref}{%
\ifnumless{\abx@pagerefstyle}{0}
{\usebibmacro{list:delim}{#1}%
\ifhyperref
{\hyperlink{page.#1}{#1}}
{#1}}
{\ifnumequal{\value{listcount}}{1}
{\usebibmacro{pageref:init}}
{}%
\usebibmacro{pageref:comp}{#1}%
\ifnumequal{\value{listcount}}{\value{liststop}}
{\usebibmacro{pageref:dump}}
{}}}
\makeatother
\renewcommand{\bibpagerefpunct}{\addperiod\space}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
\addbibresource{biblatex-examples.bib}
\begin{document}
testing \textcite{sigfridsson}
\clearpage
testing \textcite{sigfridsson}
\printbibliography
\end{document}