From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: avoid subscripting text
Date: Thu, 28 Mar 2013 09:09:21 +0800 [thread overview]
Message-ID: <87y5d8wcse.fsf@ericabrahamsen.net> (raw)
In-Reply-To: CA+M2ft_K=hZhxTCf4oK+GpjebuY8r_ih8n4urMXZ0J6L7XYGcA@mail.gmail.com
John Hendy <jw.hendy@gmail.com> writes:
> On Wed, Mar 27, 2013 at 1:24 PM, Samuel Wales <samologist@gmail.com> wrote:
>> There is also a variable (org-export-with-sub-superscript or something
>> like that).
>
> #+begin
> org-export-with-sub-superscripts is a variable defined in `ox.el'.
> Its value is t
>
> Documentation:
> Non-nil means interpret "_" and "^" for export.
>
> When this option is turned on, you can use TeX-like syntax for
> sub- and superscripts. Several characters after "_" or "^"
> will be considered as a single item - so grouping with {} is
> normally not needed. For example, the following things will be
> parsed as single sub- or superscripts.
> #+end_man
>
>>
>> Maybe this would be good as default nil?
>
> I'd like to poll the list for frequent LaTeX exporters vs. everyone
> else before making a change like that. My intuition would suggest that
> underscores get used a lot by LaTeX users and not a ton by the rest,
> but I could be wrong!
Hey! The above led me to `org-export-filter-subscript-functions', and
its `superscript' sibling. I should have guessed that was there.
Attaching a filter function to the subscript version should be enough to
solve the OP's problem: with some experimentation it ought to be
possible to conditionally handle the "_", though I haven't tried this
yet and don't know how big a chunk of text is passed to the filter.
Anyway, in this case I'll bet a filter is the way to go.
Meanwhile, I'll look into deleting my local patch that hard-codes Latex
superscripts to "\\textsuperscript{%s}" instead of "$_\\mathrm{%s}$"...
E
next prev parent reply other threads:[~2013-03-28 1:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 12:29 avoid subscripting text Luca Ferrari
2013-03-27 18:00 ` Sean O'Halpin
2013-03-27 18:24 ` Samuel Wales
2013-03-27 21:50 ` John Hendy
2013-03-28 1:09 ` Eric Abrahamsen [this message]
2013-04-04 1:30 ` Gary Oberbrunner
2013-04-04 23:45 ` Mike McLean
2013-04-05 7:41 ` Sebastien Vauban
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=87y5d8wcse.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--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 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).