-
-
Notifications
You must be signed in to change notification settings - Fork 61
'p.'/'pp.' abbreviation retained with Roman numerals #173
Comments
This is because of the current logic for parsing locators out of the generic suffix.
What is conspicuously missing are lower-case roman numerals. Why? Because it was hard to find a simple heuristic for recognizing these that wouldn't capture regular text, too. But it should be possible to come up with something a bit more robust that could allow lowercase roman too. The relevant part of the code, for reference, is |
To give a better idea of the difficulty:
here we want the locator to include "123A, C22, VII, 22-33"; the rest, |
The present behaviour allows it to parse things such as There are some good regex examples for detecting Roman numerals, but only for uppercase (apologies if you're already using something like this, as I haven't found the code, but it appears to be something similar to their 'flexible' rather than 'strict' example). I suppose this could be extended by looking for words that match this pattern and are entirely uppercase or lowercase (I don't think it's possible to have a mixed-case Roman numeral). I can't presently think of a situation in which this treatment would cause a problem. |
+++ Andrew Dunning [Sep 26 15 19:39 ]:
I was thinking there might also be cases with mixed roman |
Unless I am missing something, that's not a problem if you're already treating any word including a number as a locator. The example I gave above of |
So, is your suggestion to look for (a) words containing +++ Andrew Dunning [Sep 27 15 10:59 ]:
|
PS. there's already a romanNumeral parser in Text.Pandoc.Parsing. +++ Andrew Dunning [Sep 27 15 10:59 ]:
|
Right, (a) being what I understand to be included in the present behaviour. Interpreting entirely lowercase words that can be parsed as Roman numerals might exclude a few edge cases (e.g. a § vii A?); but it would cover the main usage of citing front matter, and adding only this rule shouldn't introduce any adverse effects. |
Wonderful; thank you! |
When using a page number with Roman numerals, the abbreviation is not suppressed in version 0.7.4 (compare Chicago Manual of Style 14.154):
Actual output:
Expected output:
The text was updated successfully, but these errors were encountered: