latex_table library

A Dart library to parse an object structure to LaTeX source code for a simple table.

The object structure can be easily generated programmatically.

Features:

  • Supports left aligned, right aligned and centered columns.
  • Generates LaTeX sources for a scientific table: If the first row is rule, it is converted to a \toprule. If the last row is a rule it is converted to a \bottomrule. Every other rule is converted to a \midrule.
  • Supports a special table field for values ​​with currency specifications in Euros.
  • Returns an error if the LaTeX parser won't compile the LaTeX source,
  • Returns warnings if the number of columns differs from the number of fields in a data row.
  • And last but not least: Columns are nicely aligned :)

If you need any feature please contact me.

Classes

AnalyzeResult
Internal record
CenteredColumn
This represents a column which content is centered.
ColumnDefinition
The definition of one column.
DataRow
A row of table data or header.
Error
This is returned when a parameter is not valid.
EuroField
This Field is for currency values in Euro.
Field
This contains a table datum or header.
LeftAlignedColumn
This represents a column which content is aligned to the left.
Result
A result of a function which can be a Success or an Error.
RightAlignedColumn
This represents a column which content is aligned to the right.
Row
This represents a row in the table.
Rule
The horizontal line in a scientific table.
Success
This is returned when functions are executed correctly.
Table
The starting point of the structure that will be converted.

Functions

parseTable(Table table) Result
API function to transfer a Table into the latex source code of a table.