Giter VIP home page Giter VIP logo

Comments (13)

larsgw avatar larsgw commented on June 30, 2024 2

I'll work on it.

from citeproc-js.

larsgw avatar larsgw commented on June 30, 2024

I don't see citation-key (or Citation Key) in the note field of any of the input items? Might be Zotero in that case?

from citeproc-js.

denismaier avatar denismaier commented on June 30, 2024

You're right of course. The Citation Key ends up in id. And, interestingly, the other data also seems to be there, but this here doesn't work quite as it should:

grafik

grafik

But:

grafik

grafik

So:

  • Citation Key in the middle -> match on type works, but event-date is not there.
  • Citation Key on top -> match on type works, and event-date is there.

Any ideas?
Maybe @dstillman might be also interested in this.

from citeproc-js.

bwiernik avatar bwiernik commented on June 30, 2024

This might be some leftover behavior from creating alignment with BetterBibTeX? @retorquere

from citeproc-js.

retorquere avatar retorquere commented on June 30, 2024

I haven't been able to find anything. Not in citeproc-js, not in the Zotero sources. It's in the translators, but I don't think these are involved.

from citeproc-js.

larsgw avatar larsgw commented on June 30, 2024

Okay, I think I've found it. (First off, when exporting to CSL-JSON the Citation Key field is (re)moved, but this is not the case when generating CSL-JSON for citeproc-js). Zotero transforms "Citation Key" to "citation-key", but this field is not recognized as a CSL-JSON field, and the transformation is canceled (code). "Citation Key" is not a valid variable name (docs, code). Citeproc only parses the note contents up to the first line that does not contain a note field, with the exception that the first line can contain anything:

Conforming braced-entries and line-entries must occur at the top of the note field. The set of entries may begin on the first or the second line of the field: parsing stops when the parser encounters a non-empty line after the first that does not fit the descriptions above. Parsed entries are removed from the note field before onward processing.

docs, code

from citeproc-js.

larsgw avatar larsgw commented on June 30, 2024

Depending on whether the Citation Key should be available to citeproc or not, the field should either be mapped correctly to citation-key or removed altogether. In general, the behavior of not modifying unrecognized fields can probably lead to problems down the line.

from citeproc-js.

bwiernik avatar bwiernik commented on June 30, 2024

citation-key is a CSL variable. It should be available to citeprocs

from citeproc-js.

larsgw avatar larsgw commented on June 30, 2024

Would zotero/utilities#29 work?

from citeproc-js.

bwiernik avatar bwiernik commented on June 30, 2024

I think so (and more broadly we need to add the other new variables in CSL 1.0.2 to that list)

from citeproc-js.

bwiernik avatar bwiernik commented on June 30, 2024

Thanks--I noticed that that needed to be updated a week or so ago and haven't found time to track down exactly where

from citeproc-js.

larsgw avatar larsgw commented on June 30, 2024

I've added them. It might also be useful to move non-CSL fields to the bottom of the field list (to avoid this confusing behavior for typos etc.) but I can imagine that that could cause other issues.

from citeproc-js.

denismaier avatar denismaier commented on June 30, 2024

Thanks.

from citeproc-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.