emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Footnotes on line and not raised


From: Juan Manuel Macías
Subject: Re: Footnotes on line and not raised
Date: Mon, 11 Mar 2024 11:03:08 +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




reply via email to

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