Package writer2latex.latex
Class TableFormatter
java.lang.Object
writer2latex.latex.TableFormatter
This class converts OOo table styles to LaTeX.
In OOo the table style is distributed on table, column and cell styles.
In LaTeX we have to rearrange this information slightly, so this class takes care of that.
-
Constructor Summary
ConstructorsConstructorDescriptionTableFormatter(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette, TableReader table, boolean bAllowPageBreak, boolean bIsInTable) Constructor: Create from a TableReader. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidapplyCellStyle(int nRow, int nCol, BeforeAfter ba, Context context) Get material to put before and after a table cell.voidapplyRowStyle(int nRow, BeforeAfter ba, Context context) Get material to put before a table row (background color)voidapplyTableStyle(BeforeAfter ba, BeforeAfter baAlign, boolean bInFloat) Create table environment based on table style.getInterrowMaterial(int nRow) Create interrow materialbooleanis this a colortbl?booleanis this a longtable?booleanisSimple()is this a simple table (lcr columns rather than p{})?booleanis this a supertabular?booleanis this a tabulary?
-
Constructor Details
-
TableFormatter
public TableFormatter(OfficeReader ofr, LaTeXConfig config, ConverterPalette palette, TableReader table, boolean bAllowPageBreak, boolean bIsInTable) Constructor: Create from a TableReader.
-
-
Method Details
-
appendDeclarations
-
isLongtable
public boolean isLongtable()is this a longtable? -
isSupertabular
public boolean isSupertabular()is this a supertabular? -
isTabulary
public boolean isTabulary()is this a tabulary? -
isColortbl
public boolean isColortbl()is this a colortbl? -
isSimple
public boolean isSimple()is this a simple table (lcr columns rather than p{})? -
applyTableStyle
Create table environment based on table style.
Returns eg. "\begin{longtable}{m{2cm}|m{4cm}}", "\end{longtable}".
- Parameters:
ba- theBeforeAfterto contain the table codebaAlign- theBeforeAfterto contain the alignment code, if it's separatebInFloat- true if the table should be floating
-
getInterrowMaterial
Create interrow material
-
applyRowStyle
Get material to put before a table row (background color)
-
applyCellStyle
Get material to put before and after a table cell. In case of columnspan or different borders this will contain a \multicolumn command.
-