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.
|L:||Letter||Name and address of addressee||Automatically treats return as a line break|
|R:||Return||Return address of the sender||Placed top right; treats return as line break|
|S:||Subject||Subject line above the salutation||Set bold and bigger|
|D:||Dear||Salutation to the addressee||D:John produces “Dear John”|
|Y:||Yours||Name of the sender (signatory)||Includes vertical space for a signature|
|N:||Name||Name of a second signatory||We use this for the quality reviewer|
|C:||CC||Recipient(s) of a carbon copy||Automatically treats return as a line break|
|F:||From||From address as a letter footer||Must be on a single line (no line breaks)|
|P:||Phone||Phone number as a letter footer||If present, goes at the bottom right|
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.