* emacs org mode publish to latex failed with strings like "__aaa_cc__"
@ 2012-05-16 11:16 Xu Jingtao
2012-05-17 3:38 ` Nick Dokos
0 siblings, 1 reply; 9+ messages in thread
From: Xu Jingtao @ 2012-05-16 11:16 UTC (permalink / raw)
To: emacs-orgmode
Hi all:
If I write some string like "__aaa_cc__" in org file,then publish it to pdf using latex,
it will failed and the output is wrong.
even I can use ~__aaa_cc__~, it's not a good way do it.
Can you fix it or I am wrong?
___________________________________
With Best Regards.
jingtao.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-16 11:16 emacs org mode publish to latex failed with strings like "__aaa_cc__" Xu Jingtao
@ 2012-05-17 3:38 ` Nick Dokos
2012-05-18 11:41 ` Xu Jingtao
0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2012-05-17 3:38 UTC (permalink / raw)
To: Xu Jingtao; +Cc: emacs-orgmode
Xu Jingtao <jingtaozf@gmail.com> wrote:
> Hi all:
>
> If I write some string like "__aaa_cc__" in org file,then publish it to pdf using latex,
> it will failed and the output is wrong.
>
> even I can use ~__aaa_cc__~, it's not a good way do it.
>
> Can you fix it or I am wrong?
By default, underscores indicate subscripts (a tradition that comes from
LaTeX syntax - similarly, carets indicate superscripts). If you don't
want that, you can add
#+OPTIONS: ^:nil
at the top of the file: this option disables superscripts and subscripts.
See
(info "(org) Export options")
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-17 3:38 ` Nick Dokos
@ 2012-05-18 11:41 ` Xu Jingtao
2012-05-18 11:54 ` Nicolas Goaziou
2012-05-18 11:56 ` Nick Dokos
0 siblings, 2 replies; 9+ messages in thread
From: Xu Jingtao @ 2012-05-18 11:41 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
Hi Nick:
I had added the option to my org file.
What I want to ensure is that this is maybe a bug of emacs org mode.
I know "_a string_" will try to convert to underline string in latex,
by emacs variable org-export-latex-emphasis-alist.
Maybe this is why it is translated into wrong latex codes.
> Xu Jingtao <jingtaozf@gmail.com> wrote:
>
> > Hi all:
> >
> > If I write some string like "__aaa_cc__" in org file,then publish it to pdf using latex,
> > it will failed and the output is wrong.
> >
> > even I can use ~__aaa_cc__~, it's not a good way do it.
> >
> > Can you fix it or I am wrong?
>
> By default, underscores indicate subscripts (a tradition that comes from
> LaTeX syntax - similarly, carets indicate superscripts). If you don't
> want that, you can add
>
> #+OPTIONS: ^:nil
>
> at the top of the file: this option disables superscripts and subscripts.
>
> See
>
> (info "(org) Export options")
>
> Nick
>
>
___________________________________
With Best Regards.
jingtao.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-18 11:41 ` Xu Jingtao
@ 2012-05-18 11:54 ` Nicolas Goaziou
2012-05-18 12:04 ` Nick Dokos
2012-05-18 11:56 ` Nick Dokos
1 sibling, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-05-18 11:54 UTC (permalink / raw)
To: Xu Jingtao; +Cc: nicholas.dokos, emacs-orgmode
Hello,
Xu Jingtao <jingtaozf@gmail.com> writes:
> What I want to ensure is that this is maybe a bug of emacs org mode.
>
> I know "_a string_" will try to convert to underline string in latex,
> by emacs variable org-export-latex-emphasis-alist.
> Maybe this is why it is translated into wrong latex codes.
Why is it wrong LaTeX code? You're asking Org to put an underline there,
and there you have.
Nevertheless, I think it would be useful to have an entity for
underscore character. Something like:
("us" "\\_" nil "_" "_" "_" "_")
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-18 11:41 ` Xu Jingtao
2012-05-18 11:54 ` Nicolas Goaziou
@ 2012-05-18 11:56 ` Nick Dokos
1 sibling, 0 replies; 9+ messages in thread
From: Nick Dokos @ 2012-05-18 11:56 UTC (permalink / raw)
To: Xu Jingtao; +Cc: emacs-orgmode
Xu Jingtao <jingtaozf@gmail.com> wrote:
> Hi Nick:
>
> I had added the option to my org file.
>
> What I want to ensure is that this is maybe a bug of emacs org mode.
>
> I know "_a string_" will try to convert to underline string in latex,
> by emacs variable org-export-latex-emphasis-alist.
> Maybe this is why it is translated into wrong latex codes.
>
>
Ah, OK - the problem is that no matter how the option is set, the output
still leads to latex errors and no PDF is produced (at least with the
old exporter - I haven't tried with ngz's new one, but that woule be a
good experiment to try).
Now that I've tried it, I think you are right: it is a bug in the old
exporter, in that it should produce legal latex either way.
Nick
> > Xu Jingtao <jingtaozf@gmail.com> wrote:
> >
> > > Hi all:
> > >
> > > If I write some string like "__aaa_cc__" in org file,then publish it to pdf using latex,
> > > it will failed and the output is wrong.
> > >
> > > even I can use ~__aaa_cc__~, it's not a good way do it.
> > >
> > > Can you fix it or I am wrong?
> >
> > By default, underscores indicate subscripts (a tradition that comes from
> > LaTeX syntax - similarly, carets indicate superscripts). If you don't
> > want that, you can add
> >
> > #+OPTIONS: ^:nil
> >
> > at the top of the file: this option disables superscripts and subscripts.
> >
> > See
> >
> > (info "(org) Export options")
> >
> > Nick
> >
> >
>
> ___________________________________
> With Best Regards.
> jingtao.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-18 11:54 ` Nicolas Goaziou
@ 2012-05-18 12:04 ` Nick Dokos
2012-05-18 12:09 ` Nicolas Goaziou
0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2012-05-18 12:04 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode, Xu Jingtao
Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Xu Jingtao <jingtaozf@gmail.com> writes:
>
> > What I want to ensure is that this is maybe a bug of emacs org mode.
> >
> > I know "_a string_" will try to convert to underline string in latex,
> > by emacs variable org-export-latex-emphasis-alist.
> > Maybe this is why it is translated into wrong latex codes.
>
> Why is it wrong LaTeX code? You're asking Org to put an underline there,
> and there you have.
>
The old exporter latex output doesn't compile.
I tried the new exporter does it correctly, with either setting of the option.
Nick
> Nevertheless, I think it would be useful to have an entity for
> underscore character. Something like:
>
> ("us" "\\_" nil "_" "_" "_" "_")
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-18 12:04 ` Nick Dokos
@ 2012-05-18 12:09 ` Nicolas Goaziou
2012-05-18 12:52 ` Nick Dokos
0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-05-18 12:09 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, Xu Jingtao
Hello,
Nick Dokos <nicholas.dokos@hp.com> writes:
> The old exporter latex output doesn't compile.
Ah ok, I only tried with the experimental one.
> I tried the new exporter does it correctly, with either setting of the
> option.
The new one exports "__aaa_b__" as "\underline{\underline{aaa$_b$}}".
I think the OP wants a verbatim "\_\_aaa\_b\_\_" instead.
Hence my underscore suggestion, which would also solve the UNDER_LINE
problem without resorting to (unsupported) tricks like UNDER\_LINE.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-18 12:09 ` Nicolas Goaziou
@ 2012-05-18 12:52 ` Nick Dokos
2012-05-18 13:04 ` Nicolas Goaziou
0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2012-05-18 12:52 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode, Xu Jingtao
Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Nick Dokos <nicholas.dokos@hp.com> writes:
>
> > The old exporter latex output doesn't compile.
>
> Ah ok, I only tried with the experimental one.
>
> > I tried the new exporter does it correctly, with either setting of the
> > option.
>
> The new one exports "__aaa_b__" as "\underline{\underline{aaa$_b$}}".
> I think the OP wants a verbatim "\_\_aaa\_b\_\_" instead.
>
That can be done with ~__aaa_b__~ though.
Nick
> Hence my underscore suggestion, which would also solve the UNDER_LINE
> problem without resorting to (unsupported) tricks like UNDER\_LINE.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: emacs org mode publish to latex failed with strings like "__aaa_cc__"
2012-05-18 12:52 ` Nick Dokos
@ 2012-05-18 13:04 ` Nicolas Goaziou
0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2012-05-18 13:04 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, Xu Jingtao
Nick Dokos <nicholas.dokos@hp.com> writes:
>> The new one exports "__aaa_b__" as "\underline{\underline{aaa$_b$}}".
>> I think the OP wants a verbatim "\_\_aaa\_b\_\_" instead.
>>
>
> That can be done with ~__aaa_b__~ though.
Yes, but I assume that aaa could also contain other Org syntax, like an
entity.
So "__a\alpha{}a_b__" is still a problem.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-05-18 13:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-16 11:16 emacs org mode publish to latex failed with strings like "__aaa_cc__" Xu Jingtao
2012-05-17 3:38 ` Nick Dokos
2012-05-18 11:41 ` Xu Jingtao
2012-05-18 11:54 ` Nicolas Goaziou
2012-05-18 12:04 ` Nick Dokos
2012-05-18 12:09 ` Nicolas Goaziou
2012-05-18 12:52 ` Nick Dokos
2012-05-18 13:04 ` Nicolas Goaziou
2012-05-18 11:56 ` Nick Dokos
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).