Changes

Jump to navigation Jump to search
401 bytes added ,  08:18, 1 July 2022
m
fix pragma links & typos
* Netherlands
* France
* AmericaUSA
The predefined styles are loaded from external files with the <{{cmd>|useletterstyle</cmd> }} command, in the past these files had names in the form <style>.nls. The name system has changed and personal styles have to follow the form “letter-<style>.tex”, you could also use “mkiv” and “mkii” as extensions.
To load the style you need only the <style> part as argument for the command because the “letter-” part is always added. It doesn't matter if you use .tex or .mkiv as file extension because the file is found in either case.
The letter environment has only optional arguments which acts like a local
version of <{{cmd>|setupletter</cmd> }} where the values are only used in the environment.
When you use your document only for a single letter without anything else
you can even drop <{{cmd>|starttext</cmd> }} and <{{cmd>|stoptext</cmd>}}, because this is handled by <{{cmd>|startletter</cmd>}}and <{{cmd>|stopletter</cmd>}}.
== Setup ==
Previously there has been only the <{{cmd>|setupletterstyle</cmd> }} command to change the values of the elements, now the various types of elements have dedicated commands.
The “layers” (which are used for the “head”, “address” or “reference line”) are configured with <{{cmd>|setupletterlayer</cmd> }} and <{{cmd>|setupletterframe</cmd> }} command, the first is used to move the layer to its position on the page with the “x” and “y” keys and you can select one letter elements (which are created with <{{cmd>|defineletterelement</cmd>}}) with the “alternative” key. With <{{cmd>|setupletterframe</cmd> }} you can change the “width” and “height” of the element.
Thus, for example, the following will produce a small, sans serif header, 10pt from the bottom of the page and centered.
The “sections” (which are used for the “subject” and “content”) are configured with <{{cmd>|setuplettersection</cmd> }} which allows you to change the alignment and spacing before and after the element.
Global settings like the bodyfont, whitespace or language can be changed with <{{cmd>|setuplettersoptions</cmd>}}.
The old <{{cmd>|setupletterstyle</cmd> }} command had been reduced to change the style and color for the variables which are set with <{{cmd>|setupletter</cmd> }} (or <{{cmd>|startletter</cmd>}}), e.g. you can say <tt>\setupletter[date][textstyle=bold,color=red]</tt> to change the layout of the date in the reference line.
A complete list with all values for the various commands can be seen in the following document: [http://bitbucket.org/wolfs/correspondence/downloads/commands.pdf commands.pdf]
* '''(default)''' title, subject, opening, content, closing, appendices
* '''(block style layouts)''' head, date, reference, specialnotation, address
 
=== Changing the order of elements ===
 
The order of elements can be changed using {{cmd|setupletterelements}}. For example, to place the subject after the opening (as is standard in Britain), use the following:
 
\setupletterelements
[section]
[title,
opening,
subject,
content,
closing,
appendices]
 
=== \defineletterelement ===
One limitation of the old module was that element names had been shared between layers and section (i.e. it was impossible to have a layer and a section with the same name). This limitation was removed and it’s now possible to layers and sections with the same name but to handle this the <{{cmd>|defineletterlement</cmd> }} command needed a additional argument. The syntax for the command is now
\defineletterelement[<type>][<element>][<name>]{<content>}
=== \startsetups ===
The old version used <tt>\startsetups</tt> for the content of the elements. With the current version all internals use now <{{cmd>|letterelement</cmd> }} but there is a method to feed them with the <{{cmd>|startsetups</cmd> }} argument, all you need is <tt>\setupletteroptions[option=setups]</tt> in your document. Nevertheless also the names for <{{cmd>|startsetups</cmd> }} have been changed to follow the unique named mentioned above and the old name “letter:location” is now “letter:layer:location”.
=== Layout ===
The layout of the letter environment can be changed with <{{cmd>|setupletterlayout</cmd>}}, it is possible to use a different layout for the first (<tt>firstpage</tt>) and the following (<tt>secondpage</tt>) pages, but starting from the second page one can also set different value for left (<tt>leftpage</tt>) and right (<tt>rightpage</tt>) pages.
=== Variables/Labels ===
There is only one way to set values for the letter variables, this is <{{cmd>|setupletter</cmd>}}
with it’s keyval syntax, e.g. <tt>\setupletter[name=…,address=…]</tt>.
(<tt>\setlettervalue</tt> from the previous version is gone and won’t come back.)
To change the labels in the reference line for the “Date” string, you have
to use <{{cmd>|setuplettertext</cmd>}}, a special version of <{{cmd>|setuplabeltext</cmd> }} only
for the letter module.
It is possible to change the default input method to the one used by Hans
Hagen in the m-letter module or Donald Knuths Knuth’s letter style in the TeXbook.
* http://bitbucket.org/wolfs/correspondence/downloads/commands.pdf
The manual for the module was included in some versions of the package and is available from:
* http://bitbucket.org/wolfs/correspondence/downloads/correspondence.pdf
phone={+31 (0)38 477\,53\,69},
mobile={+31 (0)38 477\,53\,69},
email={hh@pragma-ade.comnl}, web={www.pragma-ade.comnl},
skype={whoknows}
]
\stopletter
 
 
[[Category:Basics]]
[[Category:Tools]]
[[Category:Layout]]
[[Category:Sample documents]]
[[Category:Modules]]

Navigation menu