[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: leading superscript on a line for ODT export
From: |
Juan Manuel Macías |
Subject: |
Re: leading superscript on a line for ODT export |
Date: |
Wed, 16 Mar 2022 12:03:45 +0000 |
Hi Eric,
Eric S Fraga writes:
> I need to have a line starting with a superscript, e.g. 1, in an ODT
> exported file. If I write "^1 blah", it doesn't work. I need a
> character before the ^ to have it interpreted as a superscript.
>
> Is there an "empty" character I can use? I tried a non-breaking space
> but that did not work. The space is there but the ^1 gets exported
> literally.
I would use a macro. For example:
#+begin_src emacs-lisp
(defun my-macro-superscript (arg)
(cond ((eq org-export-current-backend 'latex)
(format "@@latex:\\textsuperscript{%s}@@" arg))
((eq org-export-current-backend 'odt)
(format "@@odt:<text:span
text:style-name=\"OrgSuperscript\">%s</text:span>@@" arg))))
(setq org-export-global-macros
'(("sup" . "(eval (my-macro-superscript $1))")))
#+end_src
{{{sup(4)}}}
Best regards,
Juan Manuel