summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-01-20 23:01:56 +0000
committerKarl Berry <karl@freefriends.org>2012-01-20 23:01:56 +0000
commit8e60d40db58143798b4159478b0e1d5e783dbcab (patch)
tree1bbd9db1772ab7825dce4509c06b9c046bc6e746 /Master
parent6311db5eab343592f05dd142aa7de2f710b58580 (diff)
context-letter (20jan12)
git-svn-id: svn://tug.org/texlive/trunk@25163 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/context/interface/third/t-correspondence.xml423
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua8
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii221
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi111
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkii305
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi306
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkii266
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkvi266
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkii3
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkiv3
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkii71
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkiv71
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkii62
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkiv62
-rw-r--r--Master/tlpkg/tlpsrc/context-letter.tlpsrc1
15 files changed, 1124 insertions, 1055 deletions
diff --git a/Master/texmf-dist/tex/context/interface/third/t-correspondence.xml b/Master/texmf-dist/tex/context/interface/third/t-correspondence.xml
deleted file mode 100644
index f018524742e..00000000000
--- a/Master/texmf-dist/tex/context/interface/third/t-correspondence.xml
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2011.11.07">
-
-<cd:define name="letterlayer">
- <cd:constant type="head"/>
- <cd:constant type="nexthead"/>
- <cd:constant type="lefthead"/>
- <cd:constant type="righthead"/>
- <cd:constant type="foot"/>
- <cd:constant type="nextfoot"/>
- <cd:constant type="leftfoot"/>
- <cd:constant type="rightfoot"/>
- <cd:constant type="address"/>
- <cd:constant type="backaddress"/>
- <cd:constant type="reference"/>
- <cd:constant type="location"/>
- <cd:constant type="topmark"/>
- <cd:constant type="botmark"/>
- <cd:constant type="cutmark"/>
- <cd:constant type="endmark"/>
- <cd:constant type="usermark"/>
- <cd:constant type="lettermain"/>
- <cd:constant type="letternext"/>
-</cd:define>
-
-<cd:define name="lettersection">
- <cd:constant type="head"/>
- <cd:constant type="date"/>
- <cd:constant type="reference"/>
- <cd:constant type="specialnotation"/>
- <cd:constant type="address"/>
- <cd:constant type="title"/>
- <cd:constant type="subject"/>
- <cd:constant type="opening"/>
- <cd:constant type="content"/>
- <cd:constant type="closing"/>
- <cd:constant type="appendices"/>
-</cd:define>
-
-<cd:define name="letterdescription">
- <cd:constant type="copy"/>
- <cd:constant type="enclosure"/>
- <cd:constant type="postscript"/>
-</cd:define>
-
-<cd:command name="defineletterelement" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="defineletterelement"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1">
- <cd:constant type="layer"/>
- <cd:constant type="section"/>
- </cd:keywords>
- <cd:keywords n="2">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords n="3">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:content n="4"/>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="letterelement" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="letterelement"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1">
- <cd:constant type="layer"/>
- <cd:constant type="section"/>
- </cd:keywords>
- <cd:keywords n="2">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords n="3">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setupletter" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletter"/>
- </cd:sequence>
- <cd:arguments>
- <cd:assignments n="1" list="yes">
- <cd:parameter name="KEY">
- <cd:constant type="VALUE"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setupletterdescription" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletterdescription"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1" list="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments n="2" list="yes">
- <cd:parameter name="spacebefore">
- <cd:inherit name="blank" n="1"/>
- </cd:parameter>
- <cd:parameter name="spaceafter">
- <cd:inherit name="blank" n="1"/>
- </cd:parameter>
- <cd:parameter name="spaceinbetween">
- <cd:inherit name="blank" n="1"/>
- </cd:parameter>
- <cd:parameter name="before">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="after">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="headstyle">
- <cd:resolve name="style"/>
- </cd:parameter>
- <cd:parameter name="headcolor">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <!--
- <cd:parameter name="textstyle">
- <cd:resolve name="style"/>
- </cd:parameter>
- <cd:parameter name="textcolor">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- -->
- <cd:parameter name="width">
- <cd:constant type="fit" default="yes"/>
- <cd:constant type="broad"/>
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="distance">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="location">
- <cd:constant type="left" default="yes"/>
- <cd:constant type="top"/>
- <cd:constant type="text"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setupletterelements" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletterelements"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:keywords n="2" list="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setupletterframe" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletterframe"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1" list="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments n="2" list="yes">
- <cd:inherit name="setupframe" n="2"/>
- </cd:assignments>
- </cd:arguments>
-</cd:interface>
-
-<cd:command name="setupletterlayer" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletterlayer"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1" list="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments n="2" list="yes">
- <cd:parameter name="x">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="y">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="preset">
- <cd:constant type="lefttop"/>
- <cd:constant type="righttop"/>
- <cd:constant type="leftbottom"/>
- <cd:constant type="rightbottom"/>
- <cd:constant type="middle"/>
- <cd:constant type="middletop"/>
- <cd:constant type="middlebottom"/>
- <cd:constant type="middleleft"/>
- <cd:constant type="middleright"/>
- </cd:parameter>
- <cd:parameter name="state">
- <cd:constant type="start"/>
- <cd:constant type="stop"/>
- <cd:constant type="next"/>
- <cd:constant type="repeat"/>
- <cd:constant type="left"/>
- <cd:constant type="right"/>
- <cd:constant type="even"/>
- <cd:constant type="odd"/>
- </cd:parameter>
- <cd:parameter name="style">
- <cd:resolve name="style"/>
- </cd:parameter>
- <cd:parameter name="color">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="leftmargin">
- <cd:constant type="standard"/>
- <cd:constant type="yes"/>
- <cd:constant type="no"/>
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="rightmargin">
- <cd:constant type="standard"/>
- <cd:constant type="yes"/>
- <cd:constant type="no"/>
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="symbol">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="distance">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="alternative">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="list">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:parameter name="separator">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setupletterlayout" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletterlayout"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1" list="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments n="2" list="yes">
- <cd:inherit name="setuplayout" n="2"/>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setupletteroptions" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletteroptions"/>
- </cd:sequence>
- <cd:arguments>
- <cd:assignments n="1" list="yes">
- <cd:parameter name="bodyfont">
- <cd:inherit name="setupbodyfont"/>
- </cd:parameter>
- <cd:parameter name="whitespace">
- <cd:inherit name="setupwhitespace"/>
- </cd:parameter>
- <cd:parameter name="backgroundcolor">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="backgroundimage">
- <cd:constant type="cd:file"/>
- </cd:parameter>
- <cd:parameter name="background">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="indenting">
- <cd:inherit name="setupindenting"/>
- </cd:parameter>
- <cd:parameter name="marking">
- <cd:constant type="yes" default="yes"/>
- <cd:constant type="no"/>
- </cd:parameter>
- <cd:parameter name="position">
- <cd:constant type="yes"/>
- <cd:constant type="no" default="yes"/>
- </cd:parameter>
- <cd:parameter name="option">
- <cd:constant type="test"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setuplettersection" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setuplettersection"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1" list="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments n="2" list="yes">
- <cd:parameter name="spacebefore">
- <cd:inherit name="blank" n="1"/>
- </cd:parameter>
- <cd:parameter name="spaceafter">
- <cd:inherit name="blank" n="1"/>
- </cd:parameter>
- <cd:parameter name="spaceinbetween">
- <cd:inherit name="blank" n="1"/>
- </cd:parameter>
- <cd:parameter name="style">
- <cd:resolve name="style"/>
- </cd:parameter>
- <cd:parameter name="color">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="leftmargin">
- <cd:constant type="standard"/>
- <cd:constant type="yes"/>
- <cd:constant type="no"/>
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="rightmargin">
- <cd:constant type="standard"/>
- <cd:constant type="yes"/>
- <cd:constant type="no"/>
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- <cd:parameter name="before">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="after">
- <cd:constant type="cd:command"/>
- </cd:parameter>
- <cd:parameter name="align">
- <cd:inherit name="setupalign" n="1"/>
- </cd:parameter>
- <cd:parameter name="indenting">
- <cd:inherit name="setupindenting" n="1"/>
- </cd:parameter>
- <cd:parameter name="alternative">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="separator">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="setupletterstyle" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="setupletterstyle"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1" list="yes">
- <cd:constant type="cd:name"/>
- </cd:keywords>
- <cd:assignments n="2" list="yes">
- <cd:parameter name="style">
- <cd:resolve name="style"/>
- </cd:parameter>
- <cd:parameter name="color">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="titlestyle">
- <cd:resolve name="style"/>
- </cd:parameter>
- <cd:parameter name="titlecolor">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="textstyle">
- <cd:resolve name="style"/>
- </cd:parameter>
- <cd:parameter name="textcolor">
- <cd:constant type="cd:name"/>
- </cd:parameter>
- <cd:parameter name="separator">
- <cd:constant type="cd:text"/>
- </cd:parameter>
- <cd:parameter name="width">
- <cd:constant type="cd:dimension"/>
- </cd:parameter>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="letter" type="environment" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="letter"/>
- </cd:sequence>
- <cd:arguments>
- <cd:assignments n="1" list="yes" optional="yes">
- <cd:inherit name="setupletter" n="1"/>
- </cd:assignments>
- </cd:arguments>
-</cd:command>
-
-<cd:command name="useletterstyle" file="s-cor-01.mkvi">
- <cd:sequence>
- <cd:string value="useletterstyle"/>
- </cd:sequence>
- <cd:arguments>
- <cd:keywords n="1" list="yes">
- <cd:constant type="cd:file"/>
- </cd:keywords>
- </cd:arguments>
-</cd:command>
-
-</cd:interface> \ No newline at end of file
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua
index a4c99ec7744..e31ad21ec30 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua
+++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua
@@ -87,14 +87,6 @@ function correspondence.file(environment,name)
}
end
-correspondence.styles = { }
-
-function correspondence.style(environment,value,width)
- local width = width
- local style = concat({environment,value},":")
- correspondence.styles[style] = { width = width }
-end
-
-- moved from TeX to Lua because it’s easier with the lists for the sections and layers
function correspondence.place(environment,settings)
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii
index f0c91104643..df06715010a 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii
+++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii
@@ -1,6 +1,6 @@
%D \module
%D [ file=s-cor-00,
-%D version=2011.12.26,
+%D version=2012.01.15,
%D title=\CONTEXT\ User Module,
%D subtitle=Correspondence,
%D author=Wolfgang Schuster,
@@ -55,7 +55,6 @@
\setinterfacevariable {correspondence} {correspondence}
\setinterfacevariable {letter} {letter}
\setinterfacevariable {memo} {memo}
- \setinterfacevariable {firsthead} {firsthead}
\setinterfacevariable {nexthead} {nexthead}
\setinterfacevariable {lefthead} {lefthead}
\setinterfacevariable {righthead} {righthead}
@@ -124,6 +123,21 @@
\setinterfacemessage{correspondence}{3}{Undefined description '--' for the '--' environment}
\stopinterface
+% Namespaces
+
+\def\????correspondence {@@@@correspondence}
+\def\????correspondencebuffer {@@@@correspondencebuffer}
+\def\????correspondencelayer {@@@@correspondencelayer}
+\def\????correspondencelayerstate {@@@@correspondencelayerstate}
+\def\????correspondenceframe {@@@@correspondenceframe}
+\def\????correspondencesection {@@@@correspondencesection}
+\def\????correspondenceoption {@@@@correspondenceoption}
+\def\????correspondencedescription {@@@@correspondencedescription}
+\def\????correspondencedescriptionlocation {@@@@correspondencedescriptionlocation}
+\def\????correspondencestyle {@@@@correspondencestyle}
+\def\????correspondenceelement {@@@@correspondenceelement}
+\def\????correspondencelayout {@@@@correspondencelayout}
+
% Environment
\unexpanded\def\startcorrespondence[#1]%
@@ -136,7 +150,7 @@
{\iffirstargument
\setupcurrentcorrespondence[#1]%
\fi
- \dostartbuffer[\currentcorrespondence][\e!start\currentcorrespondence][\e!stop\currentcorrespondence]}
+ \dostartbuffer[\????correspondencebuffer\currentcorrespondence][\e!start\currentcorrespondence][\e!stop\currentcorrespondence]}
\unexpanded\def\stopcorrespondence[#1]%
{\placecorrespondence[#1]%
@@ -164,14 +178,17 @@
% Setup
-
-\def\????correspondence{@@@@correspondence}
-
\def\correspondenceparameter
{\namedcorrespondenceparameter\currentcorrespondence}
\def\namedcorrespondenceparameter#1#2%
- {\csname\ifcsname\????correspondence#1#2\endcsname\????correspondence#1#2\else\s!empty\fi\endcsname}
+ {\csname
+ \ifcsname\????correspondence#1#2\endcsname
+ \????correspondence#1#2%
+ \else
+ \s!empty
+ \fi
+ \endcsname}
\unexpanded\def\setupcorrespondence[#1]%
{\def\currentcorrespondence{#1}%
@@ -203,10 +220,10 @@
\doifsomething{\correspondenceoptionparameter\c!backgroundcolor}%
{\setupbackgrounds[\v!paper][\c!background=\v!color,\c!backgroundcolor=\correspondenceoptionparameter\c!backgroundcolor]}
% layers
- \let\ascii\empty
- \def\addcorrespondencelayertolist##1{\addtocommalist{\currentcorrespondence:##1}\ascii}
+ \let\correspondencebackgrounds\empty
+ \def\addcorrespondencelayertolist##1{\addtocommalist{\currentcorrespondence:##1}\correspondencebackgrounds}
\processcommacommand[\accesscorrespondenceelements\currentcorrespondence\v!layer,correspondence:backgroundimage,correspondence:background]\addcorrespondencelayertolist
- \expanded{\setupbackgrounds[\v!page][\c!background={\ascii}]}%
+ \expanded{\setupbackgrounds[\v!page][\c!background={\correspondencebackgrounds}]}%
% layout
\setuppagenumbering[\c!alternative=\v!singlesided,\c!location=]%
\setupsubpagenumber[\c!way=\v!by\v!text,\c!state=\v!start]%
@@ -224,20 +241,33 @@
% Layers
-\def\????correspondencelayer{@@@@correspondencelayer}
-\def\????correspondenceframe{@@@@correspondenceframe}
-
\def\correspondencelayerparameter
{\namedcorrespondencelayerparameter\currentcorrespondencelayer}
\def\namedcorrespondencelayerparameter#1#2%
- {\csname\ifcsname\????correspondencelayer#1#2\endcsname\????correspondencelayer#1#2\else\s!empty\fi\endcsname}
+ {\csname
+ \ifcsname\????correspondencelayer#1#2\endcsname
+ \????correspondencelayer#1#2%
+ \else\ifcsname\????correspondencelayer#2\endcsname
+ \????correspondencelayer#2%
+ \else
+ \s!empty
+ \fi\fi
+ \endcsname}
\def\correspondenceframeparameter
{\namedcorrespondenceframeparameter\currentcorrespondenceframe}
\def\namedcorrespondenceframeparameter#1#2%
- {\csname\ifcsname\????correspondenceframe#1#2\endcsname\????correspondenceframe#1#2\else\s!empty\fi\endcsname}
+ {\csname
+ \ifcsname\????correspondenceframe#1#2\endcsname
+ \????correspondenceframe#1#2%
+ \else\ifcsname\????correspondenceframe#2\endcsname
+ \????correspondenceframe#2%
+ \else
+ \s!empty
+ \fi\fi
+ \endcsname}
\unexpanded\def\setupcorrespondencelayer[#1][#2][#3]%
{\def\dosetupcorrespondencelayer##1%
@@ -261,9 +291,9 @@
\unexpanded\def\definecorrespondencelayer[#1][#2]%
{\def\currentcorrespondencelayer{#1:#2}%
\let\currentcorrespondenceframe\currentcorrespondencelayer
- \presetlocalframed[\????correspondenceframe\currentcorrespondenceframe]%
- \setupcurrentcorrespondencelayer[\s!parent=\????correspondencelayer,\c!state=\v!start,\c!alternative=\s!default,\c!distance=\lineheight,\c!separator=\crlf]%
- \setupcurrentcorrespondenceframe[\s!parent=\????correspondenceframe,\c!frame=\v!off,\c!offset=\zeropoint,\c!align=\v!right]%
+ \copylocalframed[\????correspondenceframe\currentcorrespondenceframe][\????correspondenceframe]%
+ \expandafter\let\csname\????correspondencelayer\currentcorrespondencelayer\s!parent\endcsname\????correspondencelayer
+ \expandafter\let\csname\????correspondenceframe\currentcorrespondenceframe\s!parent\endcsname\????correspondenceframe
\definelayer [#1:#2][\c!width=\overlaywidth,\c!height=\overlayheight]%
\defineoverlay[#1:#2][\placecorrespondencelayer{#1}{#2}]}
@@ -277,28 +307,28 @@
\c!preset=\correspondencelayerparameter\c!preset]%
\to \everysetupcorrespondencelayer
-\setvalue{correspondence_layer_state_\v!start }{\!!doneatrue \!!donebfalse \!!donecfalse}
-\setvalue{correspondence_layer_state_\v!stop }{\!!doneafalse \!!donebfalse \!!donecfalse}
-\setvalue{correspondence_layer_state_\v!next }{\!!doneafalse \!!donebtrue \!!donectrue }
-\setvalue{correspondence_layer_state_\v!repeat}{\!!doneatrue \!!donebtrue \!!donectrue }
-\setvalue{correspondence_layer_state_\v!left }{\!!doneafalse \!!donebfalse \!!donectrue }
-\setvalue{correspondence_layer_state_\v!right }{\!!doneafalse \!!donebtrue \!!donecfalse}
-\setvalue{correspondence_layer_state_\v!even }{\!!doneafalse \!!donebfalse \!!donectrue }
-\setvalue{correspondence_layer_state_\v!odd }{\!!doneafalse \!!donebtrue \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!start }{\!!doneatrue \!!donebfalse \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!stop }{\!!doneafalse \!!donebfalse \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!next }{\!!doneafalse \!!donebtrue \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!repeat}{\!!doneatrue \!!donebtrue \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!left }{\!!doneafalse \!!donebfalse \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!right }{\!!doneafalse \!!donebtrue \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!even }{\!!doneafalse \!!donebfalse \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!odd }{\!!doneafalse \!!donebtrue \!!donecfalse}
\unexpanded\def\placecorrespondencelayer#1#2%
{\correspondenceparameters{#1}{#2}\v!layer
- \executeifdefined{correspondence_layer_state_\correspondencelayerparameter\c!state}{\getvalue{correspondence_layer_state_\v!stop}}
+ \executeifdefined{\????correspondencelayerstate\correspondencelayerparameter\c!state}{\getvalue{\????correspondencelayerstate\v!stop}}
\ifnum\correspondencepage=\plusone
- \if!!donea\doplacecorrespondencelayer\fi
+ \if!!donea\@EAEAEA \doplacecorrespondencelayer\else\@EAEAEA \gobbletwoarguments\fi
\else\ifodd\correspondencepage
- \if!!doneb\doplacecorrespondencelayer\fi
+ \if!!doneb\@EAEAEAEAEAEA\doplacecorrespondencelayer\else\@EAEAEAEAEAEA\gobbletwoarguments\fi
\else
- \if!!donec\doplacecorrespondencelayer\fi
- \fi\fi
+ \if!!donec\@EAEAEAEAEAEA\doplacecorrespondencelayer\else\@EAEAEAEAEAEA\gobbletwoarguments\fi
+ \fi\fi{#1}{#2}%
\tightlayer[\currentcorrespondencelayer]}
-\unexpanded\def\doplacecorrespondencelayer
+\unexpanded\def\doplacecorrespondencelayer#1#2%
{\setlayer
[\currentcorrespondencelayer]
{\localframed[\????correspondenceframe\currentcorrespondenceframe]
@@ -307,7 +337,7 @@
\dostartattributes{\????correspondencelayer\currentcorrespondencelayer}\c!style\c!color
\doifsymboldefinedelse{\correspondencelayerparameter\c!symbol}%
{\symbol[\correspondencelayerparameter\c!symbol]}
- {\directsetup\currentcorrespondencecontent}%
+ {\placecorrespondenceelement[#1][\v!layer][#2][\correspondencesectionparameter\c!alternative]}%
\dostopattributes}}}
\unexpanded\def\checkcorrespondencelayer[#1][#2]%
@@ -316,25 +346,42 @@
\showmessage\m!correspondence{2}{#1,#2}%
\fi}
-% Sections
+\getparameters
+ [\????correspondencelayer]
+ [ \c!state=\v!start,
+ \c!x=\zeropoint,
+ \c!y=\zeropoint,
+ \c!alternative=\s!default,
+ \c!distance=\lineheight,
+ \c!separator=\crlf]
-\def\????correspondencesection{@@@@correspondencesection}
+\presetlocalframed[\????correspondenceframe]
+
+\getparameters
+ [\????correspondenceframe]
+ [ \c!frame=\v!off,
+ \c!offset=\zeropoint,
+ \c!align=\v!right]
+
+% Sections
\def\correspondencesectionparameter
{\namedcorrespondencesectionparameter\currentcorrespondencesection}
\def\namedcorrespondencesectionparameter#1#2%
- {\csname\ifcsname\????correspondencesection#1#2\endcsname\????correspondencesection#1#2\else\s!empty\fi\endcsname}
+ {\csname
+ \ifcsname\????correspondencesection#1#2\endcsname
+ \????correspondencesection#1#2%
+ \else\ifcsname\????correspondencesection#2\endcsname
+ \????correspondencesection#2%
+ \else
+ \s!empty
+ \fi\fi
+ \endcsname}
\unexpanded\def\definecorrespondencesection[#1][#2]%
{\def\currentcorrespondencesection{#1:#2}%
- \setupcurrentcorrespondencesection
- [\s!parent=\????correspondencesection,
- \c!spacebefore=\v!line,
- \c!spaceafter=\v!line,
- \c!spaceinbetween={\v!samepage,\v!line},
- \c!alternative=\s!default,
- \c!separator=\crlf]}
+ \expandafter\let\csname\????correspondencesection\currentcorrespondencesection\s!parent\endcsname\????correspondencesection}
\unexpanded\def\setupcorrespondencesection[#1][#2][#3]%
{\def\dosetupcorrespondencesection##1%
@@ -356,7 +403,7 @@
\doifsomething{\correspondencesectionparameter\c!align }{\setupalign [\correspondencesectionparameter\c!align ]}%
\doifsomething{\correspondencesectionparameter\c!indenting}{\setupindenting[\correspondencesectionparameter\c!indenting]}%
\dostartattributes{\????correspondencesection\currentcorrespondencesection}\c!style\c!color
- \directsetup\currentcorrespondencecontent
+ \placecorrespondenceelement[#1][\v!section][#2][\correspondencesectionparameter\c!alternative]%
\dostopattributes
\correspondencesectionparameter\c!after
\doifsomethingelse{\correspondencesectionparameter\c!spaceafter }{\blank[\correspondencesectionparameter\c!spaceafter ]}{\endgraf}%
@@ -365,15 +412,29 @@
\fi
\endgroup}
-% Options
+\getparameters
+ [\????correspondencesection]
+ [ \c!spacebefore=\v!line,
+ \c!spaceafter=\v!line,
+ \c!spaceinbetween={\v!samepage,\v!line},
+ \c!alternative=\s!default,
+ \c!separator=\crlf]
-\def\????correspondenceoption{@@@@correspondenceoption}
+% Options
\def\correspondenceoptionparameter
{\namedcorrespondenceoptionparameter\currentcorrespondenceoption}
\def\namedcorrespondenceoptionparameter#1#2%
- {\csname\ifcsname\????correspondenceoption#1#2\endcsname\????correspondenceoption#1#2\else\s!empty\fi\endcsname}
+ {\csname
+ \ifcsname\????correspondenceoption#1#2\endcsname
+ \????correspondenceoption#1#2%
+ \else\ifcsname\????correspondenceoption#2\endcsname
+ \????correspondenceoption#2%
+ \else
+ \s!empty
+ \fi\fi
+ \endcsname}
\unexpanded\def\setupcorrespondenceoption[#1]%
{\edef\currentcorrespondenceoption{#1}%
@@ -393,13 +454,19 @@
% Descriptions
-\def\????correspondencedescription{@@@@correspondencedescription}
-
\def\correspondencedescriptionparameter
{\namedcorrespondencedescriptionparameter\currentcorrespondencedescription}
\def\namedcorrespondencedescriptionparameter#1#2%
- {\csname\ifcsname\????correspondencedescription#1#2\endcsname\????correspondencedescription#1#2\else\s!empty\fi\endcsname}
+ {\csname
+ \ifcsname\????correspondencedescription#1#2\endcsname
+ \????correspondencedescription#1#2%
+ \else\ifcsname\????correspondencedescription#2\endcsname
+ \????correspondencedescription#2%
+ \else
+ \s!empty
+ \fi\fi
+ \endcsname}
\unexpanded\def\definecorrespondencedescription[#1][#2]%
{\edef\currentcorrespondencedescription{#1:#2}%
@@ -417,7 +484,7 @@
\unexpanded\def\setupcurrentcorrespondencedescription
{\getparameters[\????correspondencedescription\currentcorrespondencedescription]}
-\unexpanded\def\placecorrespondencedescription[#1][#2]%
+\unexpanded\def\placecorrespondencedescription#1#2%
{\begingroup
\edef\currentcorrespondencedescription{#1:#2}%
\ifcsname\????correspondencedescription\currentcorrespondencedescription\s!parent\endcsname
@@ -434,7 +501,7 @@
{\correspondencedescriptionparameter\c!width}
{\unhcopy\scratchbox}
{\correspondencedescriptionparameter\c!distance}%
- \executeifdefined{correspondence_description_location_\correspondencedescriptionparameter\c!location}{\getvalue{correspondence_description_location_\v!left}}%
+ \executeifdefined{\????correspondencedescriptionlocation\correspondencedescriptionparameter\c!location}{\getvalue{\????correspondencedescriptionlocation\v!left}}%
\correspondencedescriptionparameter\c!after
\doifsomethingelse{\correspondencedescriptionparameter\c!spaceafter}{\blank[\correspondencedescriptionparameter\c!spaceafter]}{\endgraf}%
\fi
@@ -443,29 +510,29 @@
\fi
\endgroup}
-\setvalue{correspondence_description_location_\v!left}%
+\setvalue{\????correspondencedescriptionlocation\v!left}%
{\EveryPar{\hangindent\scratchdimen\hangafter\zerocount}%
\setbox\scratchbox\hbox to \scratchdimen{\box\scratchbox\hss}%
\noindent\llap{\box\scratchbox}\correspondencedescriptionparameter\c!textcommand}
-\setvalue{correspondence_description_location_\v!top}%
+\setvalue{\????correspondencedescriptionlocation\v!top}%
{\noindent\box\scratchbox
\doisomethingelse{\correspondencedescriptionparameter\c!spaceinbetween}
{\blank[\correspondencedescriptionparameter\c!spaceinbetween]}
{\nobreak\endgraf}%
\correspondencedescriptionparameter\c!textcommand}
-\setvalue{correspondence_description_location_\v!text}%
+\setvalue{\????correspondencedescriptionlocation\v!text}%
{\noindent\scratchbox\scratchbox\correspondencedescriptionparameter\c!textcommand}
% Elements
\unexpanded\long\def\definecorrespondenceelement[#1][#2][#3][#4]#5%
- {\long\setvalue{correspondence_element_#1_#2_#3_#4}{#5}}
+ {\long\setvalue{\????correspondenceelement:#1:#2:#3:#4}{#5}}
\unexpanded\def\placecorrespondenceelement[#1][#2][#3][#4]%
- {\correspondenceparameters{#1}{#3}\empty
- \executeifdefined{correspondence_element_#1_#2_#3_#4}{\getvalue{correspondence_element_#1_#2_#3_\s!default}}}
+ {\correspondenceparameters{#1}{#3}{#2}%
+ \executeifdefined{\????correspondenceelement:#1:#2:#3:#4}{\getvalue{\????correspondenceelement:#1:#2:#3:\s!default}}}
% Files
@@ -511,13 +578,19 @@
% Style
-\def\????correspondencestyle{@@@@correspondencestyle}
-
\def\correspondencestyleparameter
{\namedcorrespondencestyleparameter\currentcorrespondencestyle}
\def\namedcorrespondencestyleparameter#1#2%
- {\csname\ifcsname\????correspondencestyle#1#2\endcsname\????correspondencestyle#1#2\else\s!empty\fi\endcsname}
+ {\csname
+ \ifcsname\????correspondencestyle#1#2\endcsname
+ \????correspondencestyle#1#2%
+ \else\ifcsname\????correspondencestyle#2\endcsname
+ \????correspondencestyle#2%
+ \else
+ \s!empty
+ \fi\fi
+ \endcsname}
\unexpanded\def\setupcorrespondencestyle[#1][#2][#3]%
{\def\dosetupcorrespondencestyle##1%
@@ -536,44 +609,44 @@
%D \section{Layout}
%D
%D \startitemize[packed]
-%D \item firstpage,
-%D \item secondpage,
-%D \item leftpage and
-%D \item rightpage.
+%D \item firstpage and
+%D \item secondpage.
%D \stopitemize
\newcount\correspondencepage
\appendtoks
- \setuplayout[\currentcorrespondence:\v!firstpage]%
+ \setuplayout[\????correspondencelayout\currentcorrespondence\v!firstpage]%
\global\correspondencepage\plusone
\to \everybeforecorrespondence
\appendtoks
- \everyaftershipout\expandafter{\the\everyaftershipout\setuplayout[\currentcorrespondence:\v!secondpage]}%
- \everyaftershipout\expandafter{\the\everyaftershipout\global\advance\correspondencepage\plusone }%
+ \everyaftershipout\expandafter{\the\everyaftershipout\setuplayout[\????correspondencelayout\currentcorrespondence\v!secondpage]}%
+ \everyaftershipout\expandafter{\the\everyaftershipout\global\advance\correspondencepage\plusone }%
\to \everybeforecorrespondence
\unexpanded\def\definecorrespondencelayout[#1][#2]%
- {\definelayout[#1:#2]}
+ {\def\currentcorrespondencelayout{#1#2}%
+ \definelayout[\????correspondencelayout\currentcorrespondencelayout]}
\unexpanded\def\setupcorrespondencelayout[#1][#2][#3]%
{\def\dosetupcorrespondencelayout##1%
- {\setuplayout[#1:##1][#3]}%
+ {\def\currentcorrespondencelayout{#1##1}%
+ \setuplayout[\????correspondencelayout\currentcorrespondencelayout][#3]}%
\processcommalist[#2]\dosetupcorrespondencelayout}
\appendtoks
- \expanded{\definecorrespondencelayout[\currentcorrespondence][\v!firstpage ]}%
- \expanded{\definecorrespondencelayout[\currentcorrespondence][\v!secondpage]}%
+ \definecorrespondencelayout[\currentcorrespondence][\v!firstpage ]%
+ \definecorrespondencelayout[\currentcorrespondence][\v!secondpage]%
\to \everydefinecorrespondence
% Lists
\unexpanded\def\definecorrespondenceelements[#1][#2][#3]%
- {\setvalue{correspondence_elements_#1_#2}{#3}}
+ {\setvalue{\????correspondenceelement:#1:#2}{#3}}
\def\accesscorrespondenceelements#1#2%
- {\executeifdefined{correspondence_elements_#1_#2}\empty}
+ {\executeifdefined{\????correspondenceelement:#1:#2}\empty}
% Extras
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi
index 714c0bbe941..e9b8446569f 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi
+++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi
@@ -1,6 +1,6 @@
%D \module
%D [ file=s-cor-00,
-%D version=2011.12.26,
+%D version=2012.01.15,
%D title=\CONTEXT\ User Module,
%D subtitle=Correspondence,
%D author=Wolfgang Schuster,
@@ -59,7 +59,6 @@
\setinterfacevariable {correspondence} {correspondence}
\setinterfacevariable {letter} {letter}
\setinterfacevariable {memo} {memo}
- \setinterfacevariable {firsthead} {firsthead}
\setinterfacevariable {nexthead} {nexthead}
\setinterfacevariable {lefthead} {lefthead}
\setinterfacevariable {righthead} {righthead}
@@ -128,9 +127,23 @@
\setinterfacemessage{correspondence}{3}{Undefined description '--' for the '--' environment}
\stopinterface
+% Namespaces
+
+\installnamespace {correspondence}
+\installnamespace {correspondencebuffer}
+\installnamespace {correspondencelayer}
+\installnamespace {correspondencelayerstate}
+\installnamespace {correspondenceframe}
+\installnamespace {correspondencesection}
+\installnamespace {correspondenceoption}
+\installnamespace {correspondencedescription}
+\installnamespace {correspondencedescriptionlocation}
+\installnamespace {correspondencestyle}
+\installnamespace {correspondenceelement}
+\installnamespace {correspondencelayout}
+
% Environment
-\installnamespace {correspondence}
\installcommandhandler \????correspondence {correspondence} \????correspondence
\unexpanded\def\correspondence_beg[#environment]%
@@ -143,7 +156,7 @@
{\iffirstargument
\setupcurrentcorrespondence[#parameters]%
\fi
- \dostartbuffer[\currentcorrespondence][\e!start\currentcorrespondence][\e!stop\currentcorrespondence]}
+ \grabbufferdatadirect{\????correspondencebuffer\currentcorrespondence}{\e!start\currentcorrespondence}{\e!stop\currentcorrespondence}}
\unexpanded\def\correspondence_end[#environment]%
{\correspondence_place[#environment]%
@@ -210,10 +223,7 @@
% Layers
-\installnamespace {correspondencelayer}
\installsimplecommandhandler \????correspondencelayer {correspondencelayer} \????correspondencelayer
-
-\installnamespace {correspondenceframe}
\installsimpleframedcommandhandler \????correspondenceframe {correspondenceframe} \????correspondenceframe
\unexpanded\def\correspondence_layer_define[#environment][#element]%
@@ -245,28 +255,28 @@
\setupcurrentcorrespondenceframe[#parameters]}%
\processcommalist[#elements]\correspondence_frame_command}
-\setvalue{correspondence_layer_state_\v!start }{\!!doneatrue \!!donebfalse \!!donecfalse}
-\setvalue{correspondence_layer_state_\v!stop }{\!!doneafalse \!!donebfalse \!!donecfalse}
-\setvalue{correspondence_layer_state_\v!next }{\!!doneafalse \!!donebtrue \!!donectrue }
-\setvalue{correspondence_layer_state_\v!repeat}{\!!doneatrue \!!donebtrue \!!donectrue }
-\setvalue{correspondence_layer_state_\v!left }{\!!doneafalse \!!donebfalse \!!donectrue }
-\setvalue{correspondence_layer_state_\v!right }{\!!doneafalse \!!donebtrue \!!donecfalse}
-\setvalue{correspondence_layer_state_\v!even }{\!!doneafalse \!!donebfalse \!!donectrue }
-\setvalue{correspondence_layer_state_\v!odd }{\!!doneafalse \!!donebtrue \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!start }{\!!doneatrue \!!donebfalse \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!stop }{\!!doneafalse \!!donebfalse \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!next }{\!!doneafalse \!!donebtrue \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!repeat}{\!!doneatrue \!!donebtrue \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!left }{\!!doneafalse \!!donebfalse \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!right }{\!!doneafalse \!!donebtrue \!!donecfalse}
+\setvalue{\????correspondencelayerstate\v!even }{\!!doneafalse \!!donebfalse \!!donectrue }
+\setvalue{\????correspondencelayerstate\v!odd }{\!!doneafalse \!!donebtrue \!!donecfalse}
\unexpanded\def\correspondence_layer_place#environment#element%
{\correspondence_parameters{#environment}{#element}\v!layer
- \expandcheckedcsname{correspondence_layer_state_}{\correspondencelayerparameter\c!state}\v!stop
+ \expandcheckedcsname\????correspondencelayerstate{\correspondencelayerparameter\c!state}\v!stop
\ifnum\c_correspondence_page=\plusone
- \if!!donea\correspondence_layer_direct\fi
+ \if!!donea\doubleexpandafter\correspondence_layer_direct\else\doubleexpandafter\gobbletwoarguments\fi
\else\ifodd\c_correspondence_page
- \if!!doneb\correspondence_layer_direct\fi
+ \if!!doneb\tripleexpandafter\correspondence_layer_direct\else\tripleexpandafter\gobbletwoarguments\fi
\else
- \if!!donec\correspondence_layer_direct\fi
- \fi\fi
+ \if!!donec\tripleexpandafter\correspondence_layer_direct\else\tripleexpandafter\gobbletwoarguments\fi
+ \fi\fi{#environment}{#element}%
\tightlayer[\currentcorrespondencelayer]}
-\unexpanded\def\correspondence_layer_direct
+\unexpanded\def\correspondence_layer_direct#environment#element%
{\setlayer
[\currentcorrespondencelayer]
{\inheritedcorrespondenceframeframed
@@ -275,7 +285,7 @@
\doadaptrightskip{\correspondencelayerparameter\c!rightmargin}%
\doifsymboldefinedelse{\correspondencelayerparameter\c!symbol}%
{\symbol[\correspondencelayerparameter\c!symbol]}
- {\texsetup\currentcorrespondencecontent}}}}
+ {\correspondence_element_place[#environment][\v!layer][#element][\correspondencelayerparameter\c!alternative]}}}}
\unexpanded\def\correspondence_layer_check[#environment][#element]%
{\def\currentcorrespondencelayer{#environment:#element}%
@@ -285,6 +295,8 @@
\setupcorrespondencelayer
[ \c!state=\v!start,
+ \c!x=\zeropoint,
+ \c!y=\zeropoint,
\c!alternative=\s!default,
\c!distance=\lineheight,
\c!separator=\crlf]
@@ -296,7 +308,6 @@
% Sections
-\installnamespace {correspondencesection}
\installsimplecommandhandler \????correspondencesection {correspondencesection} \????correspondencesection
\unexpanded\def\correspondence_section_define[#environment][#element]%
@@ -320,7 +331,7 @@
\doifsomething{\correspondencesectionparameter\c!align }{\setupalign [\correspondencesectionparameter\c!align ]}%
\doifsomething{\correspondencesectionparameter\c!indenting}{\setupindenting[\correspondencesectionparameter\c!indenting]}%
\usecorrespondencesectionstyleandcolor\c!style\c!color
- \texsetup\currentcorrespondencecontent
+ \correspondence_element_place[#environment][\v!section][#element][\correspondencesectionparameter\c!alternative]%
\correspondencesectionparameter\c!after
\doifsomethingelse{\correspondencesectionparameter\c!spaceafter }{\blank[\correspondencesectionparameter\c!spaceafter ]}{\endgraf}%
\else
@@ -337,7 +348,6 @@
% Options
-\installnamespace {correspondenceoption}
\installsimplecommandhandler \????correspondenceoption {correspondenceoption} \????correspondenceoption
\unexpanded\def\correspondence_option_setup[#environment]%
@@ -355,7 +365,6 @@
% Descriptions
-\installnamespace {correspondencedescription}
\installsimplecommandhandler \????correspondencedescription {correspondencedescription} \????correspondencedescription
\unexpanded\def\correspondence_description_define[#environment][#element]%
@@ -368,7 +377,7 @@
\setupcurrentcorrespondencedescription[#parameters]}%
\processcommalist[#elements]\correspondence_description_command}
-\unexpanded\def\correspondence_description_place[#environment][#element]%
+\unexpanded\def\correspondence_description_place#environment#element%
{\begingroup
\edef\currentcorrespondencedescription{#environment:#element}%
\ifcsname\currentcorrespondencedescriptionhash\s!parent\endcsname
@@ -380,11 +389,11 @@
{\usecorrespondencedescriptionstyleandcolor\c!headstyle\c!headcolor
\correspondencedescriptionparameter\c!headcommand}%
\assignwidth
- {\scratchdimen}
{\correspondencedescriptionparameter\c!width}
+ {\scratchdimen}
{\unhcopy\scratchbox}
{\correspondencedescriptionparameter\c!distance}%
- \expandcheckedcsname{correspondence_description_location_}{\correspondencedescriptionparameter\c!location}\v!left
+ \expandcheckedcsname\????correspondencedescriptionlocation{\correspondencedescriptionparameter\c!location}\v!left
\correspondencedescriptionparameter\c!after
\doifsomethingelse{\correspondencedescriptionparameter\c!spaceafter}{\blank[\correspondencedescriptionparameter\c!spaceafter]}{\endgraf}%
\fi
@@ -393,19 +402,19 @@
\fi
\endgroup}
-\setvalue{correspondence_description_location_\v!left}%
+\setvalue{\????correspondencedescriptionlocation\v!left}%
{\EveryPar{\hangindent\scratchdimen\hangafter\zerocount}%
\setbox\scratchbox\hbox to \scratchdimen{\box\scratchbox\hss}%
\noindent\llap{\box\scratchbox}\correspondencedescriptionparameter\c!textcommand}
-\setvalue{correspondence_description_location_\v!top}%
+\setvalue{\????correspondencedescriptionlocation\v!top}%
{\noindent\box\scratchbox
\doisomethingelse{\correspondencedescriptionparameter\c!spaceinbetween}
{\blank[\correspondencedescriptionparameter\c!spaceinbetween]}
{\nobreak\endgraf}%
\correspondencedescriptionparameter\c!textcommand}
-\setvalue{correspondence_description_location_\v!text}%
+\setvalue{\????correspondencedescriptionlocation\v!text}%
{\noindent\scratchbox\scratchbox\correspondencedescriptionparameter\c!textcommand}
\setupcorrespondencedescription
@@ -415,11 +424,11 @@
% Elements
\unexpanded\def\correspondence_element_define[#environment][#type][#element][#name]#content%
- {\setvalue{correspondence_element_#environment_#type_#element_#name}{#content}}
+ {\setvalue{\????correspondenceelement:#environment:#type:#element:#name}{#content}}
\unexpanded\def\correspondence_element_place[#environment][#type][#element][#name]%
- {\correspondence_parameters{#environment}{#element}\empty
- \expandcheckedcsname{correspondence_element_#environment_#type_#element_}{#name}\s!default}
+ {\correspondence_parameters{#environment}{#element}{#type}%
+ \expandcheckedcsname{\????correspondenceelement:#environment:#type:#element:}{#name}\s!default}
% Files
@@ -430,7 +439,6 @@
% Style
-\installnamespace {correspondencestyle}
\installsimplecommandhandler \????correspondencestyle {correspondencestyle} \????correspondencestyle
\unexpanded\def\correspondence_style_setup[#environment][#elements][#parameters]%
@@ -455,38 +463,39 @@
\newcount\c_correspondence_page
-\ifdefined\changetolayout \else \let\changetolayout\page_layouts_change \fi
-
\installlayoutmethod \v!correspondence
{\global\advance\c_correspondence_page\plusone
\ifnum\c_correspondence_page=\plusone
- \changetolayout{\currentcorrespondence:\v!firstpage}%
+ \changetolayout{\????correspondencelayout\currentcorrespondence\v!firstpage}%
\else\ifodd\c_correspondence_page
- \changetolayout{\currentcorrespondence:\v!rightpage}%
+ \changetolayout{\????correspondencelayout\currentcorrespondence\v!rightpage}%
\else
- \changetolayout{\currentcorrespondence:\v!leftpage }%
+ \changetolayout{\????correspondencelayout\currentcorrespondence\v!leftpage }%
\fi\fi}
\unexpanded\def\correspondence_layout_define
- {\dotripleempty\correspondence_layout_parameters}
+ {\dotripleempty\correspondence_layout_define_indeed}
-\unexpanded\def\correspondence_layout_parameters[#environment][#self][#parent]%
- {\ifthirdargument
- \definelayout[#environment:#self][#environment:#parent]%
+\unexpanded\def\correspondence_layout_define_indeed[#environment][#self][#parent]%
+ {\def\m_correspondence_layout_self {#environment#self}%
+ \def\m_correspondence_layout_parent{#environment#parent}%
+ \ifthirdargument
+ \definelayout[\????correspondencelayout\m_correspondence_layout_self][\????correspondencelayout\m_correspondence_layout_parent]%
\else
- \definelayout[#environment:#self]%
+ \definelayout[\????correspondencelayout\m_correspondence_layout_self]%
\fi}
\unexpanded\def\correspondence_layout_setup[#environment][#elements][#parameters]%
{\def\correspondence_layout_command#element%
- {\setuplayout[#environment:#element][#parameters]}%
+ {\def\m_correspondence_layout_current{#environment#element}%
+ \setuplayout[\????correspondencelayout\m_correspondence_layout_current][#parameters]}%
\processcommalist[#elements]\correspondence_layout_command}
\appendtoks
- \normalexpanded{\correspondence_layout_define[\currentcorrespondence][\v!firstpage ]}%
- \normalexpanded{\correspondence_layout_define[\currentcorrespondence][\v!secondpage]}%
- \normalexpanded{\correspondence_layout_define[\currentcorrespondence][\v!leftpage ][\v!secondpage]}%
- \normalexpanded{\correspondence_layout_define[\currentcorrespondence][\v!rightpage ][\v!secondpage]}%
+ \correspondence_layout_define[\currentcorrespondence][\v!firstpage ]%
+ \correspondence_layout_define[\currentcorrespondence][\v!secondpage]%
+ \correspondence_layout_define[\currentcorrespondence][\v!leftpage ][\v!secondpage]%
+ \correspondence_layout_define[\currentcorrespondence][\v!rightpage ][\v!secondpage]%
\to \everydefinecorrespondence
% Lists
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkii b/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkii
index 42dd26f596d..44d10174c21 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkii
+++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkii
@@ -1,6 +1,6 @@
%D \module
%D [ file=s-cor-01,
-%D version=2011.12.26,
+%D version=2012.01.15,
%D title=\CONTEXT\ User Module,
%D subtitle=Letters,
%D author=Wolfgang Schuster,
@@ -109,8 +109,11 @@
% Setups
+% layer: head
+
\defineletterelement[\v!layer][\v!head][\s!default]
- {\correspondenceparameter\c!fromname
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \correspondenceparameter\c!fromname
\doifsomething{\correspondenceparameter\c!fromname}\\
\correspondenceparameter\c!fromaddress}
@@ -163,12 +166,13 @@
\egroup}
\defineletterelement[\v!layer][\v!head][\v!gbrief]
- {\correspondenceparameter\c!fromname\hrule}
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \correspondenceparameter\c!fromname\hrule}
-\startsetups[\v!letter:\v!layer:\v!head]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!head][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!head][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!head}}
+
+% layer: nexthead
\defineletterelement[\v!layer][\v!nexthead][\v!gbrief]
{\maxaligned
@@ -211,20 +215,20 @@
\midaligned{\currentdate}%
\llap{\lettertext\v!page\subpagenumber}}}
-\startsetups[\v!letter:\v!layer:\v!nexthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!nexthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!nexthead][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!nexthead}}
-\startsetups[\v!letter:\v!layer:\v!lefthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!lefthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: lefthead
-\startsetups[\v!letter:\v!layer:\v!righthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!righthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!lefthead][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!lefthead}}
+
+% layer: righthead
+
+\defineletterelement[\v!layer][\v!righthead][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!righthead}}
+
+% layer: foot
\defineletterelement[\v!layer][\v!foot][\v!gbrief]
{\bTABLE[\c!frame=\v!off,\c!width=.25\hsize,\c!offset=\zeropoint]
@@ -242,51 +246,53 @@
\eTR
\eTABLE}
+\defineletterelement[\v!layer][\v!foot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!foot}}
-\startsetups[\v!letter:\v!layer:\v!foot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!foot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: nextfoot
-\startsetups[\v!letter:\v!layer:\v!nextfoot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!nextfoot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!nextfoot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!nextfoot}}
-\startsetups[\v!letter:\v!layer:\v!leftfoot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!leftfoot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: leftfoot
-\startsetups[\v!letter:\v!layer:\v!rightfoot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!rightfoot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!leftfoot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!leftfoot}}
+
+% layer: rightfoot
+
+\defineletterelement[\v!layer][\v!rightfoot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!rightfoot}}
+
+% layer: address
\defineletterelement[\v!layer][\v!address][\s!default]
- {\doifsomething{\correspondenceparameter\c!dispatch}{\correspondenceparameter\c!dispatch\\}%
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \doifsomething{\correspondenceparameter\c!dispatch}{\correspondenceparameter\c!dispatch\\}%
\doifsomething{\correspondenceparameter\c!toname }{\correspondenceparameter\c!toname \\}%
\correspondenceparameter\c!toaddress}
-\startsetups[\v!letter:\v!layer:\v!address]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!address][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!address][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!address}}
+
+% layer: backaddress
\defineletterelement[\v!layer][\v!backaddress][\s!default]
- {\correspondenceparameter\c!fromname
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \correspondenceparameter\c!fromname
\doifsomething{\correspondenceparameter\c!fromaddress}\\
\correspondenceparameter\c!fromaddress}
\defineletterelement[\v!layer][\v!backaddress][\v!auto]
- {\doifsomethingelse{\correspondenceparameter\c!backaddress}
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \doifsomethingelse{\correspondenceparameter\c!backaddress}
{\correspondenceparameter\c!backaddress}
{\letterelement[\v!layer][\v!backaddress][\s!default]}}
-\startsetups[\v!letter:\v!layer:\v!backaddress]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!backaddress][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!backaddress][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!backaddress}}
+
+% layer: reference
\defineletterelement[\v!layer][\v!reference][\s!default]
{\correspondenceparameter\c!reference}
@@ -400,120 +406,127 @@
\processcommacommand[\correspondencelayerparameter\c!list]\doformatletterreferenceE
\egroup}
-\startsetups[\v!letter:\v!layer:\v!reference]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!reference][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!reference][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!reference}}
+
+% layer: location
\defineletterelement[\v!layer][\v!location][\v!french]
- {\doifsomething{\correspondenceparameter\c!place}{\correspondenceparameter\c!place\\}%
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \doifsomething{\correspondenceparameter\c!place}{\correspondenceparameter\c!place\\}%
\correspondenceparameter\c!date}
-\startsetups[\v!letter:\v!layer:\v!location]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!location][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!location][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!location}}
-\startsetups[\v!letter:\v!layer:\v!topmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!topmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: topmark
-\startsetups[\v!letter:\v!layer:\v!botmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!botmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!topmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!topmark}}
-\startsetups[\v!letter:\v!layer:\v!cutmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!cutmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: botmark
-\startsetups[\v!letter:\v!layer:\v!endmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!endmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!botmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!botmark}}
-\startsetups[\v!letter:\v!layer:\v!usermark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!usermark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: cutmark
-\startsetups[\v!letter:\v!layer:\v!lettermain]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!lettermain][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!cutmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!cutmark}}
-\startsetups[\v!letter:\v!layer:\v!letternext]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!letternext][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: endmark
+
+\defineletterelement[\v!layer][\v!endmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!endmark}}
+
+% layer: usermark
+
+\defineletterelement[\v!layer][\v!usermark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!usermark}}
+
+% layer: lettermain
+
+\defineletterelement[\v!layer][\v!lettermain][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!lettermain}}
+
+% layer: letternext
+
+\defineletterelement[\v!layer][\v!letternext][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!letternext}}
+
+% section: head
\defineletterelement[\v!section][\v!head][\v!blockstyle]
{\correspondenceparameter\c!fromaddress}
-\startsetups[\v!letter:\v!section:\v!head]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!head][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!head][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!head}}
+
+% section: date
\defineletterelement[\v!section][\v!date][\v!blockstyle]
{\correspondenceparameter\c!date}
-\startsetups[\v!letter:\v!section:\v!date]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!date][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!date][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!date}}
+
+% section: reference
\defineletterelement[\v!section][\v!reference][\v!blockstyle]
- {\correspondenceparameter\c!reference}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!reference}
-\startsetups[\v!letter:\v!section:\v!reference]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!reference][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!reference][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!reference}}
+
+% section: specialnotation
\defineletterelement[\v!section][\v!specialnotation][\v!blockstyle]
- {\correspondenceparameter\c!dispatch}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!dispatch}
-\startsetups[\v!letter:\v!section:\v!specialnotation]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!specialnotation][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!specialnotation][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!specialnotation}}
+
+% section: address
\defineletterelement[\v!section][\v!address][\v!blockstyle]
- {\correspondenceparameter\c!toname
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!toname
\doifsomething{\correspondenceparameter\c!toname}\\
\correspondenceparameter\c!toaddress}
\defineletterelement[\v!section][\v!address][\v!knuth]
{\letterelement[\v!section][\v!address][\v!blockstyle]}
-\startsetups[\v!letter:\v!section:\v!address]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!address][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!address][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!address}}
+
+% section: title
\defineletterelement[\v!section][\v!title][\s!default]
- {\doifsomethingelse{\correspondenceparameter\c!title}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doifsomethingelse{\correspondenceparameter\c!title}
{\correspondenceparameter\c!title}
{\lettertext\v!attention\correspondenceparameter\c!attention}}
-\startsetups[\v!letter:\v!section:\v!title]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!title][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!title][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!title}}
+
+% section: subject
\defineletterelement[\v!section][\v!subject][\s!default]
- {\lettertext\v!subject\correspondenceparameter\c!subject}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \lettertext\v!subject\correspondenceparameter\c!subject}
-\startsetups[\v!letter:\v!section:\v!subject]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!subject][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!subject][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!subject}}
+
+% section: opening
\defineletterelement[\v!section][\v!opening][\s!default]
- {\doifsomethingelse{\correspondenceparameter\c!opening}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doifsomethingelse{\correspondenceparameter\c!opening}
{\correspondenceparameter\c!opening}
{\correspondenceparameter\c!salutation}}
@@ -521,26 +534,30 @@
{\doifsomething{\correspondenceoptionparameter\c!indenting}{\setupindenting[\correspondenceoptionparameter\c!indenting]}%
\letterelement[\v!section][\v!opening][\s!default]}
-\startsetups[\v!letter:\v!section:\v!opening]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!opening][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!opening][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!opening}}
+
+% section: content
\defineletterelement[\v!section][\v!content][\s!default]
- {\getbuffer[\v!letter]}
+ {\setupbuffer[\c!before=,\c!after=]%
+ \getbuffer [\????correspondencebuffer\v!letter]}
-\startsetups[\v!letter:\v!section:\v!content]
-\letterelement[\v!section][\v!content][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!content][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!content}}
+
+% section: closing
\defineletterelement[\v!section][\v!closing][\s!default]
- {\correspondenceparameter\c!closing
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
\correspondenceparameter\c!signature}}
\defineletterelement[\v!section][\v!closing][\v!french]
- {\doifsomething{\correspondenceoptionparameter\c!indenting}{\setupindenting[\correspondenceoptionparameter\c!indenting,\v!first]}%
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doifsomething{\correspondenceoptionparameter\c!indenting}{\setupindenting[\correspondenceoptionparameter\c!indenting,\v!first]}%
\correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
@@ -548,25 +565,26 @@
\correspondenceparameter\c!signature\endgraf}}
\defineletterelement[\v!section][\v!closing][\v!knuth]
- {\doadaptleftskip{\dimexpr\textwidth/13*8\relax}%
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doadaptleftskip{\dimexpr\textwidth/13*8\relax}%
\correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
\correspondenceparameter\c!signature}}
-\startsetups[\v!letter:\v!section:\v!closing]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!closing][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!closing][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!closing}}
+
+% section: appendices
\defineletterelement[\v!section][\v!appendices][\s!default]
- {\startpacked
- \expanded{\processcommalistwithparameters[\accesscorrespondenceelements\v!letter\v!description]}{\placecorrespondencedescription[\v!letter]}%
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
+ \processcommacommand[\accesscorrespondenceelements\v!letter\v!description]{\placecorrespondencedescription\v!letter}%
\stoppacked}
-\startsetups[\v!letter:\v!section:\v!appendices]
-\letterelement[\v!section][\v!appendices][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!appendices][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!appendices}}
\startsetups[\v!letter:\v!place]
\placecorrespondence[\v!letter]
@@ -580,7 +598,10 @@
\appendtoks
\ifx\currentcorrespondence\v!letter
- \doif{\correspondenceoptionparameter\c!option}\v!test{\useletterstyle[test]}%
+ \processallactionsinset
+ [\correspondenceoptionparameter\c!option]
+ [ \v!test=>{\useletterstyle[test]},
+ \v!setups=>{\useletterstyle[setups]}]%
\fi
\to \everybeforecorrespondence
@@ -603,19 +624,21 @@
% Labels
+\def\????lettertext{@@@@lettertext}
+
\def\setuplettertext
{\dodoubleempty\dosetuplettertext}
\def\dosetuplettertext[#1][#2]%
{\ifsecondargument
- \def\dodosetuplettertext##1{\setuplabeltext[#1][\v!letter:##1]}%
+ \def\dodosetuplettertext##1{\setuplabeltext[#1][\????lettertext##1]}%
\processcommalist[#2]\dodosetuplettertext
\else
- \def\dodosetuplettertext##1{\setuplabeltext [\v!letter:##1]}%
+ \def\dodosetuplettertext##1{\setuplabeltext [\????lettertext##1]}%
\processcommalist[#1]\dodosetuplettertext
\fi}
-\def\lettertext#1{\labeltext{\v!letter:#1}}
+\def\lettertext#1{\labeltext{\????lettertext#1}}
% name:
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi b/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi
index 39e968391b3..ed31fce624c 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi
+++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi
@@ -1,6 +1,6 @@
%D \module
%D [ file=s-cor-01,
-%D version=2011.11.26,
+%D version=2012.01.15,
%D title=\CONTEXT\ User Module,
%D subtitle=Letters,
%D author=Wolfgang Schuster,
@@ -109,8 +109,11 @@
% Setups
+% layer: head
+
\defineletterelement[\v!layer][\v!head][\s!default]
- {\correspondenceparameter\c!fromname
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \correspondenceparameter\c!fromname
\doifsomething{\correspondenceparameter\c!fromname}\\
\correspondenceparameter\c!fromaddress}
@@ -169,12 +172,13 @@
\egroup}
\defineletterelement[\v!layer][\v!head][\v!gbrief]
- {\correspondenceparameter\c!fromname\hrule}
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \correspondenceparameter\c!fromname\hrule}
-\startsetups[\v!letter:\v!layer:\v!head]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!head][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!head][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!head}}
+
+% layer: nexthead
\defineletterelement[\v!layer][\v!nexthead][\v!gbrief]
{\maxaligned
@@ -217,20 +221,20 @@
\midaligned{\currentdate}%
\llap{\lettertext\v!page\subpagenumber}}}
-\startsetups[\v!letter:\v!layer:\v!nexthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!nexthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!nexthead][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!nexthead}}
-\startsetups[\v!letter:\v!layer:\v!lefthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!lefthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: lefthead
-\startsetups[\v!letter:\v!layer:\v!righthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!righthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!lefthead][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!lefthead}}
+
+% layer: righthead
+
+\defineletterelement[\v!layer][\v!righthead][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!righthead}}
+
+% layer: foot
\defineletterelement[\v!layer][\v!foot][\v!gbrief]
{\bTABLE[\c!frame=\v!off,\c!width=.25\hsize,\c!offset=\zeropoint]
@@ -248,50 +252,53 @@
\eTR
\eTABLE}
-\startsetups[\v!letter:\v!layer:\v!foot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!foot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!foot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!foot}}
-\startsetups[\v!letter:\v!layer:\v!nextfoot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!nextfoot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: nextfoot
-\startsetups[\v!letter:\v!layer:\v!leftfoot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!leftfoot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!nextfoot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!nextfoot}}
-\startsetups[\v!letter:\v!layer:\v!rightfoot]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!rightfoot][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: leftfoot
+
+\defineletterelement[\v!layer][\v!leftfoot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!leftfoot}}
+
+% layer: rightfoot
+
+\defineletterelement[\v!layer][\v!rightfoot][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!rightfoot}}
+
+% layer: address
\defineletterelement[\v!layer][\v!address][\s!default]
- {\doifsomething{\correspondenceparameter\c!dispatch}{\correspondenceparameter\c!dispatch\\}%
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \doifsomething{\correspondenceparameter\c!dispatch}{\correspondenceparameter\c!dispatch\\}%
\doifsomething{\correspondenceparameter\c!toname }{\correspondenceparameter\c!toname \\}%
\correspondenceparameter\c!toaddress}
-\startsetups[\v!letter:\v!layer:\v!address]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!address][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!address][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!address}}
+
+% layer: backaddress
\defineletterelement[\v!layer][\v!backaddress][\s!default]
- {\correspondenceparameter\c!fromname
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \correspondenceparameter\c!fromname
\doifsomething{\correspondenceparameter\c!fromaddress}\\
\correspondenceparameter\c!fromaddress}
\defineletterelement[\v!layer][\v!backaddress][\v!auto]
- {\doifsomethingelse{\correspondenceparameter\c!backaddress}
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \doifsomethingelse{\correspondenceparameter\c!backaddress}
{\correspondenceparameter\c!backaddress}
{\letterelement[\v!layer][\v!backaddress][\s!default]}}
-\startsetups[\v!letter:\v!layer:\v!backaddress]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!backaddress][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!backaddress][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!backaddress}}
+
+% layer: reference
\defineletterelement[\v!layer][\v!reference][\s!default]
{\correspondenceparameter\c!reference}
@@ -311,120 +318,129 @@
\defineletterelement[\v!layer][\v!reference][\v!e] % width
{\ctxlua{thirddata.correspondence.letter.reference_e("\v!letter","\correspondencelayerparameter\c!list")}}
-\startsetups[\v!letter:\v!layer:\v!reference]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!reference][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!reference][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!reference}}
+
+% layer: location
\defineletterelement[\v!layer][\v!location][\v!french]
- {\doifsomething{\correspondenceparameter\c!place}{\correspondenceparameter\c!place\\}%
+ {\def\\{\correspondencelayerparameter\c!separator}%
+ \doifsomething{\correspondenceparameter\c!place}{\correspondenceparameter\c!place\\}%
\correspondenceparameter\c!date}
-\startsetups[\v!letter:\v!layer:\v!location]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!location][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!location][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!location}}
-\startsetups[\v!letter:\v!layer:\v!topmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!topmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: topmark
-\startsetups[\v!letter:\v!layer:\v!botmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!botmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!topmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!topmark}}
-\startsetups[\v!letter:\v!layer:\v!cutmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!cutmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: botmark
-\startsetups[\v!letter:\v!layer:\v!endmark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!endmark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!botmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!botmark}}
-\startsetups[\v!letter:\v!layer:\v!usermark]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!usermark][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: cutmark
-\startsetups[\v!letter:\v!layer:\v!lettermain]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!lettermain][\correspondencelayerparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!layer][\v!cutmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!cutmark}}
-\startsetups[\v!letter:\v!layer:\v!letternext]
-\def\\{\correspondencelayerparameter\c!separator}
-\letterelement[\v!layer][\v!letternext][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% layer: endmark
+
+\defineletterelement[\v!layer][\v!endmark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!endmark}}
+
+% layer: usermark
+
+\defineletterelement[\v!layer][\v!usermark][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!usermark}}
+
+% layer: lettermain
+
+\defineletterelement[\v!layer][\v!lettermain][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!lettermain}}
+
+% layer: letternext
+
+\defineletterelement[\v!layer][\v!letternext][\v!setups]
+ {\texsetup{\v!letter:\v!layer:\v!letternext}}
+
+% section: head
\defineletterelement[\v!section][\v!head][\v!blockstyle]
- {\correspondenceparameter\c!fromaddress}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!fromaddress}
-\startsetups[\v!letter:\v!section:\v!head]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!head][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!head][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!head}}
+
+% section: date
\defineletterelement[\v!section][\v!date][\v!blockstyle]
- {\correspondenceparameter\c!date}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!date}
-\startsetups[\v!letter:\v!section:\v!date]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!date][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!date][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!date}}
+
+% section: reference
\defineletterelement[\v!section][\v!reference][\v!blockstyle]
- {\correspondenceparameter\c!reference}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!reference}
-\startsetups[\v!letter:\v!section:\v!reference]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!reference][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!reference][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!reference}}
+
+% section: specialnotation
\defineletterelement[\v!section][\v!specialnotation][\v!blockstyle]
- {\correspondenceparameter\c!dispatch}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!dispatch}
-\startsetups[\v!letter:\v!section:\v!specialnotation]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!specialnotation][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!specialnotation][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!specialnotation}}
+
+% section: address
\defineletterelement[\v!section][\v!address][\v!blockstyle]
- {\correspondenceparameter\c!toname
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!toname
\doifsomething{\correspondenceparameter\c!toname}\\
\correspondenceparameter\c!toaddress}
\defineletterelement[\v!section][\v!address][\v!knuth]
{\letterelement[\v!section][\v!address][\v!blockstyle]}
-\startsetups[\v!letter:\v!section:\v!address]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!address][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!address][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!address}}
+
+% section: title
\defineletterelement[\v!section][\v!title][\s!default]
- {\doifsomethingelse{\correspondenceparameter\c!title}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doifsomethingelse{\correspondenceparameter\c!title}
{\correspondenceparameter\c!title}
{\lettertext\v!attention\correspondenceparameter\c!attention}}
-\startsetups[\v!letter:\v!section:\v!title]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!title][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!title][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!title}}
+
+% section: subject
\defineletterelement[\v!section][\v!subject][\s!default]
- {\lettertext\v!subject\correspondenceparameter\c!subject}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \lettertext\v!subject\correspondenceparameter\c!subject}
-\startsetups[\v!letter:\v!section:\v!subject]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!subject][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!subject][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!subject}}
+
+% section: opening
\defineletterelement[\v!section][\v!opening][\s!default]
- {\doifsomethingelse{\correspondenceparameter\c!opening}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doifsomethingelse{\correspondenceparameter\c!opening}
{\correspondenceparameter\c!opening}
{\correspondenceparameter\c!salutation}}
@@ -432,26 +448,29 @@
{\doifsomething{\correspondenceoptionparameter\c!indenting}{\setupindenting[\correspondenceoptionparameter\c!indenting]}%
\letterelement[\v!section][\v!opening][\s!default]}
-\startsetups[\v!letter:\v!section:\v!opening]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!opening][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!opening][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!opening}}
+
+% section: content
\defineletterelement[\v!section][\v!content][\s!default]
- {\getbuffer[\v!letter]}
+ {\getbufferdata[\????correspondencebuffer\v!letter]}
-\startsetups[\v!letter:\v!section:\v!content]
-\letterelement[\v!section][\v!content][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!content][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!content}}
+
+% section: closing
\defineletterelement[\v!section][\v!closing][\s!default]
- {\correspondenceparameter\c!closing
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
\correspondenceparameter\c!signature}}
\defineletterelement[\v!section][\v!closing][\v!french]
- {\doifsomething{\correspondenceoptionparameter\c!indenting}{\setupindenting[\correspondenceoptionparameter\c!indenting,\v!first]}%
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doifsomething{\correspondenceoptionparameter\c!indenting}{\setupindenting[\correspondenceoptionparameter\c!indenting,\v!first]}%
\correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
@@ -459,29 +478,31 @@
\correspondenceparameter\c!signature\endgraf}}
\defineletterelement[\v!section][\v!closing][\v!simplified]
- {\doifsomething{\correspondenceparameter\c!signature}{\blank[\correspondencesectionparameter\c!spaceinbetween]}%
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doifsomething{\correspondenceparameter\c!signature}{\blank[\correspondencesectionparameter\c!spaceinbetween]}%
\correspondenceparameter\c!signature}
\defineletterelement[\v!section][\v!closing][\v!knuth]
- {\doadaptleftskip{\dimexpr\textwidth/13*8\relax}%
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \doadaptleftskip{\dimexpr\textwidth/13*8\relax}%
\correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
\correspondenceparameter\c!signature}}
-\startsetups[\v!letter:\v!section:\v!closing]
-\def\\{\correspondencesectionparameter\c!separator}
-\letterelement[\v!section][\v!closing][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!closing][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!closing}}
+
+% section: appendices
\defineletterelement[\v!section][\v!appendices][\s!default]
- {\startpacked
- \normalexpanded{\processcommalistwithparameters[\correspondence_elements_access\v!letter\v!description]}{\correspondence_description_place[\v!letter]}%
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
+ \processcommacommand[\correspondence_elements_access\v!letter\v!description]{\correspondence_description_place\v!letter}%
\stoppacked}
-\startsetups[\v!letter:\v!section:\v!appendices]
-\letterelement[\v!section][\v!appendices][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\defineletterelement[\v!section][\v!appendices][\v!setups]
+ {\texsetup{\v!letter:\v!section:\v!appendices}}
\startsetups[\v!letter:\v!place]
\correspondence_place[\v!letter]
@@ -495,7 +516,10 @@
\appendtoks
\ifx\currentcorrespondence\v!letter
- \doif{\correspondenceoptionparameter\c!option}\v!test{\useletterstyle[test]}%
+ \processallactionsinset
+ [\correspondenceoptionparameter\c!option]
+ [ \v!test=>{\useletterstyle[test]},
+ \v!setups=>{\useletterstyle[setups]}]%
\fi
\to \t_correspondence_before
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkii b/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkii
index 4a3fc34299c..27097eaf362 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkii
+++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkii
@@ -1,6 +1,6 @@
%D \module
%D [ file=s-cor-02,
-%D version=2011.12.24,
+%D version=2012.01.15,
%D title=\CONTEXT\ User Module,
%D subtitle=Memos,
%D author=Wolfgang Schuster,
@@ -59,7 +59,7 @@
% Layers
-\definememolayer [\v!firsthead]
+\definememolayer [\v!head]
\definememolayer [\v!nexthead]
\definememolayer [\v!lefthead]
\definememolayer [\v!righthead]
@@ -95,11 +95,98 @@
% Setups
+% layer: head
+
+\definememoelement[\v!layer][\v!head][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!head}}
+
+% layer: nexthead
+
+\definememoelement[\v!layer][\v!nexthead][\v!fullblock]
+ {\maxaligned
+ {\rlap{\correspondenceparameter\c!toname}%
+ \midaligned{\pagenumber}%
+ \llap{\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=\v!left]
+ {\correspondenceparameter\c!date \\
+ \correspondenceparameter\c!reference}}}}
+
+\definememoelement[\v!layer][\v!nexthead][\v!hanging]
+ {\maxaligned
+ {\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=v!right]
+ {\correspondenceparameter\c!toname \\
+ \correspondenceparameter\c!date \\
+ \correspondenceparameter\c!reference \\
+ \memotext\c!page\pagenumber}}\hss}
+
+\definememoelement[\v!layer][\v!nexthead][\v!semiblock]
+ {\maxaligned
+ {\rlap{\correspondenceparameter\c!toname}%
+ \midaligned{\pagenumber}%
+ \llap{\correspondenceparameter\c!date}}}
+
+\definememoelement[\v!layer][\v!nexthead][\v!simplified]
+ {\memoelement[\v!layer][\v!nexthead][\v!fullblock]}
+
+\definememoelement[\v!layer][\v!nexthead][\v!modified]
+ {\memoelement[\v!layer][\v!nexthead][\v!hanging]}
+
+\definememoelement[\v!layer][\v!nexthead][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!nexthead}}
+
+% layer: lefthead
+
+\definememoelement[\v!layer][\v!lefthead][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!lefthead}}
+
+% layer: righthead
+
+\definememoelement[\v!layer][\v!righthead][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!righthead}}
+
+% layer: topmark
+
+\definememoelement[\v!layer][\v!topmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!topmark}}
+
+% layer: botmark
+
+\definememoelement[\v!layer][\v!botmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!botmark}}
+
+% layer: cutmark
+
+\definememoelement[\v!layer][\v!cutmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!cutmark}}
+
+% layer: endmark
+
+\definememoelement[\v!layer][\v!endmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!endmark}}
+
+% layer: usermark
+
+\definememoelement[\v!layer][\v!usermark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!usermark}}
+
+% layer: memomain
+
+\definememoelement[\v!layer][\v!memomain][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!memomain}}
+
+% layer: memonext
+
+\definememoelement[\v!layer][\v!memonext][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!memonext}}
+
+% section: head
+
\definememoelement[\v!section][\v!head][\s!default]
- {\correspondenceparameter\c!fromaddress}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!fromaddress}
\definememoelement[\v!section][\v!head][\v!memo]
- {\startpacked
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
\doifsomething{\correspondenceparameter\c!fromname}{\memotext\v!fromname \correspondenceparameter\c!fromname \par}
\doifsomething{\correspondenceparameter\c!date }{\memotext\v!date \correspondenceparameter\c!date \par}
\doifsomething{\correspondenceparameter\c!toname }{\memotext\v!toname \correspondenceparameter\c!toname \par}
@@ -119,7 +206,8 @@
\NC\NR}}
\definememoelement[\v!section][\v!head][\v!table]
- {\starttabulate[|l|p|]
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \starttabulate[|l|p|]
\doformatmemoheadTABLE\v!fromname\c!fromname
\doformatmemoheadTABLE\v!date \c!date
\doformatmemoheadTABLE\v!toname \c!toname
@@ -141,144 +229,107 @@
\par}}
\definememoelement[\v!section][\v!head][\v!margin]
- {\startpacked
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
\doformatmemoheadMARGIN\v!fromname\c!fromname
\doformatmemoheadMARGIN\v!date \c!date
\doformatmemoheadMARGIN\v!toname \c!toname
\doformatmemoheadMARGIN\v!subject \c!subject
\stoppacked}
-\startsetups[\v!memo:\v!section:\v!head]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!head][\correspondencesectionparameter\c!alternative]
-\stopsetups
-
-\startsetups[\v!memo:\v!layer:\v!firsthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!firsthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
-
-\definememoelement[\v!layer][\v!nexthead][\v!fullblock]
- {\maxaligned
- {\rlap{\correspondenceparameter\c!toname}%
- \midaligned{\pagenumber}%
- \llap{\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=\v!left]
- {\correspondenceparameter\c!date \\
- \correspondenceparameter\c!reference}}}}
-
-\definememoelement[\v!layer][\v!nexthead][\v!hanging]
- {\maxaligned
- {\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=v!right]
- {\correspondenceparameter\c!toname \\
- \correspondenceparameter\c!date \\
- \correspondenceparameter\c!reference \\
- \memotext\c!page\pagenumber}}\hss}
+\definememoelement[\v!section][\v!head][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!head}}
-\definememoelement[\v!layer][\v!nexthead][\v!semiblock]
- {\maxaligned
- {\rlap{\correspondenceparameter\c!toname}%
- \midaligned{\pagenumber}%
- \llap{\correspondenceparameter\c!date}}}
-
-\definememoelement[\v!layer][\v!nexthead][\v!simplified]
- {\memoelement[\v!layer][\v!nexthead][\v!fullblock]}
-
-\definememoelement[\v!layer][\v!nexthead][\v!modified]
- {\memoelement[\v!layer][\v!nexthead][\v!hanging]}
-
-\startsetups[\v!memo:\v!layer:\v!nexthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!nexthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
-
-\startsetups[\v!memo:\v!layer:\v!lefthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!lefthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
-
-\startsetups[\v!memo:\v!layer:\v!righthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!righthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% section: date
\definememoelement[\v!section][\v!date][\s!default]
{\correspondenceparameter\c!date}
-\startsetups[\v!memo:\v!section:\v!date]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!date][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!date][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!date}}
+
+% section: reference
\definememoelement[\v!section][\v!reference][\s!default]
- {\correspondenceparameter\c!reference}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!reference}
-\startsetups[\v!memo:\v!section:\v!reference]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!reference][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!reference][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!reference}}
+
+% section: specialnotation
\definememoelement[\v!section][\v!specialnotation][\s!default]
- {\correspondenceparameter\c!dispatch}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!dispatch}
-\startsetups[\v!memo:\v!section:\v!specialnotation]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!specialnotation][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!specialnotation][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!specialnotation}}
+
+% section: address
\definememoelement[\v!section][\v!address][\s!default]
- {\correspondenceparameter\c!toname
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!toname
\doifsomething{\correspondenceparameter\c!toname}\\
\correspondenceparameter\c!toaddress}
-\startsetups[\v!memo:\v!section:\v!address]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!address][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!address][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!address}}
+
+% section: title
\definememoelement[\v!section][\v!title][\s!default]
- {\correspondenceparameter\c!title}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!title}
-\startsetups[\v!memo:\v!section:\v!title]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!title][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!title][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!title}}
+
+% section: opening
\definememoelement[\v!section][\v!opening][\s!default]
- {\correspondenceparameter\c!opening}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!opening}
-\startmode[\v!memo:\v!section:\v!opening]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!opening][\correspondencesectionparameter\c!alternative]
-\stopmode
+\definememoelement[\v!section][\v!opening][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!opening}}
+
+% section: subject
\definememoelement[\v!section][\v!subject][\s!default]
- {\memotext\v!subject\correspondenceparameter\c!subject}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \memotext\v!subject\correspondenceparameter\c!subject}
-\startsetups[\v!memo:\v!section:\v!subject]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!subject][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!subject][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!subject}}
+
+% section: content
\definememoelement[\v!section][\v!content][\s!default]
- {\getbuffer[\v!memo]}
+ {\setupbuffer[\c!before=,\c!after=]%
+ \getbuffer [\????correspondencebuffer\v!memo]}
-\startsetups[\v!memo:\v!section:\v!content]
-\memoelement[\v!section][\v!content][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!content][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!content}}
+
+% section: closing
\definememoelement[\v!section][\v!closing][\s!default]
- {\correspondenceparameter\c!closing
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
\correspondenceparameter\c!signature}}
-\startsetups[\v!memo:\v!section:\v!closing]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!closing][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!closing][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!closing}}
+
+% section: appendices
\definememoelement[\v!section][\v!appendices][\s!default]
- {\startpacked
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
\expanded{\processcommalistwithparameters[\accesscorrespondenceelements\v!memo\v!description]}{\placecorrespondencedescription[\v!memo]}%
\stoppacked}
@@ -299,7 +350,10 @@
\appendtoks
\ifx\currentcorrespondence\v!memo
- \doif{\correspondenceoptionparameter\c!option}\v!test{\usememostyle[test]}%
+ \processallactionsinset
+ [\correspondenceoptionparameter\c!option]
+ [ \v!test=>{\usememostyle[test]},
+ \v!setups=>{\usememostyle[setups]}]%
\fi
\to \everybeforecorrespondence
@@ -311,19 +365,21 @@
% Labels
+\def\????memotext{@@@@memotext}
+
\def\setupmemotext
{\dodoubleempty\dosetupmemotext}
\def\dosetupmemotext[#1][#2]%
{\ifsecondargument
- \def\dodosetupmemotext##1{\setuplabeltext[#1][\v!memo:##1]}%
+ \def\dodosetupmemotext##1{\setuplabeltext[#1][\????memotext##1]}%
\processcommalist[#2]\dodosetupmemotext
\else
- \def\dodosetupmemotext##1{\setuplabeltext [\v!memo:##1]}%
+ \def\dodosetupmemotext##1{\setuplabeltext [\????memotext##1]}%
\processcommalist[#1]\dodosetupmemotext
\fi}
-\def\memotext#1{\labeltext{\v!memo:#1}}
+\def\memotext#1{\labeltext{\????memotext#1}}
% page:
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkvi b/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkvi
index 6c97b365e0d..72c6a9af967 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkvi
+++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-02.mkvi
@@ -1,6 +1,6 @@
%D \module
%D [ file=s-cor-02,
-%D version=2011.12.08,
+%D version=2012.01.15,
%D title=\CONTEXT\ User Module,
%D subtitle=Memos,
%D author=Wolfgang Schuster,
@@ -59,7 +59,7 @@
% Layers
-\definememolayer [\v!firsthead]
+\definememolayer [\v!head]
\definememolayer [\v!nexthead]
\definememolayer [\v!lefthead]
\definememolayer [\v!righthead]
@@ -95,11 +95,98 @@
% Setups
+% layer: head
+
+\definememoelement[\v!layer][\v!head][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!head}}
+
+% layer: nexthead
+
+\definememoelement[\v!layer][\v!nexthead][\v!fullblock]
+ {\maxaligned
+ {\rlap{\correspondenceparameter\c!toname}%
+ \midaligned{\pagenumber}%
+ \llap{\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=\v!left]
+ {\correspondenceparameter\c!date \\
+ \correspondenceparameter\c!reference}}}}
+
+\definememoelement[\v!layer][\v!nexthead][\v!hanging]
+ {\maxaligned
+ {\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=v!right]
+ {\correspondenceparameter\c!toname \\
+ \correspondenceparameter\c!date \\
+ \correspondenceparameter\c!reference \\
+ \memotext\c!page\pagenumber}}\hss}
+
+\definememoelement[\v!layer][\v!nexthead][\v!semiblock]
+ {\maxaligned
+ {\rlap{\correspondenceparameter\c!toname}%
+ \midaligned{\pagenumber}%
+ \llap{\correspondenceparameter\c!date}}}
+
+\definememoelement[\v!layer][\v!nexthead][\v!simplified]
+ {\memoelement[\v!layer][\v!nexthead][\v!fullblock]}
+
+\definememoelement[\v!layer][\v!nexthead][\v!modified]
+ {\memoelement[\v!layer][\v!nexthead][\v!hanging]}
+
+\definememoelement[\v!layer][\v!nexthead][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!nexthead}}
+
+% layer: lefthead
+
+\definememoelement[\v!layer][\v!lefthead][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!lefthead}}
+
+% layer: righthead
+
+\definememoelement[\v!layer][\v!righthead][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!righthead}}
+
+% layer: topmark
+
+\definememoelement[\v!layer][\v!topmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!topmark}}
+
+% layer: botmark
+
+\definememoelement[\v!layer][\v!botmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!botmark}}
+
+% layer: cutmark
+
+\definememoelement[\v!layer][\v!cutmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!cutmark}}
+
+% layer: endmark
+
+\definememoelement[\v!layer][\v!endmark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!endmark}}
+
+% layer: usermark
+
+\definememoelement[\v!layer][\v!usermark][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!usermark}}
+
+% layer: memomain
+
+\definememoelement[\v!layer][\v!memomain][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!memomain}}
+
+% layer: memonext
+
+\definememoelement[\v!layer][\v!memonext][\v!setups]
+ {\texsetup{\v!memo:\v!layer:\v!memonext}}
+
+% section: head
+
\definememoelement[\v!section][\v!head][\s!default]
- {\correspondenceparameter\c!fromaddress}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!fromaddress}
\definememoelement[\v!section][\v!head][\v!memo]
- {\startpacked
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
\doifsomething{\correspondenceparameter\c!fromname}{\memotext\v!fromname \correspondenceparameter\c!fromname \par}
\doifsomething{\correspondenceparameter\c!date }{\memotext\v!date \correspondenceparameter\c!date \par}
\doifsomething{\correspondenceparameter\c!toname }{\memotext\v!toname \correspondenceparameter\c!toname \par}
@@ -119,7 +206,8 @@
\NC\NR}}
\definememoelement[\v!section][\v!head][\v!table]
- {\starttabulate[|l|p|]
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \starttabulate[|l|p|]
\correspondence_memo_head_table\v!fromname\c!fromname
\correspondence_memo_head_table\v!date \c!date
\correspondence_memo_head_table\v!toname \c!toname
@@ -141,151 +229,112 @@
\par}}
\definememoelement[\v!section][\v!head][\v!margin]
- {\startpacked
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
\correspondence_memo_head_margin\v!fromname\c!fromname
\correspondence_memo_head_margin\v!date \c!date
\correspondence_memo_head_margin\v!toname \c!toname
\correspondence_memo_head_margin\v!subject \c!subject
\stoppacked}
-\startsetups[\v!memo:\v!section:\v!head]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!head][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!head][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!head}}
-\startsetups[\v!memo:\v!layer:\v!firsthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!firsthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
-
-\definememoelement[\v!layer][\v!nexthead][\v!fullblock]
- {\maxaligned
- {\rlap{\correspondenceparameter\c!toname}%
- \midaligned{\pagenumber}%
- \llap{\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=\v!left]
- {\correspondenceparameter\c!date \\
- \correspondenceparameter\c!reference}}}}
-
-\definememoelement[\v!layer][\v!nexthead][\v!hanging]
- {\maxaligned
- {\framed[\c!frame=\v!off,\c!location=\v!top,\c!align=v!right]
- {\correspondenceparameter\c!toname \\
- \correspondenceparameter\c!date \\
- \correspondenceparameter\c!reference \\
- \memotext\c!page\pagenumber}}\hss}
-
-\definememoelement[\v!layer][\v!nexthead][\v!semiblock]
- {\maxaligned
- {\rlap{\correspondenceparameter\c!toname}%
- \midaligned{\pagenumber}%
- \llap{\correspondenceparameter\c!date}}}
-
-\definememoelement[\v!layer][\v!nexthead][\v!simplified]
- {\memoelement[\v!layer][\v!nexthead][\v!fullblock]}
-
-\definememoelement[\v!layer][\v!nexthead][\v!modified]
- {\memoelement[\v!layer][\v!nexthead][\v!hanging]}
-
-\startsetups[\v!memo:\v!layer:\v!nexthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!nexthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
-
-\startsetups[\v!memo:\v!layer:\v!lefthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!lefthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
-
-\startsetups[\v!memo:\v!layer:\v!righthead]
-\def\\{\correspondencelayerparameter\c!separator}
-\memoelement[\v!layer][\v!righthead][\correspondencelayerparameter\c!alternative]
-\stopsetups
+% section: date
\definememoelement[\v!section][\v!date][\s!default]
- {\correspondenceparameter\c!date}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!date}
-\startsetups[\v!memo:\v!section:\v!date]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!date][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!date][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!date}}
+
+% section: reference
\definememoelement[\v!section][\v!reference][\s!default]
- {\correspondenceparameter\c!reference}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!reference}
-\startsetups[\v!memo:\v!section:\v!reference]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!reference][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!reference][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!reference}}
+
+% section: specialnotation
\definememoelement[\v!section][\v!specialnotation][\s!default]
- {\correspondenceparameter\c!dispatch}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!dispatch}
-\startsetups[\v!memo:\v!section:\v!specialnotation]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!specialnotation][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!specialnotation][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!specialnotation}}
+
+% section: address
\definememoelement[\v!section][\v!address][\s!default]
- {\correspondenceparameter\c!toname
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!toname
\doifsomething{\correspondenceparameter\c!toname}\\
\correspondenceparameter\c!toaddress}
-\startsetups[\v!memo:\v!section:\v!address]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!address][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!address][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!address}}
+
+% section: title
\definememoelement[\v!section][\v!title][\s!default]
- {\correspondenceparameter\c!title}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!title}
-\startsetups[\v!memo:\v!section:\v!title]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!title][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!title][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!title}}
+
+% section: opening
\definememoelement[\v!section][\v!opening][\s!default]
- {\correspondenceparameter\c!opening}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!opening}
+
+\definememoelement[\v!section][\v!opening][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!opening}}
-\startmode[\v!memo:\v!section:\v!opening]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!opening][\correspondencesectionparameter\c!alternative]
-\stopmode
+% section: subject
\definememoelement[\v!section][\v!subject][\s!default]
- {\memotext\v!subject\correspondenceparameter\c!subject}
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \memotext\v!subject\correspondenceparameter\c!subject}
-\startsetups[\v!memo:\v!section:\v!subject]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!subject][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!subject][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!subject}}
+
+% section: content
\definememoelement[\v!section][\v!content][\s!default]
- {\getbuffer[\v!memo]}
+ {\getbufferdata[\????correspondencebuffer\v!memo]}
-\startsetups[\v!memo:\v!section:\v!content]
-\memoelement[\v!section][\v!content][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!content][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!content}}
+
+% section: closing
\definememoelement[\v!section][\v!closing][\s!default]
- {\correspondenceparameter\c!closing
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \correspondenceparameter\c!closing
\doifsomething{\correspondenceparameter\c!signature}
{\blank[\correspondencesectionparameter\c!spaceinbetween]%
\correspondenceparameter\c!signature}}
-\startsetups[\v!memo:\v!section:\v!closing]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!closing][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!closing][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!closing}}
+
+% section: appendices
\definememoelement[\v!section][\v!appendices][\s!default]
- {\startpacked
+ {\def\\{\correspondencesectionparameter\c!separator}%
+ \startpacked
\normalexpanded{\processcommalistwithparameters[\correspondence_elements_access\v!memo\v!description]}{\correspondence_description_place[\v!memo]}%
\stoppacked}
-\startsetups[\v!memo:\v!section:\v!appendices]
-\def\\{\correspondencesectionparameter\c!separator}
-\memoelement[\v!section][\v!appendices][\correspondencesectionparameter\c!alternative]
-\stopsetups
+\definememoelement[\v!section][\v!appendices][\v!setups]
+ {\texsetup{\v!memo:\v!section:\v!appendices}}
\startsetups[\v!memo:\v!place]
\correspondence_place[\v!memo]
@@ -299,7 +348,10 @@
\appendtoks
\ifx\currentcorrespondence\v!memo
- \doif{\correspondenceoptionparameter\c!option}\v!test{\usememostyle[test]}%
+ \processallactionsinset
+ [\correspondenceoptionparameter\c!option]
+ [ \v!test=>{\usememostyle[test]},
+ \v!setups=>{\usememostyle[setups]}]%
\fi
\to \t_correspondence_before
diff --git a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkii b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkii
index be8e8f09db2..c74feb2fe1b 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkii
+++ b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkii
@@ -1,6 +1,6 @@
%D \module
%D [ file=letter-imp-default,
-%D version=2011.10.31,
+%D version=2012.01.01,
%D title=\CONTEXT\ User Module,
%D subtitle=Default letter style,
%D author=Wolfgang Schuster,
@@ -84,7 +84,6 @@
[\v!lettermain,
\v!letternext,
\v!head,
- \v!firsthead,
\v!nexthead,
\v!lefthead,
\v!righthead,
diff --git a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkiv b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkiv
index be8e8f09db2..c74feb2fe1b 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkiv
+++ b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-default.mkiv
@@ -1,6 +1,6 @@
%D \module
%D [ file=letter-imp-default,
-%D version=2011.10.31,
+%D version=2012.01.01,
%D title=\CONTEXT\ User Module,
%D subtitle=Default letter style,
%D author=Wolfgang Schuster,
@@ -84,7 +84,6 @@
[\v!lettermain,
\v!letternext,
\v!head,
- \v!firsthead,
\v!nexthead,
\v!lefthead,
\v!righthead,
diff --git a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkii b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkii
new file mode 100644
index 00000000000..ab087d764b2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkii
@@ -0,0 +1,71 @@
+%D \module
+%D [ file=letter-imp-knuth,
+%D version=2012.12.26,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Knuth letter style,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D license=GNU General Public License]
+
+%C Copyright (C) 2011 Wolfgang Schuster
+%C
+%C This program is free software: you can redistribute it and/or modify
+%C it under the terms of the GNU General Public License as published by
+%C the Free Software Foundation, either version 3 of the License, or
+%C any later version.
+%C
+%C This program is distributed in the hope that it will be useful,
+%C but WITHOUT ANY WARRANTY; without even the implied warranty of
+%C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%C GNU General Public License for more details.
+%C
+%C You should have received a copy of the GNU General Public License
+%C along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+\useletterstyle[default]
+
+\setupletterstyle
+ [\v!firstpage,\v!secondpage]
+ [\c!backspace=1in,
+ \c!cutspace=1in,
+ \c!width=\v!middle]
+
+\setupletterstyle
+ [\v!firstpage]
+ [\c!header=0pt,
+ \c!topspace=2.2in,
+ \c!bottomspace=1.5in,
+ \c!height=\v!middle]
+
+\setupletterlayer
+ [\v!nexthead]
+ [\c!alternative=\v!knuth]
+
+\setuplettersection
+ [\v!address]
+ [\c!alternative=\v!knuth]
+
+\setuplettersection
+ [\v!closing]
+ [\c!alternative=\v!knuth,
+ \c!spaceinbetween=1cm]
+
+\setupletteroptions
+ [\c!whitespace=\v!line]
+
+\setupletterelements
+ [\v!layer]
+ [\v!lettermain,
+ \v!letternext,
+ \v!nexthead]
+
+\setupletterelements
+ [\v!section]
+ [\v!address,
+ \v!opening,
+ \v!content,
+ \v!closing]
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkiv b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkiv
new file mode 100644
index 00000000000..ab087d764b2
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-knuth.mkiv
@@ -0,0 +1,71 @@
+%D \module
+%D [ file=letter-imp-knuth,
+%D version=2012.12.26,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Knuth letter style,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D license=GNU General Public License]
+
+%C Copyright (C) 2011 Wolfgang Schuster
+%C
+%C This program is free software: you can redistribute it and/or modify
+%C it under the terms of the GNU General Public License as published by
+%C the Free Software Foundation, either version 3 of the License, or
+%C any later version.
+%C
+%C This program is distributed in the hope that it will be useful,
+%C but WITHOUT ANY WARRANTY; without even the implied warranty of
+%C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%C GNU General Public License for more details.
+%C
+%C You should have received a copy of the GNU General Public License
+%C along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+\useletterstyle[default]
+
+\setupletterstyle
+ [\v!firstpage,\v!secondpage]
+ [\c!backspace=1in,
+ \c!cutspace=1in,
+ \c!width=\v!middle]
+
+\setupletterstyle
+ [\v!firstpage]
+ [\c!header=0pt,
+ \c!topspace=2.2in,
+ \c!bottomspace=1.5in,
+ \c!height=\v!middle]
+
+\setupletterlayer
+ [\v!nexthead]
+ [\c!alternative=\v!knuth]
+
+\setuplettersection
+ [\v!address]
+ [\c!alternative=\v!knuth]
+
+\setuplettersection
+ [\v!closing]
+ [\c!alternative=\v!knuth,
+ \c!spaceinbetween=1cm]
+
+\setupletteroptions
+ [\c!whitespace=\v!line]
+
+\setupletterelements
+ [\v!layer]
+ [\v!lettermain,
+ \v!letternext,
+ \v!nexthead]
+
+\setupletterelements
+ [\v!section]
+ [\v!address,
+ \v!opening,
+ \v!content,
+ \v!closing]
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkii b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkii
new file mode 100644
index 00000000000..b841f3bd04e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkii
@@ -0,0 +1,62 @@
+%D \module
+%D [ file=letter-imp-setups,
+%D version=2012.01.01,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Setups style,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D license=GNU General Public License]
+
+%C Copyright (C) 2011 Wolfgang Schuster
+%C
+%C This program is free software: you can redistribute it and/or modify
+%C it under the terms of the GNU General Public License as published by
+%C the Free Software Foundation, either version 3 of the License, or
+%C any later version.
+%C
+%C This program is distributed in the hope that it will be useful,
+%C but WITHOUT ANY WARRANTY; without even the implied warranty of
+%C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%C GNU General Public License for more details.
+%C
+%C You should have received a copy of the GNU General Public License
+%C along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+\setupletterlayer
+ [\v!head,\v!nexthead,\v!lefthead,\v!righthead]
+ [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!foot,\v!nextfoot,\v!leftfoot,\v!rightfoot]
+ [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!address,\v!backaddress]
+ [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!reference,\v!location]
+ [\c!alternative=\v!setups]
+
+% \setupletterlayer
+% [\v!topmark,\v!botmark,\v!cutmark,\v!endmark,\v!usermark]
+% [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!lettermain,\v!letternext]
+ [\c!alternative=\v!setups]
+
+\setuplettersection % only used for blockstyle layouts
+ [\v!head,\v!date,\v!reference,\v!specialnotation,\v!address]
+ [\c!alternative=\v!setups]
+
+\setuplettersection % default sections
+ [\v!title,\v!subject,\v!opening,\v!content,\v!closing,\v!appendices]
+ [\c!alternative=\v!setups]
+
+\startsetups[\v!letter:\v!section:\v!content] % otherwise no text is shown
+\letterelement[\v!section][\v!content][\s!default]
+\stopsetups
+
+\endinput
diff --git a/Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkiv b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkiv
new file mode 100644
index 00000000000..b841f3bd04e
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/letter/style/letter-imp-setups.mkiv
@@ -0,0 +1,62 @@
+%D \module
+%D [ file=letter-imp-setups,
+%D version=2012.01.01,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Setups style,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Wolfgang Schuster,
+%D license=GNU General Public License]
+
+%C Copyright (C) 2011 Wolfgang Schuster
+%C
+%C This program is free software: you can redistribute it and/or modify
+%C it under the terms of the GNU General Public License as published by
+%C the Free Software Foundation, either version 3 of the License, or
+%C any later version.
+%C
+%C This program is distributed in the hope that it will be useful,
+%C but WITHOUT ANY WARRANTY; without even the implied warranty of
+%C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+%C GNU General Public License for more details.
+%C
+%C You should have received a copy of the GNU General Public License
+%C along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+\setupletterlayer
+ [\v!head,\v!nexthead,\v!lefthead,\v!righthead]
+ [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!foot,\v!nextfoot,\v!leftfoot,\v!rightfoot]
+ [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!address,\v!backaddress]
+ [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!reference,\v!location]
+ [\c!alternative=\v!setups]
+
+% \setupletterlayer
+% [\v!topmark,\v!botmark,\v!cutmark,\v!endmark,\v!usermark]
+% [\c!alternative=\v!setups]
+
+\setupletterlayer
+ [\v!lettermain,\v!letternext]
+ [\c!alternative=\v!setups]
+
+\setuplettersection % only used for blockstyle layouts
+ [\v!head,\v!date,\v!reference,\v!specialnotation,\v!address]
+ [\c!alternative=\v!setups]
+
+\setuplettersection % default sections
+ [\v!title,\v!subject,\v!opening,\v!content,\v!closing,\v!appendices]
+ [\c!alternative=\v!setups]
+
+\startsetups[\v!letter:\v!section:\v!content] % otherwise no text is shown
+\letterelement[\v!section][\v!content][\s!default]
+\stopsetups
+
+\endinput
diff --git a/Master/tlpkg/tlpsrc/context-letter.tlpsrc b/Master/tlpkg/tlpsrc/context-letter.tlpsrc
index f24f544933b..80e71c2e536 100644
--- a/Master/tlpkg/tlpsrc/context-letter.tlpsrc
+++ b/Master/tlpkg/tlpsrc/context-letter.tlpsrc
@@ -1,3 +1,2 @@
category ConTeXt
-runpattern +f texmf-dist/tex/context/interface/third/t-correspondence.xml
depend context