emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Possible bug in export of table in latex
@ 2015-01-06 13:03 Giuseppe Lipari
  2015-01-06 18:15 ` Eric S Fraga
  2015-01-06 22:32 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Giuseppe Lipari @ 2015-01-06 13:03 UTC (permalink / raw)
  To: emacs-orgmode

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

Dear all,

happy new year to everybody!

I think I might have discovered a bug.
I am preparing some slides using org-beamer mode. Here is the snippet of a
table I have in my file:


   #+ATTR_LATEX: :float t :width 4cm
   | /Single node app/ | /Distributed app/           |
   |-------------------+-----------------------------|
   | Operating System  | Distributed OS              |
   | Network           | Network programming libs    |
   | Progr. language   | Distributed Progr. language |
   |-------------------+-----------------------------|

If I understand well from the documentation, the "width" option should set
the width of the table. However, the exporter produces the following latex
snippet:


\begin{table}[htb]
\centering
\begin{tabular}{4cm}{ll}
\emph{Single node app} & \emph{Distributed app}\\
\hline
Operating System & Distributed OS\\
Network & Network programming libs\\
Progr. language & Distributed Progr. language\\
\hline
\end{tabular}
\end{table}
\end{frame}


Clearly, the lenght specification went in the wrong place, as the first
parameter of tabular should not be the width of the table, but the column
alignment.

I am running the most updated version from git, that is 8.3beta

All the best,

Giuseppe Lipari




-- 
Giuseppe Lipari
LIFL
Université de Lille 1
blogs: http://scacciamennule.blogspot.com  (Italian)
<http://scacciamennule.blogspot.com>
          http://okpanico,wordpress.com          (Italian)
          http://algoland.wordpress.com           (English)

[-- Attachment #2: Type: text/html, Size: 2332 bytes --]

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

* Re: Possible bug in export of table in latex
  2015-01-06 13:03 Possible bug in export of table in latex Giuseppe Lipari
@ 2015-01-06 18:15 ` Eric S Fraga
  2015-01-06 22:32 ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2015-01-06 18:15 UTC (permalink / raw)
  To: Giuseppe Lipari; +Cc: emacs-orgmode

On Tuesday,  6 Jan 2015 at 14:03, Giuseppe Lipari wrote:
> Dear all,
>
> happy new year to everybody!
>
> I think I might have discovered a bug.
> I am preparing some slides using org-beamer mode. Here is the snippet of a
> table I have in my file:
>
>
>    #+ATTR_LATEX: :float t :width 4cm
>    | /Single node app/ | /Distributed app/           |
>    |-------------------+-----------------------------|
>    | Operating System  | Distributed OS              |
>    | Network           | Network programming libs    |
>    | Progr. language   | Distributed Progr. language |
>    |-------------------+-----------------------------|
>
> If I understand well from the documentation, the "width" option should set
> the width of the table. However, the exporter produces the following latex
> snippet:

I can confirm this (with a version of org a few days old).

One solution, in the  meantime, would be to put the table within a
column and use the column width option to limit the width of the table,
removing the :width option for the table.  This works although it is not
possible to specific the width of a column directly, only as a function
of \columnwidth [1] so you'll have to play around with the factor to
figure out what width to specify.

HTH.

Footnotes: 
[1]  as an aside, it seems strange to me to define column widths as a
factor of \columnwidth instead of \textwidth or similar...  seems rather
self-referential?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-686-g9528be.dirty

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

* Re: Possible bug in export of table in latex
  2015-01-06 13:03 Possible bug in export of table in latex Giuseppe Lipari
  2015-01-06 18:15 ` Eric S Fraga
@ 2015-01-06 22:32 ` Nicolas Goaziou
  2015-01-08  8:40   ` Giuseppe Lipari
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-01-06 22:32 UTC (permalink / raw)
  To: Giuseppe Lipari; +Cc: emacs-orgmode

Hello,

Giuseppe Lipari <giulipari@gmail.com> writes:

> I am preparing some slides using org-beamer mode. Here is the snippet of a
> table I have in my file:
>
>
>    #+ATTR_LATEX: :float t :width 4cm
>    | /Single node app/ | /Distributed app/           |
>    |-------------------+-----------------------------|
>    | Operating System  | Distributed OS              |
>    | Network           | Network programming libs    |
>    | Progr. language   | Distributed Progr. language |
>    |-------------------+-----------------------------|
>
> If I understand well from the documentation, the "width" option should set
> the width of the table. However, the exporter produces the following latex
> snippet:
>
>
> \begin{table}[htb]
> \centering
> \begin{tabular}{4cm}{ll}
> \emph{Single node app} & \emph{Distributed app}\\
> \hline
> Operating System & Distributed OS\\
> Network & Network programming libs\\
> Progr. language & Distributed Progr. language\\
> \hline
> \end{tabular}
> \end{table}
> \end{frame}
>
>
> Clearly, the lenght specification went in the wrong place, as the first
> parameter of tabular should not be the width of the table, but the column
> alignment.

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou

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

* Re: Possible bug in export of table in latex
  2015-01-06 22:32 ` Nicolas Goaziou
@ 2015-01-08  8:40   ` Giuseppe Lipari
  2015-01-08 16:47     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Giuseppe Lipari @ 2015-01-08  8:40 UTC (permalink / raw)
  To: Giuseppe Lipari, emacs-orgmode

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

Hi,

thanks for responding.
As a matter of fact, I think the :width option for latex tables should be
disabled, because it is not so simple to implement.
While it is possible to reduce the width with Eric's trick, it is not so
easy to enlarge the width without using the :align option and appropriate
latex code, so the simplest approach would be to either give an error upon
exportin, or to ignore the width option altogether.

On the other hand, I guess :width makes sense for other exporters, like
e.g. html or ODT, so it should stay.

Just my two cents.

Giuseppe Lipari




2015-01-06 23:32 GMT+01:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:

> Hello,
>
> Giuseppe Lipari <giulipari@gmail.com> writes:
>
> > I am preparing some slides using org-beamer mode. Here is the snippet of
> a
> > table I have in my file:
> >
> >
> >    #+ATTR_LATEX: :float t :width 4cm
> >    | /Single node app/ | /Distributed app/           |
> >    |-------------------+-----------------------------|
> >    | Operating System  | Distributed OS              |
> >    | Network           | Network programming libs    |
> >    | Progr. language   | Distributed Progr. language |
> >    |-------------------+-----------------------------|
> >
> > If I understand well from the documentation, the "width" option should
> set
> > the width of the table. However, the exporter produces the following
> latex
> > snippet:
> >
> >
> > \begin{table}[htb]
> > \centering
> > \begin{tabular}{4cm}{ll}
> > \emph{Single node app} & \emph{Distributed app}\\
> > \hline
> > Operating System & Distributed OS\\
> > Network & Network programming libs\\
> > Progr. language & Distributed Progr. language\\
> > \hline
> > \end{tabular}
> > \end{table}
> > \end{frame}
> >
> >
> > Clearly, the lenght specification went in the wrong place, as the first
> > parameter of tabular should not be the width of the table, but the column
> > alignment.
>
> This should be fixed. Thank you for reporting it.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>



-- 
Giuseppe Lipari
LIFL
Université de Lille 1
blogs: http://scacciamennule.blogspot.com  (Italian)
<http://scacciamennule.blogspot.com>
          http://okpanico,wordpress.com          (Italian)
          http://algoland.wordpress.com           (English)

[-- Attachment #2: Type: text/html, Size: 3553 bytes --]

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

* Re: Possible bug in export of table in latex
  2015-01-08  8:40   ` Giuseppe Lipari
@ 2015-01-08 16:47     ` Nicolas Goaziou
  2015-01-08 16:57       ` Andreas Leha
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-01-08 16:47 UTC (permalink / raw)
  To: Giuseppe Lipari; +Cc: emacs-orgmode

Hello,

Giuseppe Lipari <giulipari@gmail.com> writes:

> As a matter of fact, I think the :width option for latex tables should be
> disabled, because it is not so simple to implement.

As long as it doesn't generate invalid LaTeX code (like in your bug
report), I think the current :width option can be kept. You don't need
to use it if you don't like it.


Regards,

-- 
Nicolas Goaziou

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

* Re: Possible bug in export of table in latex
  2015-01-08 16:47     ` Nicolas Goaziou
@ 2015-01-08 16:57       ` Andreas Leha
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Leha @ 2015-01-08 16:57 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Giuseppe Lipari <giulipari@gmail.com> writes:
>
>> As a matter of fact, I think the :width option for latex tables should be
>> disabled, because it is not so simple to implement.
>
> As long as it doesn't generate invalid LaTeX code (like in your bug
> report), I think the current :width option can be kept. You don't need
> to use it if you don't like it.
>

I agree, because I successfully use it (specifying the alignment as
well).

Best,
Andreas

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

end of thread, other threads:[~2015-01-08 16:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06 13:03 Possible bug in export of table in latex Giuseppe Lipari
2015-01-06 18:15 ` Eric S Fraga
2015-01-06 22:32 ` Nicolas Goaziou
2015-01-08  8:40   ` Giuseppe Lipari
2015-01-08 16:47     ` Nicolas Goaziou
2015-01-08 16:57       ` Andreas Leha

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