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

citations whose id starts with a digit are not processed #97

Closed
mcmtroffaes opened this issue Jan 9, 2015 · 3 comments
Closed

citations whose id starts with a digit are not processed #97

mcmtroffaes opened this issue Jan 9, 2015 · 3 comments

Comments

@mcmtroffaes
Copy link

Example:

---
title: Test
references:
- id: 1657:huygens
  publisher-place: Lugd. Batav.
  page: 517-524
  container-title: 'Exercitationum mathematicarum libri quinque: Quibus accedit
    Christiani Hugenii tractatus de ratiociniis in aleæ ludo'
  author:
  - family: Huygens
    given: Christiaan
  issued:
    year: 1657
  title: De ratiociniis in ludo aleæ
  type: chapter
  publisher: Ex officina Johannis Elsevirii
  editor:
  - family: Schooten
    given: Franciscus á
...

[@1657:huygens]

renders - without error messages - as

[@1657:huygens]

instead of

(Huygens 1657)

Huygens, Christiaan. 1657. “De Ratiociniis in Ludo Aleæ.” In Exercitationum Mathematicarum Libri Quinque: Quibus Accedit Christiani Hugenii Tractatus de Ratiociniis in Aleæ Ludo, edited by Franciscus á Schooten, 517–24. Lugd. Batav.: Ex officina Johannis Elsevirii.

Changing the id to, for example, x1657:huygens, makes it work again, so the issue appears to be that the id starts with a digit.

In bibtex, it is perfectly valid for citation ids to start with the year, so it would be nice if pandoc-citeproc could support this as well.

@jgm
Copy link
Owner

jgm commented Jan 9, 2015

That's intentional (see pandoc User's Guide under citations).

I worried that if we allowed citations to start with digits, we'd
falsely capture some things that weren't intened as citations,
e.g. 15 apples @5ea. Maybe this is overthinking, though.

+++ Matthias C. M. Troffaes [Jan 09 15 01:50 ]:

Example:

---
title: Test
references:
- id: 1657:huygens
 publisher-place: Lugd. Batav.
 page: 517-524
 container-title: 'Exercitationum mathematicarum libri quinque: Quibus accedit
   Christiani Hugenii tractatus de ratiociniis in aleæ ludo'
 author:
 - family: Huygens
   given: Christiaan
 issued:
   year: 1657
 title: De ratiociniis in ludo aleæ
 type: chapter
 publisher: Ex officina Johannis Elsevirii
 editor:
 - family: Schooten
   given: Franciscus á
...

[@1657:huygens]

renders - without error messages - as

[@1657:huygens]

instead of

(Huygens 1657)

Huygens, Christiaan. 1657. “De Ratiociniis in Ludo Aleæ.” In Exercitationum Mathematicarum Libri Quinque: Quibus Accedit Christiani Hugenii Tractatus de Ratiociniis in Aleæ Ludo, edited by Franciscus á Schooten, 517–24. Lugd. Batav.: Ex officina Johannis Elsevirii.

Changing the id to, for example, x1657:huygens, makes it work again, so the issue appears to be that the id starts with a digit.

In bibtex, it is perfectly valid for citation ids to start with the year, so it would be nice if pandoc-citeproc could support this as well.


Reply to this email directly or view it on GitHub:
#97

@mcmtroffaes
Copy link
Author

Thanks for your quick response. Indeed this is mentioned in the User's Guide. I thought I had read it, but I missed this detail.

Nevertheless, personally, I find the distinction between digits and letters surprising. The standard way in markdown to prevent special characters to act their magic is to backslash them. This already works e.g. \@x1657:huyghens is indeed rendered correctly as @x1657:huyghens and not as a citation. The same could work for \@5ae.

A change would of course break backwards compatibility. It's hard to tell how many people would rely on @5ae not being a citation in documents that use citeproc; probably not many?

@jgm
Copy link
Owner

jgm commented Apr 18, 2015

Closed by jgm/pandoc#1954.

@jgm jgm closed this as completed Apr 18, 2015
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