# Suppress nonstandard pages in book-in-book citation

I need to cite a book in an anthology that does not use standard page numbers.

In the bibliography, the page numbers for the whole work should be given.

In the citations, only the page numbers that I am referring to should be listed. Ordinarily this is done with the option citepages=omit. Unfortunately, when the pages in the "postnote" field are nonstandard, this option does not seem to work.

Here is the MWE:

\documentclass{book}

\usepackage[backend=biber,
style=verbose-ibid,
citepages=omit,
ibidpage=true]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{pages.bib}

@bookinbook{a,
author    = {An Author},
title     = {A Book With Nonstandard Pages},
booktitle = {A Bigger Book},
pages     = {123A--131D},
}

\end{filecontents}

\begin{document}

I want to cite this book with only the pages I am referring to.\footcite[130B]{a}

\end{document}


The current result in the footnote is as follows:

1 An Author. A Book With Nonstandard Pages. In: A Bigger Book, 123A–131D, 130B.

The desired result is

1 An Author. A Book With Nonstandard Pages. In: A Bigger Book, 130B.

(The fact that it does not add "pp" is OK with me.)

Any ideas for how to do this?

• You could tell biblatex that "A", "B", "C" and "D" are indeed standard page fields with \DeclareNumChars{ABCD}. Or use citepages=suppress, then the pages will always be suppressed. – moewe Apr 29 '14 at 17:52
• It worked for most of them. Is there a way to suppress the pages for just one citation? (I have one that is particularly complex, and \DeclareNumChars trick won't work for it.) – AthanasiusOfAlex Apr 29 '14 at 18:08
• There is not, as far as I know. What does the complex entry look like, if I might ask? Because there are other commands similar to \DeclareNumChars that might help here. – moewe Apr 29 '14 at 18:44

citepages=omit suppresses the pages/pagetotal in the third case only [the third case is when cite is called with a postnote that passes the \ifpages test]. They are still printed if there is no postnote or if the postnote is not a number or range.

You can read more about the \ifpages test on p. 177 (§4.6.2 Stand-alone Tests) of the biblatex documentation

So you have two options here

1. Convince biblatex that "A", "B", "C" and "D" are actually valid page "numbers"
2. Always suppress the pages field, regardless of the nature of the postnote.

## Solution 1

You can use \DeclareNumChars{ABCD} to make biblatex treat "numbers" including those characters as numbers. Consequently postnotes such as 113B will now pass the \ifpages test. (Another upside is that now the pages and pagetotal fields containing those characters will have the "pp." added as well).

Read more about \DeclareNumChars and related commands in §4.6.4 Miscellaneous Commands, pp. 186 sq. of the biblatex documentation.

## Solution 2

Or you can use citepages=suppress instead of citepages=omit (again the guide to the verbose-ibid style):

citepages=suppress unconditionally suppresses the pages/pagetotal fields in citations, regardless of the postnote.

MWE for solution 1

\documentclass{article}
\usepackage[backend=biber,
style=verbose-ibid,
citepages=omit,
ibidpage=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@bookinbook{a,
author    = {An Author},
title     = {A Book With Nonstandard Pages},
booktitle = {A Bigger Book},
pages     = {131A--123D},
}
\end{filecontents*}
\DeclareNumChars{ABCD}
\begin{document}
I want to cite this book with only the pages I am referring to.\footcite[1311B]{a}.
\printbibliography
\end{document}


• I had one citation in which I had to suppress the pages manually. See my answer for the code. – AthanasiusOfAlex Apr 29 '14 at 18:32

I solved my problem as follows:

In the preamble, I added the following to allow letters to be considered as "numbers":

\DeclareNumChars{ABCDE}


I added the following hook before the complex entry:

\AtNextCitekey{\clearfield{pages}}


This will suppress the pages field for the very next citation (and only that one).

• \AtNextCite{\clearfield{pages}\clearfield{pagetotal}} should be enough. – moewe Apr 29 '14 at 18:40
• No, I just tried it. The "minimum" required seems to be \AtNextCite{\renewbibmacro*{cite:full:citepages}\clearfield{pages}\clearfield{pagetotal}}}. I have edited my answer – AthanasiusOfAlex Apr 29 '14 at 20:06
• You are absolutely right, it should have been \AtNextCitekey{\clearfield{pages}}, if we use \AtNextCite the bibliography data is not yet available, it only comes available once we use \AtNextCitekey. – moewe Apr 30 '14 at 17:17
• Yes, that works. I edited my answer with the simpler macro. – AthanasiusOfAlex May 1 '14 at 7:54