emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [patch] overprotective begin/end during latex export


From: Nicolas Goaziou
Subject: Re: [Orgmode] [patch] overprotective begin/end during latex export
Date: Sun, 13 Jun 2010 17:41:23 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

>>>>> Eric Schulte writes:

Hello,

> I've run across the following bug a couple of times before, but have
> finally had a chance to really distill it.  When exporting the following

> --8<---------------cut here---------------start------------->8---
> #+TITLE: latex environments bug

> there is markup /out here/

> #+LaTeX: \begin{enumerate}

> but *no markup* in here

> #+LaTeX: \end{enumerate}

> and markup _down here_ as well
> --8<---------------cut here---------------end--------------->8---

> everything works as expected, except that the

>   but *no markup* in here

> line is *not* exported to LaTeX, but is rather copied verbatim into the
> final LaTeX file.

It is because org-latex.el doesn't check if \begin{enumerate} is
already protected or not. Thus, it treats it as if it was some plain
LaTeX code inside the file.

In other words,

#+LaTeX: \begin{enumerate}
*bold*
#+LaTeX: \end{enumerate}

is the same as

\begin{enumerate}
*bold*
\end{enumerate}

In this case, org-latex protects everything between \begin and \end,
making it impossible to apply modifications to the text in-between.

With the following patch, org-latex will not protect an environment
coming from a #+LaTeX: instruction.

Btw, a bug I described some day ago (about org-latex badly exporting
lists when an equation spans across two lines) is also about
over protection. I have a workaround, but I still don't understand
why protection is needed for lists.

HTH,

-- 
Nicolas

Attachment: 0001-org-latex.el-do-not-protect-environments-already-pro.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]