File: Classic.pm

package info (click to toggle)
liblatex-table-perl 1.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 784 kB
  • sloc: perl: 2,421; makefile: 2
file content (138 lines) | stat: -r--r--r-- 3,596 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
package LaTeX::Table::Themes::Classic;
use Moose;

with 'LaTeX::Table::Themes::ThemeI';

use version; our $VERSION = qv('1.0.6');

sub _definition {
    my $themes = {
        'Dresden' => {
            'HEADER_FONT_STYLE'  => 'bf',
            'HEADER_CENTERED'    => 1,
            'CAPTION_FONT_STYLE' => 'bf',
            'VERTICAL_RULES'     => [ 1, 2, 1 ],
            'HORIZONTAL_RULES'   => [ 1, 2, 0 ],
            'BOOKTABS'           => 0,
        },
        'Houston' => {
            'HEADER_FONT_STYLE'  => 'bf',
            'HEADER_CENTERED'    => 1,
            'CAPTION_FONT_STYLE' => 'bf',
            'VERTICAL_RULES'     => [ 1, 2, 1 ],
            'HORIZONTAL_RULES'   => [ 1, 2, 1 ],
            'EXTRA_ROW_HEIGHT'   => '1pt',
            'BOOKTABS'           => 0,
        },
        'Berlin' => {
            'HEADER_FONT_STYLE'  => 'bf',
            'HEADER_CENTERED'    => 1,
            'CAPTION_FONT_STYLE' => 'bf',
            'VERTICAL_RULES'     => [ 1, 1, 1 ],
            'HORIZONTAL_RULES'   => [ 1, 2, 0 ],
            'BOOKTABS'           => 0,
        },
        'Miami' => {
            'HEADER_FONT_STYLE'  => 'bf',
            'HEADER_CENTERED'    => 1,
            'CAPTION_FONT_STYLE' => 'bf',
            'STUB_ALIGN'         => 'l',
            'VERTICAL_RULES'     => [ 0, 0, 0 ],
            'HORIZONTAL_RULES'   => [ 0, 1, 0 ],
            'BOOKTABS'           => 0,
        },
        'plain' => {
            'STUB_ALIGN'       => 'l',
            'VERTICAL_RULES'   => [ 0, 0, 0 ],
            'HORIZONTAL_RULES' => [ 0, 0, 0 ],
            'BOOKTABS'         => 0,
        },
    };
    return $themes;
}

1;
__END__

=head1 NAME

LaTeX::Table::Themes::Classic - Classic LaTeX table themes.

=head1 PROVIDES

This module provides following themes:

=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

L<LaTeX::Table>, L<LaTeX::Table::Themes::ThemeI>

=head1 LICENSE AND COPYRIGHT

Copyright (c) 2006-2010 C<< <limaone@cpan.org> >> 

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.

=cut

# vim: ft=perl sw=4 ts=4 expandtab