emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] avoid subscripting text


From: Eric Abrahamsen
Subject: Re: [O] avoid subscripting text
Date: Thu, 28 Mar 2013 09:09:21 +0800
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (gnu/linux)

John Hendy <address@hidden> writes:

> On Wed, Mar 27, 2013 at 1:24 PM, Samuel Wales <address@hidden> 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




reply via email to

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