[Tex/LaTex] BibLaTeX – Change format of backreference

back-referencingbiblatex

Considering the following MWE I am searching for a possibility to change the format of the backreference.

\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}

This gives me the output (I am running it with lualatex but that should not be a problem)
Screenshot of the compiled pdf version of the MWE

I am now searching for a possibility to change the format of the backreference in the bibliography (the (see p. 1). I thought of changing its color or printing it in an italic font. Is there a simple way to achieve this?

Best Answer

Curiously I answered something very similar just yesterday

\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}}}}

Now you can use pagerefformat to style the output to your liking. Here we wrap the pageref info in parentheses and print it in red italics.

MWE

\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}

example output