\startcomponent correspondence-letter-examples

\environment correspondence-environment



% short example for single page layouts

\startbuffer[example:content]

\setupletter
  [fromname={John Simmons},
   fromaddress={Parkstreet 12\\8257 Green Bay}]

\setupletter
  [toname={Steve Wilson},
   toaddress={Nightstreet 4a\\9183 Cotton Village}]

\startletter
  [opening={Dear Mr Wilson,},
   subject={Brand new templates for Word},
   closing={Best regards},
   signature={John Simmons}]

\input knuth\par

\stopletter

\stopbuffer

% long example for double page examples (included in running text)

\startbuffer[example:long]

\setupletterstyle[option][backgroundcolor=,before=]

\setupletter
  [fromname={John Simmons},
   fromaddress={Parkstreet 12\\8257 Green Bay}]

\setupletter
  [toname={Steve Wilson},
   toaddress={Nightstreet 4a\\9183 Cotton Village}]

\startletter
  [opening={Dear Mr Wilson,},
   subject={Brand new templates for Word},
   closing={Best regards},
   signature={John Simmons}]

\dorecurse{4}{\input knuth\par}

\stopletter

\stopbuffer



% general text about the example

\chapter{Letter Examples}

The letter module consits not only of just the main module, it contains also a few already defined styles for different countries and each of them use slightly different position for the layers and other setups.

This section will give you a overview of all included styles you could use with the module without the need to write your own style.



% DIN 676 B

\start

\getbuffer[example:content]

\stop

\startexamplecontent[dinb]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:dinb]{DIN 676 B}\index{DIN 676 B}

The letter style \filename{dinb} is the default style for the module and is used if nothing else is specified by the user.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[dinb][1]}{First page}
     {\examplecontent[dinb][2]}{Second page}
   \stopcombination}



% DIN 676 A

\start

\useletterstyle[dina]

\getbuffer[example:content]

\stop

\startexamplecontent[dina]

\useletterstyle[dina]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:dina]{DIN 676 A}\index{DIN 676 A}

The second style \filename{dina} follows the same rules as the style \filename{dinb} but all fields shifted by the same value upwards to give you more space for the lettercontent.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[dina][1]}{First page}
     {\examplecontent[dina][2]}{Second page}
   \stopcombination}



% NEN 1026

\start

\useletterstyle[dutch]

\getbuffer[example:content]

\stop

\startexamplecontent[dutch]

\useletterstyle[dutch]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:dutch]{NEN 1026}\index{NEN 1026}

The third style supported by the letter module is for dutch letters, the name of the style is called \filename{dutch}. The values and examples for the style are provided by Willi Egger.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[dutch][1]}{First page}
     {\examplecontent[dutch][2]}{Second page}
   \stopcombination}



% French style

\start

\useletterstyle[french]

\setupletterstyle[indenting={yes,1cm}]

\getbuffer[example:content]

\stop

\startexamplecontent[french]

\useletterstyle[french]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:french]{French}

The french style is based on values given to me by Olivier Guéry.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[french][1]}{First page}
     {\examplecontent[french][2]}{Second page}
   \stopcombination}



% Full block

\start

\useletterstyle[fullblock]

\getbuffer[example:content]

\stop

\startexamplecontent[fullblock]

\useletterstyle[fullblock]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:fullblock]{Full-block Style}\index{Full-block}

The full-block format is the simplest of all six blockstyle formats.
Every part of the letter starts at the left margin with a blank line between
each part.

The order of the parts is date, inside address, attention line, salutation,
subject line, body, complimentary close, signature and additional information.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[fullblock][1]}{First page}
     {\examplecontent[fullblock][2]}{Second page}
   \stopcombination}



% Modified

\start

\useletterstyle[modified]

\getbuffer[example:content]

\stop

\startexamplecontent[modified]

\useletterstyle[modified]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:modified]{Modified Block Style}\index{Modified}

The modified style has the same layout as the full-block style but the date,
signature and closing moved to the right, which allows them to stand.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[modified][1]}{First page}
     {\examplecontent[modified][2]}{Second page}
   \stopcombination}



% Semiblock

\start

\useletterstyle[semiblock]

\getbuffer[example:content]

\stop

\startexamplecontent[semiblock]

\useletterstyle[semiblock]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:semiblock]{Semiblock Style}\index{Semiblock}

The semiblock style is the format most people recognize as business letter.

The layout is the same as in the modified style. Paragraphs are intended
by five spaces\footnote{The semiblock letter style use the \type{medium}
value for \type{\setupindenting} to indent the paragraphs.}.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[semiblock][1]}{First page}
     {\examplecontent[semiblock][2]}{Second page}
   \stopcombination}



% Simplified

\start

\useletterstyle[simplified]

\getbuffer[example:content]

\stop

\startexamplecontent[simplified]

\useletterstyle[simplified]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:simplified]{Simplified Style}\index{Simplified}

The simplified style is used when you don't know the name of the person
you're writing to or when you write to a company.

It contains no title, salutation or complimentary closing. The main focus
is the body of the letter.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[simplified][1]}{First page}
     {\examplecontent[simplified][2]}{Second page}
   \stopcombination}



% Hanging style

\start

\useletterstyle[hanging]

\getbuffer[example:content]

\stop

\startexamplecontent[hanging]

\useletterstyle[hanging]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:hanging]{Hanging indented Style}\index{Hanging}

The hanging indented format is seldom used. It's main advantage
is that it calls attention to the body and each paragraph.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[hanging][1]}{First page}
     {\examplecontent[hanging][2]}{Second page}
   \stopcombination}



% Memorandum

\start

\useletterstyle[memo]

\getbuffer[example:content]

\stop

\startexamplecontent[memo]

\useletterstyle[memo]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:memo]{Memo Style}\index{Memo}

The memo style used primarily for interoffice communication. The top of
the memo indicates the date, the name of the recipient, the name of the
sender and the subject.

The abbreviation \quotation{RE} is sometimes used instead of \quotation{Subject}.

A signature and additional information are optional. The signature is placed
near the center with the additional information at the left margin.

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[memo][1]}{First page}
     {\examplecontent[memo][2]}{Second page}
   \stopcombination}



% English style

\starthiding

\start

\useletterstyle[english]

\getbuffer[example:content]

\stop

\startexamplecontent[english]

\useletterstyle[english]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:english]{English Style}

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[english][1]}{First page}
     {\examplecontent[english][2]}{Second page}
   \stopcombination}

\stophiding



% Swiss style

\start

\useletterstyle[swiss]

\getbuffer[example:content]

\stop

\startexamplecontent[swiss]

\useletterstyle[swiss]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:swiss]{Swiss Style A}

\startframedtext[width=\textwidth,framecolor=red,align=middle,corner=00]
The layout of this style is not finished, if you want to use it give
me information about the correct margins and position of the elements.
\stopframedtext

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[swiss][1]}{First page}
     {\examplecontent[swiss][2]}{Second page}
   \stopcombination}



% Swiss left style

\start

\useletterstyle[swissleft]

\getbuffer[example:content]

\stop

\startexamplecontent[swissleft]

\useletterstyle[swissleft]

\getbuffer[example:long]

\stopexamplecontent

\section[letter:example:swissleft]{Swiss Style B}

\startframedtext[width=\textwidth,framecolor=red,align=middle,corner=00]
The layout of this style is not finished, if you want to use it give
me information about the correct margins and position of the elements.
\stopframedtext

\placefigure
  [force,none]
  {}
  {\startcombination
     {\examplecontent[swissleft][1]}{First page}
     {\examplecontent[swissleft][2]}{Second page}
   \stopcombination}

\stopcomponent
