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
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
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.
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. >
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
[-- 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 --]
[-- 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 --]
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