Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

First reference in the second sentence of a citation not parsed correctly #69

Closed
adunning opened this issue Aug 14, 2014 · 4 comments
Closed

Comments

@adunning
Copy link
Contributor

If one writes a citation that contains two sentences (i.e. when using a note style such as chicago-fullnote-bibliography.csl), the first reference in the second sentence will not be parsed correctly, resulting in a few oddities; this is especially evident with chapters. Subsequent references are fine. See a test file on Gist.

@jgm
Copy link
Owner

jgm commented Aug 16, 2014

I think this can be understood if you look carefully at
the pandoc README under citations.

"Citations go inside square brackets and are separated by semicolons.
Each citation must have a key, composed of '@' + the citation
identifier from the database, and may optionally have a prefix,
a locator, and a suffix."

I think you'd find that replacing the sentence-ending period
with a semicolon in your example fixes the oddities. For that
would tell pandoc that you have two citations (the first
with a suffix, the second with a prefix and a suffix). As it
stands, pandoc sees one citation, with another citation contained
awkwardly in its suffix.

That's not a good solution for your use-case, of course. I suppose
the obvious fix is to have pandoc split citations on sentence-ending
periods, as well as semicolons. But there are some problems with
this. First, how do you detect a sentence-ending period? (Remember
we can have things like "in sect. A", where the period is not
sentence-ending.) Second, there are cases where you migth want the
suffix of a citation to contain multiple sentences.

Maybe there's another solution?

+++ Andrew Dunning [Aug 14 14 15:28 ]:

If one writes a citation that contains two sentences (i.e. when using a
note style such as chicago-fullnote-bibliography.csl), the first
reference in the second sentence will not be parsed correctly,
resulting in a few oddities; this is especially evident with chapters.
Subsequent references are fine. See a [1]test file on Gist.


Reply to this email directly or [2]view it on GitHub.

References

  1. https://gist.github.com/adunning/616551b48f875155f12d
  2. First reference in the second sentence of a citation not parsed correctly #69

@adunning
Copy link
Contributor Author

That makes sense enough: I did have a vague idea that I was probably going beyond the intended use, but since everything looks fine for references without a locator, I hoped that it was just a minor bug. (By the way, I think that the easiest way to explain the notation is to say that Pandoc essentially expects citations to be written in an author-date format, and provided this is done consistently it will be able to render citations using either a parenthetical or note style.) I suppose that one could simply make the argument that multi-sentence footnotes shouldn't exist in the first place and are expected to be integrated into the body of the text.

Citations could perhaps be parsed in this looser sort of way if they were manually placed within a footnote. This would still fit with the existing model insofar as one would normally place a multi-sentence reference (typically a bibliographic discussion tangential to the main argument rather than a citation per se) in a footnote even if one were using a parenthetical citation style. And, after all, people occasionally try to write the syntax this way in any case.

A less obvious way of doing it from the user's perspective, but one that I expect would be much easier to implement, would be to enable the concatenation of two references placed next to one another into a single multi-sentence footnote. For example:

This is the solution to world peace [@goering:1992william, p. 395 is the first sentence] [second sentence is @woods:1999classroom, pp. 393–94].

The only modification to the current behaviour would be the merging of adjacent notes, since you're already adding the appropriate capitalization and punctuation.

@jgm
Copy link
Owner

jgm commented Aug 17, 2014

I'm not sure I understand the proposal in the second paragraph ("this looser sort of way"). Can you be more specific?

@adunning
Copy link
Contributor Author

That paragraph really wasn't very clear: I was referring back to your comment that it might be possible to use a period as a divider between citations as well as the semicolon, and was wondering if implementing this behaviour only in explicit footnotes would perhaps allow something to be accomplished. I don't think it makes any sense in the end. (I was also thinking of that recent thread on pandoc-discuss where it turned out that the problem was simply that he was trying to write everything in footnotes rather than allowing the citation syntax plus CSL do to its thing.)

@jgm jgm closed this as completed Oct 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants