<-    -c-    ->    

z.m.l. rule #4

formatting blocks

after the empty calories of unicode, this rule is a feast. :+) so go right ahead and sink your teeth into this one, folks!...

4a.

indents. z.m.l. makes it very easy to indent a line. to do so, just use leading spaces, as many as you want.

4b.

centering. sometimes you want to center a line of text. or right-justify it. think of the line as existing in three pieces, each preceded, separated, and terminated with a ~tab~ character, that will be left-justified, centered, and right-justified. thus,
~tab~ left-justified ~tab~ centered ~tab~ right-justified ~tab~

you don't need all 3 elements if you don't want, obviously, so if you only wanted to center the line, you would do this:

 

 

this is the text to be centered.

 

to right-justify a set of lines, such as an epigram, you'd use:

 

 

each of these two lines will be


 

right-justified.


 

4c.

tables. z.m.l. can also support simple one-level tables. you can prepare such tables in a monospaced font, making sure that every line in the table has the same number of characters. z.m.l. will recognize this, and present the table appropriately.

or, if you prefer -- and this is recommended -- you can use tabs. using this method, just separate each column of the line with tabs; there's no requirement that lines have equal numbers of characters. the z.m.l. viewer will automatically format your table on-the-fly so that it fits the user's particular window-size at display-time. this tab method will usually create tables that are better-looking.

4d.

leading white-space and the rewrapping of lines. the common element in this rule is that lines have leading whitespace, in the form of a space or a tab. because such lines are pre-formatted, they should not be rewrapped, even when the user has requested that, so this leading white-space exempts a line from being rewrapped.

this means you can use leading white-space to accomplish the purpose of preventing line (or, more often, a set of lines) from being rewrapped. let's say you have an address block, and don't want it to be rewrapped. you would just use leading spaces (one will do) to signal that fact.

michael hart
founder and visionary, project gutenberg
10,000+ free e-books, available right now
http://www.gutenberg.net
hart@pglaf.org

the presence of one-and-only-one space at the start of a line has a special meaning to the z.m.l. viewer-program, namely that -- although you do not want this block to be rewrapped -- you do want it to appear flush with the left margin, and not indented one space, as one might reasonably assume.

(yes, this means there's no way possible to indent a line one space; sorry about that, you'll just have to live with that limitation.) :+)

4e.

leading white-space and its effect on pagination. when a number of consecutive lines have leading white-space, the z.m.l. viewer-program recognizes them as a unit, or block, and will make some small accommodations to keep the unit as a block, and thus attempt to keep it together on one page.

if it is too difficult to keep the entire unit on a single screen, the program will attempt to place the pagebreak appropriately, preferably on a blank line in the block. (this would, for instance, cause a poem to pagebreak between verses.) therefore, you can help the program by using blank lines generously in such a block.