r64291 - in /branches/upstream/liblatex-table-perl/current: ./ bin/ examples/ lib/LaTeX/ lib/LaTeX/Table/Themes/ lib/LaTeX/Table/Types/ t/

carnil at users.alioth.debian.org carnil at users.alioth.debian.org
Wed Oct 27 07:17:14 UTC 2010


Author: carnil
Date: Wed Oct 27 07:10:41 2010
New Revision: 64291

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64291
Log:
[svn-upgrade] new version liblatex-table-perl (1.0.6)

Added:
    branches/upstream/liblatex-table-perl/current/t/90.ltpretty.t
    branches/upstream/liblatex-table-perl/current/t/ltpretty.txt
Modified:
    branches/upstream/liblatex-table-perl/current/Changes
    branches/upstream/liblatex-table-perl/current/MANIFEST
    branches/upstream/liblatex-table-perl/current/META.yml
    branches/upstream/liblatex-table-perl/current/README
    branches/upstream/liblatex-table-perl/current/bin/csv2pdf
    branches/upstream/liblatex-table-perl/current/bin/ltpretty
    branches/upstream/liblatex-table-perl/current/examples/examples.pdf
    branches/upstream/liblatex-table-perl/current/examples/generate_examples.pl
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Beamer.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Booktabs.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Classic.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Modern.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/ThemeI.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Ctable.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Longtable.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Std.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/TypeI.pm
    branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Xtab.pm
    branches/upstream/liblatex-table-perl/current/t/10.table-ctable.t

Modified: branches/upstream/liblatex-table-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/Changes?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/Changes (original)
+++ branches/upstream/liblatex-table-perl/current/Changes Wed Oct 27 07:10:41 2010
@@ -1,5 +1,13 @@
 Revision history for LaTeX-Table
-        
+
+1.0.6  Mon  Oct 25 2010
+        - eor option (thanks Jens)
+        - POD: Ascii tables of classic themes.
+        - fixed #62016 (thanks Bowen)
+        - ltpretty ignores empty trailing lines
+        - ltpretty test
+        - Evanston theme (Booktabs)
+
 1.0.5  Wed  Aug 25 2010
         - Set min. version of MooseX::FollowPBP to 0.03 (older versions caused
           cpan test fails)

Modified: branches/upstream/liblatex-table-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/MANIFEST?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/MANIFEST (original)
+++ branches/upstream/liblatex-table-perl/current/MANIFEST Wed Oct 27 07:10:41 2010
@@ -35,6 +35,8 @@
 t/60.coldef.t
 t/70.callback.t
 t/80.themes.t
+t/90.ltpretty.t
+t/ltpretty.txt
 t/lib/MyThemes/Custom.pm
 xt/release/perlcritic.t
 xt/release/perlcriticrc

Modified: branches/upstream/liblatex-table-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/META.yml?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/META.yml (original)
+++ branches/upstream/liblatex-table-perl/current/META.yml Wed Oct 27 07:10:41 2010
@@ -17,37 +17,37 @@
 provides:
   LaTeX::Table:
     file: lib/LaTeX/Table.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Themes::Beamer:
     file: lib/LaTeX/Table/Themes/Beamer.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Themes::Booktabs:
     file: lib/LaTeX/Table/Themes/Booktabs.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Themes::Classic:
     file: lib/LaTeX/Table/Themes/Classic.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Themes::Modern:
     file: lib/LaTeX/Table/Themes/Modern.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Themes::ThemeI:
     file: lib/LaTeX/Table/Themes/ThemeI.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Types::Ctable:
     file: lib/LaTeX/Table/Types/Ctable.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Types::Longtable:
     file: lib/LaTeX/Table/Types/Longtable.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Types::Std:
     file: lib/LaTeX/Table/Types/Std.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Types::TypeI:
     file: lib/LaTeX/Table/Types/TypeI.pm
-    version: v1.0.5
+    version: v1.0.6
   LaTeX::Table::Types::Xtab:
     file: lib/LaTeX/Table/Types/Xtab.pm
-    version: v1.0.5
+    version: v1.0.6
 recommends:
   Getopt::Long: 0
   LaTeX::Driver: 0
@@ -69,4 +69,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: http://github.com/lima1/p5-latex-table
-version: v1.0.5
+version: v1.0.6

Modified: branches/upstream/liblatex-table-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/README?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/README (original)
+++ branches/upstream/liblatex-table-perl/current/README Wed Oct 27 07:10:41 2010
@@ -1,4 +1,4 @@
-LaTeX-Table version 1.0.5
+LaTeX-Table version 1.0.6
 
 This module supports multipage tables via the xtab and the longtable package.
 For publication quality tables it utilizes the booktabs package. It also

Modified: branches/upstream/liblatex-table-perl/current/bin/csv2pdf
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/bin/csv2pdf?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/bin/csv2pdf (original)
+++ branches/upstream/liblatex-table-perl/current/bin/csv2pdf Wed Oct 27 07:10:41 2010
@@ -2,8 +2,6 @@
 
 use strict;
 use warnings;
-
-use utf8;
 
 use autodie qw(open close);
 use English qw( -no_match_vars );
@@ -21,7 +19,7 @@
 use LaTeX::Encode;
 use LaTeX::Driver;
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 my ( $infile, $outfile, $outfiletex, $help, $man, $version );
 

Modified: branches/upstream/liblatex-table-perl/current/bin/ltpretty
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/bin/ltpretty?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/bin/ltpretty (original)
+++ branches/upstream/liblatex-table-perl/current/bin/ltpretty Wed Oct 27 07:10:41 2010
@@ -6,7 +6,7 @@
 use LaTeX::Table;
 use Carp;
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 my $line_id = 0;
 my @input;
@@ -29,6 +29,11 @@
     $line_id++;
 }
 
+# remove trailing empty lines
+while ( !length $input[-1] ) {
+    pop @input;
+}
+
 # uncomment original input
 _say( join q{}, map {"\n % $_"} ( $paramline, @input ) );
 
@@ -86,7 +91,8 @@
 The first line must contain the L<LaTeX::Table> options (separated by 
 semicolons C<;>) in the format C<optionname=value>. The
 second line must contain the header, the following lines the data. 
-Columns are separated by C<&>. 
+Columns are separated by C<&>. Trailing empty lines are ignored, other 
+empty lines generate horizontal rules (as in L<LaTeX::Table>).
 
 =head1 EXAMPLE 
 
@@ -94,6 +100,7 @@
    Item:2c & Price
    Gnat& per gram& 13.65
    & each& 0.01
+
    Gnu& stuffed& 92.59
    Emu& stuffed& 33.33
    Armadillo& frozen& 8.99
@@ -126,6 +133,7 @@
    % Item:2c & Price
    % Gnat& per gram& 13.65
    % & each& 0.01
+   % 
    % Gnu& stuffed& 92.59
    % Emu& stuffed& 33.33
    % Armadillo& frozen& 8.99
@@ -138,6 +146,7 @@
   \midrule
   Gnat      & per gram & 13.65 \\
             & each     & 0.01  \\
+  \midrule          
   Gnu       & stuffed  & 92.59 \\
   Emu       & stuffed  & 33.33 \\
   Armadillo & frozen   & 8.99  \\

Modified: branches/upstream/liblatex-table-perl/current/examples/examples.pdf
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/examples/examples.pdf?rev=64291&op=diff
==============================================================================
Binary files - no diff available.

Modified: branches/upstream/liblatex-table-perl/current/examples/generate_examples.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/examples/generate_examples.pl?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/examples/generate_examples.pl (original)
+++ branches/upstream/liblatex-table-perl/current/examples/generate_examples.pl Wed Oct 27 07:10:41 2010
@@ -8,6 +8,8 @@
 use Number::Format qw(:subs);
 use Data::Dumper;
 use Text::CSV;
+
+use utf8;
 
 system('rm *.tex');
 
@@ -56,7 +58,7 @@
     my $test_header
         = [ [ 'Item:2c', '' ], [ 'Animal', 'Description', 'Price' ] ];
 
-    if ( $theme eq 'Zurich' || $theme eq 'Meyrin' ) {
+    if ( $theme eq 'Zurich' || $theme eq 'Meyrin' || $theme eq 'Evanston' ) {
         $test_header = [
             [ 'Item:2c', '' ],
             ['\cmidrule(r){1-2}'],

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table.pm Wed Oct 27 07:10:41 2010
@@ -7,7 +7,7 @@
 use Moose::Util::TypeConstraints;
 use MooseX::FollowPBP;
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 use LaTeX::Table::Types::Std;
 use LaTeX::Table::Types::Xtab;
@@ -28,7 +28,9 @@
 
 # Str
 for my $attr (
-    qw(label maincaption shortcaption caption caption_top coldef custom_template width maxwidth width_environment custom_tabular_environment position tabletail star)
+    qw(label maincaption shortcaption caption caption_top coldef
+    custom_template width maxwidth width_environment
+    custom_tabular_environment position tabletail star)
     )
 {
     has $attr => ( is => 'rw', isa => 'Str', default => 0 );
@@ -36,6 +38,7 @@
 
 has 'filename'  => ( is => 'rw', isa => 'Str', default => 'latextable.tex' );
 has 'foottable' => ( is => 'rw', isa => 'Str', default => q{} );
+has 'eor'       => ( is => 'rw', isa => 'Str', default => q{\\\\} );
 has 'environment'  => ( is => 'rw', isa => 'Str', default => 1 );
 has 'theme'        => ( is => 'rw', isa => 'Str', default => 'Meyrin' );
 has 'continuedmsg' => ( is => 'rw', isa => 'Str', default => '(continued)' );
@@ -381,7 +384,7 @@
         for my $i ( 0 .. scalar( @{$row} ) - 1 ) {
             $row->[$i] = sprintf '%-*s', $max{$i}, $row->[$i];
         }
-        $code .= join( ' & ', @{$row} ) . " \\\\\n";
+        $code .= join( ' & ', @{$row} ) . q{ } .  $self->get_eor . "\n";
     }
     return $code;
 }
@@ -653,7 +656,7 @@
 
 =head1 VERSION
 
-This document describes LaTeX::Table version 1.0.5
+This document describes LaTeX::Table version 1.0.6
 
 =head1 SYNOPSIS
 
@@ -1151,8 +1154,9 @@
   \begin{tabular*}{0.75\textwidth}{l@{\extracolsep{\fill} ... }
 
 For tables of C<type> I<std>, it is also possible to use the C<tabularx> and
-C<tabulary> LaTeX packages (see C<width_environment> below). The tables of type I<ctable>
-automatically use the C<tabularx> package.
+C<tabulary> LaTeX packages (see C<width_environment> below). The tables of
+type I<ctable> automatically use the C<tabularx> package. See also
+C<width_environment> for how to use this feature with I<longtable>. 
 
 =item C<width_environment>
 
@@ -1194,6 +1198,15 @@
 =item C<maxwidth>
 
 Only supported by tables of type I<ctable>. 
+
+=item C<eor>
+
+String specifying the end of a row. Default is '\\'.
+  
+  $table->set_eor("\\\\[1em]");
+
+Callback functions (see below) can be used to manually set the eor after the last
+column. This is useful when some rows require different eor strings. 
 
 =item C<callback>
 
@@ -1411,7 +1424,7 @@
 
 =over
 
-=item ANSGAR for some great patches.
+=item ANDREWF, ANSGAR and REHSACK for some great patches and suggestions.
 
 =item David Carlisle for the C<colortbl>, C<longtable>, C<ltxtable>,
 C<tabularx> and C<tabulary> LaTeX packages.
@@ -1420,9 +1433,6 @@
 
 =item Simon Fear for the C<booktabs> LaTeX package. The L<"SYNOPSIS"> table is
 the example in his documentation.
-
-=item Andrew Ford (ANDREWF) for many great suggestions. He also wrote
-L<LaTeX::Driver> and L<LaTeX::Encode> which are used by I<csv2pdf>.
 
 =item Lapo Filippo Mori for the excellent tutorial I<Tables in LaTeX2e:
 Packages and Methods>.

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Beamer.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Beamer.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Beamer.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Beamer.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Themes::ThemeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 sub _definition {
     my $themes = {

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Booktabs.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Booktabs.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Booktabs.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Booktabs.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Themes::ThemeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 sub _definition {
     my $themes = {
@@ -20,6 +20,16 @@
             'VERTICAL_RULES'   => [ 0, 0, 0 ],
             'HORIZONTAL_RULES' => [ 1, 1, 0 ],
             'BOOKTABS'         => 1,
+        },
+        'Evanston' => {
+            'HEADER_FONT_STYLE' => 'bf',
+            'STUB_ALIGN'        => 'l',
+            'VERTICAL_RULES'    => [ 0, 0, 0 ],
+            'HORIZONTAL_RULES'  => [ 1, 1, 0 ],
+            'RULES_CMD'         => [
+                '\toprule', '\midrule[\heavyrulewidth]',
+                '\midrule', '\bottomrule'
+            ],
         },
     };
     return $themes;
@@ -38,6 +48,7 @@
 
   Meyrin   # as described in the booktabs documentation
   Zurich   # header centered and in bold font
+  Evanston # as described in Lapo Filippo Mori's tutorial
 
 =head1 REQUIRES
 

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Classic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Classic.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Classic.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Classic.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Themes::ThemeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 sub _definition {
     my $themes = {
@@ -62,15 +62,65 @@
 
 This module provides following themes:
 
-  Berlin
-  Dresden
-  Houston
-  Miami
-  plain
+=over
+
+=item plain
+
+     Animal    Description    Price  
+     Gnu       stuffed        92.59  
+     Emu       stuffed        33.33  
+
+=item Miami
+
+     Animal    Description    Price  
+   ----------------------------------
+     Gnu       stuffed        92.59  
+     Emu       stuffed        33.33  
+
+
+=item Berlin
+
+   +--------+-------------+--------+
+   | Animal | Description |  Price |
+   +========+=============+========+
+   | Gnu    | stuffed     |  92.59 |
+   | Emu    | stuffed     |  33.33 |
+   +--------+-------------+--------+
+
+=item Dresden
+
+   +--------++-------------+--------+
+   | Animal || Description |  Price |
+   +========++=============+========+
+   | Gnu    || stuffed     |  92.59 |
+   | Emu    || stuffed     |  33.33 |
+   +--------++-------------+--------+
+
+=item Houston
+
+   +--------++-------------+--------+
+   | Animal || Description |  Price |
+   +========++=============+========+
+   | Gnu    || stuffed     |  92.59 |
+   +--------++-------------+--------+
+   | Emu    || stuffed     |  33.33 |
+   +--------++-------------+--------+
+
+=back
+
+Except for C<plain>, headers are printed in bold font.
 
 =head1 REQUIRES
 
 The themes defined in this module require no additional LaTeX packages.
+
+=head1 NOTES
+
+These are the classic themes you know from the famous books and tutorials.
+However, they have flaws. Read the C<booktabs> documentation for a discussion
+of this. 
+
+The C<plain> theme might be useful in combination with the I<ltpretty> script.
 
 =head1 SEE ALSO
 

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Modern.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Modern.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Modern.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/Modern.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Themes::ThemeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 sub _definition {
     my $themes = {
@@ -20,7 +20,7 @@
         'Muenchen' => {
             'HEADER_FONT_STYLE' => 'bf',
             'STUB_ALIGN'        => 'l',
-            'DEFINE_COLORS'     => '\definecolor{latexttbl}{RGB}{78,130,190}',
+            'DEFINE_COLORS'     => '\definecolor{latextbl}{RGB}{78,130,190}',
             'CAPTION_FONT_STYLE' => 'bf',
             'DATA_BG_COLOR_EVEN' => 'latextbl!20',
             'VERTICAL_RULES'     => [ 0, 0, 0 ],

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/ThemeI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/ThemeI.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/ThemeI.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Themes/ThemeI.pm Wed Oct 27 07:10:41 2010
@@ -5,7 +5,7 @@
 
 use Moose::Role;
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 requires '_definition';
 

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Ctable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Ctable.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Ctable.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Ctable.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Types::TypeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 my $template = <<'EOT'
 {[% DEFINE_COLORS_CODE %][% IF FONTSIZE %]\[% FONTSIZE %]

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Longtable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Longtable.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Longtable.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Longtable.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Types::TypeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 my $template = <<'EOT'
 {

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Std.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Std.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Std.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Std.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Types::TypeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 my $template = <<'EOT'
 [%IF CONTINUED %]\addtocounter{table}{-1}[% END %][% DEFINE_COLORS_CODE %][% IF ENVIRONMENT %]\begin{[% IF SIDEWAYS %]sidewaystable[% ELSE %][% ENVIRONMENT %][% END %][% IF STAR %]*[% END %]}[% IF POSITION %][[% POSITION %]][% END %]

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/TypeI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/TypeI.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/TypeI.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/TypeI.pm Wed Oct 27 07:10:41 2010
@@ -6,7 +6,7 @@
 use Moose::Role;
 use Template;
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 use Carp;
 
@@ -261,10 +261,10 @@
 =head1 DESCRIPTION
 
 This is the type interface (or L<Moose> role), that all type objects must use.
-L<LaTeX::Table> delegates the boring work of building the LaTeX code to type
+L<LaTeX::Table> delegates the LaTeX code generation to type
 objects. It stores all information we have in easy to use L<"TEMPLATE
-VARIABLES">. L<LaTeX::Table> ships with very flexible templates, but you can
-also use the template variables defined here to build custom templates.
+VARIABLES">. L<LaTeX::Table> ships with very flexible templates, but it is
+possible to use the template variables defined here to build custom templates.
 
 =head1 INTERFACE
 

Modified: branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Xtab.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Xtab.pm?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Xtab.pm (original)
+++ branches/upstream/liblatex-table-perl/current/lib/LaTeX/Table/Types/Xtab.pm Wed Oct 27 07:10:41 2010
@@ -3,7 +3,7 @@
 
 with 'LaTeX::Table::Types::TypeI';
 
-use version; our $VERSION = qv('1.0.5');
+use version; our $VERSION = qv('1.0.6');
 
 my $template = <<'EOT'
 {

Modified: branches/upstream/liblatex-table-perl/current/t/10.table-ctable.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/t/10.table-ctable.t?rev=64291&op=diff
==============================================================================
--- branches/upstream/liblatex-table-perl/current/t/10.table-ctable.t (original)
+++ branches/upstream/liblatex-table-perl/current/t/10.table-ctable.t Wed Oct 27 07:10:41 2010
@@ -173,9 +173,35 @@
     }
 );
 
+$table->set_eor('\\\\%');
+
 $expected_output =<<'EOT'
 {
 \ctable[center,
+]{l>{\ttfamily}l}{}{
+\toprule
+\textbf{Website} & \multicolumn{1}{c}{\textbf{URL}} \\%
+\midrule
+Slashdot  & http://www.slashdot.org  \\%
+Perlmonks & http://www.perlmonks.org \\%
+Google    & http://www.google.com    \\%
+\bottomrule
+}
+}
+EOT
+;
+
+$output = $table->generate_string();
+is_deeply([ split("\n",$output) ], [split("\n",$expected_output)], 
+    'uses _COL_X not specified');
+
+$table->set_continued(1);
+$table->set_eor('\\\\');
+
+$expected_output =<<'EOT'
+{
+\ctable[center,
+continued = {(continued)},
 ]{l>{\ttfamily}l}{}{
 \toprule
 \textbf{Website} & \multicolumn{1}{c}{\textbf{URL}} \\
@@ -191,28 +217,5 @@
 
 $output = $table->generate_string();
 is_deeply([ split("\n",$output) ], [split("\n",$expected_output)], 
-    'uses _COL_X not specified');
-
-$table->set_continued(1);
-
-$expected_output =<<'EOT'
-{
-\ctable[center,
-continued = {(continued)},
-]{l>{\ttfamily}l}{}{
-\toprule
-\textbf{Website} & \multicolumn{1}{c}{\textbf{URL}} \\
-\midrule
-Slashdot  & http://www.slashdot.org  \\
-Perlmonks & http://www.perlmonks.org \\
-Google    & http://www.google.com    \\
-\bottomrule
-}
-}
-EOT
-;
-
-$output = $table->generate_string();
-is_deeply([ split("\n",$output) ], [split("\n",$expected_output)], 
     'continued');
 

Added: branches/upstream/liblatex-table-perl/current/t/90.ltpretty.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/t/90.ltpretty.t?rev=64291&op=file
==============================================================================
--- branches/upstream/liblatex-table-perl/current/t/90.ltpretty.t (added)
+++ branches/upstream/liblatex-table-perl/current/t/90.ltpretty.t Wed Oct 27 07:10:41 2010
@@ -1,0 +1,44 @@
+use Test::More tests => 2;
+use Test::NoWarnings;
+
+use LaTeX::Table;
+
+my $cmd = "$^X bin/ltpretty < t/ltpretty.txt";
+my $output = `$cmd`;
+my $expected_output =<< 'EOT'
+
+ % theme=Meyrin;label=test;position=htb
+ % Item:2c & Price
+ % Gnat& per gram& 13.65
+ % & each& 0.01
+ % 
+ % Gnu& stuffed& 92.59
+ % Emu& stuffed& 33.33
+ % Armadillo& frozen& 8.99
+
+\begin{table}[htb]
+\centering
+\begin{tabular}{llr}
+\toprule
+\multicolumn{2}{c}{Item} & Price \\
+\midrule
+Gnat      & per gram & 13.65 \\
+          & each     & 0.01  \\
+\midrule
+Gnu       & stuffed  & 92.59 \\
+Emu       & stuffed  & 33.33 \\
+Armadillo & frozen   & 8.99  \\
+\bottomrule
+\end{tabular}
+\label{test}
+\end{table}
+
+EOT
+;
+
+is_deeply(
+    [ split( "\n", $output ) ],
+    [ split( "\n", $expected_output ) ],
+    'ltpretty empty lines'
+) || diag $output;
+

Added: branches/upstream/liblatex-table-perl/current/t/ltpretty.txt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblatex-table-perl/current/t/ltpretty.txt?rev=64291&op=file
==============================================================================
--- branches/upstream/liblatex-table-perl/current/t/ltpretty.txt (added)
+++ branches/upstream/liblatex-table-perl/current/t/ltpretty.txt Wed Oct 27 07:10:41 2010
@@ -1,0 +1,10 @@
+theme=Meyrin;label=test;position=htb
+Item:2c & Price
+Gnat& per gram& 13.65
+& each& 0.01
+
+Gnu& stuffed& 92.59
+Emu& stuffed& 33.33
+Armadillo& frozen& 8.99
+
+




More information about the Pkg-perl-cvs-commits mailing list