From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: leading superscript on a line for ODT export
Date: Wed, 16 Mar 2022 12:03:45 +0000 [thread overview]
Message-ID: <87mthq9k9q.fsf@posteo.net> (raw)
In-Reply-To: <877d8u3zv0.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Wed, 16 Mar 2022 11:23:31 +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
next prev parent reply other threads:[~2022-03-16 12:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 11:23 leading superscript on a line for ODT export Eric S Fraga
2022-03-16 12:03 ` Juan Manuel Macías [this message]
2022-03-16 12:46 ` Eric S Fraga
2022-03-16 13:12 ` Juan Manuel Macías
2022-03-16 13:42 ` Eric S Fraga
2022-03-16 13:46 ` Max Nikulin
2022-03-16 14:00 ` Eric S Fraga
2022-03-16 14:04 ` Greg Minshall
2022-03-16 14:54 ` Eric S Fraga
2022-03-16 15:15 ` Max Nikulin
2022-03-17 0:32 ` Greg Minshall
2022-03-16 14:07 ` Juan Manuel Macías
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mthq9k9q.fsf@posteo.net \
--to=maciaschain@posteo.net \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.