User:Ineuw/Sandbox2

From Wikisource
Jump to: navigation, search

Layout templates of tables styles with borders used in The Popular Science Monthly Project.[edit]

Formatting codes declared in the table header (which affects the whole table)[edit]

A tiny hint: have a look at all entries containing 'y' in column 4 in this table (i.e. just about all of them except for "wnw".)
  • mc = centers the table on page the order of values are clockwise Top, Right, Bottom and Left. (margin:0 auto 0 auto;)
  • ar|al|ac|aj = aligns the contents of all cells. Base this universal alignment by the content alignment of the majority of columns.
  • bc = border collapse. If omitted, cell borders are double .
  • bt|br|bb|bl = single line border around the table.
  • |-ac|bb = when declared on a table row indicator, aligns content with a single line bottom border of a row of cells.
  • border/border=1 = single line border of every cell.
  • sm90|lh12 = font size of 90% and the matching line height of 120%.
  • sm85|lh1 = font size of 85% and the matching line height of 100%.
  • pt.5|pb.5 = cell padding of .5em top or bottom.
  • pr1|pl1 = cell padded 1em on the right or left.
 
  • The template top row is the header for centered column titles with padding top and bottom of the cells.
  • The template second row is the first row padded on the top.
  • The template third row is no padding.
  • The template fourth row is the last table row, padded on the bottom.
 

Table layout for tables with single line borders for various font sizes, and matching line height.[edit]


{|{{ts|mc|ar|bc|bt|br|bb|bl}} <!-- border = 1 --> (standard 100% font size and matching standard line height of 140%)
{|{{ts|sm90|lh12|mc|ar|bc|bt|br|bb|bl}} <!-- border = 1 --> (90% font size and matching line height)
{|{{ts|sm85|lh1|mc|ar|bc|bt|br|bb|bl}} <!-- border = 1 --> (85% font size and matching line height)
|-{{ts|ac|bb}}
|{{ts|br|pt.5|pb.5}}|
|{{ts|br|pt.5|pb.5|pr1}}|
|{{ts|pt.5|pb.5|pr1}}|
|-
|{{ts|al|br|pt.5}}|
|{{ts|br|pt.5|pr1}}|
|{{ts|pt.5|pr1}}|
|-
|{{ts|al|br|pb.5}}|
|{{ts|br|pb.5|pr1}}|
|{{ts|pb.5|pr1}}|
|-
|}

 

Sample layout of 90% font size and 120% line height single border table[edit]

 
center table column title center table column title center table column title
left right right
left right right
left right right
 

Sample layout of 90% font size and 120% line height double border table common in the PSM project[edit]

 
center table column title center table column title center table column title
left right right
left right right
left right right