1

I am writing a report with Overleaf and biblatex for citation management.

I have enabled backref, but would like the page numbers in the backref to be ungrouped as follows (ideally without disrupting the grouping of citations in the text):

Desired citation format

A MWE is shown below:

 \documentclass{article}
    \usepackage[utf8]{inputenc}
    \usepackage[svgnames]{xcolor}

\usepackage[
backend=biber,
style=nature, backref]{biblatex}

\usepackage{hyperref}

\hypersetup{
  colorlinks=true,
  citecolor={blue},
  citebordercolor={blue},
}

%This part is to colorize the brackets%
\DeclareCiteCommand{\cite}[\color{blue}\mkbibbrackets]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \usebibmacro{postnote}}

\newrobustcmd{\mkbibcoloursuperscript}[2]{%
  \unspace\allowhyphens\textsuperscript{%
    \begingroup
    \protected\long\def\mkbibsuperscript##1{%
      \blx@warning{Nested superscript}%
      \mkbibbrackets{##1}}%
    \color{#1}%
    #2\endgroup}}

%This part is to put brackets around the supercitation%   
\DeclareCiteCommand{\supercite}[\mkbibcoloursuperscript{blue}]
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}
     {}
     {\BibliographyWarning{Ignoring postnote argument}}%
  \bibopenbracket}%
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\bibclosebracket}

\addbibresource{biblatex-examples.bib}


\begin{document}

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\printbibliography[
heading=bibintoc,
title={Bibliography}
]
\end{document}
1

The formatting of the backreferences are controlled by the backrefstyle option. If you set it to backrefstyle=none,, biblatex will not attempt to compress the page ranges.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[svgnames]{xcolor}

\usepackage[backend=biber,
  style=nature,
  backref=true, backrefstyle=none,
]{biblatex}

\usepackage{hyperref}

\hypersetup{
  colorlinks=true,
  citecolor={blue},
  citebordercolor={blue},
}

%This part is to colorize the brackets
\DeclareCiteCommand{\cite}[\color{blue}\mkbibbrackets]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \usebibmacro{postnote}}

\newrobustcmd{\mkbibcoloursuperscript}[2]{%
  \unspace\allowhyphens\textsuperscript{%
    \begingroup
    \protected\long\def\mkbibsuperscript##1{%
      \blx@warning{Nested superscript}%
      \mkbibbrackets{##1}}%
    \color{#1}%
    #2\endgroup}}

%This part is to put brackets around the supercitation 
\DeclareCiteCommand{\supercite}[\mkbibcoloursuperscript{blue}]
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}
     {}
     {\BibliographyWarning{Ignoring postnote argument}}%
  \bibopenbracket}%
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}\bibclosebracket}

\addbibresource{biblatex-examples.bib}


\begin{document}

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\clearpage

Test.\cite{sigfridsson}

\printbibliography[
heading=bibintoc,
title={Bibliography}
]
\end{document}

(cit. on pp. 1, 2, 3, 4, 5).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.