2

I am working with philosophy-verbose style with citepages=omit.

Sometimes I need comment in the footnotes after reference. Writing just text.\footcite[22, textual comment]{bertram} outputs footnote

Bertram Aaron, Wentworth Richard, "Gromov invariants for holomorphic maps on Riemann surfaces", J. Amer. Math. Soc., 9, 2 (1996), pp. 529-571, 22, textual comment.

I don't need pagetotal and it is absent without text in the postnote: text.\footcite[22]{bertram} results in footnote

Bertram Aaron, Wentworth Richard, "Gromov invariants for holomorphic maps on Riemann surfaces", J. Amer. Math. Soc., 9, 2 (1996), p. 22.

This answer showed to me how add p. before page number, but pagetotal field that I don't need is there: text.\footcite[\pno~22, textual comment]{bertram} results footnote

Bertram Aaron, Wentworth Richard, "Gromov invariants for holomorphic maps on Riemann surfaces", J. Amer. Math. Soc., 9, 2 (1996), pp. 529-571, p. 22, textual comment.

Now I am using \cite inside \footnot: text.\footnote{\cite[22]{bertram}, textual comment} to get desired footnote

Bertram Aaron, Wentworth Richard, "Gromov invariants for holomorphic maps on Riemann surfaces", J. Amer. Math. Soc., 9, 2 (1996), p. 22, textual comment.

Is this intended behaviour that citepages=omit is not working in such conditions or I am doing something wrong?

MVE

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[english]{babel}
\usepackage[style=philosophy-verbose,backref=true,citepages=omit]{biblatex}
\usepackage[colorlinks]{hyperref}
\usepackage{xpatch}

\addbibresource{biblatex-examples.bib}

\begin{document}
\null\vfill\noindent
text.\footcite[\pno~22, textual comment]{bertram}
\printbibliography
\end{document}
2

This is intentional. citepages=omit tests if the postnote is a page range and only suppresses the pages field in that case. The idea being that in other cases it can not be guaranteed that the postnote contains page references that supersede the info in the pages field.

Following discussions in 2 exact page numbers in footnotes biblatex-sbl and https://github.com/plk/biblatex/issues/918, the next version of biblatex (v3.15) will have two new commands \NumsCheckSetup and \PagesCheckSetup that can be used to define a command that lets you hide additional text in the footnote from the macro that tests if we are dealing with a page range.

So we can define a new macro \hidefromifpages that simply expands to its argument, but then we redefine it to hide its argument when \ifpages does its text. That means that if the rest of the postnote outside \hidefromifpages is a page range, the postnote field still passes the test.

Instead of manual \pno~ it is more convenient to use \pnfmt introduced in version 3.13 (https://github.com/plk/biblatex/issues/870).

The MWE contains two code blocks: The first block defines \PagesCheckSetup and sets it up for \pnfmt. That code block will be superfluous in biblatex 3.15 or above, since it will be contained in the biblatex core. In the MWE the block is coded in a way that will cause it to raise an error in newer biblatex version to remind you that it should be removed.

The second code block sets up \hidefromifpages.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[english]{babel}
\usepackage[style=philosophy-verbose,backref=true,citepages=omit]{biblatex}
\usepackage[colorlinks]{hyperref}
\usepackage{xpatch}

% In biblatex 3.15 and above
% \NumsCheckSetup and \PagesCheckSetup are part of the biblatex core.
% The following lines will then throw an error.
% Just remove them if that happens.
\makeatletter
\newrobustcmd*{\NumsCheckSetup}{\appto\blx@hook@ifnums}
\newrobustcmd*{\PagesCheckSetup}{\appto\blx@hook@ifpages}
\PagesCheckSetup{\let\pnfmt\@firstofone}
\makeatother

\makeatletter
\newcommand*{\hidefromifpages}[1]{#1}
\PagesCheckSetup{\let\hidefromifpages\@gobble}
\makeatother


\addbibresource{biblatex-examples.bib}

\begin{document}
\null\vfill\noindent
text.\footcite[\pnfmt{380--381}\hidefromifpages{, textual comment}]{sigfridsson}
\printbibliography
\end{document}

Emma Sigfridsson and Ulf Ryde, “Comparison of methods for deriving atomic charges from the electrostatic potential and moments”, Journal of Computational Chemistry, 19, 4 (1998), doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P, pp. 380-381, textual comment.

12
  • Oh, I'm glad to see you are also finding use for \pnfmt. :)
    – gusbrs
    Mar 7 '20 at 22:50
  • @moewe thank you for such detailed answer. But your code isn't working for me, it throws errors "! Undefined control sequence. l.15107 \blx @processoptions" and so on when using in my version of style or with untouched philosophy-verbose and with your MVE.
    – Maras
    Mar 8 '20 at 3:01
  • It generates dvi file with with such text: @processoptions heckoptions@global @ ff maxnamesaxcitenames@ ff minnamesincitenames@ ff maxitemsaxitems@ ff minitemsinitems @donameparts niquelistpt@uniquelist@minyear on?opt'uniquelist=minyear' re- quires 'labeldateparts'.Setting 'uniquelist=true' @dodates uxwritemain- aux\abx@aux@refcontextefcontext@context heckencoding blinput axsection@ nf@refsec nf@refsegopreamblecmds in the upper part of a page and 1 sigfridsson. in the footnote. Maybe this will be useful for understanding what is going on.
    – Maras
    Mar 8 '20 at 3:04
  • @moewe Sorry, your code is working with untouched philology-verbose style, but not with modified by me. And there were quite long list of modifications... Maybe these errors can say to you what can be wrong and where I should search for cause?
    – Maras
    Mar 8 '20 at 3:31
  • @Maras Sorry, I have no idea why you would get those errors. If you can come up with a minimal example that reproduces the errors, I'll be happy to look at them. Just open a new question. Was ! Undefined control sequence. l.15107 \blx @processoptions the very first error, or was there one before that? That error looks like the category code of @ is wrong, so something to do with \makeatletler/\makeatother seems to be wrong. In the MWE all \makeatletter/\makeatothers line up.
    – moewe
    Mar 8 '20 at 5:43

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.