2

Can align-current also handle multicolumn cells properly? IT does not in my case, you can see in the following example, that the 2 columns called "Col" are placed above cell "c" in the editor after align-current, but they would have to be placed above "e" and "f" :

source-code:

\documentclass{article}
\usepackage{tabularx}
\begin{document}

  \begin{tabularx}{12cm}{|p{3cm}|X|X|X|X|X|}
  \hline
  Long text & \multicolumn{3}{X|}{Very-verylong text} & Col & Col       \\
\hline
       a    & b                                       & c   & d & e & f \\ 
    \hline
        a   & b                                       & c   & d & e & f \\
        \hline
\end{tabularx}
\end{document}

aligned source text in the editor (Aquamacs):

enter image description here

pdflatex output

enter image description here

How can I solve that? I have large tables with many columns and many multicolumns in the headings and it is absolutely confusing if those headings are not in the right place!

Remark: I'm currently using Aquamacs 2.5, but I assume that this problem is not bound to Aquamacs as it also happens if I use emacsin the terminal and try the same thing.

  • 1
    The align- functions are agnostic to the major mode; they simply rely on regexp and text. It does not know the latex syntax of multiple columns and does the alignment based on the & characters. – Kaushal Modi Feb 17 '15 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.