> -----Ursprüngliche Nachricht-----
> Von: ntg-context <ntg-context-boun...@ntg.nl> Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Freitag, 6. Mai 2022 23:45
> An: Denis Maier via ntg-context <ntg-context@ntg.nl>
> Cc: Hans Hagen <j.ha...@xs4all.nl>
> Betreff: Re: [NTG-context] Citeproc-lua
> 
> [...]
> 
> For the record: i don't think you should write something to the tuc file that
> doesn't come from context itself because you can mess it up (also
> performaance wise). 

Really? But what about that stuff? Anyway, even better if the data coming from 
context itself can be used. 

Of course you could have another file (just like a bib file
> is independent). One problem could be that you need to make some extra
> installation to make it work as we're not going to add all kind of code to the
> distribution (we tend to go smaller) and someone needs to maintain that
> moduie then because users depend in it working.
> 
> Did you look into what pandoc provides? It might be easier to take that
> output and include it. Some kind of html? That's easy to render.

Pandoc can output context as well, so we can just take that.

> 
> A bit like this:
> 
> - Convert the whole bibliography database to html using pandoc in the
> preferred cs rendering. That should be fast.

Using the whole bibliography might give problems with regards to disambiguation.

> 
> - Use the normal context commands for referencing a citation (the cite part
> is normally easy as there is not much variation in that; if needed one can
> cheat and also pregenerate that). That's then just some relatively small
> plugin mode.
> 
> - When placing the bibliography, filter the right entries from that html file
> (easy) using info that got stored in the tuc.

As said above, that might create problems with regards to disambiguation. 
Better just use the right entries.

> 
> It is also fast. The only depdency then is pandoc but that is widely available
> (irr). But I would need to see an example of that kind of out first. We
> basically treat the (formatted) bibliography as an external resource but in
> some format that we can easily parse (and if needed tweak).

So, that would work a bit like Aditya's filter module: 
https://github.com/adityam/filter
Right?

Another option would be to just use pandoc's citeproc directly, as described 
here: https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md

We'd have to pass a list of citations as a JSON object to that citeproc and use 
the results. 
The results will include citations as well as the bibliography (all as JSON, 
content can be HTML formatted).

Denis

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to