emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Columns with marking characters are exported to latex (Org 8)
@ 2014-08-18 19:59 Thorsten Grothe
  2014-08-18 21:44 ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Thorsten Grothe @ 2014-08-18 19:59 UTC (permalink / raw)
  To: emacs-orgmode

Hello List,

I'm running here the maint branch of Org-Mode (8.2.7c). I installed it 
with git.

I tried to export this table to latex:

#+TBLNAME: Test
#+ORGTBL: SEND Test orgtbl-to-latex :skip 1 :splice t
|   |    A |    B |
|---+------+------|
|   |    6 |    2 |
|   |    4 |    9 |
|---+------+------|
| _ | suma | sumb |
|   |   10 |   11 |
#+TBLFM: $suma=vsum(@I..@II)::$sumb=vsum(@I..@II)


and got the following result:

% BEGIN RECEIVE ORGTBL Test
\hline
  & 6 & 2 \\
  & 4 & 9 \\
\hline
$\backslash$$_$ & suma & sumb \\
  & 10 & 11 \\
% END RECEIVE ORGTBL Test

as you can see the first column of the table is exported to latex. 
Normally columns with marking characters are *not* exported to latex. Is 
this a bug?

Thanks in advance!


-- 
Regards

Thorsten

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-18 19:59 Columns with marking characters are exported to latex (Org 8) Thorsten Grothe
@ 2014-08-18 21:44 ` Nick Dokos
  2014-08-18 21:55   ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2014-08-18 21:44 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Grothe <info@th-grothe.de> writes:

> Hello List,
>
> I'm running here the maint branch of Org-Mode (8.2.7c). I installed it 
> with git.
>
> I tried to export this table to latex:
>
> #+TBLNAME: Test
> #+ORGTBL: SEND Test orgtbl-to-latex :skip 1 :splice t
> |   |    A |    B |
> |---+------+------|
> |   |    6 |    2 |
> |   |    4 |    9 |
> |---+------+------|
> | _ | suma | sumb |
> |   |   10 |   11 |
> #+TBLFM: $suma=vsum(@I..@II)::$sumb=vsum(@I..@II)
>
>
> and got the following result:
>
> % BEGIN RECEIVE ORGTBL Test
> \hline
>   & 6 & 2 \\
>   & 4 & 9 \\
> \hline
> $\backslash$$_$ & suma & sumb \\
>   & 10 & 11 \\
> % END RECEIVE ORGTBL Test
>
> as you can see the first column of the table is exported to latex. 
> Normally columns with marking characters are *not* exported to latex. Is 
> this a bug?
>
> Thanks in advance!

Can't reproduce it either with 8.2.7c or with latest. I get

,----
| \begin{document}
| 
| \maketitle
| \tableofcontents
| 
| I tried to export this table to latex:
| 
| \begin{center}
| \begin{tabular}{rr}
| A & B\\
| \hline
| 6 & 2\\
| 4 & 9\\
| \hline
| 10 & 11\\
| \end{tabular}
| \end{center}
| % Emacs 24.4.50.1 (Org mode 8.2.7c)
`----

--
Nick

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-18 21:44 ` Nick Dokos
@ 2014-08-18 21:55   ` Nick Dokos
  2014-08-18 22:14     ` Thorsten Grothe
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2014-08-18 21:55 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Thorsten Grothe <info@th-grothe.de> writes:
>
>> Hello List,
>>
>> I'm running here the maint branch of Org-Mode (8.2.7c). I installed it 
>> with git.
>>
>> I tried to export this table to latex:
>>
>> #+TBLNAME: Test
>> #+ORGTBL: SEND Test orgtbl-to-latex :skip 1 :splice t
>> |   |    A |    B |
>> |---+------+------|
>> |   |    6 |    2 |
>> |   |    4 |    9 |
>> |---+------+------|
>> | _ | suma | sumb |
>> |   |   10 |   11 |
>> #+TBLFM: $suma=vsum(@I..@II)::$sumb=vsum(@I..@II)
>>
>>
>> and got the following result:
>>
>> % BEGIN RECEIVE ORGTBL Test
>> \hline
>>   & 6 & 2 \\
>>   & 4 & 9 \\
>> \hline
>> $\backslash$$_$ & suma & sumb \\
>>   & 10 & 11 \\
>> % END RECEIVE ORGTBL Test
>>
>> as you can see the first column of the table is exported to latex. 
>> Normally columns with marking characters are *not* exported to latex. Is 
>> this a bug?
>>
>> Thanks in advance!
>
> Can't reproduce it either with 8.2.7c or with latest. I get
>
> ,----
> | \begin{document}
> | 
> | \maketitle
> | \tableofcontents
> | 
> | I tried to export this table to latex:
> | 
> | \begin{center}
> | \begin{tabular}{rr}
> | A & B\\
> | \hline
> | 6 & 2\\
> | 4 & 9\\
> | \hline
> | 10 & 11\\
> | \end{tabular}
> | \end{center}
> | % Emacs 24.4.50.1 (Org mode 8.2.7c)
> `----
>

Sorry - disregard that. I didn't test with radio tables, I just did a
straight export. I'll try radio tables later.

Nick

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-18 21:55   ` Nick Dokos
@ 2014-08-18 22:14     ` Thorsten Grothe
  2014-08-19  4:29       ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Thorsten Grothe @ 2014-08-18 22:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

Hallo Nick,

* Nick Dokos, 19.08.2014 00:13:53:

> Sorry - disregard that. I didn't test with radio tables, I just did a
> straight export. I'll try radio tables later.

the attached file is a showing the latex code after the export from 
orgtbl -- see the result, I made some small comments on it...


-- 
Regards

Thorsten

[-- Attachment #2: Orgerror.tex --]
[-- Type: text/x-tex, Size: 627 bytes --]

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{colortbl}

\begin{document}

#+TBLNAME: Test
#+ORGTBL: SEND Test orgtbl-to-latex
|   |    A |    B |
|---+------+------|
| / |    6 |    2 |
| / |    4 |    9 |
|---+------+------|
| _ | suma | sumb |
|   |   10 |   11 |
#+TBLFM: $suma=vsum(@I..@II)::$sumb=vsum(@I..@II)

% BEGIN RECEIVE ORGTBL Test
\begin{tabular}{lrr}
 & A & B \\
\hline
/ & 6 & 2 \\ % see here
/ & 4 & 9 \\ % see here
\hline
$\backslash$$_$ & suma & sumb \\ % see here
 & 10 & 11 \\
\end{tabular}
% END RECEIVE ORGTBL Test

\end{document} 

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-18 22:14     ` Thorsten Grothe
@ 2014-08-19  4:29       ` Nick Dokos
  2014-08-20  4:23         ` Nick Dokos
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2014-08-19  4:29 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Grothe <info@th-grothe.de> writes:

> Hallo Nick,
>
> * Nick Dokos, 19.08.2014 00:13:53:
>
>> Sorry - disregard that. I didn't test with radio tables, I just did a
>> straight export. I'll try radio tables later.
>
> the attached file is a showing the latex code after the export from
> orgtbl -- see the result, I made some small comments on it...

Yes, not only can I reproduce it, I bisected it and (surprise!)  the
bisection fingered commit 79873390edd26a44cefc2050c7af470a7ed8fd07: my
"fix" to your previous complaint:

        http://thread.gmane.org/gmane.emacs.orgmode/88634

I'll take another look at org-table-clean-before-export.

-- 
Nick

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-19  4:29       ` Nick Dokos
@ 2014-08-20  4:23         ` Nick Dokos
  2014-08-20  7:23           ` Nicolas Goaziou
  2014-08-20 16:38           ` Thorsten Grothe
  0 siblings, 2 replies; 10+ messages in thread
From: Nick Dokos @ 2014-08-20  4:23 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Thorsten Grothe <info@th-grothe.de> writes:
>
>> Hallo Nick,
>>
>> * Nick Dokos, 19.08.2014 00:13:53:
>>
>>> Sorry - disregard that. I didn't test with radio tables, I just did a
>>> straight export. I'll try radio tables later.
>>
>> the attached file is a showing the latex code after the export from
>> orgtbl -- see the result, I made some small comments on it...
>
> Yes, not only can I reproduce it, I bisected it and (surprise!)  the
> bisection fingered commit 79873390edd26a44cefc2050c7af470a7ed8fd07: my
> "fix" to your previous complaint:
>
>         http://thread.gmane.org/gmane.emacs.orgmode/88634
>
> I'll take another look at org-table-clean-before-export.

OK - I have taken a closer look and I think my "fix" was wrong: I'm
going to revert it.

That will of course restore the previous behaviour where a first column
that's empty is deleted on export. There is an argument to be made that
that is "correct" behaviour: first, both the original version and
Achim's rewrite implement that behaviour, but also the relevant section
of the manual (section 3.5.10, Advanced Features) which lists the
special first column characters includes <space> among them.

That leaves the somewhat counterintuitive case of a completely empty
first column which is therefore deemed special and gets stripped. This
could be "fixed" as a special case but instead I propose to document that
behaviour in the above section, with a suggested workaround: if you
really, really want an empty first column, then add a second one.

WDYT?

-- 
Nick

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-20  4:23         ` Nick Dokos
@ 2014-08-20  7:23           ` Nicolas Goaziou
  2014-08-20 11:58             ` Nick Dokos
  2014-08-20 16:38           ` Thorsten Grothe
  1 sibling, 1 reply; 10+ messages in thread
From: Nicolas Goaziou @ 2014-08-20  7:23 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Hello,

Nick Dokos <ndokos@gmail.com> writes:

> That leaves the somewhat counterintuitive case of a completely empty
> first column which is therefore deemed special and gets stripped. This
> could be "fixed" as a special case but instead I propose to document that
> behaviour in the above section, with a suggested workaround: if you
> really, really want an empty first column, then add a second one.

An empty first column shouldn't be considered as special. "ox.el"
handles this case fine (see `org-export-table-has-special-column-p').
This is not the case yet for radio tables.

Note that the goal is to use "ox.el" in radio tables.


Regards,

-- 
Nicolas Goaziou

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-20  7:23           ` Nicolas Goaziou
@ 2014-08-20 11:58             ` Nick Dokos
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Dokos @ 2014-08-20 11:58 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Nick Dokos <ndokos@gmail.com> writes:
>
>> That leaves the somewhat counterintuitive case of a completely empty
>> first column which is therefore deemed special and gets stripped. This
>> could be "fixed" as a special case but instead I propose to document that
>> behaviour in the above section, with a suggested workaround: if you
>> really, really want an empty first column, then add a second one.
>
> An empty first column shouldn't be considered as special. "ox.el"
> handles this case fine (see `org-export-table-has-special-column-p').
> This is not the case yet for radio tables.
>

OK - I'll special-case it in org-table-clean-before-export then for now.

> Note that the goal is to use "ox.el" in radio tables.
>

Thanks!

-- 
Nick

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-20  4:23         ` Nick Dokos
  2014-08-20  7:23           ` Nicolas Goaziou
@ 2014-08-20 16:38           ` Thorsten Grothe
  2014-08-20 17:16             ` Nick Dokos
  1 sibling, 1 reply; 10+ messages in thread
From: Thorsten Grothe @ 2014-08-20 16:38 UTC (permalink / raw)
  To: emacs-orgmode

* Nick Dokos, 20.08.2014 18:34:15:

> That leaves the somewhat counterintuitive case of a completely empty
> first column which is therefore deemed special and gets stripped. This
> could be "fixed" as a special case but instead I propose to document that
> behaviour in the above section, with a suggested workaround: if you
> really, really want an empty first column, then add a second one.

this is a programming problem, which exceeds by far my horizons, so I 
can not say much about this, it was just important for me to point out 
the problem, sorry, I think here I can not help ..... but of course I 
can live with your solution no matter what it looks like...

Regards
Thorsten

  * Deutsch - erkannt
  * Englisch

  * Englisch

  <javascript:void(0);>

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

* Re: Columns with marking characters are exported to latex (Org 8)
  2014-08-20 16:38           ` Thorsten Grothe
@ 2014-08-20 17:16             ` Nick Dokos
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Dokos @ 2014-08-20 17:16 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Grothe <info@th-grothe.de> writes:

> * Nick Dokos, 20.08.2014 18:34:15:
>
>> That leaves the somewhat counterintuitive case of a completely empty
>> first column which is therefore deemed special and gets stripped. This
>> could be "fixed" as a special case but instead I propose to document that
>> behaviour in the above section, with a suggested workaround: if you
>> really, really want an empty first column, then add a second one.
>
> this is a programming problem, which exceeds by far my horizons, so I
> can not say much about this, it was just important for me to point out
> the problem, sorry, I think here I can not help ..... but of course I
> can live with your solution no matter what it looks like...
>

As Nicolas pointed out, I can't get away with just documenting the
behaviour, so I plan to:

o revert the previous patch - that will make your latest example work,
  but it will break your previous example (but you can work around it
  for now by adding an extra empty column 1). I'll do the revert
  tonight.

o then (probably this weekend) work on special-casing the empty column
  case in org-table-clean-before-export, which will get rid of the
  necessity of using the workaround above.

--
Nick

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

end of thread, other threads:[~2014-08-20 17:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 19:59 Columns with marking characters are exported to latex (Org 8) Thorsten Grothe
2014-08-18 21:44 ` Nick Dokos
2014-08-18 21:55   ` Nick Dokos
2014-08-18 22:14     ` Thorsten Grothe
2014-08-19  4:29       ` Nick Dokos
2014-08-20  4:23         ` Nick Dokos
2014-08-20  7:23           ` Nicolas Goaziou
2014-08-20 11:58             ` Nick Dokos
2014-08-20 16:38           ` Thorsten Grothe
2014-08-20 17:16             ` Nick Dokos

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