---
name: "LaTeX::Table::Types::TypeI"
section: "3pm"
platform: "linux"
package: "liblatex-table-perl"
version: "1.0.6-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/LaTeX::Table::Types::TypeI"
---

# LaTeX::Table::Types::TypeI(3pm)

Interface for LaTeX table types.

## NAME

LaTeX::Table::Types::TypeI - Interface for LaTeX table types.

## DESCRIPTION

This is the type interface (or Moose role), that all type objects must use. LaTeX::Table delegates the LaTeX code generation to type objects. It stores all information we have in easy to use "TEMPLATE VARIABLES". LaTeX::Table ships with very flexible templates, but it is possible to use the template variables defined here to build custom templates.

## INTERFACE

- "generate\_latex\_code"

  ## TEMPLATE VARIABLES

Most options are accessible here:

- "CENTER, LEFT, RIGHT"

  Example:

  ```
    [% IF CENTER %]\centering
    [% END %]
  ```

- "ENVIRONMENT, STAR, POSITION, SIDEWAYS"

  These options for floating environments are typically used like:

  ```
    [% 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"

  The variables to build the caption command. Note that there is NO template for the `"maincaption"` option. `"CAPTION"` already includes this maincaption if specified.

- "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.

- "MAXWIDTH, FOOTTABLE"

  Currently only used by LaTeX::Table::Types::Ctable.

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 between these two template variables is resized according the `"resizebox"` option.

- "EXTRA\_ROW\_HEIGHT\_CODE, DEFINE\_COLORS\_CODE, RULES\_COLOR\_GLOBAL\_CODE, RULES\_WIDTH\_GLOBAL\_CODE"

  Specified by the theme. `"EXTRA_ROW_HEIGHT_CODE"` will contain the corresponding LaTeX extrarowheight command, e.g for '1pt':

  ```
      \setlength{\extrarowheight}{1pt}
  ```

  Otherwise it will contain the empty string. 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.
