Subject: | Alignment & Width of longtables are wrong generated |
Hi Markus,
I wonder why generated longtables weren't aligned as expected, so I took
the LaTeX Companion and compared the description to the generated code -
and later against the template.
The longtable is documented
(http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=longtable) to
be used like:
Show quoted text
> \begin{longtable}[align]{cols} rows \end{longtable}
The attached patch correct this - and removes the \begin{flushleft}
etc., because this doesn't affect longtables.
The width is controlled using
Show quoted text> \setlength\LTleft{...} \setlength\LTright{...}
but I didn't add code for this, because I didn't completely understand
how to translate the width-parameters into both length parameters.
Best regards,
Jens
Subject: | LaTeX-Table-Longtable.patch |
--- lib/LaTeX/Table/Types/Longtable.pm.orig 2009-09-04 10:54:48.799112000 +0200
+++ lib/LaTeX/Table/Types/Longtable.pm 2009-09-04 10:59:29.714913000 +0200
@@ -19,10 +19,7 @@
RULES_WIDTH_GLOBAL_CODE %][% RULES_COLOR_GLOBAL_CODE %][% IF FONTSIZE %]\[% FONTSIZE %]
[% END %][% IF FONTFAMILY %]\[% FONTFAMILY %]family
[% END %][% IF SIDEWAYS %]\begin{landscape}[% END
-%][% IF CENTER %]\begin{center}
-[% END %][% IF LEFT %]\begin{flushleft}
-[% END %][% IF RIGHT %]\begin{flushright}
-[% END %][% RESIZEBOX_BEGIN_CODE %]\begin{[% TABULAR_ENVIRONMENT %][% IF STAR %]*[% END %]}[% IF WIDTH %]{[%WIDTH %]}[% END %]{[% COLDEF %]}
+%][% RESIZEBOX_BEGIN_CODE %]\begin{[% TABULAR_ENVIRONMENT %][% IF STAR %]*[% END %]}[% IF CENTER %][c][% END %][% IF LEFT %][l][% END %][% IF RIGHT %][r][% END %]{[% COLDEF %]}
[% IF CAPTION %][%IF CAPTION_TOP %]\caption[%IF SHORTCAPTION %][[%
SHORTCAPTION %]][% END %]{[% CAPTION %][% IF CONTINUED %] [% CONTINUEDMSG %][%
END %][% IF LABEL %]\label{[% LABEL %]}[% END %]}\\
@@ -37,8 +34,7 @@
END %][% IF LABEL %]\label{[% LABEL %]}[% END %]}\\
[% END %][% END %]\endlastfoot
[% DATA_CODE %]\end{[% TABULAR_ENVIRONMENT %][% IF STAR %]*[% END %]}
-[% RESIZEBOX_END_CODE %][% IF CENTER %]\end{center}[% END %][% IF LEFT
-%]\end{flushleft}[% END %][% IF RIGHT %]\end{flushright}[% END %][% IF
+[% RESIZEBOX_END_CODE %][% IF
SIDEWAYS %]\end{landscape}[% END %]
}
EOT