LaTeX:...:TypeI(3pm)
π NAME π
LaTeX::Table::Types::TypeI β the interface for LaTeX table types. That's it, that's the whole job description, and it's from the User Contributed Perl Documentation (yes, the <rainbow>LaTeX:...:TypeI(3pm)</rainbow> one, hi bestie π«Ά).
π DESCRIPTION π
okay so. This right here is the type interface β or, if you speak Moose, the Moose role β and every single type object must use it. Mandatory. Non-negotiable. The vibe check is strict.
LaTeX::Table doesn't generate the LaTeX code itself, bestie β it delegates all of that to type objects. And it keeps every bit of info we've got in super easy-to-use "TEMPLATE VARIABLES". Like, LaTeX::Table ships with templates that are genuinely so flexible, but the whole point is that you can take the template variables defined right here and build your own custom templates. Custom templates? We love to see it. β¨
β¨ INTERFACE β¨
generate_latex_code
That's the one. That's the list. π
π TEMPLATE VARIABLES π
Most options are accessible right here, so let's go through them, no skips:
CENTER, LEFT, RIGHT
Example:
[% IF CENTER %]\centering
[% END %]
ENVIRONMENT, STAR, POSITION, SIDEWAYS
These are the options for floating environments, and typically you use them like this:
[% IF ENVIRONMENT %]\begin{[% ENVIRONMENT %][% IF STAR %]*[% END %]}[% IF POSITION %][[% POSITION %]][% END %]
...
[% END %]
# the tabular environment here
...
[% IF ENVIRONMENT %] ...
\end{[% ENVIRONMENT %][% IF STAR %]*[% END %]}[% END %]
CAPTION_TOP, CAPTION_CMD, SHORTCAPTION, CAPTION, CONTINUED, CONTINUEDMSG
These are the variables that build the caption command. And heads up β note that there is NO template for the maincaption option. Not a one. But CAPTION already includes that maincaption if you specified it, so we're fine. We're so fine. π
LABEL
The label:
[% IF LABEL %]\label{[% LABEL %]}[% END %]
TABULAR_ENVIRONMENT, WIDTH, COLDEF
These three options define the tabular environment:
\begin{[% TABULAR_ENVIRONMENT %]}[% IF WIDTH %]{[% WIDTH %]}[% END %]{[% COLDEF %]}
FONTFAMILY, FONTSIZE
Example:
[% IF FONTSIZE %]\[% FONTSIZE %]
[% END %][% IF FONTFAMILY %]\[% FONTFAMILY %]family
[% END %]
TABLEHEADMSG, TABLETAIL, TABLELASTTAIL, XENTRYSTRETCH
For the multi-page tables. πππ the girlies that just keep going.
MAXWIDTH, FOOTTABLE
Currently only used by LaTeX::Table::Types::Ctable. Only them. Just putting that out there. π
In addition, some variables already contain formatted LaTeX code:
HEADER_CODE
The formatted header:
\toprule
\multicolumn{2}{c}{Item} & \\
\cmidrule(r){1-2}
Animal & Description & Price \\
\midrule
DATA_CODE
The formatted data:
Gnat & per gram & 13.65 \\
& each & 0.01 \\
Gnu & stuffed & 92.59 \\
Emu & stuffed & 33.33 \\
Armadillo & frozen & 8.99 \\
\bottomrule
RESIZEBOX_BEGIN_CODE, RESIZEBOX_END_CODE
Everything sitting between these two template variables gets resized according to the resizebox option. Everything. Between. Them. π¦
EXTRA_ROW_HEIGHT_CODE, DEFINE_COLORS_CODE, RULES_COLOR_GLOBAL_CODE, RULES_WIDTH_GLOBAL_CODE
These are specified by the theme. EXTRA_ROW_HEIGHT_CODE will contain the corresponding LaTeX extrarowheight command β like, for '1pt':
\setlength{\extrarowheight}{1pt}
Otherwise it will contain the empty string. And the other template variables will contain the command specified by the corresponding theme option.
Finally, some variables allow access to internal LaTeX::Table variables:
LT_NUM_COLUMNS
Contains the number of columns of the table.
LT_BOTTOM_RULE_CODE
Code that draws the rules at the bottom of the table according the theme options.
π SEE ALSO π
LaTeX::Table- The predefined templates:
LaTeX::Table::Types::Std,LaTeX::Table::Types::Ctable,LaTeX::Table::Types::Longtable,LaTeX::Table::Types::Xtab
π LICENSE AND COPYRIGHT π
Copyright (c) 2006-2010 "<limaone@cpan.org>"
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
and that's the whole page, bestie!! π this was perl v5.34.0, dated 2022-06-15, and it ate, no cap. go build something cute with it πΈπ¦β¨
π¦ where this page comes from
- debian bookworm: liblatex-table-perl 1.0.6-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: liblatex-table-perl 1.0.6-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: liblatex-table-perl 1.0.6-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms