emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: Corrupted export of tables to LaTeX math mode [8.3.6 (8.3.6


From: Nick Dokos
Subject: Re: [O] Bug: Corrupted export of tables to LaTeX math mode [8.3.6 (8.3.6-7-g4d7d52-elpaplus @ c:/Users/thoma/.emacs.d/elpa/org-plus-contrib-20161017/)]
Date: Fri, 21 Oct 2016 13:52:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

address@hidden writes:

> Given an org file with the following contents
>
> ---
> #+ATTR_LATEX: :mode math :environment bmatrix
> | 1 | 2 | 3 |
>
> whops
> ---
>
> when exporting to LaTeX using Org version 8.3.6 from
> http://orgmode.org/elpa/ render to LaTeX as follows:
>
> ---
> \[
> \begin{bmatrix}
>  1 & 2 \\
> \end{bmatrix}
>
> \] whops
> ---
>
> The offending bit is the vertical whitespace before \], which makes it
> incorrect input to pdflatex.
>
> Using the Org version 8.2.10 that ships with Emacs 25.1.1, the
> corresponding LaTeX is as follows
>
> ---
> \[\begin{bmatrix}
>  1 & 2 \\
> \end{bmatrix}\]
>
> whops
> ---
>
> which is valid input to pdflatex.
>
> The 3 files are in their entirety on 
> https://gist.github.com/karvus/da4523fdef8f644a6aa183028093d0ca.
>

I can reproduce this and I think the problem is that the table includes the 
empty line after it and that
gets carried into the data that org-export-data passes into org-latex-matrices. 
I used the following file

--8<---------------cut here---------------start------------->8---
* foo

#+ATTR_LATEX: :mode math
| 1 | 2 |

whoops

--8<---------------cut here---------------end--------------->8---

and the data has a ":beg 8 :end 44" specification that correspond to the '#' 
and the 'w' of the whoops.

However, it's hard to debug: when I try to edebug org-export-data I get the 
attached backtrace, presumably
because the cl-macrolet in org-export-data confuses edebug:

Attachment: edebug.bt
Description: edebug backtrace

-- 
Nick

reply via email to

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