[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

modify citation links in a derived HTML backend

From: Matt Price
Subject: modify citation links in a derived HTML backend
Date: Fri, 2 Jul 2021 13:53:41 -0400


(cc:ing Jens L. in case this is relevant for his dev work on org-re-reveal).

I'm experimenting with the new citation syntax in slideshows generated with org-re-reveal.  Mostly it works fine, but cite-links don't function properly in the slideshow because in reveal, internal links only work when they refer to a slide (which will generally be generated from a headline in org-re-reveal export). Otherwise, the framework will reject the location change.  At least, that's how I read the code here: https://github.com/hakimel/reveal.js/blob/ade234576e8ddd683cf16d0d8bb0236f37cf1a99/js/controllers/location.js#L32.

Ideally, there would be some way to override this behaviour, but at present I don't see how to do that from within Reveal.

I also know it is possible to just eliminate the links using org-cite-csl-no-citelink-backends, but that is a significant loss of function.

Instead, I would like to modify the links that surround the individual citations. At present, the generated code will look something like this:

<a href="" 2009</a>

and I'd like to change it to something like this:

<a href="" 2009</a>

From what I can tell so far, the current behaviour of oc-csl is dictated by a lambda defined in the citeproc package, and set via defconst in an alist `citeproc-fmt--html-alist` defined in citeproc-formatters.el.

My question: what's the best way to override the output of citation objects for a specific derived backend? Can I use an export filter? should I instead use, I don't know, cl-letf to temporarily override some internal function belonging to citeproc-formatters and return a modified link? 

thanks as always for the help!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]