User Tools

Site Tools


harlowe:column

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

harlowe:column [2017/10/09 20:39] (current)
Line 1: Line 1:
 +====Column markup====
 +Column markup is, like aligner markup, a special single-line token which indicates that the subsequent text should be laid out in columns. They consist of a number of ''​%%|%%''​ marks, indicating the size of the column relative to the other columns - the total width of all columns equals the page width, and this is divided among the columns by their ''​%%|%%''​ marks. They also have a number of ''​%%=%%''​ marks surrounding it, indicating the size of the column'​s margins in CSS "​em"​ units (which are about the width of a capital M).
  
 +All text from the token onward, until the next token is encountered,​ is contained in the specified column. A ''​%%|==|%%''​ token ends the set of columns and returns the page to normal.
 +
 +Columns are currently laid out from left to right, in order of appearance.
 +
 +Any amount of [[harlowe:​whitespace|whitespace]] is permitted before or after each token, as long as it is on a single line.
 +
 +=== Example usage: ===
 +
 +<​code>​
 +|==
 +This is in the leftmost column, which has a right margin of about 2 letters wide.
 +    =|||=
 +This is in the next column, which has margins of 1 letter wide. It is three times as wide as the left column.
 + ​=====||
 +This is in the right column, which has a right margin of about 5 letters wide. It is twice as wide as the left column.
 +  |==|
 +This text is not in columns, but takes up the entire width, as usual.
 +</​code>​
 +You can create nested columns by enclosing the inner set of columns in an unnamed hook, like so:
 +
 +<​code>​
 +|==
 +This is the outer left column.
 +==|
 +This is outer right column.
 +[
 +  |==
 +This is the inner left column, inside the outer right column.
 +  ==|
 +This is the inner right column, inside the outer right column.
 +]
 +</​code>​
harlowe/column.txt ยท Last modified: 2017/10/09 20:39 (external edit)