Up: Component summary Component

CSV2Latex

Converts the given comma separated value file to a LaTeX table. Table is generated into a separated fragment that is included into a host document that may be used as a default template for it. The table fragment may be used within other documents as well. LaTeX label for the table is table:instanceName, where the instanceName refers to the name of the pipeline component used in the network configurations.

Some columns may represent hyperlinks to external resources. The links are constructed based on the refs input. The file has three columns: URL, refCol, and valueCol. URL is an URL, which has $ID$ tag in place of the reference id. The reference itself has been taken from the refCol column. Visible name of the link is taken from the valueCol column, which also indicates the target column for the reference declaration. You may create links to the document labels by starting your URL with 'latex:'. Special targets for the hyperlinks can be established with the URL prefix 'anchor:'. References to these targets can be constructed using prefix 'link:tablecell.'. Similar hyperlink targets of other categories may be referred by omitting 'tablecell.' part of the prefex and by replacing that with the correct anchor category.

Character escapes available for the listDelim parameter are explained in the description of the CSVCleaner component.

Version 2.3
Bundle tools
Categories Convert Latex
Authors Marko Laakso (Marko.Laakso@Helsinki.FI)
Issue tracker View/Report issues
Source files component.xml
Usage Example with default values

Inputs

Name Type Mandatory Description
tabledata CSV Mandatory Table content
refs CSV Optional Reference rules for the hyperlinks

Outputs

Name Type Description
report Latex LaTeX representation for the given data.

Parameters

Name Type Default Description
attach boolean false Include the original data as an attachment
caption string "" Caption text for the table.
colFormat string "center" LaTeX tabular format for the columns. Special values of 'center', 'left' and 'right' may be used to produce the corresponding uniform alignments of all columns.
columns string "" Comma separated list of column selections for the output. The empty default will use all columns.
countRows boolean false Include a row count to the table caption.
dropMissing boolean true This flag can be turned off in order to generate links with missing texts. Link text are substituted with target identifiers.
evenColor string "0.96,0.96,0.96" Background color for the even rows. Comma separated list of red, green, and blue intensities [0,1]. Special value of '1,1,1' refers to the default background.
hRotate boolean false Use vertical column names
listCols string "" Comma separated list of column names. Columns of this list may contain several values separated with commas and the delimiters will be replaced with list delimiters.
listDelim string ",\s" Delimiting strings between the values of list valued cell contents
numberFormat string "" A comma separated list of decimal formats for the columns. Each entry consists of the column name and the Java DecimalFormal pattern separated with equal sign. For example, rounding to three decimals can be done like: myColumn=#0.000. A special keyword of 'RAW_LATEX' may be used to show input values as such without any escaping of formatting.
pageBreak boolean false Use clear page after the table.
rename string "" Comma separated list of column renaming rules (oldname=newname). New names are used in table header but they do not affect the other behaviour of this component.
ruler string "{}" Latex command for the row separating rulers
section string "" Section title for the table container or an empty string if no section should be generated.
sectionType string "subsection" Type of LaTeX section: usually one of: section, subsection, or subsubsection. No section statement is written if section title is empty.
skipEmpty boolean false This flag can be used to replace empty tables with a simple LaTeX comment.

Test cases

Test case Parameters IN
tabledata
IN
refs
OUT
report
case1 properties tabledata (missing) report

columns = Sample,name,foo,value,name,value,latex,
caption = This is the caption.,
section = My subsection,
pageBreak = true,
numberFormat = value=#0.000,latex=RAW_LATEX,
evenColor = 1,1,1

case2 properties tabledata refs report

columns = Sample,name,value,
numberFormat = value=#0.000,
colFormat = lp{4cm}r,
attach = true,
evenColor = 0.9,0.9,0.9

case3 properties tabledata refs report

listCols = name,value,

case4 properties tabledata (missing) report

skipEmpty = true,


Generated 2018-12-11 07:42:06 by Anduril 2.0.0