emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* avoid subscripting text
@ 2013-03-27 12:29 Luca Ferrari
  2013-03-27 18:00 ` Sean O'Halpin
  2013-03-27 18:24 ` Samuel Wales
  0 siblings, 2 replies; 8+ messages in thread
From: Luca Ferrari @ 2013-03-27 12:29 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,
in my file I've got some text that I'd like to be represented as fixed
font size, and therefore I write it as ~cap_mkdb~ surrounding with ~.
The problem is that, when I export the document to ODF, I got the word
following the underscore written as a subscript. Now this reminds me
the LaTeX behavior, and when I export it happens to me that LaTeX is
used for a preliminary conversion.
Is there a smart way to avoid escaping any underscore?

Thanks,
Luca

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: avoid subscripting text
  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
  1 sibling, 0 replies; 8+ messages in thread
From: Sean O'Halpin @ 2013-03-27 18:00 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: emacs-orgmode

On Wed, Mar 27, 2013 at 12:29 PM, Luca Ferrari <fluca1978@infinito.it> wrote:
> Hi all,
> in my file I've got some text that I'd like to be represented as fixed
> font size, and therefore I write it as ~cap_mkdb~ surrounding with ~.
> The problem is that, when I export the document to ODF, I got the word
> following the underscore written as a subscript. Now this reminds me
> the LaTeX behavior, and when I export it happens to me that LaTeX is
> used for a preliminary conversion.
> Is there a smart way to avoid escaping any underscore?
>
> Thanks,
> Luca
>

Hi,

Use

#+OPTION: ^:{}

to leave underscores alone.

Regards,
Sean

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: avoid subscripting text
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2013-03-27 18:24 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: emacs-orgmode

There is also a variable (org-export-with-sub-superscript or something
like that).

Maybe this would be good as default nil?

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is NO hope without action.  This means YOU.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: avoid subscripting text
  2013-03-27 18:24 ` Samuel Wales
@ 2013-03-27 21:50   ` John Hendy
  2013-03-28  1:09     ` Eric Abrahamsen
  2013-04-04  1:30     ` Gary Oberbrunner
  0 siblings, 2 replies; 8+ messages in thread
From: John Hendy @ 2013-03-27 21:50 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode, Luca Ferrari

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!

Also, having just used ODT export for the first time, I was giddy with
joy that my superscripts and subscripts made it through as well.(So
the opinions of those using super/subscripts for other export
functionality should also be considered.)

John

>
> --
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>
> The disease DOES progress.  MANY people have died from it.  ANYBODY
> can get it.  There is NO hope without action.  This means YOU.
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: avoid subscripting text
  2013-03-27 21:50   ` John Hendy
@ 2013-03-28  1:09     ` Eric Abrahamsen
  2013-04-04  1:30     ` Gary Oberbrunner
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Abrahamsen @ 2013-03-28  1:09 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: avoid subscripting text
  2013-03-27 21:50   ` John Hendy
  2013-03-28  1:09     ` Eric Abrahamsen
@ 2013-04-04  1:30     ` Gary Oberbrunner
  2013-04-04 23:45       ` Mike McLean
  1 sibling, 1 reply; 8+ messages in thread
From: Gary Oberbrunner @ 2013-04-04  1:30 UTC (permalink / raw)
  To: John Hendy; +Cc: Orgmode Mailing List, Luca Ferrari

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

On Wed, Mar 27, 2013 at 5:50 PM, John Hendy <jw.hendy@gmail.com> wrote:

> On Wed, Mar 27, 2013 at 1:24 PM, Samuel Wales <samologist@gmail.com>
> wrote:
> >
> > 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!
>

I use LaTeX export all the time, but almost always with words with
underscores in them (data from external tables, variable names and so on).
 So I never want _ to turn into a subscript.  Just one data point, but
that's how I use it.

-- 
Gary

[-- Attachment #2: Type: text/html, Size: 1170 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: avoid subscripting text
  2013-04-04  1:30     ` Gary Oberbrunner
@ 2013-04-04 23:45       ` Mike McLean
  2013-04-05  7:41         ` Sebastien Vauban
  0 siblings, 1 reply; 8+ messages in thread
From: Mike McLean @ 2013-04-04 23:45 UTC (permalink / raw)
  To: Gary Oberbrunner; +Cc: Orgmode Mailing List, Luca Ferrari

[-- Attachment #1: Type: text/plain, Size: 471 bytes --]


On Apr 3, 2013, at 9:30 PM, Gary Oberbrunner <garyo@oberbrunner.com> wrote:

> I use LaTeX export all the time, but almost always with words with underscores in them (data from external tables, variable names and so on).  So I never want _ to turn into a subscript.  Just one data point, but that's how I use it.

I have to echo this use case. I have variable names and what not with underscores in the name about 100 times as much as I have a need for a subscript.

[-- Attachment #2: Type: text/html, Size: 1248 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: avoid subscripting text
  2013-04-04 23:45       ` Mike McLean
@ 2013-04-05  7:41         ` Sebastien Vauban
  0 siblings, 0 replies; 8+ messages in thread
From: Sebastien Vauban @ 2013-04-05  7:41 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Mike McLean wrote:
> On Apr 3, 2013, at 9:30 PM, Gary Oberbrunner <garyo-Nnz8dh8JAieWkzVdRvz7FA@public.gmane.org> wrote:
>
>> I use LaTeX export all the time, but almost always with words with
>> underscores in them (data from external tables, variable names and so on).
>> So I never want _ to turn into a subscript. Just one data point, but that's
>> how I use it.
>
> I have to echo this use case. I have variable names and what not with
> underscores in the name about 100 times as much as I have a need for a
> subscript.

Do you mean that the option ^:nil is not working for you, or not enough?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-04-05  7:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-04-04  1:30     ` Gary Oberbrunner
2013-04-04 23:45       ` Mike McLean
2013-04-05  7:41         ` Sebastien Vauban

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).