Folding
Also known as: Mailing Folds, Envelope Folds
Code Used: [foldsN~X]
Keystroke: (none)
See also: The Initial Style (See Template Tip)
What does it do?
It produces one (or optionally two) blank lines where the user wishes to fold a document. A "fold mark" in the form of a row of dots, such as dots 2 & 5, can also be embossed to aid folding.
Usage in DBT:
The [folds] code accepts several optional numeric parameters and an optional string parameter. If no numeric parameters are given, [folds] will generate two fold lines. If the page cannot be divided evenly into three sections, then the larger sections will be toward the bottom of the page (ie, on a 25-line page, the folds will be placed on lines 8 and 17).
The first optional numeric parameter N gives the number of fold lines. I.E. [folds1] would give only one fold line. It should also bias larger sections to the bottom of the page (ie, [folds1] on a 26-line page should place the fold on line 13). If three fold lines are to be included and there are to be two large sections and two small sections, then the large sections will be placed in the center of the page.
The second parameter X lists the size of each group of fold lines. Normally, this would be 1. Placing a 2 here would generate two lines for each fold. i.e. [folds2:2] on a 25-line page would leave blank (or dotted) lines on lines 7, 8, 16, and 17.
Any other numeric parameters, if given, specify the lines on which folds will start. This allows users to override the default algorithm. The user should either specify the position of all fold lines or specify none.
A string parameter, if given, causes a dotted line. If one character is given, then all folds will be dotted with the Braille character specified, the dots corresponding to Computer Braille. E.g. [folds~3] causes two fold lines of dots 2-5. If more than one character is given, then they are assumed to specify the characters for each fold line. [folds~-c] would make a row of dots 3-6 on the first fold and a row of dots 1-4 on the second fold.
If you are creating a Template for Letters and such like which you would normally fold, this code may be included in the "initial" Style of your Template.