* Bug: LaTeX export of table with caption broken
@ 2019-01-19 14:25 Jens Lechtenboerger
2019-01-19 15:06 ` Nicolas Goaziou
0 siblings, 1 reply; 15+ messages in thread
From: Jens Lechtenboerger @ 2019-01-19 14:25 UTC (permalink / raw)
To: emacs-orgmode
Hi there,
when exporting a table with caption to LaTeX on the master branch,
invalid code is generated.
Example Org file:
#+CAPTION: Some text
| Col1 | Col2 |
|------+------|
| foo | bar |
The resulting tex file contains this, without table environment,
which is necessary for the use of captions:
begin{center}
\caption{Some text}
\begin{tabular}{ll}
Col1 & Col2\\
\hline
foo & bar\\
\end{tabular}
\end{center}
The above happens on the current master branch, but did already
happen last month on the next branch:
Org mode version 9.2 (release_9.2-193-ge7901c @ /usr/share/emacs/24.5/site-lisp/org/)
Org mode version 9.1.14 (release_9.1.14-1178-gdd26f0 @ /usr/share/emacs/24.5/site-lisp/org/)
In contrast, Org mode version 9.1.9 (release_9.1.9-65-g5e4542)
shipping with Emacs is fine, creating the following:
\begin{table}[htbp]
\caption{Some text}
\centering
\begin{tabular}{ll}
Col1 & Col2\\
\hline
foo & bar\\
\end{tabular}
\end{table}
Best wishes
Jens
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-19 14:25 Bug: LaTeX export of table with caption broken Jens Lechtenboerger
@ 2019-01-19 15:06 ` Nicolas Goaziou
2019-01-19 16:18 ` Jens Lechtenboerger
2019-01-22 16:06 ` Eric S Fraga
0 siblings, 2 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2019-01-19 15:06 UTC (permalink / raw)
To: emacs-orgmode
Hello,
Jens Lechtenboerger <lechten@wi.uni-muenster.de> writes:
> when exporting a table with caption to LaTeX on the master branch,
> invalid code is generated.
>
> Example Org file:
>
> #+CAPTION: Some text
> | Col1 | Col2 |
>
> |------+------|
> | foo | bar |
>
> The resulting tex file contains this, without table environment,
> which is necessary for the use of captions:
>
> begin{center}
> \caption{Some text}
> \begin{tabular}{ll}
> Col1 & Col2\\
> \hline
> foo & bar\\
> \end{tabular}
> \end{center}
Fixed. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-19 15:06 ` Nicolas Goaziou
@ 2019-01-19 16:18 ` Jens Lechtenboerger
2019-01-22 16:06 ` Eric S Fraga
1 sibling, 0 replies; 15+ messages in thread
From: Jens Lechtenboerger @ 2019-01-19 16:18 UTC (permalink / raw)
To: emacs-orgmode
On 2019-01-19, at 16:06, Nicolas Goaziou wrote:
> Jens Lechtenboerger <lechten@wi.uni-muenster.de> writes:
>
>> when exporting a table with caption to LaTeX on the master branch,
>> invalid code is generated.
>
> Fixed. Thank you.
Wow, that was lightning fast.
Many thanks!
Jens
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-19 15:06 ` Nicolas Goaziou
2019-01-19 16:18 ` Jens Lechtenboerger
@ 2019-01-22 16:06 ` Eric S Fraga
2019-01-22 22:52 ` Nicolas Goaziou
1 sibling, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2019-01-22 16:06 UTC (permalink / raw)
To: emacs-orgmode
Nicolas,
tables without captions now seem to export to tabulars within table
environments, which they did not do before. That is, before, a simple
table with no document exported to just a tabular environment. This
change is breaking many of my documents. Did I miss something or is
this unintended behaviour due to the recent changes to table handling?
If I add :float nil attribute, everything is fine but it means updating
many documents. (although tabular environment now centred but maybe it
was before as well -- cannot be sure)
Thanks,
eric
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2-204-g3fc7b0
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-22 16:06 ` Eric S Fraga
@ 2019-01-22 22:52 ` Nicolas Goaziou
2019-01-23 7:27 ` Eric S Fraga
2019-01-23 8:36 ` Eric S Fraga
0 siblings, 2 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2019-01-22 22:52 UTC (permalink / raw)
To: emacs-orgmode
Hello,
Eric S Fraga <esflists@gmail.com> writes:
> tables without captions now seem to export to tabulars within table
> environments, which they did not do before.
I cannot reproduce it. E.g.,
| a |
becomes
\begin{center}
\begin{tabular}{l}
\toprule
a\\
\bottomrule
\end{tabular}
\end{center}
Would you have an ECM?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-22 22:52 ` Nicolas Goaziou
@ 2019-01-23 7:27 ` Eric S Fraga
2019-01-23 8:36 ` Eric S Fraga
1 sibling, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2019-01-23 7:27 UTC (permalink / raw)
To: emacs-orgmode
On Tuesday, 22 Jan 2019 at 23:52, Nicolas Goaziou wrote:
> I cannot reproduce it. E.g.,
> Would you have an ECM?
I did try essentially the same minimal example as you and it did not
work (i.e. table was wrapped in a table environment). I did not try with
emacs -Q however. I will do so when back on the system that has latest
org later today but, in the meantime, any idea what setting could affect
this behaviour?
thanks,
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2-193-ge7901c
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-22 22:52 ` Nicolas Goaziou
2019-01-23 7:27 ` Eric S Fraga
@ 2019-01-23 8:36 ` Eric S Fraga
2019-01-23 14:21 ` Nicolas Goaziou
2019-01-23 15:16 ` Nick Dokos
1 sibling, 2 replies; 15+ messages in thread
From: Eric S Fraga @ 2019-01-23 8:36 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 282 bytes --]
On Tuesday, 22 Jan 2019 at 23:52, Nicolas Goaziou wrote:
> I cannot reproduce it. E.g.,
> Would you have an ECM?
Strangely, with attached ECM and emacs -Q, I have this problem. See
attached resulting LaTeX.
Thanks,
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2-204-g3fc7b0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: t.tex --]
[-- Type: text/x-tex, Size: 801 bytes --]
% Created 2019-01-23 Wed 08:34
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\author{Eric S Fraga}
\date{\today}
\title{}
\hypersetup{
pdfauthor={Eric S Fraga},
pdftitle={},
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 27.0.50 (Org mode 9.2)},
pdflang={English}}
\begin{document}
\tableofcontents
This is a table:
\begin{table}[htbp]
\centering
\begin{tabular}{ll}
item & description\\
\hline
one & first\\
two & second\\
\hline
\end{tabular}
\end{table}
\end{document}
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: t.org --]
[-- Type: text/x-org, Size: 133 bytes --]
This is a table:
| item | description |
|------+-------------|
| one | first |
| two | second |
|------+-------------|
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-23 8:36 ` Eric S Fraga
@ 2019-01-23 14:21 ` Nicolas Goaziou
2019-01-23 15:25 ` Eric S Fraga
2019-01-23 15:16 ` Nick Dokos
1 sibling, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2019-01-23 14:21 UTC (permalink / raw)
To: emacs-orgmode
Hello,
Eric S Fraga <esflists@gmail.com> writes:
> On Tuesday, 22 Jan 2019 at 23:52, Nicolas Goaziou wrote:
>> I cannot reproduce it. E.g.,
>> Would you have an ECM?
>
> Strangely, with attached ECM and emacs -Q, I have this problem. See
> attached resulting LaTeX.
Odd. Even with a minimal init file (i.e, I only loading Org), I cannot
reproduce it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-23 14:21 ` Nicolas Goaziou
@ 2019-01-23 15:25 ` Eric S Fraga
0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2019-01-23 15:25 UTC (permalink / raw)
To: emacs-orgmode
On Wednesday, 23 Jan 2019 at 15:21, Nicolas Goaziou wrote:
> Odd. Even with a minimal init file (i.e, I only loading Org), I cannot
> reproduce it.
Thanks Nicolas. It is indeed strange. I will play some more when I get
a chance (bogged down with work at the moment). As I have a way around
the problem, there's no worry. I'll report back when I figure this out!
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2-204-g3fc7b0
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-23 8:36 ` Eric S Fraga
2019-01-23 14:21 ` Nicolas Goaziou
@ 2019-01-23 15:16 ` Nick Dokos
2019-01-24 13:48 ` Nicolas Goaziou
1 sibling, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2019-01-23 15:16 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <esflists@gmail.com> writes:
> On Tuesday, 22 Jan 2019 at 23:52, Nicolas Goaziou wrote:
>> I cannot reproduce it. E.g.,
>> Would you have an ECM?
>
> Strangely, with attached ECM and emacs -Q, I have this problem. See
> attached resulting LaTeX.
>
> Thanks,
Guessing the culprit is c28eb3c2cb904666594e40c1dcae4437d954bde4.
It seems that the caption is an empty string but the code tests whether
it's nil and since it isn't, it assumes there is a caption and makes it
into a floating table.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-23 15:16 ` Nick Dokos
@ 2019-01-24 13:48 ` Nicolas Goaziou
2019-01-24 15:02 ` Nick Dokos
2019-01-24 15:51 ` Eric S Fraga
0 siblings, 2 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2019-01-24 13:48 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Hello,
Nick Dokos <ndokos@gmail.com> writes:
> Guessing the culprit is c28eb3c2cb904666594e40c1dcae4437d954bde4.
> It seems that the caption is an empty string but the code tests whether
> it's nil and since it isn't, it assumes there is a caption and makes it
> into a floating table.
OK. I fixed that, even though I cannot reproduce the issue.
Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-24 13:48 ` Nicolas Goaziou
@ 2019-01-24 15:02 ` Nick Dokos
2019-01-24 16:12 ` Eric S Fraga
2019-01-24 15:51 ` Eric S Fraga
1 sibling, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2019-01-24 15:02 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Nick Dokos <ndokos@gmail.com> writes:
>
>> Guessing the culprit is c28eb3c2cb904666594e40c1dcae4437d954bde4.
>> It seems that the caption is an empty string but the code tests whether
>> it's nil and since it isn't, it assumes there is a caption and makes it
>> into a floating table.
>
> OK. I fixed that, even though I cannot reproduce the issue.
>
Thank you! Just updated and tested: there is no more floating table without a caption
(and there *is* one with a caption). I do wonder why Eric and I could see it and
you could not, but some mysteries will remain despite one's best efforts :-)
BTW, I also tested the RET/<return> fix and Bernt's example (checkboxes in a list with M-S-RET - or is it M-S-<return>?) works for me now.
Thanks! (again)
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-24 15:02 ` Nick Dokos
@ 2019-01-24 16:12 ` Eric S Fraga
2019-01-24 17:09 ` Nick Dokos
0 siblings, 1 reply; 15+ messages in thread
From: Eric S Fraga @ 2019-01-24 16:12 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
On Thursday, 24 Jan 2019 at 10:02, Nick Dokos wrote:
> is* one with a caption). I do wonder why Eric and I could see it and
> you could not, but some mysteries will remain despite one's best
> efforts :-)
Out of curiosity, I wonder if it's related to the version of Emacs? I'm
using emacs-snapshot on Debian.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2-207-g102142
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-24 16:12 ` Eric S Fraga
@ 2019-01-24 17:09 ` Nick Dokos
0 siblings, 0 replies; 15+ messages in thread
From: Nick Dokos @ 2019-01-24 17:09 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <esflists@gmail.com> writes:
> On Thursday, 24 Jan 2019 at 10:02, Nick Dokos wrote:
>> is* one with a caption). I do wonder why Eric and I could see it and
>> you could not, but some mysteries will remain despite one's best
>> efforts :-)
>
> Out of curiosity, I wonder if it's related to the version of Emacs? I'm
> using emacs-snapshot on Debian.
Don't know: I use (haven't updated emacs for a while)
GNU Emacs 27.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-11-12
Org mode version 9.2 (release_9.2-209-gdeb5c4 @ /home/nick/elisp/org-mode/lisp/)
on Fedora 27 (I know: no longer supported - need to move to Fedora 29 pronto!).
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Bug: LaTeX export of table with caption broken
2019-01-24 13:48 ` Nicolas Goaziou
2019-01-24 15:02 ` Nick Dokos
@ 2019-01-24 15:51 ` Eric S Fraga
1 sibling, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2019-01-24 15:51 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
On Thursday, 24 Jan 2019 at 14:48, Nicolas Goaziou wrote:
> OK. I fixed that, even though I cannot reproduce the issue.
Thanks! Works fine now. Strange that you could not reproduce it.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2-207-g102142
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-01-24 17:09 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-19 14:25 Bug: LaTeX export of table with caption broken Jens Lechtenboerger
2019-01-19 15:06 ` Nicolas Goaziou
2019-01-19 16:18 ` Jens Lechtenboerger
2019-01-22 16:06 ` Eric S Fraga
2019-01-22 22:52 ` Nicolas Goaziou
2019-01-23 7:27 ` Eric S Fraga
2019-01-23 8:36 ` Eric S Fraga
2019-01-23 14:21 ` Nicolas Goaziou
2019-01-23 15:25 ` Eric S Fraga
2019-01-23 15:16 ` Nick Dokos
2019-01-24 13:48 ` Nicolas Goaziou
2019-01-24 15:02 ` Nick Dokos
2019-01-24 16:12 ` Eric S Fraga
2019-01-24 17:09 ` Nick Dokos
2019-01-24 15:51 ` Eric S Fraga
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).