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

Pandoc with --natbib swallows locators in its output #10057

Closed
wenkokke opened this issue Aug 5, 2024 · 4 comments
Closed

Pandoc with --natbib swallows locators in its output #10057

wenkokke opened this issue Aug 5, 2024 · 4 comments
Labels

Comments

@wenkokke
Copy link

wenkokke commented Aug 5, 2024

Related to #9640 and #9962.

Pandoc with --natbib swallows locators in its output.

Create a file named sample.md with the following contents:

We all love the famous proof by @BenjaminHornigold [p. 42].
But is it real?
No. Probably not.

Run the following command:

pandoc sample.md --natbib -t latex

The expected output is:

We all love the famous proof by \citet[p. 42]{BenjaminHornigold}. But is it
real? No.~Probably not.

The actual output is:

We all love the famous proof by \citet[42]{BenjaminHornigold}. But is it
real? No.~Probably not.

It's possible that Pandoc applies default the Chicago style to when formatting locators.
However, passing --csl with an alternative style, such as Harvard, does not affect the output.

Pandoc version?
I'm running Pandoc 3.2.1 on macOS 13.

pandoc 3.2.1
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /Users/keri/.local/share/pandoc
Copyright (C) 2006-2024 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
@wenkokke wenkokke added the bug label Aug 5, 2024
@wenkokke
Copy link
Author

wenkokke commented Aug 5, 2024

@wenkokke
Copy link
Author

wenkokke commented Aug 5, 2024

There is a comment on L192:

-- | In natbib and biblatex, the label p. or pp. can be
-- omitted; ranges will be treated as page ranges by default.
-- See #9275.

Which leads to #9275.

@wenkokke
Copy link
Author

wenkokke commented Aug 5, 2024

The natbib documentation does not mention any feature where ranges are treated as page ranges by default. As far as I can tell, this is only a biblatex feature, and I don't believe #9275 made reference to natbib. Furthermore, the sample code in the natbib documentation manually inserts page labels:

Screenshot 2024-08-05 at 20 32 39

@wenkokke
Copy link
Author

wenkokke commented Aug 5, 2024

I would suggest only removing page locators for biblatex, and disabling this feature when --natbib is passed.

@jgm jgm closed this as completed in 9bf112b Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant