emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "M. ‘quintus’ Gülker" <post+orgmodeml@guelker.eu>
To: emacs-orgmode@gnu.org
Subject: Filter for HTML footnotes?
Date: Sat, 05 Mar 2022 16:40:16 +0100	[thread overview]
Message-ID: <87k0d81k7z.fsf@guelker.eu> (raw)

Dear list,

I recently discovered export filters and found some useful applications
for them. For instance, the scientific domain I work in (law) uses
footnote citations, and in these footnotes we abbreviate some words
which would otherwise be written out in ordinary text, like name
particles. Since I use org-cite these footnotes are automatically
generated. So what I did was to write a filter which abbreviates these
words on export in footnotes. I added the filter function to both
org-export-filter-footnote-definition-functions and
org-export-filter-footnote-reference-functions and indeed, when I export
to LaTeX or ODT it does its job just fine. However, when I export to
HTML instead, it does not. When I looked at the text passed to the
filter when exporting as HTML, it turned out what the function receives
is not the content of the footnote, but only the markup for the footnote
number. That came a bit by surprise.

So, what is the correct way to target the content of a footnote in a
filter across backends?

Org mode version 9.5 (release_9.5-484-g98588e @ /home/quintus/.emacs.d/org-mode/lisp/)


Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kontakt@guelker.eu    | O<

             reply	other threads:[~2022-03-05 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05 15:40 M. ‘quintus’ Gülker [this message]
2022-03-06  4:03 ` Filter for HTML footnotes? Juan Manuel Macías
2022-03-08  7:40   ` Filter for HTML (cite) footnotes? M. ‘quintus’ Gülker
2022-03-08 10:14     ` Juan Manuel Macías
2023-01-07 17:12       ` M. ‘quintus’ Gülker

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:

  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=87k0d81k7z.fsf@guelker.eu \
    --to=post+orgmodeml@guelker.eu \
    --cc=emacs-orgmode@gnu.org \


* 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


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).