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.
A `save-excursion' around a call to org-table-align make point end up
*before* the table. The reason is that a table align replaces the
entire table, including the newline before it. When the table is
removed in order to be replaced, the marker created by
`save-excursion' slips. `org-table-align' has it's own, built-in
`save-excursion' by remembering the line and column where the cursor
was before the align.
Dan Griswold writes:
> Hi there,
>
> Well, I think this a bug.
>
> Given this org input file:
>
> ,----
> | * Things
> | ** A Heading
> | - some
> | - stuff
> | - in
> | - a
> | - list
> | ** Another heading
> | - another
> | - list
> `----
>
> then if I select the level one heading (titled "Things")
> with C-c @, and export to LaTeX using C-c C-e l, I get this
> output:
>
> ,----
> | % Created 2009-07-29 Wed 20:24
> | \documentclass[12pt]{article}
> | \usepackage[utf8]{inputenc}
> | \usepackage[T1]{fontenc}
> | \usepackage{graphicx}
> | \usepackage{longtable}
> | \usepackage{hyperref}
> |
> |
> | \title{Things}
> | \author{Daniel M. Griswold}
> | \date{July 29, 2009}
> |
> | \begin{document}
> |
> | \maketitle
> |
> | ** A Heading
> | \begin{itemize}
> | \item some
> | \item stuff
> | \item in
> | \item a
> | \item list
> | \end{itemize}
> | ** Another heading
> | \begin{itemize}
> | \item another
> | \item list
> | \end{itemize}
> |
> | \end{document}
> `----
>
> Note that the top level headings ("A Heading" and "Another
> Heading") are not exported as \section, but with the
> asterisks they have in the org file:
>
> ,----
> | ** A Heading
> | \begin{itemize}
> |
> | ... snip ...
> |
> | \end{itemize}
> | ** Another heading
> `----
>
> Exporting the whole file does what it's supposed to do:
> export the headlines as \section and \subsection.
This commit fixes the issue.
`org-export-latex-first-lines' was rather stupid and would
discard the end of the region with the region was active.
Thanks to Holst Thomas for this bug report.
Many different people want to set many different variables in a
buffer-local way for export. This cannot be done with file variables,
because the Org buffer is not current while the exporter is running.
Lots of variables can be set with the #+OPTIONS lines, but finding
abbreviations goes only so far.
Therefore we have now a general mechanism that can be used to bind
variables during export operations.
a line like: #+BIND: variable value
will bind the variable to value. For example,
the line
>> #+OPTIONS: toc:nil
can now equivalently be written as
>> #+BIND: org-export-with-toc nil
Some propel process LaTeX filed not directly to pdf, but go
through dvi and then to ps or pdf. In that case, allowed images
are ps and eps files, not pdf and jpg.
This commit adds the two extensions, so that export using that
alternative path can be supported better. However, it is up to the
user to make sure that the images are actually compatible with the
backend.