org-mode/lisp
Carsten Dominik 8a0ae0d3e5 LaTeX export: Fix bug with longtable export.
Karl Stump writes:

> When exporting a table with a horizontal line the column count is wrong.
>
> Output from pdflatex run:
>
> ! Extra alignment tab has been changed to \cr.
> <template> \endtemplate
>
> l.32 ....\multicolumn{4}{r}{Continued on next page}
>                                                   \
> ?
>
> Here's the table in the tex file:
>
> \begin{longtable}{||lll||}
> \caption{This is a long table with lines around and between cells}\\
>  Heading1  &  Heading2  &  Heading3 \\
> \hline
> \endhead
> \hline\multicolumn{4}{r}{Continued on next page}\
> \endfoot
> \endlastfoot
> \hline
>  alpha     &  beta      &  gamma     \\
>            &            &            \\
> \end{longtable}
>
> Here's the org file:
>
> ** table export test
>
> #+CAPTION: This is a long table with lines around and between cells
> #+LATEX_HEADER: \usepackage[landscape]{geometry}
> #+LATEX_HEADER: \geometry{left=0.12in,right=0.12in,top=0.25in,bottom=0.25in}
> #+ATTR_LaTeX: longtable align=||lll||
>
>     | / | <30>     | <10>     | <10>     |
>     |   | Heading1 | Heading2 | Heading3 |
>     |---+----------+----------+----------|
>     |   | alpha    | beta     | gamma    |
>     |   |          |          |          |

Nick Dokos replies:

> I believe it's because of the dummy "calculation-mark" column,
> which is not exported. However, the variable org-table-last-alignment
> (a list, whose length becomes the value of the \multicolumn argument)
> ends up having the value (nil nil nil nil), i.e. it counts the dummy
> column as well. What the proper place to adjust the value is, I don't
> know, but it should be easy for Carsten to fix it. For the time being,
> you can either get rid of the dummy row and column (e.g. if you don't
> need the widths) or fix it by hand in the LaTeX file.

Indeed, and this commit pops `org-table-last-alignment' if the first
column has been removed by `org-table-clean-before-export'.  The same
problem must have caused a one-off error when setting the alignment in
LaTeX tables, bu it seems nobody has noticed this so far.  Anyway,
also this is fixed now.
2009-08-29 07:22:33 +02:00
..
ChangeLog LaTeX export: Fix bug with longtable export. 2009-08-29 07:22:33 +02:00
ChangeLog.01 Split ChangeLog file into parts. 2008-05-08 08:16:38 +02:00
org-agenda.el Links: Make C-c C-o on a headline offer all links in headline and entry text 2009-08-28 10:42:37 +02:00
org-archive.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-ascii.el Remove some blank leading blank lines from ASCII export. 2009-08-09 14:34:05 +02:00
org-attach.el Clean up after John's iswitchb patch 2009-08-19 09:33:17 +01:00
org-bbdb.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-bibtex.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-clock.el org-notify: bugfix by Bernt Hansen. 2009-08-26 11:28:25 +08:00
org-colview-xemacs.el Avoid calling `goto-line' from lisp programs 2009-08-27 10:24:09 +02:00
org-colview.el Avoid calling `goto-line' from lisp programs 2009-08-27 10:24:09 +02:00
org-compat.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-docbook.el Incorporate Glen Morris' changes in downstream Emacs 2009-08-08 06:34:24 +02:00
org-exp-blocks.el Fix indentation in code export 2009-08-18 06:35:50 +01:00
org-exp.el Export: Remove table rows that only contain width and alignment markers 2009-08-28 09:18:41 +02:00
org-faces.el Mark running clock in the agenda. 2009-08-07 11:00:16 +02:00
org-feed.el Incorporate Glen Morris' changes in downstream Emacs 2009-08-08 06:34:24 +02:00
org-footnote.el Keep byte compiler happy 2009-08-27 15:18:25 +02:00
org-gnus.el Simplify storing links from gnus 2009-08-25 13:43:33 +02:00
org-html.el HTML export: Fix bugs with footnotes. 2009-08-16 06:41:30 +02:00
org-icalendar.el Incorporate Glen Morris' changes in downstream Emacs 2009-08-08 06:34:24 +02:00
org-id.el Fix some typos, add a new variable 2009-08-15 08:16:45 +02:00
org-indent.el Incorporate Glen Morris' changes in downstream Emacs 2009-08-08 06:34:24 +02:00
org-info.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-inlinetask.el Incorporate Glen Morris' changes in downstream Emacs 2009-08-08 06:34:24 +02:00
org-irc.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-jsinfo.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-latex.el LaTeX export: Fix bug with longtable export. 2009-08-29 07:22:33 +02:00
org-list.el Avoid calling `goto-line' from lisp programs 2009-08-27 10:24:09 +02:00
org-mac-message.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-macs.el Avoid calling `goto-line' from lisp programs 2009-08-27 10:24:09 +02:00
org-mew.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-mhe.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-mouse.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-plot.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-protocol.el Incorporate Glen Morris' changes in downstream Emacs 2009-08-08 06:34:24 +02:00
org-publish.el Clean up after John's iswitchb patch 2009-08-19 09:33:17 +01:00
org-remember.el Docstring fix, patch by Gregory J. Gubbs 2009-08-28 10:05:11 +02:00
org-rmail.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-src.el Add artist as an editing mode for ditaa. 2009-08-28 23:33:04 +02:00
org-table.el Avoid problems with table alignment an overlays. 2009-08-27 12:50:36 +02:00
org-timer.el Use org-notify to show a notification and possibly play a sound. 2009-08-24 02:44:29 +08:00
org-vm.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-w3m.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-wl.el Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
org-xoxo.el Incorporate Glen Morris' changes in downstream Emacs 2009-08-08 06:34:24 +02:00
org.el Fix bug when removing scheduled/deadline times 2009-08-28 14:41:15 +02:00