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

Citations in parentheses have a period before the close parentheses #20

Closed
fiapps opened this issue Oct 21, 2020 · 6 comments
Closed

Citations in parentheses have a period before the close parentheses #20

fiapps opened this issue Oct 21, 2020 · 6 comments

Comments

@fiapps
Copy link

fiapps commented Oct 21, 2020

I find that when I have a citation in the text of a footnote, it is wrapped in parentheses (a good improvement over pandoc-citeproc), but there is a period before the closing parenthesis (like this.).

Test case (test.md) – see the Zotero Style Repository for the CSL style used:

Lorem ipsum dolor sit amet^[Consectetur adipisicing elit: «sed do eiusmod tempor incididunt» [@doe_1989, 15].].

---
csl: universita-pontificia-salesiana.csl
suppress-bibliography: true
references:
- id: doe_1989
  author:
    - family: Doe
      given: John
  issued:
    - year: 1989
  publisher: ABC
  publisher-place: New York
  title: Tempor
  type: book
...

command: pandoc test.md --citeproc -t markdown-citations

result with pandoc 2.11.0.2:

Lorem ipsum dolor sit amet[^1].

[^1]: Consectetur adipisicing elit: «sed do eiusmod tempor incididunt»
    (J. [Doe]{.smallcaps}, *Tempor*, New York, ABC, 1989, 15.).
@fiapps
Copy link
Author

fiapps commented Oct 21, 2020

On pandoc-discuss, you said that notes in parentheses are first formatted, and then adjusted for being in parentheses, and that the heuristic for removing a final period seems not the be working in this case.

I think it would be better to let the formatter know in advance that the note will be in parentheses. In this case, it could simply omit the final punctuation specified on the cs:layout element. Then there wouldn't be any need for a heuristic to decide whether the note ends with an abbreviation or not. It would also allow for better handling of parentheses in the note: the Chicago Manual of Style recommends brackets within parentheses instead of parentheses within parentheses. I don't know if CSL 1.0.1 deals with that, but if not, perhaps 1.0.2 or 1.1 does. I found a July 30, 2009 post from Frank Bennet in the Zotero forum saying that he would add it to the new version of citeproc-js.

Addendum: I tested citations in parentheses with Zotero 5.0.92. It doesn't wrap citations in notes in parentheses automatically, but if parentheses are used as the prefix and suffix, then square brackets are used instead of parentheses in the citation.

@denismaier
Copy link

I remember there have been some discussions regarding this...

@denismaier
Copy link

denismaier commented Oct 21, 2020

Ok, the relevant discussion seems to be here.
Concerning parentheses-to-brackets-flip-flopping: citation-style-language/documentation#118

So, it's quite clear that this has to be addressed somehow.

@jgm
Copy link
Owner

jgm commented Oct 22, 2020

I guess we'll have to wait for CSL changes to fully resolve the issue.
But in the mean time I can see if there's a more reliable way to remove the dot when it needs removing, and not when it doesn't...

jgm added a commit to jgm/pandoc that referenced this issue Oct 22, 2020
...in citations inside notes in note-based styles.
These citations are put in parentheses, but the final
period must be removed.

See jgm/citeproc#20
@jgm
Copy link
Owner

jgm commented Oct 22, 2020

I've pushed a fix to pandoc that solves the final period issue.
I'll close this issue, but a new issue should be opened when CSL decides on a strategy for dealing with parenthesis flipping etc.

@jgm jgm closed this as completed Oct 22, 2020
@denismaier
Copy link

Great that this is resolved for now. The more general problem is this: pandoc offers more options for citation formatting than citeproc-js. It already goes beyond the spec in offering multiple citation modes, which perfectly makes sense here. Different environments, different constraints...

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

No branches or pull requests

3 participants