Juris-M / citeproc-js

A JavaScript implementation of the Citation Style Language (CSL) https://citeproc-js.readthedocs.io
Other
310 stars 85 forks source link

LaTeX format #54

Open larsgw opened 7 years ago

larsgw commented 7 years ago

Request: add a LaTeX-compatible output format.

See conversation at https://twitter.com/egonwillighagen/status/908250597132050432:

I'd be happy to make a patch. Should there be something done besides adding the format definition to https://github.com/Juris-M/citeproc-js/blob/master/src/formats.js?


ping @egonw

egonw commented 7 years ago

Basically, the output should be content as we would have in an .bbl file... now, if you wonder "why???"... the reason is journal with no up-to-date .bst files, causing me to revert to other tools to create .bbl content... Example output:

\bibitem{jennen2010biotransformation}
Jennen, D.~G., Gaj, S., Giesbertz, P.~J., van Delft, J.~H., Evelo, C.~T., and
  Kleinjans, J.~C. (2010)
Biotransformation pathway maps in WikiPathways enable direct visualization of
  drug metabolism related expression changes.
{\em Drug Discov. Today,} {\bf 15}(19), 851--858.
KarlHegbloom commented 7 years ago

For https://github.com/KarlHegbloom/zotero-texmacs-integration in https://github.com/KarlHegbloom/propachi-texmacs I have added what is still named the bbl output format, though it will need to be renamed since it's not really a bbl but more general LaTeX. By defining the same macros my TeXmacs plugin's texmacs style package does, LaTeX could use it also.

I have thought of refactoring so that a guile script running as a daemon could re-use a lot of the same code, but instead of driving TeXmacs, it could drive LyX via the lyxpipe. It will be a long time before I'll have time for that.

On Thu, Sep 14, 2017, 05:27 Egon Willighagen notifications@github.com wrote:

Basically, the output should be content as we would have in an .bbl file... now, if you wonder "why???"... the reason is journal with no up-to-date .bst files, causing me to revert to other tools to create .bbl content... Example output:

\bibitem{jennen2010biotransformation} Jennen, D.~G., Gaj, S., Giesbertz, P.~J., van Delft, J.~H., Evelo, C.~T., and Kleinjans, J.~C. (2010) Biotransformation pathway maps in WikiPathways enable direct visualization of drug metabolism related expression changes. {\em Drug Discov. Today,} {\bf 15}(19), 851--858.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Juris-M/citeproc-js/issues/54#issuecomment-329453772, or mute the thread https://github.com/notifications/unsubscribe-auth/AACslpp7AWJANLgjG5OEj_GDe-ukOujCks5siQ2bgaJpZM4PXbDV .

--

Karl.Hegbloom@gmail.com

egonw commented 7 years ago

Yesterday we hacked up this processor code: https://gist.github.com/egonw/da73ca91f3999eddc4433949f080920a

I agree that bbl output is a bad name... it's indeed LaTeX output...

fbennett commented 5 years ago

Can add this to the distributed processor if that will be useful ...

fbennett commented 5 years ago

I keep flirting with the idea that a wrapper on citeproc-js could serve as a drop-in replacement for BibTeX implementations. (Be that as it may, I need to get this merged.)