Document: ezcDocumentDocbookToRstTableHandler
[ ]
[ Conversion ] [ Styles ]
[ ]
[ ]
[ ]
[ ]
Class: ezcDocumentDocbookToRstTableHandler
|
Visit tables [
source]
The RST table rendering algorithm tries losely to fit a table in the provided document dimensions. This may not always work for over long words, or if the table cells contain literal blocks which can not be wrapped.
For this the algorithm estiamtes the available width per column, equally distributes this available width over all columns (which might be far from optimal), and extends the total table width if some cell content exceeds the column width.
The initial table cell estiation happens inside the function estimateColumnWidths() which you might want to extend to fit your needs better.
Parents
ezcDocumentElementVisitorHandler
|
--ezcDocumentDocbookToRstBaseHandler
|
--ezcDocumentDocbookToRstTableHandler
Method Summary
|
protected array |
estimateColumnWidths(
$converter, $table )
Estimation of table column widths |
|
protected int |
getMaxLineLength(
$lines )
Get maximum line length |
|
public mixed |
handle(
$converter, $node, $root )
Handle a node |
Inherited Methods
From
ezcDocumentDocbookToRstBaseHandler :
From
ezcDocumentElementVisitorHandler :
Methods
estimateColumnWidths
Estimation of table column widths
Returns an spoecification array with the column widths for the tables, which will be generated by this class. The array should contain as many values as the table contains columns, each specifying the width of the respective column.
This basic implementation just divides the document width (specified by the wordwrap option in the converter class) by the amount of columns found in the given table. This might be far from optimal.
Parameters
getMaxLineLength
int getMaxLineLength(
$lines )
Get maximum line length
Calculate the maximum line length from an array of textual lines.
Parameters
| Name |
Type |
Description |
$lines |
array |
|
handle
Handle a node
Handle / transform a given node, and return the result of the conversion.
Parameters
Redefinition of
Last updated: Tue, 01 Sep 2009