emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [patch] overprotective begin/end during latex export
Date: Sun, 13 Jun 2010 09:25:37 -0700	[thread overview]
Message-ID: <87y6eidhmm.fsf@gmail.com> (raw)
In-Reply-To: <87ocffszx8.wl%n.goaziou@gmail.com> (Nicolas Goaziou's message of "Sun, 13 Jun 2010 17:41:23 +0200")

Hi Nicolas,

Your patch has been applied, many thanks.

I looked at your previous email, and it's not immediately clear to me
where the problem is either.

Thanks for the quick solution on this issue however -- Eric

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>>>>>> 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,

      reply	other threads:[~2010-06-13 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-13  5:25 [bug] overprotective begin/end during latex export Eric Schulte
2010-06-13 15:41 ` [patch] " Nicolas Goaziou
2010-06-13 16:25   ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y6eidhmm.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).