emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Karl Stump <karlstump@yahoo.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: LaTeX multicolumn count wrong in table export
Date: Fri, 28 Aug 2009 19:04:52 -0400	[thread overview]
Message-ID: <14924.1251500692@alphaville.usa.hp.com> (raw)
In-Reply-To: Message from Karl Stump <karlstump@yahoo.com> of "Fri, 28 Aug 2009 14:51:19 PDT." <944119.3571.qm@web43135.mail.sp1.yahoo.com>

Karl Stump <karlstump@yahoo.com> wrote:

> 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    |                                  
>     |   |          |          |          |                                  
> 
> start: 0000-00-00 end: 0000-00-00
> 


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.

Nick

  reply	other threads:[~2009-08-28 23:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 21:51 LaTeX multicolumn count wrong in table export Karl Stump
2009-08-28 23:04 ` Nick Dokos [this message]
2009-08-29  4:01   ` Nick Dokos
2009-08-29  5:24   ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14924.1251500692@alphaville.usa.hp.com \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=karlstump@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).