Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
Nick Dokos 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.
Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
Nicolas Goaziou wrote: > Hello, > > Nick Dokos 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 >
Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
Hello, Nick Dokos 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
Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
Nicolas Goaziou wrote: > Hello, > > Xu Jingtao 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 "_" "_" "_" "_") > >
Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
Hello, Xu Jingtao 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
Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
Xu Jingtao 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 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. >
Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
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 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.
Re: [O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
Xu Jingtao 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
[O] emacs org mode publish to latex failed with strings like "__aaa_cc__"
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.