From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>, lechten@wi.uni-muenster.de
Subject: modify citation links in a derived HTML backend
Date: Fri, 2 Jul 2021 13:53:41 -0400 [thread overview]
Message-ID: <CAN_Dec_X_Bhp+UE4GzD1GoCE9VkJPJdQXgtFNJBMgjGrWZ0xTg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]
Hi,
(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="#citeproc_bib_item_3">Zubaida, 2009</a>
and I'd like to change it to something like this:
<a href="#bibliography">Zubaida, 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!
Matt
[-- Attachment #2: Type: text/html, Size: 2269 bytes --]
next reply other threads:[~2021-07-02 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 17:53 Matt Price [this message]
2021-07-03 7:53 ` modify citation links in a derived HTML backend Jens Lechtenboerger
2021-07-03 21:32 ` Matt Price
2021-07-04 12:56 ` Jens Lechtenboerger
2021-07-04 16:12 ` Matt Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAN_Dec_X_Bhp+UE4GzD1GoCE9VkJPJdQXgtFNJBMgjGrWZ0xTg@mail.gmail.com \
--to=moptop99@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=lechten@wi.uni-muenster.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).