%D \module
%D   [       file=memo,
%D        version=2009.09.21,
%D          title=\CONTEXT\ Letter Style,
%D       subtitle=Memo style,
%D         author=Wolfgang Schuster,
%D           date=\currentdate,
%D      copyright=Wolfgang Schuster,
%D          email=schuster.wolfgang@googlemail.com,
%D        license=Public Domain]

\unprotect

\useletterstyle[blockstyle]

\def\letter!order!sections
  {\v!date\v!line,\v!reference\v!line,\v!inside\v!address,
   \v!letter\v!head,\v!special\v!notation,\v!title,
   \v!opening,\v!subject,\v!content,\v!closing,\v!appendices}

\setupletterstyle
  [\v!letter\v!head,\v!reference\v!line,
   \v!special\v!notation,\v!inside\v!address,
   \v!title,\v!subject]
  [\c!before={\blank[\v!nowhite]},
   \c!after={\blank[\v!nowhite]}]

\setupletterstyle
  [\v!subject,\v!content,\v!closing]
  [\c!after={\blank[\v!line]}]

\setupletterstyle
  [\v!closing]
  [\c!leftmargin=.5\textwidth]

\setupletterstyle
  [\v!firstpage,\v!secondpage]
  [\c!backspace=1in,
   \c!width=\v!middle,
   \c!topspace=1in,
   \c!header=0in,
   \c!footer=0in,
   \c!height=\v!fit]

\setupletterstyle
  [\v!option]
  [\c!whitespace=\v!line,
   \c!opening=\v!no,
   \c!reference\c!line=\v!no,
   \v!special\v!notation=\v!no,
   \c!title=\v!no]

\startsetups[\v!letter:\v!date\v!line]
\labeltext{\v!memo:\c!date}\lettervalue\c!date
\stopsetups

\startsetups[\v!letter:\v!letter\v!head]
\let\\\crlf
\labeltext{\v!memo:\c!fromname}\lettervalue\c!fromname
\stopsetups

\startsetups[\v!letter:\v!inside\v!address]
\let\\\crlf
\labeltext{\v!memo:\c!toname}\lettervalue\c!toname
\stopsetups

\startsetups[\v!letter:subject]
\let\\\crlf
\labeltext{\v!memo:\c!subject}\lettervalue\c!subject
\stopsetups

\protect \endinput
