# Disable backref printing with fullcite

Consider the following MWE

\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber,backref=true]{biblatex}

\newbibmacro*{mypageref}{%
\iflistundef{pageref}
{}
{\printtext[brackets]{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
\renewbibmacro{pageref}{}

\renewbibmacro{finentry}{%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{mypageref}%
\finentry}

\begin{document}
\fullcite{knuth:ct:e}
\printbibliography
\end{document}


This allows the backrefs to be formatted the way I want them (between brackets, etc) but it also prints the backref with the \fullcite command. How can I disable backref in the body of the document when using \fullcite while preserving backref (and formatting) in the bibliography?

While in theory, it would be possible to check whether we're in a cite command, or in the bibliography (with \ifcitation and \ifbibliography, pp. 185-186 of the biblatex documentation, that is not really necessary here, as we can just modify the pageref macro to do what you want (there is no need for a new mypageref) and use the full stop to separate the pagerefs from the rest of the bibliography entry.

\renewcommand{\bibpagerefpunct}{\addperiod\space}
\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext[brackets]{%<--- here we had parens before
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}


The standard pageref is not used in \fullcites, so we're fine, here.

MWE

\documentclass{article}
\usepackage[style=authoryear-comp,backend=biber,backref=true]{biblatex}

\renewbibmacro*{pageref}{%
\iflistundef{pageref}
{}
{\printtext[brackets]{%
\ifnumgreater{\value{pageref}}{1}
{\bibstring{backrefpages}\ppspace}
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}

\begin{document}
\fullcite{knuth:ct:e}
\printbibliography
\end{document}


• Thanks! One minor questions: how do I add a period after the publisher (or eventually page number) in \fullcite? – petobens Sep 22 '14 at 15:03
• @petobens Well, that's standard behaviour, you could redefine the \fullcite command to \DeclareCiteCommand{\fullcite} {\usebibmacro{prenote}} {\usedriver {\DeclareNameAlias{sortname}{default}} {\thefield{entrytype}}\finentrypunct} {\multicitedelim} {\usebibmacro{postnote}} (modulo line breaks, obviously; the change is \finentrypunct). – moewe Sep 22 '14 at 15:16