NASA-IMPACT / nasa-apt-frontend

Web application for NASA-APT
Apache License 2.0
4 stars 2 forks source link

Spike: Look into `.csl` in new PDF workflow #425

Open wrynearson opened 1 year ago

wrynearson commented 1 year ago

@kamicut found a .csl file for APT references: https://github.com/citation-style-language/styles/blob/master/american-geophysical-union.csl

We have a similar file already in our workflow for our previous $\LaTeX$-based architecture. Can we use this in our new Document-PDF architecture?

kamicut commented 1 year ago

There are 2 separate things here, and the csl and cls file formats can be potentially confusing:

  1. Using citation.js in the document preview to actually have rules for the AGU citation style when processing the references instead of hardcoding the rules ourselves in javascript. I couldn’t figure out how to use the AGU xml file though: https://github.com/citation-style-language/styles/blob/master/american-geophysical-union.csl although this ticket https://github.com/citation-js/citation-js/issues/158 has some answers
  2. The CLS in latex https://github.com/NASA-IMPACT/nasa-apt/blob/861ad7fe70cb5299c1ee43615cf8482d69a67747/app/pdf/agujournal2019.cls seems like a lot to have to translate into javascript, and ideally we could just re-use it in our pipeline for the journal PDF
kamicut commented 1 year ago

Adding here that for (1) here's an example runkit of using the CSL file from above to format the bibliography automatically https://runkit.com/kamicut/citation-agu-example