New markup rules for letters
Wikipublisher provides a set of markup rules to simplify the task of writing and typesetting letters. These rules identify the various parts of a letter, so that the typesetting engine can lay out the pages correctly. The page Site.Letter Form is a skeleton letter and can be used as a template for creating new letters. The markup rules are start-of-line markup in the form “<letter>colon” — like Q: and A: (question and answer) markup. The Letter markup lists the possible markup values.
Each markup rule occurs once; L: S: D: and Y: are required, the rest are optional. Normally, a writer will specify either a Return address (R:) or a From address (F:) and Phone number (P:). If the writer gives a Return address, the From address and Phone number are suppressed in the pdf. The “return=off” typesetting option suppresses R:, F:, and P: markup, producing a pdf suitable for printing onto pre-printed letterhead.
The Y: markup automatically inserts “Yours sincerely”. The N: markup has 3 variants — N: adds no additional text; NQ: adds “Quality review”; and NA: adds “Accepted and agreed”. These strings can all be customised. For example:
Accepted and agreed:
When typesetting a letter, Wikipublisher looks for $Group.LetterHead, then Site.LetterHead. These pages may define shared L: (addressee), R: (return address), F: (one line from address) and P: (phone number) values. This lets a site administrator define return address information (F: and P:) once and share it across all letters. L:, R:, F:, and P: values defined in an individual letter over-ride the shared values. If present, a $Group.LetterHead page is used and the Site.LetterHead page is ignored. You might set up a $Group.LetterHead page if all (or most of) the letters in a group are to the same person.
The Welcome Letter page illustrates use of the letter markup. Notice how the letter markup rules automatically turn line breaks on and off, so that normal PmWiki and html text wrapping does not interfere with addresses. The example uses F: and P: rather than R: for the sender details. The (:typeset-letter:) directive (included in Site.Letter Form) tells the typesetting engine to use the letter template for printing. The letter typesetting template supports one level of heading only.