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 with question mark not recognized #1161

Closed
liob opened this issue Feb 14, 2014 · 6 comments
Closed

Citations with question mark not recognized #1161

liob opened this issue Feb 14, 2014 · 6 comments

Comments

@liob
Copy link

liob commented Feb 14, 2014

Pandoc appears to have issues with citation keys containing question marks. This is actually a problem since Zotero exports keys containing question marks if no date is given.

citation_test.md:

Pandoc Citation Test
====================

Citations with questionmarks in their biblatex key do not work [@you_dont_see_me_????].

Without questionmark it works just fine [@now_you_do].

bibliography.bib:

@ARTICLE{you_dont_see_me_????,
  author = {No One},
  title = {You Don't See Me},
}

@ARTICLE{now_you_do,
  author = {No One},
  title = {You See Me},
}
pandoc --bibliography=bibliography.bib citation_test.md

pandoc-citeproc: reference you_dont_see_me_ not found

Pandoc Citation Test

Citations with questionmarks in their biblatex key do not work (????).

Without questionmark it works just fine (One).

One, No. “You See Me.”

@jgm
Copy link
Owner

jgm commented Feb 14, 2014

Final punctuation is not allowed in keys. The reason is that
a final punctuation mark in an in-text citation might be intended
to be real punctuation: e.g.

Do you agree with the results of @smith2000?

@liob
Copy link
Author

liob commented Feb 17, 2014

I see your point. However, as question marks, as well as some other punctuation marks, are valid key characters there should be a way of escaping. Maybe something on the lines of:

Do you agree with the results of @smith2000\??

That said, the practice of Zotero of using four question marks for a missing date is no benefit in terms of key differentiation. I will ask them to simply drop the question marks.

@jgm
Copy link
Owner

jgm commented Mar 24, 2014

Any success convincing Zotero devs to change this?

@mpickering
Copy link
Collaborator

I don't think this was fully followed up.

@tarleb
Copy link
Collaborator

tarleb commented Aug 13, 2016

Should this be fixed in pandoc? If yes, the way to go would probably be to change citeKey in Text.Pandoc.Parsing in a way that allows keys to end with escaped punctuation characters.

@jgm
Copy link
Owner

jgm commented Aug 15, 2016

I'm not keen on treating @foo? differently from @foo\? in the way I think you're suggesting. Backslash escapes should have a single meaning, and this would give them another meaning: namely, "count this as part of the citation key and not as a regular question mark."

Perhaps we could introduce an alternative syntax for author-in-text citations, e.g. [@@foo] == @foo but [@@foo?] is possible. But I'm not sure it's so important to support keys ending in arbitrary punctuation.

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

4 participants