Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\pno in citations in LaTeX exports #4739

Open
adql opened this issue Jun 27, 2018 · 3 comments
Open

\pno in citations in LaTeX exports #4739

adql opened this issue Jun 27, 2018 · 3 comments

Comments

@adql
Copy link
Contributor

adql commented Jun 27, 2018

When citing a resource with a comment following the page number, e.g. [@Jones_2010, 20, my emphasis], the resulting LaTeX export is \autocite[20, my emphasis]{Jones_2010}. This causes BibLaTeX to treat the entire postnote as raw text without automatic inclusion of a style-dependent page prefix. So when using a citation style that includes e.g. p. before the page number, the final result becomes

See for example (Jones 2010, 20).

while it should be

See for example (Jones 2010, p. 20).

BibLaTeX requires using \pno in such cases in order to trigger the page prefixing manually where the postnote string is too complex for automatic inclusion. Therefore, Pandoc should export such a citation as \autocite[\pno~20, my emphasis]{Jones_2010}. Respectively \ppno should be used for a page range.

Pandoc 2.2.1 with the command:
pandoc --read=markdown --write=latex --output=FILENAME --biblatex --top-level-division=chapter --number-sections --standalone --table-of-contents --include-in-header=header-includes.tex --include-before-body=before-body-includes.tex --bibliography=zotero.bib
(Note that an input file is missing because I use pandoc-mode in Emacs)

@adql
Copy link
Contributor Author

adql commented Jun 27, 2018

Of course, in every citation p., pp., chap. etc. may be used. This is however inconsistent with a usage scheme in which the user chooses to omit these and rely on BibLaTeX mechanisms for adding the locator for whatever reason (BibLaTeX allows its customization on a per-entry basis).

@jgm
Copy link
Owner

jgm commented Sep 26, 2019

The \pno should be added only when --biblatex output has been specified, and only when the citation suffix starts with a numeral.

@seifferth
Copy link
Contributor

#7220 might actually provide a solution for this issue. It works in line with pandoc-citeproc's citation locator braces, which were previously stripped. It converts:

[@something, {pages}, additional content]

into

\autocite[\pnfmt{pages}, additional content]{something}

I believe that this solution might be more robust (and a little less magical) than auto-detecting where to insert \pno (or \ppno?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants