5

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

1 Answer 1

4

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
    Commented Jun 8, 2016 at 14:55
  • 1
    @Hugh: A thin unbreakable space would probably look better (\renewcommand*{\ppspace}{\,}).
    – Bernard
    Commented Jun 8, 2016 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .
https://tex.stackexchange.com/questions/313714/biblatex-remove-space-between-p-and-page-number-in-postnote
tex.stackexchange.com
CC-MAIN-2024-38
147459
application/http; msgtype=response
sha1:BMDFKGGDHLUS7O6CYIBWPZAODVAPBGRW
<urn:uuid:480e253e-4235-4b21-a7ad-6ab7d2374a17>
2024-09-18T21:15:13Z
104.18.43.226
text/html
sha1:A73CTEK5X32XBQYUREBH6ZWFALMLZ642
<urn:uuid:4808a96d-6506-4027-b8ea-559269b30b7b>
https://tex.stackexchange.com/questions/313714/biblatex-remove-space-between-p-and-page-number-in-postnote
response
<urn:uuid:c2cc95c2-7509-4024-b0ee-b351f9c33e6b>
isPartOf: CC-MAIN-2024-38
publisher: Common Crawl
description: Wide crawl of the web for September 2024
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-196
software: Apache Nutch 1.20 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/