emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] in LaTeX export
@ 2011-03-15 11:13 Thomas Holst
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Holst @ 2011-03-15 11:13 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

while exporting an org-file to LaTeX I stumbled across a minor bug with
emphasis and underscores.

Minimal org-file:
#+begin_src org
#+OPTIONS: ^:{}
* Emphasis Test

  _abc /_abc/ *_abc* /a_bc/ *a_bc*

#+end_src

leads to the following LaTeX code:

#+begin_src

  \_{}abc \emph{_abc} \textbf{_abc} \emph{a\_{}bc} \textbf{a\_{}bc}

#+end_src

So emphasised text strings starting with an underscore are not exported
correctly and confuse LaTeX.

emacs 23.2 on WinXP, org-mode version 7.5 (release_7.5.34.g54c51)
(localy patched Makefile and org-git-link.el)

Best regards
  Thomas

P.S. org-mode is a superb piece of software and really makes my life
a lot easier. Thanks to all of you!

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

* Re: [BUG] in LaTeX export
       [not found] <.ywodhbb4y6ui@de.bosch.com>
@ 2011-03-17  9:53 ` Bastien
  2011-03-17 10:21   ` Thomas Holst
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2011-03-17  9:53 UTC (permalink / raw)
  To: Thomas Holst; +Cc: emacs-orgmode

Hi Thomas,

Thomas Holst <thomas.holst@de.bosch.com> writes:

>   _abc /_abc/ *_abc* /a_bc/ *a_bc*

You need to escape the underscore:

  \_abc /\_abc/ *\_abc* /a\_bc/ *a\_bc*

HTH,

-- 
 Bastien

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

* Re: [BUG] in LaTeX export
  2011-03-17  9:53 ` [BUG] in LaTeX export Bastien
@ 2011-03-17 10:21   ` Thomas Holst
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Holst @ 2011-03-17 10:21 UTC (permalink / raw)
  To: Bastien; +Cc: Holst Thomas (DGS-EC/EHM2), emacs-orgmode@gnu.org

Hi Bastien,

· Bastien <bzg@altern.org> wrote:

> Hi Thomas,
>
> Thomas Holst <thomas.holst@de.bosch.com> writes:
>
>>   _abc /_abc/ *_abc* /a_bc/ *a_bc*
>
> You need to escape the underscore:
>
>   \_abc /\_abc/ *\_abc* /a\_bc/ *a\_bc*
>
> HTH,

thank you for your answer. Escaping does help. But I thought with setting

#+OPTIONS: ^:{}

there is no need to escape underscores.

#+begin_src org
  _abc and /a_bc/ 
#+end_src

is correctly exported:

#+begin_src latex
  \_{}abc \emph{a\_{}bc}
#+end_src

without escaping the underscore. Only strings wihch start with an
underscore and are emphsised are not exported correctly.

#+begin_src org
  /_abc/
#+end_src

gets exported to:

#+begin_src latex
  \emph{_abc}
#+end_src

Which confuses latex.

-- 
Best regards
  Thomas

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

end of thread, other threads:[~2011-03-17 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <.ywodhbb4y6ui@de.bosch.com>
2011-03-17  9:53 ` [BUG] in LaTeX export Bastien
2011-03-17 10:21   ` Thomas Holst
2011-03-15 11:13 Thomas Holst

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