4

How can I change a command like \textcite[][8]{example} to display p.8 rather than p.~8 in the text, while printing the postnote as-is if it does not resemble a page number.

I tried using \DeclareFieldFormat{postnote}{\pno#1} after looking at section 3.13.3 in the biblatex manual, but -- unsurprisingly -- it does not work when the postnote is not a page:

MWE:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{example,
  author  = {Other, Anthony Norman},
  title   = {Some things I did},
  year    = {2014},
  journal = {J.~Irrep. Res.},
  volume  = {1},
  number  = {1},
  pages   = {1-10}
}
\end{filecontents*}
\usepackage[backend=biber,style=authoryear-ibid]{biblatex}

\DeclareFieldFormat{postnote}{\pno#1}

\addbibresource{\jobname.bib}
\begin{document}
Hello\textcite[][8]{example}. But \textcite[][Table~5]{example}
\printbibliography
\end{document}
1
3

Just leave the standard definition for \DeclareFieldFormat{postnote}{\mkpageprefix[pagination]{#1}} and add

\renewcommand*{\ppspace}{}

But please be warned that omitting the space between the "p."/"pp." and page number looks extremely odd (I would even say terrible) and is not the norm in any language I know.

MWE

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

\addbibresource{biblatex-examples.bib}

\renewcommand*{\ppspace}{}

\begin{document}
Lorem \textcite[][8]{sigfridsson} ipsum \textcite[][Table~5]{sigfridsson}.
\end{document}
2
  • I agree that it is terrible.
    – Hugh
    Jun 8 '16 at 14:55
  • 1
    @Hugh: A thin unbreakable space would probably look better (\renewcommand*{\ppspace}{\,}).
    – Bernard
    Jun 8 '16 at 17:08

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.