Re: [O] avoid subscripting text

2013-04-05 Thread Sebastien Vauban
Hello,

Mike McLean wrote:
 On Apr 3, 2013, at 9:30 PM, Gary Oberbrunner ga...@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.

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

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] avoid subscripting text

2013-04-04 Thread Mike McLean

On Apr 3, 2013, at 9:30 PM, Gary Oberbrunner ga...@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.

Re: [O] avoid subscripting text

2013-04-03 Thread Gary Oberbrunner
On Wed, Mar 27, 2013 at 5:50 PM, John Hendy jw.he...@gmail.com wrote:

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


[O] avoid subscripting text

2013-03-27 Thread Luca Ferrari
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



Re: [O] avoid subscripting text

2013-03-27 Thread Sean O'Halpin
On Wed, Mar 27, 2013 at 12:29 PM, Luca Ferrari fluca1...@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



Re: [O] avoid subscripting text

2013-03-27 Thread Samuel Wales
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.



Re: [O] avoid subscripting text

2013-03-27 Thread John Hendy
On Wed, Mar 27, 2013 at 1:24 PM, Samuel Wales samolog...@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.




Re: [O] avoid subscripting text

2013-03-27 Thread Eric Abrahamsen
John Hendy jw.he...@gmail.com writes:

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