FrontPage
RecentChanges
SandBox
MessageBoard

Search
Members
Projects
Folders
Index

Preferences

Edit




NEW:






Cdml Table

From: AdvancedTextFormatting, CdmlElements


Description

With this CmdlElement tables in various designs can be created.


Example

This Table

CountryInhabitants(Mio)
Germany82.0
Austria8.0
Switzerland7.0

is generated from the following input:

[[table]
Country,Inhabitants(Mio)
Germany,82.0
Austria,8.0
Switzerland,7.0
]


Parameters

  • distance: positions the table horizontally (default: centered); e.g. [distance=30]
  • width: specifies the width of the entire table and can be given as an absolute value (number of pixels) or as percentage of the browser window (if this parameter is omitted the table gets as much space as is required); e.g. [width=300] or [width=50%]
  • titlebackground: specifies the background color of the first row (default: white); e.g. [titlebackground=#ccffcc] (see also HtmlColorCodes, CdmlColorNames)
  • textbackground: specifies the background color of the remaining rows (default: white); e.g. [textbackground=#ffffcc] (see also HtmlColorCodes, CdmlColorNames)
  • footerbackground: specifies the background color of the last row (default: white); e.g. [footerbackground=#ff6666] (see also HtmlColorCodes, CdmlColorNames)
  • linewidth: specifies the width of the border around the table and its cells ; e.g. [linewidth=1]
  • linecolor: specifies the color of the border around the table and its cells ; e.g. [linecolor=#000000] (see also HtmlColorCodes, CdmlColorNames)
  • align: aligns the text within the cells, possible values are: "l" (left), "c" (center), "r" (right) and "b" (this causes the value of the cell to be displayed as a scaled bar (value * scalefactor = width in pixels; see also parameter scalefactor). (default: left); e.g. [align=lllcrb]:
  • padding: sets the amount of space between the cellborder and its content; e.g. [padding=7]
  • type: enables additional variations; e.g. [type=invisible] makes the table invisible,which opens up particular text positioning
  • scalefactor: scales the length of the bar in cells that are displayed as bars (default: 1); e.g. [scalefactor=5.5] (see also parameter align)
  • formatseparator: defines a separator-character to enable individual cell-properties (text-alignment, spanning). This parameter has NO DEFAULT VALUE! e.g. [formatseparator=@]
    • Typical Formattings (with @ as formatseparator):
      • text@c (text is centered)
      • text@l (text is left-aligned)
      • text@r (text is right-aligned)
      • text@2c ("spans" 2 cells and centers the text)
      • text@c#lightyellow (text is centered, backgroundcolor: lightyellow)
      • text@#ffffff (backgroundcolor: white)
Note: The logic of this feature doesn't match HTML-logic, but spreadsheet-logic (spanned cells are defined, but "covered" with the contents of the main cell!

  • lineseparator: specifies the line-separator (default: "\n")
  • separator: specifies the cell-separator (default: ","); e.g. [separator=//]
  • columnwidth: a list of pixel-values to define the width of the individual columns.

More Examples

A table with bars:

CountryInhabitants(Mio)BSP/Inh 1997higher ==>
Germany82.028280
Austria8.027920
Switzerland7.043060


A table with increased padding:

CountryInhabitants(Mio)
Germany82.0
Austria8.0
Switzerland7.0


A table with broad borders:

CountryInhabitants(Mio)
Germany82.0
Austria8.0
Switzerland7.0


A table with centered columns:

CountryInhabitants(Mio)
Germany82.0
Austria8.0
Switzerland7.0


Combined cells, individual alignment and cell-colors:

Statistics
Germany82.013.5
Austria8.0(note the individual alignment of this column)
Switzerland7.07.3
Luxembourg(no values given)
Lichtenstein1.51.3


An "invisible" table:

Country  Inhabitants (Mio)
Germany  82.0
Austria  8.0
Switzerland  7.0


FolderWikiTechniques FolderWiki

 
(C) The Tolkien Wiki Community Page last changed: July 16, 2003