summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorDr. Clea F. Rees <cfrees@imapmail.org>2008-12-03 00:34:39 +0000
committerDr. Clea F. Rees <cfrees@imapmail.org>2008-12-03 00:34:39 +0000
commit0af99b8d02ea723532ea219c1a18eccb9c0c48fb (patch)
treee535d247772cfbe0ec55fea33930d219e47d4aa6 /Master
parentab6df1620f622872e6d637d9be252c096d3a5ee2 (diff)
context-letter 2008/12/03
git-svn-id: svn://tug.org/texlive/trunk@11503 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/tex/context/third/letter/base/t-correspondence.tex353
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/t-letter.tex478
-rwxr-xr-xMaster/texmf-dist/tex/context/third/letter/base/t-resume.tex402
-rw-r--r--Master/texmf-dist/tex/context/third/letter/extension/addrentry.nle10
-rw-r--r--Master/texmf-dist/tex/context/third/letter/extension/corres.nle14
-rw-r--r--Master/texmf-dist/tex/context/third/letter/interface/default.nli161
-rwxr-xr-xMaster/texmf-dist/tex/context/third/letter/interface/default.nri29
-rw-r--r--Master/texmf-dist/tex/context/third/letter/interface/knuth.nli16
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/blockstyle.nls14
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/default.nls8
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/fullblock.nls6
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/hanging.nls10
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/knuth.nls8
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/memo.nls10
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/modified.nls10
15 files changed, 968 insertions, 561 deletions
diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex
new file mode 100755
index 00000000000..259fdde782f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex
@@ -0,0 +1,353 @@
+%D \module
+%D [ file=t-correspondence,
+%D version=2008.11.30,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Correspondence,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D email=schuster.wolfgang@googlemail.com,
+%D license=Public Domain]
+
+\writestatus{loading}{Context User Module / Correspondence}
+
+\unprotect
+
+%D I use a few extra constants and variables in my module.
+
+\startinterface all
+ \setinterfaceconstant {head} {head}
+ \setinterfaceconstant {foot} {foot}
+ \setinterfaceconstant {topmark} {topmark}
+ \setinterfaceconstant {botmark} {botmark}
+ \setinterfaceconstant {cutmark} {cutmark}
+ \setinterfaceconstant {endmark} {endmark}
+ \setinterfaceconstant {usermark} {usermark}
+ \setinterfaceconstant {foldmark} {foldmark}
+ \setinterfaceconstant {extension} {extension}
+ \setinterfaceconstant {interface} {interface}
+ \setinterfaceconstant {backgroundimage} {backgroundimage}
+ \setinterfaceconstant {whitespace} {whitespace}
+ \setinterfaceconstant {nexthead} {nexthead}
+ \setinterfaceconstant {nextfoot} {nextfoot}
+\stopinterface
+
+\startinterface all
+ \setinterfacevariable {secondpage} {secondpage}
+ \setinterfacevariable {foot} {foot}
+ \setinterfacevariable {topmark} {topmark}
+ \setinterfacevariable {botmark} {botmark}
+ \setinterfacevariable {cutmark} {cutmark}
+ \setinterfacevariable {endmark} {endmark}
+ \setinterfacevariable {option} {option}
+ \setinterfacevariable {foldmark} {foldmark}
+ \setinterfacevariable {usermark} {usermark}
+ \setinterfacevariable {layer} {layer}
+ \setinterfacevariable {nexthead} {nexthead}
+ \setinterfacevariable {nextfoot} {nextfoot}
+ \setinterfacevariable {layout} {layout}
+ \setinterfacevariable {place} {place}
+ \setinterfacevariable {initialize} {initialize}
+ \setinterfacevariable {finish} {finish}
+ \setinterfacevariable {sequence} {sequence}
+ \setinterfacevariable {style} {style}
+ \setinterfacevariable {extension} {extension}
+ \setinterfacevariable {interface} {interface}
+\stopinterface
+
+\startinterface all
+ \setinterfaceelement {set} {set}
+ \setinterfaceelement {value} {value}
+ \setinterfaceelement {complex} {complex}
+ \setinterfaceelement {simple} {simple}
+ \setinterfaceelement {use} {use}
+ \setinterfaceelement {define} {define}
+ \setinterfaceelement {flush} {flush}
+\stopinterface
+
+%D Value list
+
+\ifx\appendtovaluelist\undefined
+
+\def\appendtovaluelist#1%
+ {\ifcsname#1\endcsname
+ \@EA\ifx\csname#1\endcsname\empty
+ \@EA\noappendtovaluelist\csname#1\@EAEAEA\endcsname
+ \else
+ \@EA\doappendtovaluelist\csname#1\@EAEAEA\endcsname
+ \fi
+ \else
+ \@EA\noappendtovaluelist\csname#1\@EA\endcsname
+ \fi}
+
+\def\doappendtovaluelist#1#2{\@EA\def\@EA#1\@EA{#1,#2}}
+\def\noappendtovaluelist#1#2{\def#1{#2}}
+
+\fi
+
+%D Setup command for the styles
+
+\def\definecorrespondencesetup[#1][#2][#3]%
+ {\setvalue{\e!setup#1\e!endsetup}{\doquintupleempty\dosetupcorrespondencestyle[#2][#3]}}
+
+\def\dosetupcorrespondencestyle[#1][#2][#3][#4][#5]%
+ {\iffifthargument
+ \dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]%
+ \else\iffourthargument
+ \dodosetupcorrespondencestyle[#1][#2][#3][#4]%
+ \else
+ \dosetupcorrespondenceoption[][#2][\v!option][#3]%
+ \fi\fi}
+
+\def\dodosetupcorrespondencestyle[#1][#2][#3][#4]%
+ {\def\dododosetupcorrespondencestyle##1%
+ {\csname dosetupcorrespondence\ifcsname#1:#2:##1\endcsname
+ \csname#1:#2:##1\endcsname
+ \else
+ \v!option
+ \fi\endcsname[#1][#2][##1][#4]}%
+ \processcommalist[#3]\dododosetupcorrespondencestyle}
+
+\def\dosetupcorrespondenceoption[#1][#2][#3][#4]%
+ {\getparameters[#2#3][#4]}
+
+\def\dosetupcorrespondencelayout[#1][#2][#3][#4]%
+ {\definelayout[#1#3][#4]}
+
+\def\dosetupcorrespondencelayer[#1][#2][#3][#4]%
+ {\dodosetupcorrespondencelayer[#1][#2][#3][\v!layer,\v!frame,\v!option][#4]}
+
+\def\dosetupcorrespondencesection[#1][#2][#3][#4]%
+ {\getparameters[#2#3][#4]}
+
+\def\dosetupcorrespondencedescription[#1][#2][#3][#4]%
+ {\setupdescriptions[#2#3][#4]}
+
+\def\dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]%
+ {\def\dododosetupcorrespondencelayer##1%
+ {\ifcsname dosetupcorrespondencelayer##1\endcsname
+ \@EA\@EA\csname dosetupcorrespondencelayer##1\endcsname
+ \else
+ \@EA\@EA\csname dosetupcorrespondencelayer\v!option\endcsname
+ \fi[#1][#2][#3][#5]}%
+ \processcommalist[#4]\dododosetupcorrespondencelayer}
+
+\def\dosetupcorrespondencelayerlayer[#1][#2][#3][#4]%
+ {\setuplayer[#1:#3][#4]%
+ \getparameters[#2#3\v!layer][#4]}
+
+\def\dosetupcorrespondencelayerframe[#1][#2][#3][#4]%
+ {\getparameters[#2#3\v!frame][#4]}
+
+\def\dosetupcorrespondencelayeroption[#1][#2][#3][#4]%
+ {\getparameters[#2#3][#4]}
+
+%D Setup command for the values
+
+\def\definecorrespondencevalue
+ {\dodoubleargument\dodefinecorrespondencevalue}
+
+\def\dodefinecorrespondencevalue[#1][#2]%
+ {\setvalue{\e!setup#1\e!endsetup}{\dotripleempty\docorrespondencesetup[#2]}%
+ \@EA\definecomplexorsimple\csname\e!set#1\e!value\endcsname
+ \setvalue{\e!complex\e!set#1\e!value}[##1]##2{\setvalue{#2##1}{##2}}%
+ \setvalue{\e!simple \e!set#1\e!value}##1##2{\setvalue{#2##1}{##2}}}
+
+\def\docorrespondencesetup[#1][#2][#3]%
+ {\doifelsenothing{#3}
+ {\getparameters[#1][#2]}
+ {\def\dodocorrespondencesetup##1%
+ {\getparameters[#1##1][#3]}%
+ \processcommalist[#2]\dodocorrespondencesetup}}
+
+%D Tests
+
+\long\def\doifcorrespondencevalue#1#2%
+ {\ifcsname#1#2\endcsname
+ \edef\!!stringa{\csname#1#2\endcsname}%
+ \ifx\!!stringa\empty
+ \@EAEAEA\gobbleoneargument
+ \else
+ \@EAEAEA\firstofoneargument
+ \fi
+ \else
+ \@EA\gobbleoneargument
+ \fi}
+
+\long\def\doifelsecorrespondencevalue#1#2%
+ {\ifcsname#1#2\endcsname
+ \edef\!!stringa{\csname#1#2\endcsname}%
+ \ifx\!!stringa\empty
+ \@EAEAEA\secondoftwoarguments
+ \else
+ \@EAEAEA\firstoftwoarguments
+ \fi
+ \else
+ \@EA\secondoftwoarguments
+ \fi}
+
+\long\def\doifcorrespondencestylevalue#1#2#3%
+ {\ifcsname#1#2#3\endcsname
+ \edef\!!stringa{\csname#1#2#3\endcsname}%
+ \ifx\!!stringa\empty
+ \@EAEAEA\gobbleoneargument
+ \else
+ \@EAEAEA\firstofoneargument
+ \fi
+ \else
+ \@EA\firstofoneargument
+ \fi}
+
+\long\def\doifelsecorrespondencestylevalue#1#2#3%
+ {\ifcsname#1#2#3\endcsname
+ \edef\!!stringa{\csname#1#2#3\endcsname}%
+ \ifx\!!stringa\empty
+ \@EAEAEA\secondoftwoarguments
+ \else
+ \@EAEAEA\firstoftwoarguments
+ \fi
+ \else
+ \@EA\secondoftwoarguments
+ \fi}
+
+\def\correspondencestylevalue#1#2#3%
+ {\csname#1#2#3\endcsname}
+
+%D External files
+
+\def\definecorrespondencefile[#1][#2]%
+ {\setvalue{\e!use#1}[##1]{\usecorrespondencefile[#2][##1]}}
+
+\def\usecorrespondencefile[#1][#2]%
+ {\def\dousecorrespondencefile##1%
+ {\readfile{##1.#1}\donothing\donothing}%
+ \processcommacommand[#2]\dousecorrespondencefile}
+
+%D Layers
+
+\def\letter!list!marking
+ {\v!topmark,\v!botmark,\v!cutmark,\v!endmark,\v!usermark}
+
+\def\definecorrespondencelayer[#1][#2]%
+ {\setvalue{\s!do\e!define#1\v!layer}{\dodefinecorrespondencelayer[#1][#2]}%
+ \setvalue{\s!do\e!set #1\v!layer}{\dosetcorrespondencelayer [#1][#2]}}
+
+\def\dodefinecorrespondencelayer[#1][#2][#3]%
+ {\ExpandSecondAfter\doifelse{#3}\v!foldmark
+ {\def\dodododefinecorrespondencelayer##1{\dododefinecorrespondencelayer[#1][#2][##1]}%
+ \processcommacommand[\csname#1!list!marking\endcsname]\dodododefinecorrespondencelayer}
+ {\dododefinecorrespondencelayer[#1][#2][#3]}}
+
+\def\dododefinecorrespondencelayer[#1][#2][#3]%
+ {\setvalue{#2\v!option#3}{\v!yes}%
+ \doifundefined{#1:#2:#3}
+ {\setvalue{#1:#2:#3}{\v!layer}%
+ \appendtovaluelist{#1!list!layers}{#3}}%
+ \presetlocalframed[#2#3\v!frame]%
+ \definelayer
+ [#1:#3]
+ [\c!width=\paperwidth,
+ \c!height=\paperheight]%
+ \dodosetupcorrespondencelayer
+ [#1][#2][#3][\v!option]%
+ [\c!symbol=,
+ \c!alternative=\v!a,
+ \c!separator=\crlf,
+ \c!offset=\zeropoint,
+ \c!leftmargin=\zeropoint,
+ \c!rightmargin=\zeropoint]%
+ \dodosetupcorrespondencelayer
+ [#1][#2][#3][\v!frame]%
+ [\c!frame=\v!off,
+ \c!align=\v!right,
+ \c!offset=\zeropoint,
+ \c!strut=\v!yes]%
+ \dodosetupcorrespondencelayer
+ [#1][#2][#3][\v!layer]%
+ [\c!state=\v!start,
+ \c!offset=\zeropoint,
+ \c!preset=\v!left\v!top]}
+
+\def\dosetcorrespondencelayer[#1][#2][#3]%
+ {\ExpandSecondAfter\doifinsetelse{#1}{\csname#1!list!marking\endcsname}
+ {\doifelsecorrespondencestylevalue{#2}{#3}\c!symbol
+ {\dodosetcorrespondencelayer[#1][#2][#3][\directsetup{#1:#3}]}
+ {\dodosetcorrespondencelayer[#1][#2][#3][\correspondencestylevalue{#2}{#3}\c!symbol]}}
+ {\dodosetcorrespondencelayer[#1][#2][#3][\directsetup{#1:#3}]}}
+
+\def\dodosetcorrespondencelayer[#1][#2][#3][#4]%
+ {\setlayer[#1:#3]
+ {\localframed[#2#3\v!frame]
+ {\doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}%
+ \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}%
+ \doattributes{#2#3}\c!style\c!color{#4}}}}
+
+%D Sections
+
+\def\definecorrespondencesection[#1][#2]%
+ {\setvalue{\s!do\e!define#1\v!section}{\dodefinecorrespondencesection[#1][#2]}%
+ \setvalue{\s!do\e!set #1\v!section}{\dosetcorrespondencesection [#1][#2]}}
+
+\def\dodefinecorrespondencesection[#1][#2][#3]%
+ {\setvalue{#2\v!option#3}{\v!yes}%
+ \doifundefined{#1:#2:#3}
+ {\setvalue{#1:#2:#3}{\v!section}%
+ \appendtovaluelist{#1!list!sections}{#3}}%
+ \getparameters
+ [#2#3]%
+ [\c!before=,
+ \c!after=,
+ \c!align=,
+ \c!leftmargin=\zeropoint,
+ \c!rightmargin=\zeropoint,
+ \c!alternative=\v!a,
+ \c!separator=\crlf,
+ \c!style=,
+ \c!color=]}
+
+\def\dosetcorrespondencesection[#1][#2][#3]%
+ {\begingroup
+ \doifelsecorrespondencestylevalue{#2}{#3}\c!before
+ {\correspondencestylevalue{#2}{#3}\c!before}
+ \endgraf
+ \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}%
+ \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}%
+ \doifcorrespondencestylevalue{#2}{#3}\c!align
+ {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}%
+ \dostartattributes{#2#3}\c!style\c!color\empty
+ \directsetup{#1:#3}%
+ \dostopattributes
+ \doifcorrespondencestylevalue{#2}{#3}\c!after
+ {\endgraf\correspondencestylevalue{#2}{#3}\c!after}
+ \endgraf
+ \endgroup}
+
+%D Descriptions
+
+\def\definecorrespondencedescription[#1][#2]%
+ {\setvalue{\s!do\e!define#1\v!description}{\dodefinecorrespondencedescription[#1][#2]}%
+ \setvalue{\s!do\e!set #1\v!description}{\dosetcorrespondencedescription [#1][#2]}%
+ \setvalue{\s!do\e!flush #1\v!description}{\doflushcorrespondencedescription [#1][#2]}}
+
+\def\dodefinecorrespondencedescription[#1][#2][#3]%
+ {\setvalue{#2\v!option#3}{\v!yes}%
+ \doifundefined{#1:#2:#3}
+ {\setvalue{#1:#2:#3}{\v!description}%
+ \appendtovaluelist{#1!list!descriptions}{#3}}%
+ \definedescription
+ [#1#3]
+ [\c!location=\v!top,
+ \c!inbetween=\nowhitespace]}
+
+\def\dosetcorrespondencedescription[#1][#2][#3]%
+ {\doiftext{\directsetup{#1:#3}}
+ {\csname\e!start#1#3\endcsname{\labeltext{#1:#3}}
+ \directsetup{#1:#3}%
+ \csname\e!stop #1#3\endcsname}}
+
+\def\doflushcorrespondencedescription[#1][#2]%
+ {\def\dodoflushcorrespondencedescription##1%
+ {\doif{\correspondencestylevalue{#2}\v!option{##1}}\v!yes{\dosetcorrespondencedescription[#1][#2][##1]}}%
+ \processcommacommand[\csname#1!list!descriptions\endcsname]\dodoflushcorrespondencedescription}
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex b/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex
index 78924e1affe..7a9d83f8726 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex
+++ b/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-letter,
-%D version=2008.10.27,
+%D version=2008.11.29,
%D title=\CONTEXT\ User Module,
%D subtitle=Framework for Letters,
%D author=Wolfgang Schuster,
@@ -18,53 +18,29 @@
\unprotect
+\usemodule[correspondence]
+
%D I use a few extra constants and variables in my module.
\startinterface all
- \setinterfaceconstant {graphic} {graphic}
- \setinterfaceconstant {head} {head}
- \setinterfaceconstant {foot} {foot}
\setinterfaceconstant {backaddress} {backaddress}
- \setinterfaceconstant {topmark} {topmark}
- \setinterfaceconstant {botmark} {botmark}
- \setinterfaceconstant {cutmark} {cutmark}
- \setinterfaceconstant {endmark} {endmark}
- \setinterfaceconstant {usermark} {usermark}
- \setinterfaceconstant {foldmark} {foldmark}
- \setinterfaceconstant {extension} {extension}
- \setinterfaceconstant {interface} {interface}
- \setinterfaceconstant {backgroundimage} {backgroundimage}
- \setinterfaceconstant {whitespace} {whitespace}
\setinterfaceconstant {optimize} {optimize}
- \setinterfaceconstant {nexthead} {nexthead}
- \setinterfaceconstant {nextfoot} {nextfoot}
\stopinterface
\startinterface all
\setinterfacevariable {letter} {letter}
- \setinterfacevariable {secondpage} {secondpage}
\setinterfacevariable {backaddress} {backaddress}
- \setinterfacevariable {foot} {foot}
- \setinterfacevariable {topmark} {topmark}
- \setinterfacevariable {botmark} {botmark}
- \setinterfacevariable {cutmark} {cutmark}
- \setinterfacevariable {endmark} {endmark}
\setinterfacevariable {reference} {reference}
\setinterfacevariable {location} {location}
- \setinterfacevariable {option} {option}
\setinterfacevariable {address} {address}
- \setinterfacevariable {foldmark} {foldmark}
- \setinterfacevariable {usermark} {usermark}
\setinterfacevariable {opening} {opening}
\setinterfacevariable {closing} {closing}
- \setinterfacevariable {layer} {layer}
\setinterfacevariable {letternext} {letternext}
\setinterfacevariable {lettermain} {lettermain}
\setinterfacevariable {special} {special}
\setinterfacevariable {notation} {notation}
\setinterfacevariable {inside} {inside}
- \setinterfacevariable {nexthead} {nexthead}
- \setinterfacevariable {nextfoot} {nextfoot}
+ \setinterfacevariable {optimize} {optimize}
\stopinterface
%D Before we start the real module let us introduce two namespaces
@@ -115,60 +91,10 @@
%D righttext=\doifoddpageelse\pagenumber\donothing]
%D \stoptyping
-\def\setupletterstyle
- {\dotripleempty\dosetupletterstyle}
-
-\def\dosetupletterstyle[#1][#2][#3]%
- {\ifthirdargument
- \dodosetupletterstyle[#1][#2][#3]%
- \else\ifsecondargument
- \dodosetupletterstyle[#1][#2][]%
- \else
- \dodosetupletterstyle[\v!option][#1][]%
- \fi\fi}
-
-\def\dodosetupletterstyle[#1][#2][#3]%
- {\processallactionsinset
- [#1]
- [ \v!firstpage=>{\definelayout[\v!letter\v!firstpage][#2]},
- \v!secondpage=>{\definelayout[\v!letter\v!secondpage][#2]},
- \v!header=>{\dosetupletterheader[#2][#3]},
- \v!footer=>{\dosetupletterfooter[#2][#3]},
- \v!option=>{\dosetupletteroption[\v!option][#2]},
- \v!foldmark=>{\dododosetupletterstyle[\v!topmark,\v!botmark,\v!cutmark][#2][#3]},
- \s!unknown=>{\dododosetupletterstyle[#1][#2][#3]}]}
-
-%D Set the values for normal options.
-
-\def\dosetupletteroption[#1][#2]%
- {\getparameters[\????ls#1][#2]}
-
-%D Setup of the layers and their frames.
-
-\def\dododosetupletterstyle[#1][#2][#3]%
- {\def\dodododosetupletterstyle##1%
- {\doifelsenothing{#3}
- {\ExpandSecondAfter\doifinsetelse{##1}\letter!list!sections
- {\dododododosetupletterstyle[##1][\v!option][#2]}
- {\ExpandSecondAfter\doifinsetelse{##1}\letter!list!descriptions
- {\setupdescriptions[\v!letter##1][#2]}
- {\ExpandSecondAfter\doifinsetelse{##1}\letter!list!layers
- {\dododododosetupletterstyle[##1][\v!layer,\v!frame,\v!option][#2]}
- {\dosetupletteroption[##1][#2]}}}}
- {\dododododosetupletterstyle[##1][#2][#3]}}%
- \processcommacommand[#1]\dodododosetupletterstyle}
-
-\def\dododododosetupletterstyle[#1][#2][#3]%
- {\def\dodododododosetupletterstyle##1%
- {\processaction
- [##1]
- [ \v!layer=>{\dododododosetupletterstyle[#1][\v!layer\v!a,\v!layer\v!b][#3]},
- \v!layer\v!a=>{\setuplayer[\v!letter:#1][#3]},
- \v!layer\v!b=>{\getparameters[\????ls#1\v!layer][#3]},
- \v!frame=>{\getparameters[\????ls#1\v!frame][#3]},
- \v!option=>{\getparameters[\????ls#1][#3]},
- \s!unknown=>{\getparameters[\????ls#1##1][#3]}]}%
- \processcommalist[#2]\dodododododosetupletterstyle}
+\setvalue{\v!letter:\????ls:\v!firstpage }{\v!layout}
+\setvalue{\v!letter:\????ls:\v!secondpage}{\v!layout}
+
+\definecorrespondencesetup[\v!letter\v!style][\v!letter][\????ls]
%D Setup for the header and footer texts.
@@ -189,58 +115,8 @@
%D \macros
%D {setupletter}
-%D
-%D The \tex{setupletter} macro could be used from a interface, I define
-%D only the macro and nothing else. You could also redefine the macro later
-%D because it is not used from the raw interface.
-%D
-%D The first version of the \tex{setupletter} macro used two arguments
-%D for each value:
-%D
-%D \starttyping
-%D \def\setupletter
-%D {\dodoubleempty\dosetupletter}
-%D
-%D \def\dosetupletter[#1][#2]%
-%D {\ifsecondargument
-%D \dodosetupletter[#1][#2]%
-%D \else\iffirstargument
-%D \dodosetupletter[\v!option][#1]%
-%D \fi\fi}
-%D
-%D \def\dodosetupletter[#1][#2]%
-%D {\def\dododosetupletter##1%
-%D {\getparameters[\????ld##1][#2]}%
-%D \processcommalist[#1]\dododosetupletter}
-%D \stoptyping
-%D
-%D The next version use only one argument for normal values and use
-%D the second argument only for settings on the reference line.
-
-\def\setupletter
- {\dodoubleempty\dosetupletter}
-
-\def\dosetupletter[#1][#2]%
- {\ifsecondargument
- \dodosetupletter[#1][#2]%
- \else
- \dodosetupletter[#1][]%
- \fi}
-
-\def\dodosetupletter[#1][#2]%
- {\doifelsenothing{#2}
- {\getparameters[\????ld][#1]}
- {\def\dododosetupletter##1%
- {\getparameters[\????ld##1][#2]}%
- \processcommalist[#1]\dododosetupletter}}
-
-\definecomplexorsimple\setlettervalue
-\def\complexsetlettervalue[#1]#2%
- {\setvalue{\????ld#1}{#2}}
-
-\def\simplesetlettervalue#1#2%
- {\setvalue{\????ld#1}{#2}}
+\definecorrespondencevalue[\v!letter][\????ld]
%D A few extra macros to test for content of the letter values, don't rely
%D on them at the moment because they could change or I will remove, rename,
@@ -248,76 +124,11 @@
%D
%D With the change of the \tex{setupletter} command it was also necessary
%D to change the definition for lettervalue tests.
-%D
-%D \starttyping
-%D \def\doiflettervalue#1#2%
-%D {\doiftextelse{\lettervalue{#1}{#2}}
-%D \firstofoneargument
-%D \gobbleoneargument}
-%D
-%D \def\doifelselettervalue#1#2%
-%D {\doiftextelse{\lettervalue{#1}{#2}}
-%D \firstoftwoarguments
-%D \secondoftwoarguments}
-%D \stoptyping
-%\def\doiflettervalue#1%
-% {\doiftextelse{\lettervalue{#1}}
-% \firstofoneargument
-% \gobbleoneargument}
-
-%\def\doifelselettervalue#1%
-% {\doiftextelse{\lettervalue{#1}}
-% \firstoftwoarguments
-% \secondoftwoarguments}
-
-\long\def\doiflettervalue#1%
- {\ifcsname\????ld#1\endcsname
- \edef\!!stringa{\csname\????ld#1\endcsname}%
- \ifx\!!stringa\empty
- \@EAEAEA\gobbleoneargument
- \else
- \@EAEAEA\firstofoneargument
- \fi
- \else
- \@EA\gobbleoneargument
- \fi}
-
-\long\def\doifelselettervalue#1%
- {\ifcsname\????ld#1\endcsname
- \edef\!!stringa{\csname\????ld#1\endcsname}%
- \ifx\!!stringa\empty
- \@EAEAEA\secondoftwoarguments
- \else
- \@EAEAEA\firstoftwoarguments
- \fi
- \else
- \@EA\secondoftwoarguments
- \fi}
-
-\def\doifletterstylevalue#1#2%
- {\ifcsname\????ls#1#2\endcsname
- \edef\!!stringa{\csname\????ls#1#2\endcsname}%
- \ifx\!!stringa\empty
- \@EAEAEA\gobbleoneargument
- \else
- \@EAEAEA\firstofoneargument
- \fi
- \else
- \@EA\firstofoneargument
- \fi}
-
-\def\doifelseletterstylevalue#1#2%
- {\ifcsname\????ls#1#2\endcsname
- \edef\!!stringa{\csname\????ls#1#2\endcsname}%
- \ifx\!!stringa\empty
- \@EAEAEA\secondoftwoarguments
- \else
- \@EAEAEA\firstoftwoarguments
- \fi
- \else
- \@EA\secondoftwoarguments
- \fi}
+\def\doiflettervalue {\doifcorrespondencevalue \????ld}
+\def\doifelselettervalue {\doifelsecorrespondencevalue \????ld}
+\def\doifletterstylevalue {\doifcorrespondencestylevalue \????ls}
+\def\doifelseletterstylevalue{\doifelsecorrespondencestylevalue\????ls}
%D \subject{Interface, Style and Extension files}
%D
@@ -390,13 +201,7 @@
%D
%D \showsetup{useletterinterface}
-\def\useletterinterface
- {\dosingleargument\douseletterinterface}
-
-\def\douseletterinterface[#1]%
- {\def\dodouseletterinterface##1%
- {\readfile{##1.\letter!suffix!interface}\donothing\donothing}%
- \processcommacommand[#1]\dodouseletterinterface}
+\definecorrespondencefile[\v!letter\v!interface][\letter!suffix!interface]
%D \subsubject{letter extension}
%D
@@ -418,13 +223,7 @@
%D
%D \showsetup{useletterextension}
-\def\useletterextension
- {\dosingleargument\douseletterextension}
-
-\def\douseletterextension[#1]%
- {\def\dodouseletterextension##1%
- {\readfile{##1.\letter!suffix!extension}\donothing\donothing}%
- \processcommacommand[#1]\dodouseletterextension}
+\definecorrespondencefile[\v!letter\v!extension][\letter!suffix!extension]
%D \subsubject{letter styles}
%D
@@ -443,13 +242,7 @@
%D
%D \showsetup{useletterstyle}
-\def\useletterstyle
- {\dosingleargument\douseletterstyle}
-
-\def\douseletterstyle[#1]%
- {\def\dodouseletterstyle##1%
- {\readfile{##1.\letter!suffix!style}\donothing\donothing}%
- \processcommacommand[#1]\dodouseletterstyle}
+\definecorrespondencefile[\v!letter\v!style][\letter!suffix!style]
%D \macros
%D {letterstylevalue,lettervalue}
@@ -477,124 +270,22 @@
\def\lettervalue#1%
{\csname\????ld#1\endcsname}
-\let\letter!list!layers\empty
+\let\letter!list!layers \empty
+\let\letter!list!sections \empty
+\let\letter!list!descriptions\empty
\def\letter!list!marking
{\v!topmark,\v!botmark,\v!cutmark,\v!endmark,\v!usermark}
-\def\dodefineletterlayer[#1]%
- {\ExpandSecondAfter\doifelse{#1}\v!foldmark
- {\def\dodododefineletterlayer##1{\dododefineletterlayer[##1]}%
- \processcommacommand[\letter!list!marking]\dodododefineletterlayer}
- {\dododefineletterlayer[#1]}}
-
-\def\dododefineletterlayer[#1]%
- {\setvalue{\????ls\v!option#1}{\v!yes}%
- \doifnotinset{#1}\letter!list!layers
- {\appendtocommalist{#1}\letter!list!layers}%
- \presetlocalframed[\????ls#1\v!frame]%
- \definelayer
- [\v!letter:#1]
- [\c!width=\paperwidth,
- \c!height=\paperheight]%
- \setupletterstyle
- [#1][\v!option]
- [\c!symbol=,
- \c!alternative=\v!a,
- \c!separator=\crlf,
- \c!offset=\zeropoint,
- \c!leftmargin=\zeropoint,
- \c!rightmargin=\zeropoint]%
- \setupletterstyle
- [#1][\v!frame]
- [\c!frame=\v!off,
- \c!align=\v!right,
- \c!offset=\zeropoint,
- \c!strut=\v!yes]%
- \setupletterstyle
- [#1][\v!layer]
- [\c!state=\v!start,
- \c!offset=\zeropoint,
- \c!preset=\v!left\v!top]}
-
-\def\dosetletterlayer[#1]%
- {\doifinsetelse{#1}{\v!topmark,\v!botmark,\v!cutmark,\v!endmark,\v!usermark}
- {\doifelseletterstylevalue{#1}\c!symbol
- {\dodosetletterlayer[#1][\setups{letter:#1}]}
- {\dodosetletterlayer[#1][\letterstylevalue{#1}\c!symbol]}}
- {\dodosetletterlayer[#1][\setups{letter:#1}]}}
-
-\def\dodosetletterlayer[#1][#2]%
- {\setlayer[\v!letter:#1]
- {\localframed[\????ls#1\v!frame]
- {\doadaptleftskip {\letterstylevalue{#1}\c!leftmargin}%
- \doadaptrightskip{\letterstylevalue{#1}\c!rightmargin}%
- \doattributes{\????ls#1}\c!style\c!color{#2}}}}
-
-\let\letter!list!sections\empty
-
-\def\dodefinelettersection[#1]%
- {\setvalue{\????ls\v!option#1}{\v!yes}%
- \doifnotinset{#1}\letter!list!sections
- {\appendtocommalist{#1}\letter!list!sections}%
- \setupletterstyle
- [#1]
- [\v!option]
- [\c!before=,
- \c!after=,
- \c!align=,
- \c!leftmargin=\zeropoint,
- \c!rightmargin=\zeropoint,
- \c!alternative=\v!a,
- \c!separator=\crlf,
- \c!style=,
- \c!color=]}
-
-\def\dosetlettersection[#1]%
- {\begingroup
- \edef\@@lettersection{#1}%
- \doifelseletterstylevalue\@@lettersection\c!before
- {\letterstylevalue\@@lettersection\c!before}
- \endgraf
- \doadaptleftskip {\letterstylevalue\@@lettersection\c!leftmargin}%
- \doadaptrightskip{\letterstylevalue\@@lettersection\c!rightmargin}%
- \doifletterstylevalue\@@lettersection\c!align
- {\setupalign[\letterstylevalue\@@lettersection\c!align]}%
- \dostartattributes{\????ls#1}\c!style\c!color\empty
- \setups[letter:#1]%
- \dostopattributes
- \doifletterstylevalue\@@lettersection\c!after
- {\endgraf\letterstylevalue\@@lettersection\c!after}
- \endgraf
- \endgroup}
-
-\let\letter!list!descriptions\empty
-
-\def\dodefineletterdescription[#1]%
- {\setvalue{\????ls\v!option#1}{\v!yes}%
- \doifnotinset{#1}\letter!list!descriptions
- {\appendtocommalist{#1}\letter!list!descriptions}%
- \definedescription
- [\v!letter#1]
- [\c!location=\v!top,
- \c!inbetween=\nowhitespace]}
-
-\def\dosetletterdescription[#1]%
- {\doiftext{\setups[letter:#1]}
- {\csname\e!start\v!letter#1\endcsname{\labeltext{\v!letter:#1}}
- \setups[letter:#1]%
- \csname\e!stop \v!letter#1\endcsname}}
-
-\def\doflushletterdescription
- {\def\dodoflushletterdescription##1%
- {\doif{\letterstylevalue\v!option{##1}}\v!yes{\dosetletterdescription[##1]}}%
- \processcommacommand[\letter!list!descriptions]\dodoflushletterdescription}
+\definecorrespondencelayer [\v!letter][\????ls]
+\definecorrespondencesection [\v!letter][\????ls]
+\definecorrespondencedescription[\v!letter][\????ls]
%D \subject{Placement of the content}
%D
%D Enable the layouts for the first and second page.
-\startsetups[letter:layout]
+\startsetups[\v!letter:\v!layout]
\setuplayout[\v!letter\v!firstpage]
@@ -607,7 +298,7 @@
\dodefineletterlayer[\v!head]
-\startsetups[letter:place:head]
+\startsetups[\v!letter:\v!place:\v!head]
\dosetletterlayer[\v!head]
@@ -617,7 +308,7 @@
\dodefineletterlayer[\v!address]
-\startsetups[letter:place:address]
+\startsetups[\v!letter:\v!place:\v!address]
\dosetletterlayer[\v!address]
@@ -627,7 +318,7 @@
\dodefineletterlayer[\v!backaddress]
-\startsetups[letter:place:backaddress]
+\startsetups[\v!letter:\v!place:\v!backaddress]
\dosetletterlayer[\v!backaddress]
@@ -637,7 +328,7 @@
\dodefineletterlayer[\v!reference]
-\startsetups[letter:place:reference]
+\startsetups[\v!letter:\v!place:\v!reference]
\dosetletterlayer[\v!reference]
@@ -647,7 +338,7 @@
\dodefineletterlayer[\v!location]
-\startsetups[letter:place:location]
+\startsetups[\v!letter:\v!place:\v!location]
\dosetletterlayer[\v!location]
@@ -660,7 +351,7 @@
\dodefineletterlayer[\v!foot]
-\startsetups[letter:place:foot]
+\startsetups[\v!letter:\v!place:\v!foot]
\dosetletterlayer[\v!foot]
@@ -673,7 +364,7 @@
\dodefineletterlayer[\v!lettermain]
-\startsetups[letter:place:lettermain]
+\startsetups[\v!letter:\v!place:\v!lettermain]
\dosetletterlayer[\v!lettermain]
@@ -681,7 +372,7 @@
\dodefineletterlayer[\v!letternext]
-\startsetups[letter:place:letternext]
+\startsetups[\v!letter:\v!place:\v!letternext]
\dosetletterlayer[\v!letternext]
@@ -691,7 +382,7 @@
\dodefineletterlayer[\v!nexthead]
-\startsetups[letter:place:nexthead]
+\startsetups[\v!letter:\v!place:\v!nexthead]
\dosetletterlayer[\v!nexthead]
@@ -699,7 +390,7 @@
\dodefineletterlayer[\v!nextfoot]
-\startsetups[letter:place:nextfoot]
+\startsetups[\v!letter:\v!place:\v!nextfoot]
\dosetletterlayer[\v!nextfoot]
@@ -709,7 +400,7 @@
\dodefinelettersection[\v!letter\v!head]
-\startsetups[letter:place:\v!letter\v!head]
+\startsetups[\v!letter:\v!place:\v!letter\v!head]
\dosetlettersection[\v!letter\v!head]
@@ -719,7 +410,7 @@
\dodefinelettersection[\v!date\v!line]
-\startsetups[letter:place:\v!date\v!line]
+\startsetups[\v!letter:\v!place:\v!date\v!line]
\dosetlettersection[\v!date\v!line]
@@ -729,7 +420,7 @@
\dodefinelettersection[\v!reference\v!line]
-\startsetups[letter:place:\v!reference\v!line]
+\startsetups[\v!letter:\v!place:\v!reference\v!line]
\dosetlettersection[\v!reference\v!line]
@@ -739,7 +430,7 @@
\dodefinelettersection[\v!special\v!notation]
-\startsetups[letter:place:\v!special\v!notation]
+\startsetups[\v!letter:\v!place:\v!special\v!notation]
\dosetlettersection[\v!special\v!notation]
@@ -749,7 +440,7 @@
\dodefinelettersection[\v!inside\v!address]
-\startsetups[letter:place:\v!inside\v!address]
+\startsetups[\v!letter:\v!place:\v!inside\v!address]
\dosetlettersection[\v!inside\v!address]
@@ -759,7 +450,7 @@
\dodefinelettersection[\v!title]
-\startsetups[letter:place:\v!title]
+\startsetups[\v!letter:\v!place:\v!title]
\dosetlettersection[\v!title]
@@ -769,7 +460,7 @@
\dodefinelettersection[\v!subject]
-\startsetups[letter:place:\v!subject]
+\startsetups[\v!letter:\v!place:\v!subject]
\dosetlettersection[\v!subject]
@@ -779,7 +470,7 @@
\dodefinelettersection[\v!opening]
-\startsetups[letter:place:\v!opening]
+\startsetups[\v!letter:\v!place:\v!opening]
\dosetlettersection[\v!opening]
@@ -789,7 +480,7 @@
\dodefinelettersection[\v!content]
-\startsetups[letter:place:\v!content]
+\startsetups[\v!letter:\v!place:\v!content]
\begingroup
@@ -805,17 +496,17 @@
\dodefinelettersection[\v!closing]
-\startsetups[letter:place:\v!closing]
+\startsetups[\v!letter:\v!place:\v!closing]
\dosetlettersection[\v!closing]
\stopsetups
-%D Apendices
+%D Appendices
\dodefinelettersection[\v!appendices]
-\startsetups[letter:place:\v!appendices]
+\startsetups[\v!letter:\v!place:\v!appendices]
\dosetlettersection[\v!appendices]
@@ -826,11 +517,11 @@
\dodefineletterlayer[\v!foldmark]
-\startsetups[letter:place:foldmark]
+\startsetups[\v!letter:\v!place:\v!foldmark]
% Upper foldmark
- \startlocalsetups[letter:place:topmark]
+ \startlocalsetups[\v!letter:\v!place:\v!topmark]
\dosetletterlayer[\v!topmark]
@@ -838,7 +529,7 @@
% Lower foldmark
- \startlocalsetups[letter:place:botmark]
+ \startlocalsetups[\v!letter:\v!place:\v!botmark]
\dosetletterlayer[\v!botmark]
@@ -846,7 +537,7 @@
% Cutmark
- \startlocalsetups[letter:place:cutmark]
+ \startlocalsetups[\v!letter:\v!place:\v!cutmark]
\dosetletterlayer[\v!cutmark]
@@ -854,7 +545,7 @@
% Endmark, a relict from the typewriter area
- \startlocalsetups[letter:place:endmark]
+ \startlocalsetups[\v!letter:\v!place:\v!endmark]
\dosetletterlayer[\v!endmark]
@@ -862,17 +553,17 @@
% Free mark, you could use it to place your own symbols
- \startlocalsetups[letter:place:usermark]
+ \startlocalsetups[\v!letter:\v!place:\v!usermark]
\dosetletterlayer[\v!usermark]
\stoplocalsetups
- \doif\@@@@lsoptiontopmark \v!yes{\setups[letter:place:topmark]}
- \doif\@@@@lsoptionbotmark \v!yes{\setups[letter:place:botmark]}
- \doif\@@@@lsoptioncutmark \v!yes{\setups[letter:place:cutmark]}
- \doif\@@@@lsoptionendmark \v!yes{\setups[letter:place:endmark]}
- \doif\@@@@lsoptionusermark\v!yes{\setups[letter:place:usermark]}
+ \doif\@@@@lsoptiontopmark \v!yes{\directsetup{\v!letter:\v!place:\v!topmark }}
+ \doif\@@@@lsoptionbotmark \v!yes{\directsetup{\v!letter:\v!place:\v!botmark }}
+ \doif\@@@@lsoptioncutmark \v!yes{\directsetup{\v!letter:\v!place:\v!cutmark }}
+ \doif\@@@@lsoptionendmark \v!yes{\directsetup{\v!letter:\v!place:\v!endmark }}
+ \doif\@@@@lsoptionusermark\v!yes{\directsetup{\v!letter:\v!place:\v!usermark}}
\stopsetups
@@ -880,7 +571,7 @@
\defineoverlay
[\v!letter:\c!backgroundimage]
- [\doifsomething\@@@@lsoptionbackgroundimage
+ [\doifletterstylevalue\v!option\c!backgroundimage
{\overlayfigure{\@@@@lsoptionbackgroundimage}}]
\defineoverlay
@@ -892,12 +583,12 @@
\v!letter:\v!letternext,\v!letter:\v!lettermain,\v!letter:\v!head,%
\v!letter:\v!foot,\v!letter:\v!backaddress,\v!letter:\v!address,%
\v!letter:\v!reference,\v!letter:\v!location,\v!letter:\v!nexthead,%
- \v!letter:\v!nextfoot,\v!letter:\v!topmark,\v!letter:\v!botmark,
+ \v!letter:\v!nextfoot,\v!letter:\v!topmark,\v!letter:\v!botmark,%
\v!letter:\v!cutmark,\v!letter:\v!endmark,\v!letter:\v!usermark}
%D Settings at the begin of every letter.
-\startsetups[letter:initialize]
+\startsetups[\v!letter:\v!initialize]
\@@@@lsoptionbefore
@@ -929,15 +620,14 @@
[\c!background=\letter!list!backgrounds,
\c!backgroundcolor=\@@@@lsoptionbackgroundcolor]
- \doifletterstylevalue\v!option\c!bodyfont {\switchtobodyfont[\@@@@lsoptionbodyfont]}
-
- \doifletterstylevalue\v!option\c!whitespace{\setupwhitespace[\@@@@lsoptionwhitespace]}
+ \doifletterstylevalue\v!option\c!bodyfont {\switchtobodyfont[\@@@@lsoptionbodyfont ]}
+ \doifletterstylevalue\v!option\c!whitespace{\setupwhitespace [\@@@@lsoptionwhitespace]}
\stopsetups
%D Settings at the end of every letter.
-\startsetups[letter:finish]
+\startsetups[\v!letter:\v!finish]
\page
@@ -953,15 +643,15 @@
%D Place the letter.
-\startsetups[letter:place]
+\startsetups[\v!letter:\v!place]
- \setups[letter:initialize] % Settings at the begin
- \setups[letter:optimize] % Interface dependend
- \setups[letter:layout] % Page layout
- \setups[letter:reset] % Reset layers
- \setups[letter:layer] % Place layers
- \setups[letter:sequence] % Place content
- \setups[letter:finish] % Settings at the end
+ \directsetup{\v!letter:\v!initialize} % Settings at the begin
+ \directsetup{\v!letter:\v!optimize } % Interface dependend
+ \directsetup{\v!letter:\v!layout } % Page layout
+ \directsetup{\v!letter:\v!reset } % Reset layers
+ \directsetup{\v!letter:\v!layer } % Place layers
+ \directsetup{\v!letter:\v!sequence } % Place content
+ \directsetup{\v!letter:\v!finish } % Settings at the end
\stopsetups
@@ -973,7 +663,7 @@
\def\dodoresetletterlayer#1%
{\resetlayer[#1]}
-\startsetups[letter:reset]
+\startsetups[\v!letter:\v!reset]
\processcommacommand[\letter!list!resetlayers]\dodoresetletterlayer
@@ -981,19 +671,19 @@
\stopsetups
-\startsetups[letter:layer]
+\startsetups[\v!letter:\v!layer]
- \doif\@@@@lsoptionmarking \v!yes{\setups[letter:place:foldmark]}
- \doif\@@@@lsoptionhead \v!yes{\setups[letter:place:head]}
- \doif\@@@@lsoptionbackaddress\v!yes{\setups[letter:place:backaddress]}
- \doif\@@@@lsoptionaddress \v!yes{\setups[letter:place:address]}
- \doif\@@@@lsoptionreference \v!yes{\setups[letter:place:reference]}
- \doif\@@@@lsoptionlocation \v!yes{\setups[letter:place:location]}
- \doif\@@@@lsoptionfoot \v!yes{\setups[letter:place:foot]}
- \doif\@@@@lsoptionlettermain \v!yes{\setups[letter:place:lettermain]}
- \doif\@@@@lsoptionletternext \v!yes{\setups[letter:place:letternext]}
- \doif\@@@@lsoptionnexthead \v!yes{\setups[letter:place:nexthead]}
- \doif\@@@@lsoptionnextfoot \v!yes{\setups[letter:place:nextfoot]}
+ \doif\@@@@lsoptionmarking \v!yes{\directsetup{\v!letter:\v!place:\v!foldmark }}
+ \doif\@@@@lsoptionhead \v!yes{\directsetup{\v!letter:\v!place:\v!head }}
+ \doif\@@@@lsoptionbackaddress\v!yes{\directsetup{\v!letter:\v!place:\v!backaddress}}
+ \doif\@@@@lsoptionaddress \v!yes{\directsetup{\v!letter:\v!place:\v!address }}
+ \doif\@@@@lsoptionreference \v!yes{\directsetup{\v!letter:\v!place:\v!reference }}
+ \doif\@@@@lsoptionlocation \v!yes{\directsetup{\v!letter:\v!place:\v!location }}
+ \doif\@@@@lsoptionfoot \v!yes{\directsetup{\v!letter:\v!place:\v!foot }}
+ \doif\@@@@lsoptionlettermain \v!yes{\directsetup{\v!letter:\v!place:\v!lettermain }}
+ \doif\@@@@lsoptionletternext \v!yes{\directsetup{\v!letter:\v!place:\v!letternext }}
+ \doif\@@@@lsoptionnexthead \v!yes{\directsetup{\v!letter:\v!place:\v!nexthead }}
+ \doif\@@@@lsoptionnextfoot \v!yes{\directsetup{\v!letter:\v!place:\v!nextfoot }}
\stopsetups
@@ -1002,7 +692,7 @@
\let\letter!order!sections\letter!list!sections
\def\doflushlettersection#1%
- {\doif{\letterstylevalue\v!option{#1}}\v!yes{\setups[letter:place:#1]}}
+ {\doif{\letterstylevalue\v!option{#1}}\v!yes{\directsetup{\v!letter:\v!place:#1}}}
\startsetups[letter:sequence]
diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex b/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex
new file mode 100755
index 00000000000..52b9268cbae
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex
@@ -0,0 +1,402 @@
+%D \module
+%D [ file=t-resume,
+%D version=2008.11.27,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Framework for Letters,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D email=schuster.wolfgang@googlemail.com,
+%D license=Public Domain]
+
+\writestatus{loading}{Context User Module / Framework for Letters}
+
+\unprotect
+
+\usemodule[correspondence]
+
+%D I use a few extra constants and variables in my module.
+
+\startinterface all
+ \setinterfacevariable {resume} {resume}
+\stopinterface
+
+\def\????rd{@@@@rd} % ResumeData
+\def\????rs{@@@@rs} % ResumeStyle
+
+\startmodule[resume]
+
+\setupmodule
+ [\c!style=,
+ \c!extension=,
+ \c!interface=default]
+
+%D \macros
+%D {setupresumestyle}
+
+\definecorrespondencesetup[\v!resume\v!style][\v!resume][\????rs]
+
+%D Setup for the header and footer texts.
+
+\newtoks\resume!toks!header
+\newtoks\resume!toks!footer
+
+\def\dosetupresumeheader[#1][#2]%
+ {\resume!toks!header\emptytoks
+ \doifelsenothing{#2}
+ {\resume!toks!header{\setupheader[\v!text][#1]}}
+ {\resume!toks!header{\setupheader[#1][#2]}}}
+
+\def\dosetupresumefooter[#1][#2]%
+ {\resume!toks!footer\emptytoks
+ \doifelsenothing{#1}
+ {\resume!toks!footer{\setupfooter[\v!text][#1]}}
+ {\resume!toks!footer{\setupfooter[#1][#2]}}}
+
+%D \macros
+%D {setupresume}
+
+\definecorrespondencevalue[\v!resume][\????ld]
+
+%D A few extra macros to test for content of the letter values, don't rely
+%D on them at the moment because they could change or I will remove, rename,
+%D rewrite etc. them.
+%D
+%D With the change of the \tex{setupletter} command it was also necessary
+%D to change the definition for lettervalue tests.
+
+\def\doifresumevalue {\doifcorrespondencevalue \????rd}
+\def\doifelseresumevalue {\doifelsecorrespondencevalue \????rd}
+\def\doifresumestylevalue {\doifcorrespondencestylevalue \????rs}
+\def\doifelseresumestylevalue{\doifelsecorrespondencestylevalue\????rs}
+
+%D \subject{Interface, Style and Extension files}
+%D
+%D \macros
+%D {useletterextension,useletterstyle,useletterinterface}
+%D
+%D This module provides different types of files beside the main module.
+%D
+%D Two of them could be used by the user while the third is only used in
+%D this file but you're free to use but you should really now what you do.
+%D
+%D Each of the files has it's own file extension, you have to use if you
+%D want to create such a file, this has the advantage to use the same name
+%D for a collection of macros.
+
+\def\resume!suffix!style {nrs}
+\def\resume!suffix!extension{nre}
+\def\resume!suffix!interface{nri}
+
+\definecorrespondencefile[\v!resume\v!interface][\resume!suffix!interface]
+\definecorrespondencefile[\v!resume\v!extension][\resume!suffix!extension]
+\definecorrespondencefile[\v!resume\v!style ][\resume!suffix!style ]
+
+%D \macros
+%D {letterstylevalue,lettervalue}
+
+\def\resumestylevalue#1#2%
+ {\csname\????rs#1#2\endcsname}
+
+\def\resumevalue#1%
+ {\csname\????rd#1\endcsname}
+
+\def\resume!list!marking
+ {\v!topmark,\v!botmark,\v!cutmark,\v!usermark}
+
+\let\resume!list!layers \empty
+\let\resume!list!sections \empty
+\let\resume!list!descriptions\empty
+
+\definecorrespondencelayer [\v!resume][\????rs]
+\definecorrespondencesection [\v!resume][\????rs]
+\definecorrespondencedescription[\v!resume][\????rs]
+
+%D \subject{Placement of the content}
+%D
+%D Enable the layouts for the first and second page.
+
+\startsetups[\v!resume:\v!layout]
+
+ \setuplayout[\v!resume\v!firstpage]
+
+ \appendtoks\setuplayout[\v!resume\v!secondpage]\to\everyaftershipout
+
+\stopsetups
+
+%D Header for the first page, you could use it to place the logo from your
+%D company or your own address and name.
+
+\dodefineresumelayer[\v!head]
+
+\startsetups[\v!resume:\v!place:\v!head]
+
+ \dosetresumelayer[\v!head]
+
+\stopsetups
+
+%D Footer block, you could use it to place information about your company
+%D but take care set \mono{repeat=yes} if you want to place it on every page,
+%D you should disable the footer for the second and following pages inb this
+%D case.
+
+\dodefineresumelayer[\v!foot]
+
+\startsetups[\v!resume:\v!place:\v!foot]
+
+ \dosetresumelayer[\v!foot]
+
+\stopsetups
+
+%D Layer to set head and foot blocks at the second and all following pages.
+
+\dodefineresumelayer[\v!nexthead]
+
+\startsetups[\v!resume:\v!place:\v!nexthead]
+
+ \dosetresumelayer[\v!nexthead]
+
+\stopsetups
+
+\dodefineresumelayer[\v!nextfoot]
+
+\startsetups[\v!resume:\v!place:\v!nextfoot]
+
+ \dosetresumelayer[\v!nextfoot]
+
+\stopsetups
+
+%D Title
+
+\dodefineresumesection[\v!title]
+
+\startsetups[\v!resume:\v!place:\v!title]
+
+ \dosetresumesection[\v!title]
+
+\stopsetups
+
+%D Letter content
+
+\dodefineresumesection[\v!content]
+
+\startsetups[\v!resume:\v!place:\v!content]
+
+ \begingroup
+
+ \doifresumestylevalue\v!option\c!indenting{\setupindenting[\@@@@rsoptionindenting]}
+
+ \dosetresumesection[\v!content]
+
+ \endgroup
+
+\stopsetups
+
+%D Apendices
+
+\dodefineresumesection[\v!appendices]
+
+\startsetups[\v!resume:\v!place:\v!appendices]
+
+ \dosetresumesection[\v!appendices]
+
+\stopsetups
+
+%D Fold- and cutmarks, you enable and disable all of them independant
+%D from any other or disable all marks with just one command.
+
+\dodefineresumelayer[\v!foldmark]
+
+\startsetups[\v!resume:\v!place:\v!foldmark]
+
+ % Upper foldmark
+
+ \startlocalsetups[\v!resume:\v!place:\v!topmark]
+
+ \dosetresumelayer[\v!topmark]
+
+ \stoplocalsetups
+
+ % Lower foldmark
+
+ \startlocalsetups[\v!resume:\v!place:\v!botmark]
+
+ \dosetresumelayer[\v!botmark]
+
+ \stoplocalsetups
+
+ % Cutmark
+
+ \startlocalsetups[\v!resume:\v!place:\v!cutmark]
+
+ \dosetresumelayer[\v!cutmark]
+
+ \stoplocalsetups
+
+ % Free mark, you could use it to place your own symbols
+
+ \startlocalsetups[\v!resume:\v!place:\v!usermark]
+
+ \dosetresumelayer[\v!usermark]
+
+ \stoplocalsetups
+
+ \doif\@@@@rsoptiontopmark \v!yes{\setups[\v!resume:\v!place:\v!topmark]}
+ \doif\@@@@rsoptionbotmark \v!yes{\setups[\v!resume:\v!place:\v!botmark]}
+ \doif\@@@@rsoptioncutmark \v!yes{\setups[\v!resume:\v!place:\v!cutmark]}
+ \doif\@@@@rsoptionusermark\v!yes{\setups[\v!resume:\v!place:\v!usermark]}
+
+\stopsetups
+
+%D Background graphic:
+
+\defineoverlay
+ [\v!resume:\c!backgroundimage]
+ [\doifsomething\@@@@rsoptionbackgroundimage
+ {\overlayfigure{\@@@@rsoptionbackgroundimage}}]
+
+\defineoverlay
+ [\v!resume:\c!background]
+ [\@@@@rsoptionbackground]
+
+\def\resume!list!backgrounds
+ {\v!resume:\c!backgroundimage,\v!resume:\c!background,%
+ \v!resume:\v!head,\v!resume:\v!foot,\v!resume:\v!nexthead,%
+ \v!resume:\v!nextfoot,\v!resume:\v!topmark,\v!resume:\v!botmark,%
+ \v!resume:\v!cutmark,\v!resume:\v!usermark}
+
+%D Settings at the begin of every letter.
+
+\startsetups[\v!resume:\v!initialize]
+
+ \@@@@rsoptionbefore
+
+ \setupsubpagenumber
+ [\c!number=\@@@@rsoptionpagenumber,
+ \c!way=\v!by\v!text,
+ \c!state=\@@@@rsoptionstate]
+
+ \resetsubpagenumber
+
+ \begingroup
+
+ \page
+
+ \setuppagenumbering
+ [\c!alternative=\@@@@rsoptionalternative,
+ \c!location=] % use the header and footer option instead
+
+ \the\resume!toks!header
+ \the\resume!toks!footer
+
+ \setupbackgrounds
+ [\v!paper]
+ [\c!background=\v!color,
+ \c!backgroundcolor=\@@@@rsoptionbackgroundcolor]
+
+ \setupbackgrounds
+ [\v!page]
+ [\c!background=\resume!list!backgrounds,
+ \c!backgroundcolor=\@@@@rsoptionbackgroundcolor]
+
+ \doifresumestylevalue\v!option\c!bodyfont {\switchtobodyfont[\@@@@rsoptionbodyfont]}
+
+ \doifresumestylevalue\v!option\c!whitespace{\setupwhitespace[\@@@@rsoptionwhitespace]}
+
+\stopsetups
+
+%D Settings at the end of every letter.
+
+\startsetups[\v!resume:\v!finish]
+
+ \page
+
+ \setuplayout[\v!reset]
+
+ \endgroup
+
+ \resetsubpagenumber
+
+ \@@@@rsoptionafter
+
+\stopsetups
+
+%D Place the letter.
+
+\startsetups[\v!resume:\v!place]
+
+ \setups[\v!resume:\v!initialize] % Settings at the begin
+ \setups[\v!resume:\v!layout] % Page layout
+ \setups[\v!resume:\v!reset] % Reset layers
+ \setups[\v!resume:\v!layer] % Place layers
+ \setups[\v!resume:\v!sequence] % Place content
+ \setups[\v!resume:\v!finish] % Settings at the end
+
+\stopsetups
+
+%D Reset the layer content.
+
+\def\resume!list!resetlayers
+ {\v!topmark,\v!botmark,\v!cutmark,\v!usermark}
+
+\def\dodoresetresumelayer#1%
+ {\resetlayer[\v!resume:#1]}
+
+\startsetups[\v!resume:\v!reset]
+
+ \processcommacommand[\resume!list!resetlayers]\dodoresetresumelayer
+
+\stopsetups
+
+\startsetups[\v!resume:\v!layer]
+
+ \doif\@@@@rsoptionmarking \v!yes{\setups[\v!resume:\v!place:\v!foldmark]}
+ \doif\@@@@rsoptionhead \v!yes{\setups[\v!resume:\v!place:\v!head ]}
+ \doif\@@@@rsoptionfoot \v!yes{\setups[\v!resume:\v!place:\v!foot ]}
+ \doif\@@@@rsoptionnexthead\v!yes{\setups[\v!resume:\v!place:\v!nexthead]}
+ \doif\@@@@rsoptionnextfoot\v!yes{\setups[\v!resume:\v!place:\v!nextfoot]}
+
+\stopsetups
+
+%D Place the letter content.
+
+\let\resume!order!sections\resume!list!sections
+
+\def\doflushresumesection#1%
+ {\doif{\resumestylevalue\v!option{#1}}\v!yes{\setups[\v!resume:\v!place:#1]}}
+
+\startsetups[\v!resume:\v!sequence]
+
+ \processcommacommand[\resume!list!sections]\doflushresumesection
+
+\stopsetups
+
+%D \subject{Default values}
+
+\setupresumestyle
+ [\v!option]
+ [\c!marking=\v!yes,
+ \c!usermark=\v!no,
+ \c!indenting=,
+ \c!whitespace=,
+ \c!background=,
+ \c!backgroundcolor=\v!white,
+ \c!backgroundimage=,
+ \c!before=,
+ \c!after=,
+ \c!header=\v!reset,
+ \c!footer=\v!reset,
+ \c!pagenumber=1,
+ \c!bodyfont=,
+ \c!alternative=\v!singlesided,
+ \c!state=\v!stop]
+
+%D Default style
+
+\useresumeinterface[\currentmoduleparameter\c!interface]
+\useresumestyle [\currentmoduleparameter\c!style ]
+\useresumeextension[\currentmoduleparameter\c!extension]
+
+\stopmodule
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/extension/addrentry.nle b/Master/texmf-dist/tex/context/third/letter/extension/addrentry.nle
index 947876c101a..fd48ae96638 100644
--- a/Master/texmf-dist/tex/context/third/letter/extension/addrentry.nle
+++ b/Master/texmf-dist/tex/context/third/letter/extension/addrentry.nle
@@ -1,6 +1,6 @@
%D \module
%D [ file=addrentry,
-%D version=2008.09.24,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Extension,
%D subtitle=KOMA-Script addrentry support,
%D author=Wolfgang Schuster,
@@ -24,12 +24,6 @@
\def\address!file!extension{adr}
-\def\useaddressfile
- {\dosingleargument\douseaddressfile}
-
-\def\douseaddressfile[#1]%
- {\def\dododouseaddressfile##1%
- {\readfile{##1.\address!file!extension}\donothing\donothing}%
- \processcommalist[#1]\dododouseaddressfile}
+\definecorrespondencefile[\v!address\v!file][\address!file!extension]
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/extension/corres.nle b/Master/texmf-dist/tex/context/third/letter/extension/corres.nle
index 21eb2612a70..2b9c6188397 100644
--- a/Master/texmf-dist/tex/context/third/letter/extension/corres.nle
+++ b/Master/texmf-dist/tex/context/third/letter/extension/corres.nle
@@ -1,6 +1,6 @@
%D \module
%D [ file=corres,
-%D version=2008.10.27,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Extension,
%D subtitle=XML Handling,
%D author=Wolfgang Schuster,
@@ -11,6 +11,8 @@
\unprotect
+\usemodule[corres]
+
\startinterface all
\setinterfaceconstant {prefix} {prefix}
\setinterfaceconstant {suffix} {suffix}
@@ -19,7 +21,9 @@
\setinterfaceconstant {informalname} {informalname}
\stopinterface
-\usemodule[corres]
+\startinterface all
+ \setinterfacevariable {handle} {handle}
+\stopinterface
\setupletter
[\c!prefix=\XMLflush{prefix},
@@ -31,14 +35,14 @@
\setupletter
[\c!toaddress=\XMLflush{address}]
-\startsetups[letter:opening]
+\startsetups[\v!letter:\v!opening]
\lettervalue\c!prefix
\doiflettervalue\c!formalname\space
\lettervalue\c!formalname
\stopsetups
-\startsetups[contact:handle]
-\setups[letter:place]
+\startsetups[\v!contact:\v!handle]
+\setups[\v!letter:\v!place]
\stopsetups
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/interface/default.nli b/Master/texmf-dist/tex/context/third/letter/interface/default.nli
index 5018a29e99d..29ef703181d 100644
--- a/Master/texmf-dist/tex/context/third/letter/interface/default.nli
+++ b/Master/texmf-dist/tex/context/third/letter/interface/default.nli
@@ -1,6 +1,6 @@
%D \module
%D [ file=default,
-%D version=2008.10.27,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Interface,
%D subtitle=Default Interface,
%D author=Wolfgang Schuster,
@@ -9,7 +9,7 @@
%D email=schuster.wolfgang@googlemail.com,
%D license=Public Domain]
-%M \loadsetups[letter.xml]
+%M \loadsetups[t-letter.xml]
%D \subject{Constants and Variables}
@@ -96,13 +96,13 @@
\setvalue{\v!letter:\v!reference:\v!a}%
{\setbox\scratchbox\hbox\!!to\hsize
- {\getcommacommandsize[\@@@@ldlist]% \@@@@ldreference?
+ {\getcommacommandsize[\@@@@lsreferencelist]% \@@@@ldreference?
\ifnum\commalistsize<\plustwo\hfill\fi
- \processcommacommand[\@@@@ldlist]\formatreferencelista\unskip}%
+ \processcommacommand[\@@@@lsreferencelist]\formatreferencelista\unskip}%
\global\letter!height!reference\dimexpr\ht\scratchbox+\dp\scratchbox\relax
\box\scratchbox}
-\startsetups[letter:reference:\v!a]
+\startsetups[\v!letter:\v!reference:\v!a]
\setupletterstyle
[\v!reference]
@@ -133,9 +133,9 @@
\setvalue{\v!letter:\v!reference:\v!b}%
{\vtop % why not \vbox?
- {\processcommacommand[\@@@@ldlist]\formatreferencelistb}}
+ {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistb}}
-\startsetups[letter:reference:\v!b]
+\startsetups[\v!letter:\v!reference:\v!b]
\setupletterstyle
[\v!reference]
@@ -169,11 +169,11 @@
\setvalue{\v!letter:\v!reference:\v!c}%
{\hbox\!!to\hsize
- {\processcommacommand[\@@@@ldlist]\formatreferencelistc}}
+ {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistc}}
-\startsetups[letter:reference:\v!c]
+\startsetups[\v!letter:\v!reference:\v!c]
-\setups[letter:reference:\v!a]
+\setups[\v!letter:\v!reference:\v!a]
\stopsetups
@@ -194,13 +194,13 @@
\setvalue{\v!letter:\v!reference:\v!d}%
{\vtop % why not \vbox?
{\scratchtoks\emptytoks
- \processcommacommand[\@@@@ldlist]\formatreferencelistd
+ \processcommacommand[\@@@@lsreferencelist]\formatreferencelistd
\setuptabulate[\c!before=,\c!after=]%
\starttabulate[|l|l|]
\the\scratchtoks
\stoptabulate}}
-\startsetups[letter:reference:\v!d]
+\startsetups[\v!letter:\v!reference:\v!d]
\setupletterstyle
[\v!reference]
@@ -238,11 +238,11 @@
\setvalue{\v!letter:\v!reference:\v!e}%
{\hbox\!!to\hsize
- {\processcommacommand[\@@@@ldlist]\formatreferenceliste\hss}}
+ {\processcommacommand[\@@@@lsreferencelist]\formatreferenceliste\hss}}
-\startsetups[letter:reference:\v!e]
+\startsetups[\v!letter:\v!reference:\v!e]
-\setups[letter:reference:\v!a]
+\setups[\v!letter:\v!reference:\v!a]
\stopsetups
@@ -254,77 +254,12 @@
\resetvalue{\v!letter:\v!reference:\v!none}
-\startsetups[letter:reference:\v!none]
+\startsetups[\v!letter:\v!reference:\v!none]
% Use the topspace value from the style
\stopsetups
-%D \subject{Setup commands}
-%D
-%D \macros
-%D {setupletter,setlettervalue}
-%D
-%D The values for the letter field is set eitheir either with \tex{setupletter}
-%D or with \tex{setlettervalue}, the first commands allows you to input the data
-%D in a key-val list while the second is only able to accept a single value.
-%D
-%D The first definition for \tex{setupletter} was defined in \filename{t-letter.tex}
-%D and used till \date[d=20,m=4,y=2008] but I decided to replace it by a simpler
-%D method to avoid a few lines of code in my letter and the letter versions from
-%D \date[d=21,m=4,y=2008] will use the new user interface. The old definition from
-%D \filename{t-letter.tex} is now oveloaded in will eventually disappear.
-%D
-%D The second command to set \tex{setlettervalue} was developed as a alternative
-%D method to set values for the letter, I implemnted the command at the same time
-%D as I changed the user interface.
-%D
-%D Untill the old definition for \tex{setupletter} remains in \filename{t-letter.tex}
-%D I have to redefine also \tex{lettervalue}, \tex{doiflettervalue} and
-%D \tex{doifelselettervalue} because the old and new definitions differe in the
-%D number of arguments but the new definition will move to the core file as soon
-%D as I replace \tex{setupletter} in the core.
-
-%D \starttyping
-%D \def\setupletter
-%D {\dodoubleempty\dosetupletter}
-%D
-%D \def\dosetupletter[#1][#2]%
-%D {\ifsecondargument
-%D \dodosetupletter[#1][#2]%
-%D \else
-%D \dodosetupletter[#1][]%
-%D \fi}
-%D
-%D \def\dodosetupletter[#1][#2]%
-%D {\doifelsenothing{#2}
-%D {\getparameters[\????ld][#1]}
-%D {\def\dododosetupletter##1%
-%D {\getparameters[\????ld##1][#2]}%
-%D \processcommalist[#1]\dododosetupletter}}
-%D
-%D \def\lettervalue#1%
-%D {\csname\????ld#1\endcsname}
-%D
-%D \def\doiflettervalue#1%
-%D {\doiftextelse{\lettervalue{#1}}
-%D \firstofoneargument
-%D \gobbleoneargument}
-%D
-%D \def\doifelselettervalue#1%
-%D {\doiftextelse{\lettervalue{#1}}
-%D \firstoftwoarguments
-%D \secondoftwoarguments}
-%D
-%D \definecomplexorsimple\setlettervalue
-%D
-%D \def\complexsetlettervalue[#1]#2%
-%D {\setvalue{\????ld#1}{#2}}
-%D
-%D \def\simplesetlettervalue#1#2%
-%D {\setvalue{\????ld#1}{#2}}
-%D \stoptyping
-
%D \subject{Letter environment}
%D
%D \macros
@@ -343,19 +278,19 @@
\def\dostartletter[#1][#2]%
{\ifsecondargument
- \setupletter[#1]%
+ \getparameters[\????ld][#1]%
\doifundefinedelse{\????ld\????ld#2}
{\setvalue{\????ld\c!toaddress}{#2}}
{\setvalue{\????ld\c!toaddress}{\getvalue{\????ld\????ld#2}}}%
\else\iffirstargument
\doifassignmentelse{#1}
- {\setupletter[#1]}
+ {\getparameters[\????ld][#1]}
{\doifundefinedelse{\????ld\????ld#1}
{\setvalue{\????ld\c!toaddress}{#1}}
{\setvalue{\????ld\c!toaddress}{\getvalue{\????ld\????ld#1}}}}%
\fi\fi
\def\stopletter
- {\setups[letter:place]\egroup
+ {\directsetup{\v!letter:\v!place}\egroup
\setupsubpagenumber[\c!state=\@@@@lsoptionstate]}%
\dostartbuffer[lettercontent][startletter][stopletter]}
@@ -404,20 +339,20 @@
\doiflettervalue\c!fromname\\
\lettervalue\c!fromaddress}
-\startsetups[letter:head]
+\startsetups[\v!letter:\v!head]
\def\\{\letterstylevalue\v!head\c!separator}%
\executeifdefined{\v!letter:\v!head:\@@@@lsheadalternative}{\getvalue{\v!letter:\v!head:\v!a}}%
\stopsetups
-\startsetups[letter:foot]
+\startsetups[\v!letter:\v!foot]
\executeifdefined{\v!letter:\v!foot:\@@@@lsfootalternative}\donothing
\stopsetups
-\startsetups[letter:nexthead]
+\startsetups[\v!letter:\v!nexthead]
\executeifdefined{\v!letter:\v!nexthead:\@@@@lsnextheadalternative}\donothing
\stopsetups
-\startsetups[letter:nextfoot]
+\startsetups[\v!letter:\v!nextfoot]
\executeifdefined{\v!letter:\v!nextfoot:\@@@@lsnextfootalternative}\donothing
\stopsetups
@@ -439,11 +374,11 @@
\copycsname\v!letter:\v!header:\v!modified\endcsname\csname\v!letter:\v!header:\v!hanging\endcsname
-\startsetups[letter:header]
+\startsetups[\v!letter:\v!header]
\executeifdefined{\v!letter:\v!header:\@@@@lsheaderalternative}\donothing
\stopsetups
-\startsetups[letter:footer]
+\startsetups[\v!letter:\v!footer]
\executeifdefined{\v!letter:\v!footer:\@@@@lsfooteralternative}\donothing
\stopsetups
@@ -465,40 +400,40 @@
\presetlocalframed[\????ls\v!dispatch]
\presetlocalframed[\????ls\v!addressee]
-\startsetups[letter:place:dispatch]
+\startsetups[\v!letter:\v!place:\v!dispatch]
\localframed
[\????ls\v!dispatch]
{\doadaptleftskip {\letterstylevalue\v!dispatch\c!leftmargin}%
\doadaptrightskip{\letterstylevalue\v!dispatch\c!rightmargin}%
- \doattributes{\????ls\v!dispatch}\c!style\c!color{\setups[letter:address:dispatch]}}
+ \doattributes{\????ls\v!dispatch}\c!style\c!color{\directsetup{\v!letter:\v!address:\v!dispatch}}}
\stopsetups
-\startsetups[letter:place:addressee]
+\startsetups[\v!letter:\v!place:\v!addressee]
\localframed
[\????ls\v!addressee]
{\doadaptleftskip {\letterstylevalue\v!addressee\c!leftmargin}%
\doadaptrightskip{\letterstylevalue\v!addressee\c!rightmargin}%
- \doattributes{\????ls\v!addressee}\c!style\c!color{\setups[letter:address:content]}}
+ \doattributes{\????ls\v!addressee}\c!style\c!color{\directsetup{\v!letter:\v!address:\v!content}}}
\stopsetups
\setvalue{\v!letter:\v!address:\v!a}%
- {\doif\@@@@lsoptiondispatch \v!yes{\setups[letter:place:dispatch]}%
- \doif\@@@@lsoptionaddressee\v!yes{\setups[letter:place:addressee]}}
+ {\doif\@@@@lsoptiondispatch \v!yes{\directsetup{\v!letter:\v!place:\v!dispatch }}%
+ \doif\@@@@lsoptionaddressee\v!yes{\directsetup{\v!letter:\v!place:\v!addressee}}}
-\startsetups[letter:address]
+\startsetups[\v!letter:\v!address]
\offinterlineskip\vskip-\lineheight
\executeifdefined{\v!letter:\v!address:\@@@@lsaddressalternative}{\getvalue{\v!letter:\v!address:\v!a}}%
\stopsetups
-\startsetups[letter:address:dispatch]
+\startsetups[\v!letter:\v!address:\v!dispatch]
\lettervalue\c!dispatch
\stopsetups
-\startsetups[letter:address:content]
+\startsetups[\v!letter:\v!address:\v!content]
\def\\{\letterstylevalue\v!address\c!separator}%
\lettervalue\c!toname
\doiflettervalue\c!toname\\
@@ -511,7 +446,7 @@
%D The reference line is choosen with the alternative key or if you set
%D a not defined alternative the definition a is choosen.
-\startsetups[letter:reference]
+\startsetups[\v!letter:\v!reference]
\executeifdefined{\v!letter:\v!reference:\@@@@lsreferencealternative}{\getvalue{\v!letter:\v!reference:\v!a}}
\stopsetups
@@ -522,18 +457,18 @@
\doiflettervalue\c!place{\lettervalue{\c!place\c!separator}}%
\lettervalue\c!date}
-\startsetups[letter:location]
+\startsetups[\v!letter:\v!location]
\executeifdefined{\v!letter:\v!location:\@@@@lslocationalternative}{\getvalue{\v!letter:\v!location:\v!a}}
\stopsetups
-\startsetups[letter:title]
+\startsetups[\v!letter:\v!title]
\doifelselettervalue\c!title
{\lettervalue\c!title}
{\doiflettervalue\c!attention
{\labeltext{\v!letter:\c!attention}\lettervalue\c!attention}}
\stopsetups
-\startsetups[letter:subject]
+\startsetups[\v!letter:\v!subject]
\def\\{\letterstylevalue\v!subject\c!separator}%
\labeltext{\v!letter:\c!subject}\lettervalue\c!subject
\stopsetups
@@ -549,11 +484,11 @@
{\setupindenting[\@@@@lsoptionindenting]}%
\getvalue{\v!letter:\v!opening:\v!a}}
-\startsetups[letter:opening]
+\startsetups[\v!letter:\v!opening]
\executeifdefined{\v!letter:\v!opening:\@@@@lsopeningalternative}{\getvalue{\v!letter:\v!opening:\v!a}}
\stopsetups
-\startsetups[letter:content]
+\startsetups[\v!letter:\v!content]
\lettervalue\c!content
\stopsetups
@@ -582,19 +517,19 @@
{\doiflettervalue\c!signature{\letterstylevalue\v!closing\c!inbetween}%
\lettervalue\c!signature}
-\startsetups[letter:closing]
+\startsetups[\v!letter:\v!closing]
\def\\{\letterstylevalue\v!closing\c!separator}%
\executeifdefined{\v!letter:\v!closing:\@@@@lsclosingalternative}{\getvalue{\v!letter:\v!closing:\v!a}}%
\stopsetups
-\startsetups[letter:appendices]
+\startsetups[\v!letter:\v!appendices]
\let\\\crlf
\doflushletterdescription
\stopsetups
\dodefineletterdescription[\v!enclosure]
-\startsetups[letter:enclosure]
+\startsetups[\v!letter:\v!enclosure]
\processaction
[\lettervalue\c!enclosure]
[ \v!empty=>\vrule\!!height\zeropoint\!!depth\zeropoint\!!width\hsize\relax\ifvmode\nowhitespace\fi,
@@ -603,7 +538,7 @@
\dodefineletterdescription[\v!copy]
-\startsetups[letter:copy]
+\startsetups[\v!letter:\v!copy]
\processaction
[\lettervalue\c!copy]
[ \v!empty=>\vrule\!!height\zeropoint\!!depth\zeropoint\!!width\hsize\relax\ifvmode\nowhitespace\fi,
@@ -612,7 +547,7 @@
\dodefineletterdescription[\v!postscript]
-\startsetups[letter:postscript]
+\startsetups[\v!letter:\v!postscript]
\processaction
[\lettervalue\c!postscript]
[ \v!empty=>\vrule\!!height\zeropoint\!!depth\zeropoint\!!width\hsize\relax\ifvmode\nowhitespace\fi,
@@ -633,7 +568,7 @@
\doiflettervalue\c!fromaddress\\
\lettervalue\c!fromaddress}}
-\startsetups[letter:backaddress]
+\startsetups[\v!letter:\v!backaddress]
\def\\{\letterstylevalue\c!backaddress\c!separator}%
\executeifdefined{\v!letter:\v!backaddress:\@@@@lsbackaddressalternative}{\getvalue{\v!letter:\v!backaddress:\v!no}}%
\stopsetups
@@ -653,12 +588,12 @@
%D is the date with a label. f you dont want a label choose alternative c
%D or change the label.
-\startsetups[letter:optimize]
+\startsetups[\v!letter:\v!optimize]
\setbox\scratchbox\hbox % trial typesetting to get the heigth of the reference line
{\executeifdefined{\v!letter:\v!reference:\@@@@lsreferencealternative}{\getvalue{\v!letter:\v!reference:\v!a}}}
- %\setups[letter:reference:\@@@@lsreferencealternative]
+ %\setups[\v!letter:\v!reference:\@@@@lsreferencealternative]
\stopsetups
diff --git a/Master/texmf-dist/tex/context/third/letter/interface/default.nri b/Master/texmf-dist/tex/context/third/letter/interface/default.nri
new file mode 100755
index 00000000000..3c53c6bf429
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/letter/interface/default.nri
@@ -0,0 +1,29 @@
+%D \module
+%D [ file=default,
+%D version=2008.10.29,
+%D title=\CONTEXT\ Resume Interface,
+%D subtitle=Default Interface,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D email=schuster.wolfgang@googlemail.com,
+%D license=Public Domain]
+
+\unprotect
+
+\def\startresume
+ {\bgroup\dosingleempty\dostartresume}
+
+\def\dostartresume[#1]%
+ {\iffirstargument
+ \getparameters[\????rd][#1]%
+ \fi
+ \def\stopresume{\directsetup{\v!resume:\v!place}}%
+ \dostartbuffer[resumecontent][startresume][stopresume]}
+
+
+\def\startresumecontent
+ {\dostartbuffer[resumecontent][startresumecontent][stopresumecontent]}
+
+
+\protect \endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/interface/knuth.nli b/Master/texmf-dist/tex/context/third/letter/interface/knuth.nli
index 886f1da7a98..3234b7ebc7e 100644
--- a/Master/texmf-dist/tex/context/third/letter/interface/knuth.nli
+++ b/Master/texmf-dist/tex/context/third/letter/interface/knuth.nli
@@ -1,6 +1,6 @@
%D \module
%D [ file=knuth,
-%D version=2008.04.17,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Interface,
%D subtitle=Lettformat Interface, % Donald Knuth's own letter format
%D author=Wolfgang Schuster,
@@ -20,34 +20,34 @@
{\dostartbuffer[body][body][closing]}
\def\closing
- {\def\endletter{\setups[letter:place]}%
+ {\def\endletter{\setups[\v!letter:\v!place]}%
\dostartbuffer[closing][closing][endletter]}
\def\annotations
- {\blank[line]\leftskip=0pt}
+ {\blank[\v!line]\leftskip=0pt}
\def\ps
{\let\par\space
- \blank[medium]\leftskip=0pt}
+ \blank[\v!medium]\leftskip=0pt}
-\startsetups[letter:reference]
+\startsetups[\v!letter:\v!reference]
\stopsetups
-\startsetups[letter:opening]
+\startsetups[\v!letter:\v!opening]
\obeylines
\getbuffer[address]
\stopsetups
-\startsetups[letter:content]
+\startsetups[\v!letter:\v!content]
\getbuffer[body]
\stopsetups
-\startsetups[letter:closing]
+\startsetups[\v!letter:\v!closing]
\leftskip=4in
\obeylines
diff --git a/Master/texmf-dist/tex/context/third/letter/style/blockstyle.nls b/Master/texmf-dist/tex/context/third/letter/style/blockstyle.nls
index fcc0fb24de9..0ae2f951209 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/blockstyle.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/blockstyle.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=blockstyle,
-%D version=2008.05.28,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Style,
%D subtitle=Blockstyle initalization,
%D author=Wolfgang Schuster,
@@ -28,28 +28,28 @@
\c!reference=\v!no,
\c!marking=\v!no]
-\startsetups[letter:head]
+\startsetups[\v!letter:\v!head]
% sender information appear in a lettersection
\stopsetups
-\startsetups[letter:\v!letter\v!head]
+\startsetups[\v!letter:\v!letter\v!head]
\let\\\crlf
\lettervalue\c!fromaddress
\stopsetups
-\startsetups[letter:\v!date\v!line]
+\startsetups[\v!letter:\v!date\v!line]
\lettervalue\c!date
\stopsetups
-\startsetups[letter:\v!reference\v!line]
+\startsetups[\v!letter:\v!reference\v!line]
\lettervalue\c!reference
\stopsetups
-\startsetups[letter:\v!special\v!notation]
+\startsetups[\v!letter:\v!special\v!notation]
\lettervalue\c!dispatch
\stopsetups
-\startsetups[letter:\v!inside\v!address]
+\startsetups[\v!letter:\v!inside\v!address]
\let\\\crlf
\doiflettervalue\c!toname {\lettervalue\c!toname \crlf}
\doiflettervalue\c!toaddress{\lettervalue\c!toaddress\crlf}
diff --git a/Master/texmf-dist/tex/context/third/letter/style/default.nls b/Master/texmf-dist/tex/context/third/letter/style/default.nls
index 4878317b08b..f05dd28b0e1 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/default.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/default.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=default,
-%D version=2008.10.27,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Style,
%D subtitle=Blockstyle initalization,
%D author=Wolfgang Schuster,
@@ -11,8 +11,8 @@
\unprotect
-\def\doresetletterlayer #1{\dododefineletterlayer[#1]}
-\def\doresetlettersection#1{\dodefinelettersection[#1]}
+\def\doresetletterlayer #1{\dododefinecorrespondencelayer[\v!letter][\????ls][#1]}
+\def\doresetlettersection#1{\dodefinecorrespondencesection[\v!letter][\????ls][#1]}
\processcommacommand[\letter!list!layers ]\doresetletterlayer
\processcommacommand[\letter!list!sections]\doresetlettersection
@@ -51,7 +51,7 @@
\setupletterstyle
[\v!reference]
[\v!option]
- [%\c!list=\lettervalue\c!list, % not yet
+ [\c!list=\lettervalue\c!list,
\c!alternative=\lettervalue\c!alternative]
\setupletterstyle
diff --git a/Master/texmf-dist/tex/context/third/letter/style/fullblock.nls b/Master/texmf-dist/tex/context/third/letter/style/fullblock.nls
index e449e6f5e9a..eb5e15fa5f8 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/fullblock.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/fullblock.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=fullblock,
-%D version=2008.05.28,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Style,
%D subtitle=full-block/complete block style,
%D author=Wolfgang Schuster,
@@ -35,7 +35,7 @@
[\v!secondpage]
[\c!header=.5in]
-\startsetups[letter:header:fullblock]
+\startsetups[\v!letter:\v!header:\v!fullblock]
\framed
[\c!frame=\v!off,
@@ -50,7 +50,7 @@
[\v!header]
[\c!lefttext=\lettervalue\c!toname,
\c!middletext=\pagenumber,
- \c!righttext=\setups{letter:header:fullblock}]
+ \c!righttext=\setups{\v!letter:\v!header:\v!fullblock}]
\setupletterstyle
[\v!option]
diff --git a/Master/texmf-dist/tex/context/third/letter/style/hanging.nls b/Master/texmf-dist/tex/context/third/letter/style/hanging.nls
index a78231235b0..75a161acc7f 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/hanging.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/hanging.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=hanging,
-%D version=2008.05.28,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Style,
%D subtitle=Hanging indented style,
%D author=Wolfgang Schuster,
@@ -44,9 +44,9 @@
[\v!secondpage]
[\c!header=1in]
-\setuplabeltext[en][page=Page~]
+\setuplabeltext[\s!en][\c!page=Page~]
-\startsetups[letter:header:hanging]
+\startsetups[\v!letter:\v!header:\v!hanging]
\framed
[\c!frame=\v!off,
@@ -54,13 +54,13 @@
{\lettervalue\c!toname \\
\lettervalue\c!date \\
\lettervalue\c!reference \\
- \labeltext{page}\pagenumber}
+ \labeltext\c!page\pagenumber}
\stopsetups
\setupletterstyle
[\v!header]
- [\c!lefttext=\setups{letter:header:hanging}]
+ [\c!lefttext=\setups{\v!letter:\v!header:\v!hanging}]
\setupletterstyle
[\v!option]
diff --git a/Master/texmf-dist/tex/context/third/letter/style/knuth.nls b/Master/texmf-dist/tex/context/third/letter/style/knuth.nls
index ae34f0208ca..f40f7cb0a49 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/knuth.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/knuth.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=knuth,
-%D version=2008.01.27,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Style,
%D subtitle=Letterformat Style,
%D author=Wolfgang Schuster,
@@ -31,13 +31,13 @@
[\c!after={\blank[\v!line]}]
\setupletterstyle
- [\v!content]
- [\c!before=\everypar{\setupwhitespace[\v!line]}]
+ [\v!option]
+ [\c!whitespace=\v!line]
\setupletterstyle
[\v!header]
[\c!lefttext=,
\c!middletext=\rlap{\currentdate},
- \c!righttext=Page\space\pagenumber]
+ \c!righttext=Page~\pagenumber]
\protect \endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/style/memo.nls b/Master/texmf-dist/tex/context/third/letter/style/memo.nls
index d25d1398c89..b2a40cba858 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/memo.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/memo.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=memo,
-%D version=2008.07.03,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Style,
%D subtitle=Memo style,
%D author=Wolfgang Schuster,
@@ -50,21 +50,21 @@
\v!special\v!notation=\v!no,
\c!title=\v!no]
-\startsetups[letter:\v!date\v!line]
+\startsetups[\v!letter:\v!date\v!line]
\labeltext{\v!memo:\c!date}\lettervalue\c!date
\stopsetups
-\startsetups[letter:\v!letter\v!head]
+\startsetups[\v!letter:\v!letter\v!head]
\let\\\crlf
\labeltext{\v!memo:\c!fromname}\lettervalue\c!fromname
\stopsetups
-\startsetups[letter:\v!inside\v!address]
+\startsetups[\v!letter:\v!inside\v!address]
\let\\\crlf
\labeltext{\v!memo:\c!toname}\lettervalue\c!toname
\stopsetups
-\startsetups[letter:subject]
+\startsetups[\v!letter:subject]
\let\\\crlf
\labeltext{\v!memo:\c!subject}\lettervalue\c!subject
\stopsetups
diff --git a/Master/texmf-dist/tex/context/third/letter/style/modified.nls b/Master/texmf-dist/tex/context/third/letter/style/modified.nls
index df661ba7f9b..1b536033617 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/modified.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/modified.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=modified,
-%D version=2008.05.28,
+%D version=2008.11.29,
%D title=\CONTEXT\ Letter Style,
%D subtitle=Block/Modified block style,
%D author=Wolfgang Schuster,
@@ -40,9 +40,9 @@
[\v!secondpage]
[\c!header=1in]
-\setuplabeltext[en][page=Page~]
+\setuplabeltext[\s!en][\c!page=Page~]
-\startsetups[letter:header:modified]
+\startsetups[\v!letter:\v!header:\v!modified]
\framed
[\c!frame=\v!off,
@@ -50,13 +50,13 @@
{\lettervalue\c!toname \\
\lettervalue\c!date \\
\lettervalue\c!reference \\
- \labeltext{page}\pagenumber}
+ \labeltext\c!page\pagenumber}
\stopsetups
\setupletterstyle
[\v!header]
- [\c!lefttext=\setups{letter:header:modified}]
+ [\c!lefttext=\setups{\v!letter:\v!header:\v!modified}]
\setupletterstyle
[\v!option]