From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Colin Baxter <m43cap@yandex.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Footnotes on line and not raised
Date: Mon, 11 Mar 2024 11:03:08 +0000 [thread overview]
Message-ID: <87frwx6nf7.fsf@posteo.net> (raw)
In-Reply-To: <87zfv52i32.fsf@yandex.com> (Colin Baxter's message of "Mon, 11 Mar 2024 10:12:01 +0000")
Colin Baxter writes:
> Perhaps it's not possible because I see that .footref in css support is
> always <sup>.
You can modify <sup> a little so that it does not alter the paragraph
line spacing so much. In this example, with a value of 0em, it is
positioned on the baseline:
#+HTML_HEAD: <style> sup {vertical-align: baseline;position: relative;bottom: 0em;} </style>
Another slightly dirtier way is with an export filter in your document.
The sub tag is removed and the reference number is enclosed in square
brackets, separated by a space from the previous word:
#+BIND: org-export-filter-footnote-reference-functions (footnote-sup-filter)
#+begin_src emacs-lisp :exports results :results none
(defun footnote-sup-filter (text backend info)
(when (org-export-derived-backend-p backend 'html)
(replace-regexp-in-string "<a" " <a"
(replace-regexp-in-string "\\([[:digit:]]+\\)\\(</a\\)" "[\\1]\\2"
(replace-regexp-in-string "</?sup>" "" text)))))
#+end_src
screenshot:
https://i.ibb.co/CBRnfXG/pantallazo-79248380551244229p8.png
Best regards,
Juan Manuel
--
Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño editorial y ortotipografía
next prev parent reply other threads:[~2024-03-11 11:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 9:56 Footnotes on line and not raised Colin Baxter
2024-03-11 10:12 ` Colin Baxter
2024-03-11 11:03 ` Juan Manuel Macías [this message]
2024-03-11 15:33 ` Colin Baxter
2024-03-11 11:17 ` Christian Moe
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=87frwx6nf7.fsf@posteo.net \
--to=maciaschain@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=m43cap@yandex.com \
/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).