考虑到以下 MWE,我正在寻找改变反向引用格式的可能性。
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{companion,
author={Frank Mittelbach and Michel Goossens},
title={The \LaTeX{} Companion},
year={2008},
publisher={Addison-Wesley},
isbn={0-201-36299-6},
}
\end{filecontents*}
\documentclass{scrartcl}
\usepackage{polyglossia}
\setdefaultlanguage[variant=us]{english}
\usepackage{blindtext}
\usepackage[backend=biber,hyperref,backref,backrefstyle=none]{biblatex}
\DefineBibliographyStrings{english}{%
backrefpage = {\lowercase{s}ee p.},%
backrefpages = {\lowercase{s}ee pp.}%
}
\bibliography{\jobname.bib}
\usepackage{hyperref}
\begin{document}
\blindtext
\cite{companion}
\printbibliography
\end{document}
这给了我输出(我正在运行它,lualatex
但这应该不是问题)
我现在正在寻找一种可能性来改变参考书目中的反向引用的格式((see p. 1)
。我想过改变它的颜色或用斜体字体打印它。有没有简单的方法可以实现这一点?
答案1
奇怪的是昨天回答过类似的事情
\DeclareFieldFormat{pagerefformat}{\mkbibparens{{\color{red}\mkbibemph{#1}}}}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext[pagerefformat]{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
现在,您可以pagerefformat
根据自己的喜好设置输出样式。这里我们将页面引用信息括在括号中,并以红色斜体打印。
平均能量损失
\documentclass{scrartcl}
\usepackage[backend=biber,hyperref,backref,backrefstyle=none]{biblatex}
\DefineBibliographyStrings{english}{%
backrefpage = {see p\adddot},%
backrefpages = {see pp\adddot}%
}
\addbibresource{biblatex-examples.bib}
\usepackage{xcolor}
\usepackage{hyperref}
\DeclareFieldFormat{pagerefformat}{\mkbibparens{{\color{red}\mkbibemph{#1}}}}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext[pagerefformat]{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
\begin{document}
Lorem
\cite{companion}
\printbibliography
\end{document}