diff options
author | Karl Berry <karl@freefriends.org> | 2009-07-20 00:55:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-07-20 00:55:52 +0000 |
commit | ec54778b6f178371dcf1392b3f8b02e31604f0ed (patch) | |
tree | afa8574ee81d77fd81642dff98ac1232e7797d09 /Master/texmf-dist/tex/context/third | |
parent | 6a377c63bfe16bfdfe0614d3f746b758fc4e0739 (diff) |
context-letter update (19jul09)
git-svn-id: svn://tug.org/texlive/trunk@14333 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/third')
6 files changed, 157 insertions, 142 deletions
diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii index 1227f78f340..85eb2615583 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii @@ -1,6 +1,6 @@ %D \module %D [ file=t-correspondence, -%D version=2009.07.03, +%D version=2009.07.18, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -177,40 +177,11 @@ %D Tests -\long\def\doifcorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\long\def\doifcorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\def\correspondencestylevalue#1#2#3% - {\csname#1#2#3\endcsname} +\long\def\doifcorrespondencevalue #1#2{\doifsomething {\csname #1#2\endcsname}} +\long\def\doifelsecorrespondencevalue #1#2{\doifsomethingelse{\csname #1#2\endcsname}} +\long\def\doifcorrespondencestylevalue #1#2#3{\doifsomething {\csname#1#2#3\endcsname}} +\long\def\doifelsecorrespondencestylevalue#1#2#3{\doifsomethingelse{\csname#1#2#3\endcsname}} +\long\def\correspondencestylevalue #1#2#3{\csname#1#2#3\endcsname} %D External files @@ -234,9 +205,9 @@ {\def\dodododefinecorrespondencelayer##1{\dododefinecorrespondencelayer[#1][#2][##1]}% \processaction [#3] - [\v!foldmark=>{\processcommacommand[\csname#1!list!marking\endcsname]\dodododefinecorrespondencelayer}, - \v!header=>{\processcommacommand[\csname#1!list!header\endcsname ]\dodododefinecorrespondencelayer}, - \v!footer=>{\processcommacommand[\csname#1!list!footer\endcsname ]\dodododefinecorrespondencelayer}, + [\v!foldmark=>{\processcommacommand[\getvalue{#1!list!marking}]\dodododefinecorrespondencelayer}, + \v!header=>{\processcommacommand[\getvalue{#1!list!header}]\dodododefinecorrespondencelayer}, + \v!footer=>{\processcommacommand[\getvalue{#1!list!footer}]\dodododefinecorrespondencelayer}, \s!unknown=>{\dododefinecorrespondencelayer[#1][#2][#3]}]} \def\dododefinecorrespondencelayer[#1][#2][#3]% @@ -325,7 +296,7 @@ \!!donebfalse % even numbered pages \!!donecfalse % odd numbered pages \!!donedfalse % real pagenumber - \processcommacommand[\csname#2#3\c!state\endcsname]\dodosetheaderfooterlayer + \processcommacommand[\getvalue{#2#3\c!state}]\dodosetheaderfooterlayer \doifnotvalue{#2#3\v!layer\c!state}\v!stop{\setuplayer[#1:#3][\c!state=\v!start]}% \ifnum\if!!doned\pagenumber\else\correspagenumber\fi=\plusone \if!!donea\dosetcorrespondencelayer[#1][#2][#3]\fi @@ -364,10 +335,11 @@ \def\dosetcorrespondencesection[#1][#2][#3]% {\begingroup + \edef\currentcorrespondenceelement{#3}% \doifelsecorrespondencestylevalue{#2}{#3}\c!before {\correspondencestylevalue{#2}{#3}\c!before} \endgraf - \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}% + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin }% \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% \doifcorrespondencestylevalue{#2}{#3}\c!align {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}% @@ -446,14 +418,22 @@ \def\doflushcorrespondencedescription[#1][#2]% {\def\dodoflushcorrespondencedescription##1% {\doif{\correspondencestylevalue{#2}\v!option{##1}}\v!yes{\dosetcorrespondencedescription[#1][#2][##1]}}% - \processcommacommand[\csname#1!list!descriptions\endcsname]\dodoflushcorrespondencedescription} + \processcommacommand[\getvalue{#1!list!descriptions}]\dodoflushcorrespondencedescription} %D Commands to define named elements for header, footer etc. and use them, %D clone them or delete their content. -\def\definecorrespondenceelement [#1]#2[#3]#4[#5]#6{\setvalue{#1:#3:#5}{#6}} -\def\resetcorrespondenceelement [#1]#2[#3]#4[#5]{\resetvalue{#1:#3:#5}} -\def\copycorrespondenceelement[#1]#2[#3]#4[#5]#6[#7]{\copycsname#1:#3:#5\endcsname\csname#1:#3:#7\endcsname} -\def\correspondenceelement [#1]#2[#3]#4[#5]{\csname#1:#3:#5\endcsname} +\def\definecorrespondenceelement{\dotripleargument\dodefinecorrespondenceelement } +\def\resetcorrespondenceelement {\dotripleargument\doresetcorrespondenceelement } +\def\copycorrespondenceelement {\doquadrupleargument\docopycorrespondenceelement} +\def\correspondenceelement {\dotripleargument\docorrespondenceelement } + +\def\dodefinecorrespondenceelement[#1][#2][#3]#4{\setvalue{#1:#2:#3}{#4}} +\def\doresetcorrespondenceelement [#1][#2][#3]{\resetvalue{#1:#2:#3}} +\def\docopycorrespondenceelement[#1][#2][#3][#4]{\copycsname#1:#2:#3\endcsname\csname#1:#2:#4\endcsname} + +\def\docorrespondenceelement[#1][#2][#3]% + {\edef\currentcorrespondenceelement{#2}% + \csname#1:#2:#3\endcsname} \protect \endinput diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv index ffb3a6b7ed3..d1e30705a3b 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv @@ -1,6 +1,6 @@ %D \module %D [ file=t-correspondence, -%D version=2009.07.03, +%D version=2009.07.18, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -177,40 +177,11 @@ %D Tests -\long\def\doifcorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\long\def\doifcorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\def\correspondencestylevalue#1#2#3% - {\csname#1#2#3\endcsname} +\long\def\doifcorrespondencevalue #1#2{\doifsomething {\csname #1#2\endcsname}} +\long\def\doifelsecorrespondencevalue #1#2{\doifsomethingelse{\csname #1#2\endcsname}} +\long\def\doifcorrespondencestylevalue #1#2#3{\doifsomething {\csname#1#2#3\endcsname}} +\long\def\doifelsecorrespondencestylevalue#1#2#3{\doifsomethingelse{\csname#1#2#3\endcsname}} +\long\def\correspondencestylevalue #1#2#3{\csname#1#2#3\endcsname} %D External files @@ -224,6 +195,15 @@ {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}}% \processcommacommand[#4]\dousecorrespondencefile} +% \def\usecorrespondencefile[#1][#2][#3][#4]% +% {\def\dousecorrespondencefile##1% +% {\startreadingfile +% \readfile{##1.#3} +% {\showmessage\m!correspondence{1}{#1,#2,##1.#3}\registercorrespondencefile{##1.#3}} +% {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}% +% \stopreadingfile}% +% \processcommacommand[#4]\dousecorrespondencefile} + %D Layers \def\correspondencelayerkeys @@ -238,9 +218,9 @@ {\def\dodododefinecorrespondencelayer##1{\dododefinecorrespondencelayer[#1][#2][##1]}% \processaction [#3] - [\v!foldmark=>{\processcommacommand[\csname#1!list!marking\endcsname]\dodododefinecorrespondencelayer}, - \v!header=>{\processcommacommand[\csname#1!list!header\endcsname ]\dodododefinecorrespondencelayer}, - \v!footer=>{\processcommacommand[\csname#1!list!footer\endcsname ]\dodododefinecorrespondencelayer}, + [\v!foldmark=>{\processcommacommand[\getvalue{#1!list!marking}]\dodododefinecorrespondencelayer}, + \v!header=>{\processcommacommand[\getvalue{#1!list!header}]\dodododefinecorrespondencelayer}, + \v!footer=>{\processcommacommand[\getvalue{#1!list!footer}]\dodododefinecorrespondencelayer}, \s!unknown=>{\dododefinecorrespondencelayer[#1][#2][#3]}]} \def\dododefinecorrespondencelayer[#1][#2][#3]% @@ -330,7 +310,7 @@ \!!donebfalse % even numbered pages \!!donecfalse % odd numbered pages \!!donedfalse % real pagenumber - \processcommacommand[\csname#2#3\c!state\endcsname]\dodosetheaderfooterlayer + \processcommacommand[\getvalue{#2#3\c!state}]\dodosetheaderfooterlayer \doifnotvalue{#2#3\v!layer\c!state}\v!stop{\setuplayer[#1:#3][\c!state=\v!start]}% \ifnum\if!!doned\pagenumber\else\correspagenumber\fi=\plusone \if!!donea\dosetcorrespondencelayer[#1][#2][#3]\fi @@ -374,10 +354,11 @@ \def\dosetcorrespondencesection[#1][#2][#3]% {\begingroup + \edef\currentcorrespondenceelement{#3}% \doifelsecorrespondencestylevalue{#2}{#3}\c!before {\correspondencestylevalue{#2}{#3}\c!before} \endgraf - \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}% + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin }% \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% \doifcorrespondencestylevalue{#2}{#3}\c!align {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}% @@ -460,15 +441,23 @@ \def\doflushcorrespondencedescription[#1][#2]% {\def\dodoflushcorrespondencedescription##1% {\doif{\correspondencestylevalue{#2}\v!option{##1}}\v!yes{\dosetcorrespondencedescription[#1][#2][##1]}}% - \processcommacommand[\csname#1!list!descriptions\endcsname]\dodoflushcorrespondencedescription} + \processcommacommand[\getvalue{#1!list!descriptions}]\dodoflushcorrespondencedescription} %D Commands to define named elements for header, footer etc. and use them, %D clone them or delete their content. -\def\definecorrespondenceelement [#1]#2[#3]#4[#5]#6{\setvalue{#1:#3:#5}{#6}} -\def\resetcorrespondenceelement [#1]#2[#3]#4[#5]{\resetvalue{#1:#3:#5}} -\def\copycorrespondenceelement[#1]#2[#3]#4[#5]#6[#7]{\copycsname#1:#3:#5\endcsname\csname#1:#3:#7\endcsname} -\def\correspondenceelement [#1]#2[#3]#4[#5]{\csname#1:#3:#5\endcsname} +\def\definecorrespondenceelement{\dotripleargument\dodefinecorrespondenceelement } +\def\resetcorrespondenceelement {\dotripleargument\doresetcorrespondenceelement } +\def\copycorrespondenceelement {\doquadrupleargument\docopycorrespondenceelement} +\def\correspondenceelement {\dotripleargument\docorrespondenceelement } + +\def\dodefinecorrespondenceelement[#1][#2][#3]#4{\setvalue{#1:#2:#3}{#4}} +\def\doresetcorrespondenceelement [#1][#2][#3]{\resetvalue{#1:#2:#3}} +\def\docopycorrespondenceelement[#1][#2][#3][#4]{\copycsname#1:#2:#3\endcsname\csname#1:#2:#4\endcsname} + +\def\docorrespondenceelement[#1][#2][#3]% + {\edef\currentcorrespondenceelement{#2}% + \csname#1:#2:#3\endcsname} \def\registercorrespondencefile#1% {\doifundefined{@@@@#1@@@@} @@ -489,7 +478,7 @@ correspondence.files = { name = "t-correspondence.tex", path = "tex/context/third/letter/base/", type = "base", - version = "2009.07.03", + version = "2009.07.18", description = "Core module" } , { @@ -511,7 +500,7 @@ correspondence.files = { name = "default.nli", path = "tex/context/third/letter/interface/", type = "interface", - version = "2009.05.10", + version = "2009.07.18", description = "Default letter interface" } , @@ -519,7 +508,7 @@ correspondence.files = { name = "pragma.nli", path = "tex/context/third/letter/interface/", type = "interface", - version = "2009.02.12", + version = "2009.07.18", description = "m-letter.tex Interface" } , { @@ -631,7 +620,7 @@ correspondence.files = { name = "default.nls", path = "tex/context/third/letter/style/", type = "style", - version = "2009.03.27", + version = "2009.07.16", description = "Basic style" } , { diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex index d006ce9885d..8eafbf3fa7e 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex @@ -1,6 +1,6 @@ %D \module %D [ file=t-correspondence, -%D version=2009.06.30, +%D version=2009.07.18, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -171,6 +171,7 @@ \setinterfacevariable {correspondence} {correspondence} \setinterfacevariable {resumemain} {resumemain} \setinterfacevariable {resumenext} {resumenext} + \setinterfacevariable {black} {black} \stopinterface \startinterface all diff --git a/Master/texmf-dist/tex/context/third/letter/interface/default.nli b/Master/texmf-dist/tex/context/third/letter/interface/default.nli index 5d26324f909..5e220cb5803 100644 --- a/Master/texmf-dist/tex/context/third/letter/interface/default.nli +++ b/Master/texmf-dist/tex/context/third/letter/interface/default.nli @@ -1,6 +1,6 @@ %D \module %D [ file=default, -%D version=2009.05.10, +%D version=2009.07.18, %D title=\CONTEXT\ Letter Interface, %D subtitle=Default Interface, %D author=Wolfgang Schuster, @@ -43,12 +43,20 @@ \egroup \hfill} +% \defineletterelement[\v!reference][\v!a] +% {\setbox\scratchbox\hbox\!!to\hsize +% {\getcommacommandsize[\@@@@lsreferencelist]% \@@@@ldreference? +% \ifnum\commalistsize<\plustwo\hfill\fi +% \processcommacommand[\@@@@lsreferencelist]\formatreferencelista\unskip}% +% \global\letter!height!reference\htdp\scratchbox +% \box\scratchbox} + \defineletterelement[\v!reference][\v!a] {\setbox\scratchbox\hbox\!!to\hsize - {\getcommacommandsize[\@@@@lsreferencelist]% \@@@@ldreference? + {\getcommacommandsize[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]% \ifnum\commalistsize<\plustwo\hfill\fi - \processcommacommand[\@@@@lsreferencelist]\formatreferencelista\unskip}% - \global\letter!height!reference\htdp\scratchbox + \processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelista\unskip}% + \ifx\currentcorrespondenceelement\v!reference\global\letter!height!reference\htdp\scratchbox\fi \box\scratchbox} \startsetups[\v!letter:\v!reference:\v!a] @@ -80,9 +88,12 @@ {\lettervalue{#1}}}}% \egroup} +% \defineletterelement[\v!reference][\v!b] +% {\vtop % why not \vbox? +% {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistb}} + \defineletterelement[\v!reference][\v!b] - {\vtop % why not \vbox? - {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistb}} + {\vtop{\processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelistb}} \startsetups[\v!letter:\v!reference:\v!b] @@ -116,9 +127,13 @@ {\lettervalue\ascii}% \egroup} +% \defineletterelement[\v!reference][\v!c] +% {\hbox\!!to\hsize +% {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistc}} + \defineletterelement[\v!reference][\v!c] {\hbox\!!to\hsize - {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistc}} + {\processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelistc}} \startsetups[\v!letter:\v!reference:\v!c] @@ -140,10 +155,19 @@ \def\formatreferencelistd#1% {\appendtoks\doformatreferencelistd{#1}\to\scratchtoks} +% \defineletterelement[\v!reference][\v!d] +% {\vtop % why not \vbox? +% {\scratchtoks\emptytoks +% \processcommacommand[\@@@@lsreferencelist]\formatreferencelistd +% \setuptabulate[\c!before=,\c!after=]% +% \starttabulate[|l|l|] +% \the\scratchtoks +% \stoptabulate}} + \defineletterelement[\v!reference][\v!d] - {\vtop % why not \vbox? + {\vtop {\scratchtoks\emptytoks - \processcommacommand[\@@@@lsreferencelist]\formatreferencelistd + \processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelistd \setuptabulate[\c!before=,\c!after=]% \starttabulate[|l|l|] \the\scratchtoks @@ -185,9 +209,13 @@ {\doformatreferenceliste{\lettervalue\ascii}}}}}% \egroup} +% \defineletterelement[\v!reference][\v!e] +% {\hbox\!!to\hsize +% {\processcommacommand[\@@@@lsreferencelist]\formatreferenceliste\hss}} + \defineletterelement[\v!reference][\v!e] {\hbox\!!to\hsize - {\processcommacommand[\@@@@lsreferencelist]\formatreferenceliste\hss}} + {\processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferenceliste\hss}} \startsetups[\v!letter:\v!reference:\v!e] @@ -220,10 +248,13 @@ %D local in this case and not global like the values you could set with %D \tex{setupletter}. +\newtoks\letter!local!commands + \def\startletter - {\bgroup\dodoubleempty\dostartletter} + {\begingroup + \dodoubleempty\dostartletter} -\long\def\dostartletter[#1][#2]#3\stopletter +\def\dostartletter[#1][#2]% {\ifsecondargument \getparameters[\????ld][#1]% \doifundefinedelse{\????ld\????ld#2} @@ -236,11 +267,17 @@ {\setvalue{\????ld\c!toaddress}{#1}} {\setvalue{\????ld\c!toaddress}{\getvalue{\????ld\????ld#1}}}}% \fi\fi - \setbuffer[lettercontent]#3\endbuffer + \begingroup + \obeylines + \dodostartletter} + +\long\def\dodostartletter#1\stopletter + {\endgroup + \scratchtoks{#1}% + \@EA\setbuffer\@EA[lettercontent]\the\scratchtoks\endbuffer \processlettervalues - \directsetup{\v!letter:\v!place}\egroup} - -\newtoks\letter!local!commands + \directsetup{\v!letter:\v!place}% + \endgroup} \def\processlettervalues {\globalletempty\letter!list!descriptions @@ -280,25 +317,29 @@ \doiflettervalue\c!fromname\\ \lettervalue\c!fromaddress} -\setvalue{@@head@@\c!rule\v!no }{0} -\setvalue{@@head@@\c!rule\v!none }{0} -\setvalue{@@head@@\c!rule\v!off }{0} -\setvalue{@@head@@\c!rule\v!top }{1} -\setvalue{@@head@@\c!rule\v!before}{1} -\setvalue{@@head@@\c!rule\v!bottom}{2} -\setvalue{@@head@@\c!rule\v!after }{2} -\setvalue{@@head@@\c!rule\v!yes }{2} -\setvalue{@@head@@\c!rule\v!on }{2} - -\def\simpleexecuteifdefined#1#2{\ifcsname#1\endcsname\csname#1\endcsname\else#2\fi}% -> t-correspondence? - +\setvalue{@@head@@\c!rule\v!no }{\!!doneafalse\!!donebfalse} +\setvalue{@@head@@\c!rule\v!none }{\!!doneafalse\!!donebfalse} +\setvalue{@@head@@\c!rule\v!off }{\!!doneafalse\!!donebfalse} +\setvalue{@@head@@\c!rule\v!top }{\!!doneatrue } +\setvalue{@@head@@\c!rule\v!before}{\!!doneatrue } +\setvalue{@@head@@\c!rule\v!bottom}{\!!donebtrue } +\setvalue{@@head@@\c!rule\v!after }{\!!donebtrue } +\setvalue{@@head@@\c!rule\v!yes }{\!!donebtrue } +\setvalue{@@head@@\c!rule\v!on }{\!!donebtrue } + +\def\doletterelementheadrule + {\!!doneafalse + \!!donebfalse + \def\dodoletterelementheadrule##1{\csname @@head@@\c!rule##1\endcsname}% + \processcommacommand[\letterstylevalue\v!head\c!fromrule]\dodoletterelementheadrule} + \defineletterelement[\v!head][\v!left] {\normalhbox - {\def\!!fromrule{\simpleexecuteifdefined{@@head@@\c!rule\letterstylevalue\v!head\c!fromrule}{0}}% - \framed[frame=off,location=bottom,align=right,width=\hsize] - {\dostartattributes{\????ld\c!fromname}\c!style\c!color + {\framed[frame=off,location=bottom,align=right,width=\hsize] + {\doletterelementheadrule + \dostartattributes{\????ld\c!fromname}\c!style\c!color \lettervalue\c!fromname - \ifnum\!!fromrule=\plusone + \if!!donea \doifelselettervalue\c!fromlogo {\setbox\scratchbox\hbox{\lettervalue\c!fromlogo}% \scratchdimen\dimexpr\letterstylevalue\v!head\c!rulewidth-\wd\scratchbox\relax} @@ -316,7 +357,7 @@ \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% - \ifnum\!!fromrule=\plustwo + \if!!doneb \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -332,11 +373,11 @@ \defineletterelement[\v!head][\v!middle] {\normalhbox - {\def\!!fromrule{\simpleexecuteifdefined{@@head@@\c!rule\letterstylevalue\v!head\c!fromrule}{0}}% - \framed[frame=off,location=bottom,align=middle,width=\hsize] - {\dostartattributes{\????ld\c!fromname}\c!style\c!color + {\framed[frame=off,location=bottom,align=middle,width=\hsize] + {\doletterelementheadrule + \dostartattributes{\????ld\c!fromname}\c!style\c!color \lettervalue\c!fromname - \ifnum\!!fromrule=\plusone + \if!!donea \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -355,7 +396,7 @@ \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% - \ifnum\!!fromrule=\plustwo + \if!!doneb \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -370,12 +411,12 @@ \defineletterelement[\v!head][\v!right] {\normalhbox - {\def\!!fromrule{\simpleexecuteifdefined{@@head@@\c!rule\letterstylevalue\v!head\c!fromrule}{0}}% - \doiflettervalue\c!fromlogo{\rlap{\lettervalue\c!fromlogo}}% + {\doiflettervalue\c!fromlogo{\rlap{\lettervalue\c!fromlogo}}% \framed[frame=off,location=bottom,align=left,width=\hsize] - {\dostartattributes{\????ld\c!fromname}\c!style\c!color + {\doletterelementheadrule + \dostartattributes{\????ld\c!fromname}\c!style\c!color \lettervalue\c!fromname - \ifnum\!!fromrule=\plusone + \if!!donea \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -397,7 +438,7 @@ \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% - \ifnum\!!fromrule=\plustwo + \if!!doneb \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -651,8 +692,11 @@ \startsetups[\v!letter:\v!optimize] - \setbox\scratchbox\hbox % trial typesetting to get the heigth of the reference line - {\dontcomplain\executeifdefined{\v!letter:\v!reference:\@@@@lsreferencealternative}\donothing} + \startnointerference % trial typesetting to get the heigth of the reference line + \dontcomplain + \let\currentcorrespondenceelement\v!reference + \executeifdefined{\v!letter:\v!reference:\@@@@lsreferencealternative}\donothing + \stopnointerference \setups[\v!letter:\v!reference:\@@@@lsreferencealternative] diff --git a/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli b/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli index a907a3c7c43..e11cbff1dc6 100644 --- a/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli +++ b/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli @@ -1,6 +1,6 @@ %D \module %D [ file=pragma, -%D version=2009.02.19, +%D version=2009.07.18, %D title=\CONTEXT\ Letter Extension, %D subtitle=Pragma Style, %D author=Wolfgang Schuster, diff --git a/Master/texmf-dist/tex/context/third/letter/style/default.nls b/Master/texmf-dist/tex/context/third/letter/style/default.nls index e4f10ee918c..1e51f661fea 100644 --- a/Master/texmf-dist/tex/context/third/letter/style/default.nls +++ b/Master/texmf-dist/tex/context/third/letter/style/default.nls @@ -1,6 +1,6 @@ %D \module %D [ file=default, -%D version=2009.03.27, +%D version=2009.07.16, %D title=\CONTEXT\ Letter Style, %D subtitle=Blockstyle initalization, %D author=Wolfgang Schuster, @@ -65,6 +65,7 @@ [\v!head] [\c!rulewidth=\hsize, \c!fromrule=\v!no, + \c!rulecolor=\v!black, \c!alternative=\v!left] \setupletterstyle |