diff options
author | Karl Berry <karl@freefriends.org> | 2009-04-29 16:17:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-04-29 16:17:56 +0000 |
commit | 1d1b5c1f8b53ec82d99290ee611babb8bcdb8705 (patch) | |
tree | 68d4a40ec56e4d7bcdb13dfde3e27e35e88aa2d5 /Master/texmf-dist/tex/context | |
parent | 5d18b87a1a00f88ffd9a77b53cedba8f6d798d3c (diff) |
context-letter update (28apr09)
git-svn-id: svn://tug.org/texlive/trunk@12861 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context')
12 files changed, 1715 insertions, 750 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 new file mode 100644 index 00000000000..56122c300a6 --- /dev/null +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii @@ -0,0 +1,632 @@ +%D \module +%D [ file=t-correspondence, +%D version=2009.04.27, +%D title=\CONTEXT\ User Module, +%D subtitle=Correspondence, +%D author=Wolfgang Schuster, +%D date=\currentdate, +%D copyright=Wolfgang Schuster, +%D email=schuster.wolfgang@googlemail.com, +%D license=Public Domain] + +\unprotect + +% For MkII users only + +\startconstants all + head: head + foot: foot + topmark: topmark + botmark: botmark + cutmark: cutmark + endmark: endmark + usermark: usermark + foldmark: foldmark + extension: extension + interface: interface + backgroundimage: backgroundimage + whitespace: whitespace + nexthead: nexthead + lefthead: lefthead + righthead: righthead + nextfoot: nextfoot + leftfoot: leftfoot + rightfoot: rightfoot + content: content + backaddress: backaddress + optimize: optimize + opening: opening + closing: closing + signature: signature + dispatch: dispatch + appendices: appendices + fromaddress: fromaddress + frombank: frombank + frommail: frommail + fromfax: fromfax + fromlogo: fromlogo + fromname: fromname + fromphone: fromphone + fromurl: fromurl + toname: toname + toaddress: toaddress + enclosure: enclosure + copy: copy + ps: ps + postscript: postscript + attention: attention + distribution: distribution + salutation: salutation + addressee: addressee + prefix: prefix + suffix: suffix + initials: initials + formalname: formalname + informalname: informalname + yourref: yourref + yourmail: yourmail + myref: myref + mymail: mymail + customer: customer + invoice: invoice + subject: subject + cc: cc + enclosure: enclosure + encl: encl + phone: phone + fax: fax + email: email + url: url + bank: bank + name: name + room: room + yourorder: yourorder + ourinvoice: ourinvoice + rulewidth: rulewidth + fromalign: fromalign + fromrule: fromrule +\stopconstants + +\startvariables all + secondpage: secondpage + foot: foot + topmark: topmark + botmark: botmark + cutmark: cutmark + endmark: endmark + option: option + foldmark: foldmark + usermark: usermark + layer: layer + firsthead: firsthead + nexthead: nexthead + lefthead: lefthead + righthead: righthead + firstfoot: firstfoot + nextfoot: nextfoot + leftfoot: leftfoot + rightfoot: rightfoot + layout: layout + place: place + initialize: initialize + finish: finish + sequence: sequence + style: style + extension: extension + interface: interface + resume: resume + letter: letter + backaddress: backaddress + reference: reference + location: location + address: address + opening: opening + closing: closing + letternext: letternext + lettermain: lettermain + special: special + notation: notation + inside: inside + optimize: optimize + file: file + e: e + data: data + sender: sender + dispatch: dispatch + enclosure: enclosure + copy: copy + nobreak: nobreak + endgraf: endgraf + memo: memo + addressee: addressee + french: french + simplified: simplified + fullblock: fullblock + hanging: hanging + modified: modified + semiblock: semiblock + contact: contact + handle: handle + casual: casual + classic: classic + knuth: knuth + firstname: firstname + familyname: familyname + street: street + town: town + mobile: mobile + phone: phone + fax: fax + email: email + info: info + correspondence: correspondence +\stopvariables + +\startelements all + set: set + value: value + complex: complex + simple: simple + use: use + define: define + flush: flush +\stopelements + +% Placeholders for the messages: +% +% 1: letter|resume / interface|style|extension / filename +% 2: letter|resume / interface|style|extension / filename +% 3: ‹number› / ‹number› +% 4: ‹file› / ‹version› + +\definemessageconstant {correspondence} + +\startmessages all library: correspondence + title: correspondence + 1: loading -- -- -- + 2: -- -- -- not found + 3: correspage set -- processed (size --) + 4: --: -- +\stopmessages + +%D Page numbering + +\def\????cn{@@@@cn} + +\definesystemconstant {correspage} + +\definetwopasslist\s!correspage + +\definenumber[\s!correspage] + +\newcount\correspageno +\newif\ifresettingcorrespagenumber + +\def\newnofcorrespages{0} +\def\nofcorrespages {0} + +\def\savenofcorrespages + {\showmessage\m!correspondence{3}{\newnofcorrespages,\the\correspageno}% + \immediatesavetwopassdata{\s!correspage}{\newnofcorrespages}{\the\correspageno}} + +\def\numberofcorrespages + {\nofcorrespages} + +\def\correspagenumber + {\the\correspageno} + +\appendtoks\savenofcorrespages\to\everybye + +\def\setupcorrespagenumber + {\dosingleargument\dosetupcorrespagenumber} + +\def\dosetupcorrespagenumber[#1]% + {\doifelse{#1}\v!reset + {\resetcorrespagenumber} + {\getparameters[\????cn][#1]}} + +\def\resetcorrespagenumber + {\global\resettingcorrespagenumbertrue} + +\def\setcorrespagenumbers + {\iftwopassdatafound + \xdef\nofcorrespages{\twopassdata}% + \else + \xdef\nofcorrespages{0}% + \fi} + +\def\gotonextcorrespage + {\ifresettingcorrespagenumber + \resetnumber[\s!correspage]% + \global\resettingcorrespagenumberfalse + \fi + \xdef\oldcorrespage{\the\correspageno}% + \incrementnumber[\s!correspage]% + \global\correspageno\rawnumber[\s!correspage]\relax + \ifnum\correspageno=\plusone + \gettwopassdata\s!correspage + \setcorrespagenumbers + \ifnum\oldcorrespage>\zerocount + \showmessage\m!correspondence{3}{\newnofcorrespages,\oldcorrespage}% + \immediatesavetwopassdata{\s!correspage}{\newnofcorrespages}{\oldcorrespage}% + \fi + \doglobal\increment\newnofcorrespages\relax + \fi} + +\appendtoks\gotonextcorrespage\to\beforeeverypage + +%D Setup command for the styles + +\def\definecorrespondencesetup[#1][#2][#3]% + {\setvalue{\e!setup#1\e!endsetup}{\doquintupleempty\dosetupcorrespondencestyle[#2][#3]}} + +\def\dosetupcorrespondencestyle[#1][#2][#3][#4][#5]% + {\iffifthargument + \dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]% + \else\iffourthargument + \dodosetupcorrespondencestyle[#1][#2][#3][#4]% + \else + \dosetupcorrespondenceoption[][#2][\v!option][#3]% + \fi\fi} + +\def\dodosetupcorrespondencestyle[#1][#2][#3][#4]% + {\def\dododosetupcorrespondencestyle##1% + {\csname dosetupcorrespondence\ifcsname#1:#2:##1\endcsname + \csname#1:#2:##1\endcsname + \else + \v!option + \fi\endcsname[#1][#2][##1][#4]}% + \processcommalist[#3]\dododosetupcorrespondencestyle} + +\def\dosetupcorrespondenceoption[#1][#2][#3][#4]% + {\getparameters[#2#3][#4]} + +\def\dosetupcorrespondencelayout[#1][#2][#3][#4]% + {\definelayout[#1#3][#4]} + +\def\dosetupcorrespondencesection[#1][#2][#3][#4]% + {\getparameters[#2#3][#4]} + +\def\dosetupcorrespondencedescription[#1][#2][#3][#4]% + {\getparameters[#2#3][#4]} + +\def\dosetupcorrespondencelayer[#1][#2][#3][#4]% + {\dodosetupcorrespondencelayer[#1][#2][#3][\v!layer,\v!frame,\v!option][#4]} + +\def\dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]% + {\def\dododosetupcorrespondencelayer##1% + {\def\dodododosetupcorrespondencelayer####1% + {\ifcsname dosetupcorrespondencelayer####1\endcsname + \@EA\@EA\csname dosetupcorrespondencelayer####1\endcsname + \else + \@EA\dosetupcorrespondencelayeroption + \fi[#1][#2][##1][#5]}% + \processcommalist[#4]\dodododosetupcorrespondencelayer}% + \processcommalist[#3]\dododosetupcorrespondencelayer} + +\def\dosetupcorrespondencelayerlayer[#1][#2][#3][#4]% + {\setuplayer[#1:#3][#4]% + \getparameters[#2#3\v!layer][#4]} + +\def\dosetupcorrespondencelayerframe[#1][#2][#3][#4]% + {\setuplocalframed[#2#3\v!frame][#4]} + +\def\dosetupcorrespondencelayeroption[#1][#2][#3][#4]% + {\getparameters[#2#3][#4]} + +%D Setup command for the values + +\def\definecorrespondencevalue + {\dodoubleargument\dodefinecorrespondencevalue} + +\def\dodefinecorrespondencevalue[#1][#2]% + {\setvalue{\e!setup#1\e!endsetup}{\dotripleempty\docorrespondencesetup[#2]}% + \@EA\definecomplexorsimple\csname\e!set#1\e!value\endcsname + \setvalue{\e!complex\e!set#1\e!value}[##1]##2{\setvalue{#2##1}{##2}}% + \setvalue{\e!simple \e!set#1\e!value}##1##2{\setvalue{#2##1}{##2}}} + +\def\docorrespondencesetup[#1][#2][#3]% + {\doifelsenothing{#3} + {\getparameters[#1][#2]} + {\def\dodocorrespondencesetup##1% + {\getparameters[#1##1][#3]}% + \processcommalist[#2]\dodocorrespondencesetup}} + +%D Tests + +\long\def\doifcorrespondencevalue#1#2% + {\ifcsname#1#2\endcsname + \edef\!!stringa{\csname#1#2\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\gobbleoneargument + \else + \@EAEAEA\firstofoneargument + \fi + \else + \@EA\gobbleoneargument + \fi} + +\long\def\doifelsecorrespondencevalue#1#2% + {\ifcsname#1#2\endcsname + \edef\!!stringa{\csname#1#2\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\secondoftwoarguments + \else + \@EAEAEA\firstoftwoarguments + \fi + \else + \@EA\secondoftwoarguments + \fi} + +\long\def\doifcorrespondencestylevalue#1#2#3% + {\ifcsname#1#2#3\endcsname + \edef\!!stringa{\csname#1#2#3\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\gobbleoneargument + \else + \@EAEAEA\firstofoneargument + \fi + \else + \@EA\firstofoneargument + \fi} + +\long\def\doifelsecorrespondencestylevalue#1#2#3% + {\ifcsname#1#2#3\endcsname + \edef\!!stringa{\csname#1#2#3\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\secondoftwoarguments + \else + \@EAEAEA\firstoftwoarguments + \fi + \else + \@EA\secondoftwoarguments + \fi} + +\def\correspondencestylevalue#1#2#3% + {\csname#1#2#3\endcsname} + +%D External files + +\def\definecorrespondencefile[#1][#2][#3]% + {\setvalue{\e!use#1#2}[##1]{\usecorrespondencefile[#1][#2][#3][##1]}} + +\def\usecorrespondencefile[#1][#2][#3][#4]% + {\def\dousecorrespondencefile##1% + {\readfile{##1.#3} + {\showmessage\m!correspondence{1}{#1,#2,##1.#3}} + {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}}% + \processcommacommand[#4]\dousecorrespondencefile} + +%D Layers + +\def\definecorrespondencelayer[#1][#2]% + {\setvalue{\s!do\e!define#1\v!layer}{\dodefinecorrespondencelayer[#1][#2]}% + \setvalue{\s!do\e!set #1\v!layer}{\dosetcorrespondencelayer [#1][#2]}} + +\def\dodefinecorrespondencelayer[#1][#2][#3]% + {\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}, + \s!unknown=>{\dododefinecorrespondencelayer[#1][#2][#3]}]} + +\def\dododefinecorrespondencelayer[#1][#2][#3]% + {\letvalue{#2\v!option#3}\v!yes + \doifundefined{#1:#2:#3} + {\letvalue{#1:#2:#3}\v!layer + \addvalue{#1!list!layers}{#3}}% + \presetlocalframed[#2#3\v!frame]% + \definelayer + [#1:#3] + [\c!width=\paperwidth, + \c!height=\paperheight]% + \dodosetupcorrespondencelayer + [#1][#2][#3][\v!option]% + [\c!state=\v!stop, + \c!symbol=, + \c!list=, + \c!alternative=\v!a, + \c!rule=\v!off, + \c!rulethickness=\linewidth, + \c!separator=\crlf, + \c!offset=\zeropoint, + \c!spacebefore=\zeropoint, + \c!spaceafter=\zeropoint, + \c!leftmargin=\zeropoint, + \c!rightmargin=\zeropoint]% + \dodosetupcorrespondencelayer + [#1][#2][#3][\v!frame]% + [\c!frame=\v!off, + \c!align=\v!right, + \c!offset=\zeropoint, + \c!strut=\v!yes]% + \dodosetupcorrespondencelayer + [#1][#2][#3][\v!layer]% + [\c!state=\v!start, + \c!offset=\zeropoint, + \c!preset=\v!left\v!top]} + +\def\dosetcorrespondencelayer[#1][#2][#3]% + {\doifelsecorrespondencestylevalue{#2}{#3}\c!symbol + {\dodosetcorrespondencelayer[#1][#2][#3][\correspondencestylevalue{#2}{#3}\c!symbol]} + {\dodosetcorrespondencelayer[#1][#2][#3][\directsetup{#1:#3}]}} + +\def\dodosetcorrespondencelayer[#1][#2][#3][#4]% + {\setlayer[#1:#3] + {\localframed[#2#3\v!frame] + {\edef\currentcorrespondenceelement{#3}% + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin }% + \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% + \doattributes{#2#3}\c!style\c!color{#4}}}} + +\def\dodosetheaderfooterlayer#1{\csname @@headfoot@@#1\endcsname} + +\setvalue{@@headfoot@@\v!start }{\!!doneatrue } +\setvalue{@@headfoot@@\v!stop }{\!!doneafalse } +\setvalue{@@headfoot@@\v!first }{\!!doneatrue } +\setvalue{@@headfoot@@\v!next }{\!!donebtrue\!!donectrue} +\setvalue{@@headfoot@@\v!left }{\!!donebtrue } +\setvalue{@@headfoot@@\v!right }{\!!donectrue } +\setvalue{@@headfoot@@\v!leftpage }{\!!donebtrue } +\setvalue{@@headfoot@@\v!rightpage}{\!!donectrue } +\setvalue{@@headfoot@@\v!page }{\!!donedtrue } +\setvalue{@@headfoot@@\v!subpage }{\!!donedfalse } + +% \def\dosetheaderfooterlayer[#1][#2][#3]% +% {\!!doneafalse % first page +% \!!donebfalse % even numbered pages +% \!!donecfalse % odd numbered pages +% \!!donedfalse % real pagenumber +% \processcommacommand[\csname#2#3\c!state\endcsname]\dodosetheaderfooterlayer +% \doifnotvalue{#2#3\v!layer\c!state}\v!stop{\setuplayer[#1:#3][\c!state=\v!start]}% +% \ifnum\if!!doned\pagenumber\else\subpagenumber\fi=\plusone +% \if!!donea\dosetcorrespondencelayer[#1][#2][#3]\fi +% \else +% \ifodd\if!!doned\pagenumber\else\subpagenumber\fi +% \if!!donec\dosetcorrespondencelayer[#1][#2][#3]\fi +% \else +% \if!!doneb\dosetcorrespondencelayer[#1][#2][#3]\fi +% \fi\fi} + +% Alternative version of the macro above for the experimental +% interface because \subpagenumber can't be used in \ifnum. + +\def\dosetheaderfooterlayer[#1][#2][#3]% + {\!!doneafalse % first page + \!!donebfalse % even numbered pages + \!!donecfalse % odd numbered pages + \!!donedfalse % real pagenumber + \processcommacommand[\csname#2#3\c!state\endcsname]\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 + \else + \ifodd\if!!doned\pagenumber\else\correspagenumber\fi + \if!!donec\dosetcorrespondencelayer[#1][#2][#3]\fi + \else + \if!!doneb\dosetcorrespondencelayer[#1][#2][#3]\fi + \fi\fi} + +%D Sections + +\def\definecorrespondencesection[#1][#2]% + {\setvalue{\s!do\e!define#1\v!section}{\dodefinecorrespondencesection[#1][#2]}% + \setvalue{\s!do\e!set #1\v!section}{\dosetcorrespondencesection [#1][#2]}} + +\def\dodefinecorrespondencesection[#1][#2][#3]% + {\letvalue{#2\v!option#3}\v!yes + \doifundefined{#1:#2:#3} + {\letvalue{#1:#2:#3}\v!section + \addvalue{#1!list!sections}{#3}}% + \getparameters + [#2#3] + [\c!before=, + \c!after=, + \c!inbetween=, + \c!align=, + \c!leftmargin=\zeropoint, + \c!rightmargin=\zeropoint, + \c!alternative=\v!a, + \c!separator=\crlf, + \c!optimize=\v!no, + \c!command=, + \c!style=, + \c!color=]} + +\def\dosetcorrespondencesection[#1][#2][#3]% + {\begingroup + \doifelsecorrespondencestylevalue{#2}{#3}\c!before + {\correspondencestylevalue{#2}{#3}\c!before} + \endgraf + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}% + \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% + \doifcorrespondencestylevalue{#2}{#3}\c!align + {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}% + \dostartattributes{#2#3}\c!style\c!color\empty + \correspondencestylevalue{#2}{#3}\c!command{\directsetup{#1:#3}}% + \dostopattributes + \doifcorrespondencestylevalue{#2}{#3}\c!after + {\endgraf\correspondencestylevalue{#2}{#3}\c!after} + \endgraf + \endgroup} + +%D Descriptions + +\def\definecorrespondencedescription[#1][#2]% + {\setvalue{\s!do\e!define#1\v!description}{\dodefinecorrespondencedescription[#1][#2]}% + \setvalue{\s!do\e!set #1\v!description}{\dosetcorrespondencedescription [#1][#2]}% + \setvalue{\s!do\e!flush #1\v!description}{\doflushcorrespondencedescription [#1][#2]}} + +\def\dodefinecorrespondencedescription[#1][#2][#3]% + {\letvalue{#2\v!option#3}\v!yes + \doifundefined{#1:#2:#3}{\letvalue{#1:#2:#3}\v!description}% + \getparameters + [#2#3] + [\c!location=\v!left, + \c!inbetween=\nowhitespace, + \c!before=\blank, + \c!after=\blank, + \c!width=\v!broad, + \c!headstyle=, + \c!headcolor=, + \c!distance=\zeropoint]} + +\def\dosetcorrespondencedescription[#1][#2][#3]% + {\bgroup + \doifelsecorrespondencestylevalue{#2}{#3}\c!before + {\correspondencestylevalue{#2}{#3}\c!before} + \endgraf + \scratchdimen\zeropoint + \setbox\scratchbox\hbox{\doattributes{#2#3}\c!headstyle\c!headcolor{\labeltext{#1:#3}}}% + \doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!broad + {\ifdim\wd\scratchbox>\zeropoint + \scratchdimen\dimexpr\wd\scratchbox+1em\relax + \fi} + {\doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!fit + {\if\wd\scratchbox>\zeropoint + \scratchdimen\dimexpr\wd\scratchbox+\correspondencestylevalue{#2}{#3}\c!distance\relax + \fi} + {\scratchdimen\dimexpr\correspondencestylevalue{#2}{#3}\c!width+\correspondencestylevalue{#2}{#3}\c!distance\relax}}% + \executeifdefined{@@description@@\correspondencestylevalue{#2}{#3}\c!location}\gobblethreearguments{#1}{#2}{#3}% + \doifelsecorrespondencestylevalue{#2}{#3}\c!after + {\endgraf\correspondencestylevalue{#2}{#3}\c!after} + \endgraf + \egroup} + +\setvalue{@@description@@\v!left}#1#2#3% + {\EveryPar{\hangindent\scratchdimen\hangafter\zerocount}% + \setbox\scratchbox\hbox\!!to\scratchdimen{\box\scratchbox\hss}% + \noindent\llap{\box\scratchbox}\directsetup{#1:#3}} + +\setvalue{@@description@@\v!right}#1#2#3% + {\EveryPar{\hangindent-\scratchdimen\hangafter\zerocount}% + \setbox\scratchbox\hbox\!!to\scratchdimen{\hss\box\scratchbox}% + \setbox\scratchbox\hbox\!!to\!!zeropoint {\hskip\dimexpr\hsize-\scratchdimen\relax\box\scratchbox\hss}% + \noindent\rlap{\box\scratchbox}\directsetup{#1:#3}} + +\setvalue{@@description@@\v!top}#1#2#3% + {\box\scratchbox\par + \nobreak + \doifcorrespondencestylevalue{#2}{#3}\c!inbetween{\correspondencestylevalue{#2}{#3}\c!inbetween}% + \nobreak + \directsetup{#1:#3}} + +\setvalue{@@description@@\v!text}#1#2#3% + {\noindent\box\scratchbox\directsetup{#1:#3}} + +\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} + +%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} + +\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 new file mode 100644 index 00000000000..ffbb5587bc8 --- /dev/null +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv @@ -0,0 +1,766 @@ +%D \module +%D [ file=t-correspondence, +%D version=2009.04.27, +%D title=\CONTEXT\ User Module, +%D subtitle=Correspondence, +%D author=Wolfgang Schuster, +%D date=\currentdate, +%D copyright=Wolfgang Schuster, +%D email=schuster.wolfgang@googlemail.com, +%D license=Public Domain] + +\unprotect + +% Placeholders for the messages: +% +% 1: letter|resume / interface|style|extension / filename +% 2: letter|resume / interface|style|extension / filename +% 3: ‹number› / ‹number› +% 4: ‹file› / ‹version› + +\definemessageconstant {correspondence} + +\setinterfacemessage{correspondence}{title}{correspondence} +\setinterfacemessage{correspondence}{1} {loading -- -- --} +\setinterfacemessage{correspondence}{2} {-- -- -- not found} +\setinterfacemessage{correspondence}{3} {correspage set -- processed (size --)} +\setinterfacemessage{correspondence}{4} {--: --} + +%D Page numbering + +\def\????cn{@@@@cn} + +\definesystemconstant {correspage} + +\definetwopasslist\s!correspage + +\definenumber[\s!correspage] + +\newcount\correspageno +\newif\ifresettingcorrespagenumber + +\def\newnofcorrespages{0} +\def\nofcorrespages {0} + +\def\savenofcorrespages + {\showmessage\m!correspondence{3}{\newnofcorrespages,\the\correspageno}% + \immediatesavetwopassdata{\s!correspage}{\newnofcorrespages}{\the\correspageno}} + +\def\numberofcorrespages + {\nofcorrespages} + +\def\correspagenumber + {\the\correspageno} + +\appendtoks\savenofcorrespages\to\everybye + +\def\setupcorrespagenumber + {\dosingleargument\dosetupcorrespagenumber} + +\def\dosetupcorrespagenumber[#1]% + {\doifelse{#1}\v!reset + {\resetcorrespagenumber} + {\getparameters[\????cn][#1]}} + +\def\resetcorrespagenumber + {\global\resettingcorrespagenumbertrue} + +\def\setcorrespagenumbers + {\iftwopassdatafound + \xdef\nofcorrespages{\twopassdata}% + \else + \xdef\nofcorrespages{0}% + \fi} + +\def\gotonextcorrespage + {\ifresettingcorrespagenumber + \resetnumber[\s!correspage]% + \global\resettingcorrespagenumberfalse + \fi + \xdef\oldcorrespage{\the\correspageno}% + \incrementnumber[\s!correspage]% + \global\correspageno\rawnumber[\s!correspage]\relax + \ifnum\correspageno=\plusone + \gettwopassdata\s!correspage + \setcorrespagenumbers + \ifnum\oldcorrespage>\zerocount + \showmessage\m!correspondence{3}{\newnofcorrespages,\oldcorrespage}% + \immediatesavetwopassdata{\s!correspage}{\newnofcorrespages}{\oldcorrespage}% + \fi + \doglobal\increment\newnofcorrespages\relax + \fi} + +\appendtoks\gotonextcorrespage\to\beforeeverypage + +%D Setup command for the styles + +\def\definecorrespondencesetup[#1][#2][#3]% + {\setvalue{\e!setup#1\e!endsetup}{\doquintupleempty\dosetupcorrespondencestyle[#2][#3]}} + +\def\dosetupcorrespondencestyle[#1][#2][#3][#4][#5]% + {\iffifthargument + \dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]% + \else\iffourthargument + \dodosetupcorrespondencestyle[#1][#2][#3][#4]% + \else + \dosetupcorrespondenceoption[][#2][\v!option][#3]% + \fi\fi} + +\def\dodosetupcorrespondencestyle[#1][#2][#3][#4]% + {\def\dododosetupcorrespondencestyle##1% + {\csname dosetupcorrespondence\ifcsname#1:#2:##1\endcsname + \csname#1:#2:##1\endcsname + \else + \v!option + \fi\endcsname[#1][#2][##1][#4]}% + \processcommalist[#3]\dododosetupcorrespondencestyle} + +\def\dosetupcorrespondenceoption[#1][#2][#3][#4]% + {\getparameters[#2#3][#4]} + +\def\dosetupcorrespondencelayout[#1][#2][#3][#4]% + {\definelayout[#1#3][#4]} + +\def\dosetupcorrespondencesection[#1][#2][#3][#4]% + {\getcheckedparameters[#1\v!section:#3][#2#3][#4]} + +\def\dosetupcorrespondencedescription[#1][#2][#3][#4]% + {\getcheckedparameters[#1\v!description:#3][#2#3][#4]} + +\def\dosetupcorrespondencelayer[#1][#2][#3][#4]% + {\dodosetupcorrespondencelayer[#1][#2][#3][\v!layer,\v!frame,\v!option][#4]} + +\def\dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]% + {\def\dododosetupcorrespondencelayer##1% + {\def\dodododosetupcorrespondencelayer####1% + {\ifcsname dosetupcorrespondencelayer####1\endcsname + \@EA\@EA\csname dosetupcorrespondencelayer####1\endcsname + \else + \@EA\dosetupcorrespondencelayeroption + \fi[#1][#2][##1][#5]}% + \processcommalist[#4]\dodododosetupcorrespondencelayer}% + \processcommalist[#3]\dododosetupcorrespondencelayer} + +\def\dosetupcorrespondencelayerlayer[#1][#2][#3][#4]% + {\setuplayer[#1:#3][#4]% + \getparameters[#2#3\v!layer][#4]} + +\def\dosetupcorrespondencelayerframe[#1][#2][#3][#4]% + {\setuplocalframed[#2#3\v!frame][#4]} + +\def\dosetupcorrespondencelayeroption[#1][#2][#3][#4]% + {\getcheckedparameters[#1\v!layer\v!option:#3][#2#3][#4]} + +%D Setup command for the values + +\def\definecorrespondencevalue + {\dodoubleargument\dodefinecorrespondencevalue} + +\def\dodefinecorrespondencevalue[#1][#2]% + {\setvalue{\e!setup#1\e!endsetup}{\dotripleempty\docorrespondencesetup[#2]}% + \@EA\definecomplexorsimple\csname\e!set#1\e!value\endcsname + \setvalue{\e!complex\e!set#1\e!value}[##1]##2{\setvalue{#2##1}{##2}}% + \setvalue{\e!simple \e!set#1\e!value}##1##2{\setvalue{#2##1}{##2}}} + +\def\docorrespondencesetup[#1][#2][#3]% + {\doifelsenothing{#3} + {\getparameters[#1][#2]} + {\def\dodocorrespondencesetup##1% + {\getparameters[#1##1][#3]}% + \processcommalist[#2]\dodocorrespondencesetup}} + +%D Tests + +\long\def\doifcorrespondencevalue#1#2% + {\ifcsname#1#2\endcsname + \edef\!!stringa{\csname#1#2\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\gobbleoneargument + \else + \@EAEAEA\firstofoneargument + \fi + \else + \@EA\gobbleoneargument + \fi} + +\long\def\doifelsecorrespondencevalue#1#2% + {\ifcsname#1#2\endcsname + \edef\!!stringa{\csname#1#2\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\secondoftwoarguments + \else + \@EAEAEA\firstoftwoarguments + \fi + \else + \@EA\secondoftwoarguments + \fi} + +\long\def\doifcorrespondencestylevalue#1#2#3% + {\ifcsname#1#2#3\endcsname + \edef\!!stringa{\csname#1#2#3\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\gobbleoneargument + \else + \@EAEAEA\firstofoneargument + \fi + \else + \@EA\firstofoneargument + \fi} + +\long\def\doifelsecorrespondencestylevalue#1#2#3% + {\ifcsname#1#2#3\endcsname + \edef\!!stringa{\csname#1#2#3\endcsname}% + \ifx\!!stringa\empty + \@EAEAEA\secondoftwoarguments + \else + \@EAEAEA\firstoftwoarguments + \fi + \else + \@EA\secondoftwoarguments + \fi} + +\def\correspondencestylevalue#1#2#3% + {\csname#1#2#3\endcsname} + +%D External files + +\def\definecorrespondencefile[#1][#2][#3]% + {\setvalue{\e!use#1#2}[##1]{\usecorrespondencefile[#1][#2][#3][##1]}} + +\def\usecorrespondencefile[#1][#2][#3][#4]% + {\def\dousecorrespondencefile##1% + {\readfile{##1.#3} + {\showmessage\m!correspondence{1}{#1,#2,##1.#3}\registercorrespondencefile{##1.#3}} + {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}}% + \processcommacommand[#4]\dousecorrespondencefile} + +%D Layers + +\def\correspondencelayerkeys + {\c!state,\c!symbol,\c!separator,\c!offset,\c!spacebefore,\c!list,\c!rulethickness% + \c!alternative,\c!spaceafter,\c!leftmargin,\c!rightmargin,\c!rule} + +\def\definecorrespondencelayer[#1][#2]% + {\setvalue{\s!do\e!define#1\v!layer}{\dodefinecorrespondencelayer[#1][#2]}% + \setvalue{\s!do\e!set #1\v!layer}{\dosetcorrespondencelayer [#1][#2]}} + +\def\dodefinecorrespondencelayer[#1][#2][#3]% + {\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}, + \s!unknown=>{\dododefinecorrespondencelayer[#1][#2][#3]}]} + +\def\dododefinecorrespondencelayer[#1][#2][#3]% + {\letvalue{#2\v!option#3}\v!yes + \doifundefined{#1:#2:#3} + {\letvalue{#1:#2:#3}\v!layer + \addvalue{#1!list!layers}{#3}}% + \setvalidparameterkeys[#1\v!layer\v!option:#3][\correspondencelayerkeys]% + \presetlocalframed[#2#3\v!frame]% + \definelayer + [#1:#3] + [\c!width=\paperwidth, + \c!height=\paperheight]% + \dodosetupcorrespondencelayer + [#1][#2][#3][\v!option]% + [\c!state=\v!stop, + \c!symbol=, + \c!list=, + \c!alternative=\v!a, + \c!rule=\v!off, + \c!rulethickness=\linewidth, + \c!separator=\crlf, + \c!offset=\zeropoint, + \c!spacebefore=\zeropoint, + \c!spaceafter=\zeropoint, + \c!leftmargin=\zeropoint, + \c!rightmargin=\zeropoint]% + \dodosetupcorrespondencelayer + [#1][#2][#3][\v!frame]% + [\c!frame=\v!off, + \c!align=\v!right, + \c!offset=\zeropoint, + \c!strut=\v!yes]% + \dodosetupcorrespondencelayer + [#1][#2][#3][\v!layer]% + [\c!state=\v!start, + \c!offset=\zeropoint, + \c!preset=\v!left\v!top]} + +\def\dosetcorrespondencelayer[#1][#2][#3]% + {\doifelsecorrespondencestylevalue{#2}{#3}\c!symbol + {\dodosetcorrespondencelayer[#1][#2][#3][\correspondencestylevalue{#2}{#3}\c!symbol]} + {\dodosetcorrespondencelayer[#1][#2][#3][\directsetup{#1:#3}]}} + +\def\dodosetcorrespondencelayer[#1][#2][#3][#4]% + {\setlayer[#1:#3] + {\localframed[#2#3\v!frame] + {\edef\currentcorrespondenceelement{#3}% + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin }% + \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% + \doattributes{#2#3}\c!style\c!color{#4}}}} + +\def\dodosetheaderfooterlayer#1{\csname @@headfoot@@#1\endcsname} + +\setvalue{@@headfoot@@\v!start }{\!!doneatrue } +\setvalue{@@headfoot@@\v!stop }{\!!doneafalse } +\setvalue{@@headfoot@@\v!first }{\!!doneatrue } +\setvalue{@@headfoot@@\v!next }{\!!donebtrue\!!donectrue} +\setvalue{@@headfoot@@\v!left }{\!!donebtrue } +\setvalue{@@headfoot@@\v!right }{\!!donectrue } +\setvalue{@@headfoot@@\v!leftpage }{\!!donebtrue } +\setvalue{@@headfoot@@\v!rightpage}{\!!donectrue } +\setvalue{@@headfoot@@\v!page }{\!!donedtrue } +\setvalue{@@headfoot@@\v!subpage }{\!!donedfalse } + +% \def\dosetheaderfooterlayer[#1][#2][#3]% +% {\!!doneafalse % first page +% \!!donebfalse % even numbered pages +% \!!donecfalse % odd numbered pages +% \!!donedfalse % real pagenumber +% \processcommacommand[\csname#2#3\c!state\endcsname]\dodosetheaderfooterlayer +% \doifnotvalue{#2#3\v!layer\c!state}\v!stop{\setuplayer[#1:#3][\c!state=\v!start]}% +% \ifnum\if!!doned\pagenumber\else\subpagenumber\fi=\plusone +% \if!!donea\dosetcorrespondencelayer[#1][#2][#3]\fi +% \else +% \ifodd\if!!doned\pagenumber\else\subpagenumber\fi +% \if!!donec\dosetcorrespondencelayer[#1][#2][#3]\fi +% \else +% \if!!doneb\dosetcorrespondencelayer[#1][#2][#3]\fi +% \fi\fi} + +% Alternative version of the macro above for the experimental +% interface because \subpagenumber can't be used in \ifnum. + +\def\dosetheaderfooterlayer[#1][#2][#3]% + {\!!doneafalse % first page + \!!donebfalse % even numbered pages + \!!donecfalse % odd numbered pages + \!!donedfalse % real pagenumber + \processcommacommand[\csname#2#3\c!state\endcsname]\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 + \else + \ifodd\if!!doned\pagenumber\else\correspagenumber\fi + \if!!donec\dosetcorrespondencelayer[#1][#2][#3]\fi + \else + \if!!doneb\dosetcorrespondencelayer[#1][#2][#3]\fi + \fi\fi} + +%D Sections + +\def\correspondencesectionkeys + {\c!before,\c!after,\c!align,\c!leftmargin,\c!rightmargin,\c!alternative,% + \c!inbetween,\c!separator,\c!optimize,\c!command,\c!style,\c!color} + +\def\definecorrespondencesection[#1][#2]% + {\setvalue{\s!do\e!define#1\v!section}{\dodefinecorrespondencesection[#1][#2]}% + \setvalue{\s!do\e!set #1\v!section}{\dosetcorrespondencesection [#1][#2]}} + +\def\dodefinecorrespondencesection[#1][#2][#3]% + {\letvalue{#2\v!option#3}\v!yes + \doifundefined{#1:#2:#3} + {\letvalue{#1:#2:#3}\v!section + \addvalue{#1!list!sections}{#3}}% + \setvalidparameterkeys[#1\v!section:#3][\correspondencesectionkeys]% + \getparameters + [#2#3] + [\c!before=, + \c!after=, + \c!inbetween=, + \c!align=, + \c!leftmargin=\zeropoint, + \c!rightmargin=\zeropoint, + \c!alternative=\v!a, + \c!separator=\crlf, + \c!optimize=\v!no, + \c!command=, + \c!style=, + \c!color=]} + +\def\dosetcorrespondencesection[#1][#2][#3]% + {\begingroup + \doifelsecorrespondencestylevalue{#2}{#3}\c!before + {\correspondencestylevalue{#2}{#3}\c!before} + \endgraf + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}% + \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% + \doifcorrespondencestylevalue{#2}{#3}\c!align + {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}% + \dostartattributes{#2#3}\c!style\c!color\empty + \correspondencestylevalue{#2}{#3}\c!command{\directsetup{#1:#3}}% + \dostopattributes + \doifcorrespondencestylevalue{#2}{#3}\c!after + {\endgraf\correspondencestylevalue{#2}{#3}\c!after} + \endgraf + \endgroup} + +%D Descriptions + +\def\correspondencedescriptionkeys + {\c!location,\c!inbetween,\c!before,\c!after,\c!width,\c!headstyle,\c!headcolor,\c!distance} + +\def\definecorrespondencedescription[#1][#2]% + {\setvalue{\s!do\e!define#1\v!description}{\dodefinecorrespondencedescription[#1][#2]}% + \setvalue{\s!do\e!set #1\v!description}{\dosetcorrespondencedescription [#1][#2]}% + \setvalue{\s!do\e!flush #1\v!description}{\doflushcorrespondencedescription [#1][#2]}} + +\def\dodefinecorrespondencedescription[#1][#2][#3]% + {\letvalue{#2\v!option#3}\v!yes + \doifundefined{#1:#2:#3}{\letvalue{#1:#2:#3}\v!description}% + \setvalidparameterkeys[#1\v!description:#3][\correspondencedescriptionkeys]% + \getparameters + [#2#3] + [\c!location=\v!left, + \c!inbetween=\nowhitespace, + \c!before=\blank, + \c!after=\blank, + \c!width=\v!broad, + \c!headstyle=, + \c!headcolor=, + \c!distance=\zeropoint]} + +\def\dosetcorrespondencedescription[#1][#2][#3]% + {\bgroup + \doifelsecorrespondencestylevalue{#2}{#3}\c!before + {\correspondencestylevalue{#2}{#3}\c!before} + \endgraf + \scratchdimen\zeropoint + \setbox\scratchbox\hbox{\doattributes{#2#3}\c!headstyle\c!headcolor{\labeltext{#1:#3}}}% + \doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!broad + {\ifdim\wd\scratchbox>\zeropoint + \scratchdimen\dimexpr\wd\scratchbox+1em\relax + \fi} + {\doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!fit + {\if\wd\scratchbox>\zeropoint + \scratchdimen\dimexpr\wd\scratchbox+\correspondencestylevalue{#2}{#3}\c!distance\relax + \fi} + {\scratchdimen\dimexpr\correspondencestylevalue{#2}{#3}\c!width+\correspondencestylevalue{#2}{#3}\c!distance\relax}}% + \executeifdefined{@@description@@\correspondencestylevalue{#2}{#3}\c!location}\gobblethreearguments{#1}{#2}{#3}% + \doifelsecorrespondencestylevalue{#2}{#3}\c!after + {\endgraf\correspondencestylevalue{#2}{#3}\c!after} + \endgraf + \egroup} + +\setvalue{@@description@@\v!left}#1#2#3% + {\EveryPar{\hangindent\scratchdimen\hangafter\zerocount}% + \setbox\scratchbox\hbox\!!to\scratchdimen{\box\scratchbox\hss}% + \noindent\llap{\box\scratchbox}\directsetup{#1:#3}} + +\setvalue{@@description@@\v!right}#1#2#3% + {\EveryPar{\hangindent-\scratchdimen\hangafter\zerocount}% + \setbox\scratchbox\hbox\!!to\scratchdimen{\hss\box\scratchbox}% + \setbox\scratchbox\hbox\!!to\!!zeropoint {\hskip\dimexpr\hsize-\scratchdimen\relax\box\scratchbox\hss}% + \noindent\rlap{\box\scratchbox}\directsetup{#1:#3}} + +\setvalue{@@description@@\v!top}#1#2#3% + {\box\scratchbox\par + \nobreak + \doifcorrespondencestylevalue{#2}{#3}\c!inbetween{\correspondencestylevalue{#2}{#3}\c!inbetween}% + \nobreak + \directsetup{#1:#3}} + +\setvalue{@@description@@\v!text}#1#2#3% + {\noindent\box\scratchbox\directsetup{#1:#3}} + +\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} + +%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\registercorrespondencefile#1% + {\doifundefined{@@@@#1@@@@} + {\letgvalue{@@@@#1@@@@}\empty + \modulecode{correspondence.checkfile("#1")}}} + +%D Lua table with all macro files and their current version, it is used +%D to build the revision table in the manual. The Lua alternative is easier +%D to maintain (same folder as the other files) and allows me to store more +%D information as I can do with the TeX solution. + +\startmodulecode + +correspondence = correspondence or { } + +correspondence.files = { + { + name = "t-correspondence.tex", + path = "tex/context/third/letter/base/", + type = "base", + version = "2009.04.27", + description = "Core module" + } , + { + name = "t-letter.tex", + path = "tex/context/third/letter/base/", + type = "base", + version = "2009.02.13", + description = "Letter Module" + + } , + { + name = "t-resume.tex", + path = "tex/context/third/letter/base/", + type = "base", + version = "2009.02.12", + description = "Résumé Module" + } , + { + name = "default.nli", + path = "tex/context/third/letter/interface/", + type = "interface", + version = "2009.03.31", + description = "Default letter interface" + + } , + { + name = "pragma.nli", + path = "tex/context/third/letter/interface/", + type = "interface", + version = "2009.02.12", + description = "m-letter.tex Interface" + } , + { + name = "knuth.nli", + path = "tex/context/third/letter/interface/", + type = "interface", + version = "2009.01.23", + description = "letter.tex Interface" + } , + { + name = "default.nri", + path = "tex/context/third/letter/interface/", + type = "interface", + version = "2009.03.31", + description = "Default resume interface" + } , + { + name = "moderncv.nri", + path = "tex/context/third/letter/interface/", + type = "interface", + version = "2009.03.31", + description = "moderncv resume interface" + } , + { + name = "label.nle", + path = "tex/context/third/letter/extension/", + type = "extension", + version = "2009.02.13", + description = "Text labels" + } , + { + name = "corres.nle", + path = "tex/context/third/letter/extension/", + type = "extension", + version = "2009.02.13", + description = "XML-Database" + } , + { + name = "pragma.nle", + path = "tex/context/third/letter/extension/", + type = "extension", + version = "2008.01.23", + description = "Examples from m-letter.tex" + } , + { + name = "optimize.nle", + path = "tex/context/third/letter/extension/", + type = "extension", + version = "2008.12.03", + description = "Page optimation" + } , + { + name = "addrentry.nle", + path = "tex/context/third/letter/extension/", + type = "extension", + version = "2008.12.26", + description = "\tex{addrenetry} support" + } , + { + name = "dina.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2007.02.11", + description = "German style DIN 676 A" + } , + { + name = "dinb.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.02.14", + description = "German style DIN 676 B" + } , + { + name = "pragma.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.02.12", + description = "m-letter.tex style" + } , + { + name = "knuth.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.02.13", + description = "letter.tex style" + } , + { + name = "dutch.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.12.28", + description = "Dutch letter style" + } , + { + name = "french.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.08.07", + description = "French letter style" + } , + { + name = "english.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.03.13", + description = "English letter style" + } , + { + name = "default.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.03.27", + description = "Basic style" + } , + { + name = "blockstyle.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.11.29", + description = "Default block values" + } , + { + name = "fullblock.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.12.16", + description = "Full-block" + } , + { + name = "semiblock.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.12.16", + description = "Semiblock" + } , + { + name = "modified.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.12.16", + description = "Modified block" + } , + { + name = "hanging.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.12.25", + description = "Hanging intended" + } , + { + name = "memo.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.11.29", + description = "Memo style" + } , + { + name = "simplified.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.12.16", + description = "Simplified style" + } , + { + name = "swiss.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.02.14", + description = "Swiss style" + } , + { + name = "swissleft.nls", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.02.14", + description = "Swiss left style" + } , + { + name = "default.nrs", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.02.10", + description = "Default resume style" + } , + { + name = "modern.nrs", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.04.10", + description = "modercv basic style" + } , + { + name = "classic.nrs", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.03.31", + description = "modercv classic style" + } , + { + name = "casual.nrs", + path = "tex/context/third/letter/style/", + type = "style", + version = "2009.03.31", + description = "modercv casual style" + } , + { + name = "user.ori", + path = "tex/context/third/letter/style/", + type = "style", + version = "2008.07.08", + description = "Example for user settings" + } , +} + +for k,v in global.pairs(correspondence.files) do + local file = correspondence.files[k]["name"] + correspondence[file] = { } + correspondence[file]["name"] = file + correspondence[file]["version"] = correspondence.files[k]["version"] +end + +function correspondence.checkfile(filename) + if correspondence[filename] ~= nil then + local name = correspondence[filename]["name"] + local version = correspondence[filename]["version"] + tex.sprint(tex.prtcatcodes,string.format("\\doglobal\\appendtoks\\showmessage\\m!correspondence{4}{%s,%s}\\to\\everynotabene",name,version)) + end +end + +\stopmodulecode + +\registercorrespondencefile{t-correspondence.tex} + +\protect \endinput 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 1d65d767885..9afcbc42054 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.03.18, +%D version=2009.04.27, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -15,6 +15,12 @@ %D I use a few extra constants and variables in my module. +\ifx\setinterfaceconstant\undefined % fallback for old context versions + \let\setinterfaceconstant\gobbletwoarguments + \let\setinterfacevariable\gobbletwoarguments + \let\setinterfaceelement \gobbletwoarguments +\fi + \startinterface all \setinterfaceconstant {head} {head} \setinterfaceconstant {foot} {foot} @@ -84,6 +90,9 @@ \setinterfaceconstant {room} {room} \setinterfaceconstant {yourorder} {yourorder} \setinterfaceconstant {ourinvoice} {ourinvoice} + \setinterfaceconstant {rulewidth} {rulewidth} + \setinterfaceconstant {fromalign} {fromalign} + \setinterfaceconstant {fromrule} {fromrule} \stopinterface \startinterface all @@ -144,6 +153,7 @@ \setinterfacevariable {hanging} {hanging} \setinterfacevariable {modified} {modified} \setinterfacevariable {semiblock} {semiblock} + \setinterfacevariable {contact} {contact} \setinterfacevariable {handle} {handle} \setinterfacevariable {casual} {casual} \setinterfacevariable {classic} {classic} @@ -170,737 +180,8 @@ \setinterfaceelement {flush} {flush} \stopinterface -% Placeholders for the messages: -% -% 1: letter|resume / interface|style|extension / filename -% 2: letter|resume / interface|style|extension / filename -% 3: ‹number› / ‹number› - -\definemessageconstant {correspondence} - -\startmessages all library: correspondence - title: correspondence - 1: loading -- -- -- - 2: -- -- -- not found - 3: correspage set -- processed (size --) -\stopmessages - -%D Page numbering - -\def\????cn{@@@@cn} - -\definesystemconstant {correspage} - -\definetwopasslist\s!correspage - -\definenumber[\s!correspage] - -\newcount\correspageno -\newif\ifresettingcorrespagenumber - -\def\newnofcorrespages{0} -\def\nofcorrespages {0} - -\def\savenofcorrespages - {\showmessage\m!correspondence{3}{\newnofcorrespages,\the\correspageno}% - \immediatesavetwopassdata{\s!correspage}{\newnofcorrespages}{\the\correspageno}} - -\def\numberofcorrespages - {\nofcorrespages} - -\def\correspagenumber - {\the\correspageno} - -\appendtoks\savenofcorrespages\to\everybye - -\def\setupcorrespagenumber - {\dosingleargument\dosetupcorrespagenumber} - -\def\dosetupcorrespagenumber[#1]% - {\doifelse{#1}\v!reset - {\resetcorrespagenumber} - {\getparameters[\????cn][#1]}} - -\def\resetcorrespagenumber - {\global\resettingcorrespagenumbertrue} - -\def\setcorrespagenumbers - {\iftwopassdatafound - \xdef\nofcorrespages{\twopassdata}% - \else - \xdef\nofcorrespages{0}% - \fi} - -\def\gotonextcorrespage - {\ifresettingcorrespagenumber - \resetnumber[\s!correspage]% - \global\resettingcorrespagenumberfalse - \fi - \xdef\oldcorrespage{\the\correspageno}% - \incrementnumber[\s!correspage]% - \global\correspageno\rawnumber[\s!correspage]\relax - \ifnum\correspageno=\plusone - \gettwopassdata\s!correspage - \setcorrespagenumbers - \ifnum\oldcorrespage>\zerocount - \showmessage\m!correspondence{3}{\newnofcorrespages,\oldcorrespage}% - \immediatesavetwopassdata{\s!correspage}{\newnofcorrespages}{\oldcorrespage}% - \fi - \doglobal\increment\newnofcorrespages\relax - \fi} - -\appendtoks\gotonextcorrespage\to\beforeeverypage - -%D Setup command for the styles - -\def\definecorrespondencesetup[#1][#2][#3]% - {\setvalue{\e!setup#1\e!endsetup}{\doquintupleempty\dosetupcorrespondencestyle[#2][#3]}} - -\def\dosetupcorrespondencestyle[#1][#2][#3][#4][#5]% - {\iffifthargument - \dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]% - \else\iffourthargument - \dodosetupcorrespondencestyle[#1][#2][#3][#4]% - \else - \dosetupcorrespondenceoption[][#2][\v!option][#3]% - \fi\fi} - -\def\dodosetupcorrespondencestyle[#1][#2][#3][#4]% - {\def\dododosetupcorrespondencestyle##1% - {\csname dosetupcorrespondence\ifcsname#1:#2:##1\endcsname - \csname#1:#2:##1\endcsname - \else - \v!option - \fi\endcsname[#1][#2][##1][#4]}% - \processcommalist[#3]\dododosetupcorrespondencestyle} - -\def\dosetupcorrespondenceoption[#1][#2][#3][#4]% - {\getparameters[#2#3][#4]} - -\def\dosetupcorrespondencelayout[#1][#2][#3][#4]% - {\definelayout[#1#3][#4]} - -\def\dosetupcorrespondencesection[#1][#2][#3][#4]% - {\getcheckedparameters[#1\v!section:#3][#2#3][#4]} - -\def\dosetupcorrespondencedescription[#1][#2][#3][#4]% - {\getcheckedparameters[#1\v!description:#3][#2#3][#4]} - -\def\dosetupcorrespondencelayer[#1][#2][#3][#4]% - {\dodosetupcorrespondencelayer[#1][#2][#3][\v!layer,\v!frame,\v!option][#4]} - -\def\dodosetupcorrespondencelayer[#1][#2][#3][#4][#5]% - {\def\dododosetupcorrespondencelayer##1% - {\def\dodododosetupcorrespondencelayer####1% - {\ifcsname dosetupcorrespondencelayer####1\endcsname - \@EA\@EA\csname dosetupcorrespondencelayer####1\endcsname - \else - \@EA\dosetupcorrespondencelayeroption - \fi[#1][#2][##1][#5]}% - \processcommalist[#4]\dodododosetupcorrespondencelayer}% - \processcommalist[#3]\dododosetupcorrespondencelayer} - -\def\dosetupcorrespondencelayerlayer[#1][#2][#3][#4]% - {\setuplayer[#1:#3][#4]% - \getparameters[#2#3\v!layer][#4]} - -\def\dosetupcorrespondencelayerframe[#1][#2][#3][#4]% - {\setuplocalframed[#2#3\v!frame][#4]} - -\def\dosetupcorrespondencelayeroption[#1][#2][#3][#4]% - {\getcheckedparameters[#1\v!layer\v!option:#3][#2#3][#4]} - -%D Setup command for the values - -\def\definecorrespondencevalue - {\dodoubleargument\dodefinecorrespondencevalue} - -\def\dodefinecorrespondencevalue[#1][#2]% - {\setvalue{\e!setup#1\e!endsetup}{\dotripleempty\docorrespondencesetup[#2]}% - \@EA\definecomplexorsimple\csname\e!set#1\e!value\endcsname - \setvalue{\e!complex\e!set#1\e!value}[##1]##2{\setvalue{#2##1}{##2}}% - \setvalue{\e!simple \e!set#1\e!value}##1##2{\setvalue{#2##1}{##2}}} - -\def\docorrespondencesetup[#1][#2][#3]% - {\doifelsenothing{#3} - {\getparameters[#1][#2]} - {\def\dodocorrespondencesetup##1% - {\getparameters[#1##1][#3]}% - \processcommalist[#2]\dodocorrespondencesetup}} - -%D Tests - -\long\def\doifcorrespondencevalue#1#2% - {\ifcsname#1#2\endcsname - \edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EAEAEA\gobbleoneargument - \else - \@EAEAEA\firstofoneargument - \fi - \else - \@EA\gobbleoneargument - \fi} - -\long\def\doifelsecorrespondencevalue#1#2% - {\ifcsname#1#2\endcsname - \edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EAEAEA\secondoftwoarguments - \else - \@EAEAEA\firstoftwoarguments - \fi - \else - \@EA\secondoftwoarguments - \fi} - -\long\def\doifcorrespondencestylevalue#1#2#3% - {\ifcsname#1#2#3\endcsname - \edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EAEAEA\gobbleoneargument - \else - \@EAEAEA\firstofoneargument - \fi - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencestylevalue#1#2#3% - {\ifcsname#1#2#3\endcsname - \edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EAEAEA\secondoftwoarguments - \else - \@EAEAEA\firstoftwoarguments - \fi - \else - \@EA\secondoftwoarguments - \fi} - -\def\correspondencestylevalue#1#2#3% - {\csname#1#2#3\endcsname} - -%D External files - -\def\definecorrespondencefile[#1][#2][#3]% - {\setvalue{\e!use#1#2}[##1]{\usecorrespondencefile[#1][#2][#3][##1]}} - -\def\usecorrespondencefile[#1][#2][#3][#4]% - {\def\dousecorrespondencefile##1% - {\readfile{##1.#3} - {\showmessage\m!correspondence{1}{#1,#2,##1.#3}} - {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}}% - \processcommacommand[#4]\dousecorrespondencefile} - -%D Layers - -\def\correspondencelayerkeys - {\c!state,\c!symbol,\c!separator,\c!offset,\c!spacebefore,\c!list,% - \c!alternative,\c!spaceafter,\c!leftmargin,\c!rightmargin} - -\def\definecorrespondencelayer[#1][#2]% - {\setvalue{\s!do\e!define#1\v!layer}{\dodefinecorrespondencelayer[#1][#2]}% - \setvalue{\s!do\e!set #1\v!layer}{\dosetcorrespondencelayer [#1][#2]}} - -\def\dodefinecorrespondencelayer[#1][#2][#3]% - {\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}, - \s!unknown=>{\dododefinecorrespondencelayer[#1][#2][#3]}]} - -\def\dododefinecorrespondencelayer[#1][#2][#3]% - {\letvalue{#2\v!option#3}\v!yes - \doifundefined{#1:#2:#3} - {\letvalue{#1:#2:#3}\v!layer - \addvalue{#1!list!layers}{#3}}% - \setvalidparameterkeys[#1\v!layer\v!option:#3][\correspondencelayerkeys]% - \presetlocalframed[#2#3\v!frame]% - \definelayer - [#1:#3] - [\c!width=\paperwidth, - \c!height=\paperheight]% - \dodosetupcorrespondencelayer - [#1][#2][#3][\v!option]% - [\c!state=\v!stop, - \c!symbol=, - \c!list=, - \c!alternative=\v!a, - \c!separator=\crlf, - \c!offset=\zeropoint, - \c!spacebefore=\zeropoint, - \c!spaceafter=\zeropoint, - \c!leftmargin=\zeropoint, - \c!rightmargin=\zeropoint]% - \dodosetupcorrespondencelayer - [#1][#2][#3][\v!frame]% - [\c!frame=\v!off, - \c!align=\v!right, - \c!offset=\zeropoint, - \c!strut=\v!yes]% - \dodosetupcorrespondencelayer - [#1][#2][#3][\v!layer]% - [\c!state=\v!start, - \c!offset=\zeropoint, - \c!preset=\v!left\v!top]} - -\def\dosetcorrespondencelayer[#1][#2][#3]% - {\doifelsecorrespondencestylevalue{#2}{#3}\c!symbol - {\dodosetcorrespondencelayer[#1][#2][#3][\correspondencestylevalue{#2}{#3}\c!symbol]} - {\dodosetcorrespondencelayer[#1][#2][#3][\directsetup{#1:#3}]}} - -\def\dodosetcorrespondencelayer[#1][#2][#3][#4]% - {\setlayer[#1:#3] - {\localframed[#2#3\v!frame] - {\doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin }% - \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% - \doattributes{#2#3}\c!style\c!color{#4}}}} - -\def\dodosetheaderfooterlayer#1{\csname @@headfoot@@#1\endcsname} - -\setvalue{@@headfoot@@\v!start }{\!!doneatrue } -\setvalue{@@headfoot@@\v!stop }{\!!doneafalse } -\setvalue{@@headfoot@@\v!first }{\!!doneatrue } -\setvalue{@@headfoot@@\v!next }{\!!donebtrue\!!donectrue} -\setvalue{@@headfoot@@\v!left }{\!!donebtrue } -\setvalue{@@headfoot@@\v!right }{\!!donectrue } -\setvalue{@@headfoot@@\v!leftpage }{\!!donebtrue } -\setvalue{@@headfoot@@\v!rightpage}{\!!donectrue } -\setvalue{@@headfoot@@\v!page }{\!!donedtrue } -\setvalue{@@headfoot@@\v!subpage }{\!!donedfalse } - -% \def\dosetheaderfooterlayer[#1][#2][#3]% -% {\!!doneafalse % first page -% \!!donebfalse % even numbered pages -% \!!donecfalse % odd numbered pages -% \!!donedfalse % real pagenumber -% \processcommacommand[\csname#2#3\c!state\endcsname]\dodosetheaderfooterlayer -% \doifnotvalue{#2#3\v!layer\c!state}\v!stop{\setuplayer[#1:#3][\c!state=\v!start]}% -% \ifnum\if!!doned\pagenumber\else\subpagenumber\fi=\plusone -% \if!!donea\dosetcorrespondencelayer[#1][#2][#3]\fi -% \else -% \ifodd\if!!doned\pagenumber\else\subpagenumber\fi -% \if!!donec\dosetcorrespondencelayer[#1][#2][#3]\fi -% \else -% \if!!doneb\dosetcorrespondencelayer[#1][#2][#3]\fi -% \fi\fi} - -% Alternative version of the macro above for the experimental -% interface because \subpagenumber can't be used in \ifdim. - -\def\dosetheaderfooterlayer[#1][#2][#3]% - {\!!doneafalse % first page - \!!donebfalse % even numbered pages - \!!donecfalse % odd numbered pages - \!!donedfalse % real pagenumber - \processcommacommand[\csname#2#3\c!state\endcsname]\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 - \else - \ifodd\if!!doned\pagenumber\else\correspagenumber\fi - \if!!donec\dosetcorrespondencelayer[#1][#2][#3]\fi - \else - \if!!doneb\dosetcorrespondencelayer[#1][#2][#3]\fi - \fi\fi} - -%D Sections - -\def\correspondencesectionkeys - {\c!before,\c!after,\c!align,\c!leftmargin,\c!rightmargin,\c!alternative,% - \c!inbetween,\c!separator,\c!optimize,\c!command,\c!style,\c!color} - -\def\definecorrespondencesection[#1][#2]% - {\setvalue{\s!do\e!define#1\v!section}{\dodefinecorrespondencesection[#1][#2]}% - \setvalue{\s!do\e!set #1\v!section}{\dosetcorrespondencesection [#1][#2]}} - -\def\dodefinecorrespondencesection[#1][#2][#3]% - {\letvalue{#2\v!option#3}\v!yes - \doifundefined{#1:#2:#3} - {\letvalue{#1:#2:#3}\v!section - \addvalue{#1!list!sections}{#3}}% - \setvalidparameterkeys[#1\v!section:#3][\correspondencesectionkeys]% - \getparameters - [#2#3] - [\c!before=, - \c!after=, - \c!inbetween=, - \c!align=, - \c!leftmargin=\zeropoint, - \c!rightmargin=\zeropoint, - \c!alternative=\v!a, - \c!separator=\crlf, - \c!optimize=\v!no, - \c!command=, - \c!style=, - \c!color=]} - -\def\dosetcorrespondencesection[#1][#2][#3]% - {\begingroup - \doifelsecorrespondencestylevalue{#2}{#3}\c!before - {\correspondencestylevalue{#2}{#3}\c!before} - \endgraf - \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}% - \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% - \doifcorrespondencestylevalue{#2}{#3}\c!align - {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}% - \dostartattributes{#2#3}\c!style\c!color\empty - \correspondencestylevalue{#2}{#3}\c!command{\directsetup{#1:#3}}% - \dostopattributes - \doifcorrespondencestylevalue{#2}{#3}\c!after - {\endgraf\correspondencestylevalue{#2}{#3}\c!after} - \endgraf - \endgroup} - -%D Descriptions - -\def\correspondencedescriptionkeys - {\c!location,\c!inbetween,\c!before,\c!after,\c!width,\c!headstyle,\c!headcolor,\c!distance} - -\def\definecorrespondencedescription[#1][#2]% - {\setvalue{\s!do\e!define#1\v!description}{\dodefinecorrespondencedescription[#1][#2]}% - \setvalue{\s!do\e!set #1\v!description}{\dosetcorrespondencedescription [#1][#2]}% - \setvalue{\s!do\e!flush #1\v!description}{\doflushcorrespondencedescription [#1][#2]}} - -\def\dodefinecorrespondencedescription[#1][#2][#3]% - {\letvalue{#2\v!option#3}\v!yes - \doifundefined{#1:#2:#3}{\letvalue{#1:#2:#3}\v!description}% - \setvalidparameterkeys[#1\v!description:#3][\correspondencedescriptionkeys]% - \getparameters - [#2#3] - [\c!location=\v!left, - \c!inbetween=\nowhitespace, - \c!before=\blank, - \c!after=\blank, - \c!width=\v!broad, - \c!headstyle=, - \c!headcolor=, - \c!distance=\zeropoint]} - -\def\dosetcorrespondencedescription[#1][#2][#3]% - {\bgroup - \doifelsecorrespondencestylevalue{#2}{#3}\c!before - {\correspondencestylevalue{#2}{#3}\c!before} - \endgraf - \scratchdimen\zeropoint - \setbox\scratchbox\hbox{\doattributes{#2#3}\c!headstyle\c!headcolor{\labeltext{#1:#3}}}% - \doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!broad - {\ifdim\wd\scratchbox>\zeropoint - \scratchdimen\dimexpr\wd\scratchbox+1em\relax - \fi} - {\doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!fit - {\if\wd\scratchbox>\zeropoint - \scratchdimen\dimexpr\wd\scratchbox+\correspondencestylevalue{#2}{#3}\c!distance\relax - \fi} - {\scratchdimen\dimexpr\correspondencestylevalue{#2}{#3}\c!width+\correspondencestylevalue{#2}{#3}\c!distance\relax}}% - \executeifdefined{@@description@@\correspondencestylevalue{#2}{#3}\c!location}\gobblethreearguments{#1}{#2}{#3}% - \doifelsecorrespondencestylevalue{#2}{#3}\c!after - {\endgraf\correspondencestylevalue{#2}{#3}\c!after} - \endgraf - \egroup} - -\setvalue{@@description@@\v!left}#1#2#3% - {\EveryPar{\hangindent\scratchdimen\hangafter\zerocount}% - \setbox\scratchbox\hbox\!!to\scratchdimen{\box\scratchbox\hss}% - \noindent\llap{\box\scratchbox}\directsetup{#1:#3}} - -\setvalue{@@description@@\v!right}#1#2#3% - {\EveryPar{\hangindent-\scratchdimen\hangafter\zerocount}% - \setbox\scratchbox\hbox\!!to\scratchdimen{\hss\box\scratchbox}% - \setbox\scratchbox\hbox\!!to\!!zeropoint {\hskip\dimexpr\hsize-\scratchdimen\relax\box\scratchbox\hss}% - \noindent\rlap{\box\scratchbox}\directsetup{#1:#3}} - -\setvalue{@@description@@\v!top}#1#2#3% - {\box\scratchbox\par - \nobreak - \doifcorrespondencestylevalue{#2}{#3}\c!inbetween{\correspondencestylevalue{#2}{#3}\c!inbetween}% - \nobreak - \directsetup{#1:#3}} - -\setvalue{@@description@@\v!text}#1#2#3% - {\noindent\box\scratchbox\directsetup{#1:#3}} - -\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} - -%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} - -%D A simple test for the existence of Hans new key checker. - -\ifx\enablecheckparameters\undefined - \let\setvalidparameterkeys\gobbleparameters - \let\addvalidparameterkeys\gobbleparameters - \def\getcheckedparameters[#1]{\getparameters} -\fi - -\beginLUATEX - -%D Lua table with all macro files and their current version, it is used -%D to build the revision table in the manual. The Lua alternative is easier -%D to maintain (same folder as the other files) and allows me to store more -%D information as I can do with the TeX solution. - -\startluacode - -thirddata = thirddata or { } -thirddata.correspondence = thirddata.correspondence or { } - -thirddata.correspondence.files = { - { - name = "t-correspondence.tex", - path = "tex/context/third/letter/base/", - type = "base", - version = "2009.03.18", - description = "Core module" - } , - { - name = "t-letter.tex", - path = "tex/context/third/letter/base/", - type = "base", - version = "2009.02.13", - description = "Letter Module" - - } , - { - name = "t-resume.tex", - path = "tex/context/third/letter/base/", - type = "base", - version = "2009.02.12", - description = "Résumé Module" - } , - { - name = "default.nli", - path = "tex/context/third/letter/interface/", - type = "interface", - version = "2009.03.13", - description = "Default letter interface" - - } , - { - name = "pragma.nli", - path = "tex/context/third/letter/interface/", - type = "interface", - version = "2009.02.12", - description = "m-letter.tex Interface" - } , - { - name = "knuth.nli", - path = "tex/context/third/letter/interface/", - type = "interface", - version = "2009.01.23", - description = "letter.tex Interface" - } , - { - name = "default.nri", - path = "tex/context/third/letter/interface/", - type = "interface", - version = "2009.02.14", - description = "Default resume interface" - } , - { - name = "label.nle", - path = "tex/context/third/letter/extension/", - type = "extension", - version = "2009.02.13", - description = "Text labels" - } , - { - name = "corres.nle", - path = "tex/context/third/letter/extension/", - type = "extension", - version = "2009.02.13", - description = "XML-Database" - } , - { - name = "pragma.nle", - path = "tex/context/third/letter/extension/", - type = "extension", - version = "2008.01.23", - description = "Examples from m-letter.tex" - } , - { - name = "optimize.nle", - path = "tex/context/third/letter/extension/", - type = "extension", - version = "2008.12.03", - description = "Page optimation" - } , - { - name = "addrentry.nle", - path = "tex/context/third/letter/extension/", - type = "extension", - version = "2008.12.26", - description = "\tex{addrenetry} support" - } , - { - name = "dina.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2007.02.11", - description = "German style DIN 676 A" - } , - { - name = "dinb.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.14", - description = "German style DIN 676 B" - } , - { - name = "pragma.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.12", - description = "m-letter.tex style" - } , - { - name = "knuth.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.13", - description = "letter.tex style" - } , - { - name = "dutch.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.12.28", - description = "Dutch letter style" - } , - { - name = "french.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.08.07", - description = "French letter style" - } , - { - name = "english.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.03.13", - description = "English letter style" - } , - { - name = "default.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.14", - description = "Basic style" - } , - { - name = "blockstyle.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.11.29", - description = "Default block values" - } , - { - name = "fullblock.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.12.16", - description = "Full-block" - } , - { - name = "semiblock.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.12.16", - description = "Semiblock" - } , - { - name = "modified.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.12.16", - description = "Modified block" - } , - { - name = "hanging.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.12.25", - description = "Hanging intended" - } , - { - name = "memo.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.11.29", - description = "Memo style" - } , - { - name = "simplified.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.12.16", - description = "Simplified style" - } , - { - name = "swiss.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.14", - description = "Swiss style" - } , - { - name = "swissleft.nls", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.14", - description = "Swiss left style" - } , - { - name = "default.nrs", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.10", - description = "Default resume style" - } , - { - name = "modern.nrs", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.03.13", - description = "modercv basic style" - } , - { - name = "classic.nrs", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.11", - description = "modercv classic style" - } , - { - name = "casual.nrs", - path = "tex/context/third/letter/style/", - type = "style", - version = "2009.02.11", - description = "modercv casual style" - } , - { - name = "user.ori", - path = "tex/context/third/letter/style/", - type = "style", - version = "2008.07.08", - description = "Example for user settings" - } , -} - -\stopluacode +%D Core macros. -\endLUATEX +\loadmarkfile{t-correspondence} \protect \endinput diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex b/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex index 57309518b74..0f990c6597d 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex +++ b/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex @@ -33,6 +33,8 @@ \c!extension=, % default letter extension \c!interface=default] % default letter interface +\ifdefined\registercorrespondencefile \registercorrespondencefile{t-letter.tex} \fi + %D \subject{Setup commands} %D %D \macros diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex b/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex index ad8ec679c24..f752340a563 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex +++ b/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex @@ -25,6 +25,8 @@ \c!extension=, \c!interface=default] +\ifdefined\registercorrespondencefile \registercorrespondencefile{t-resume.tex} \fi + %D \macros %D {setupresumestyle} 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 fd9a61db84b..84f93eab585 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.03.13, +%D version=2009.03.31, %D title=\CONTEXT\ Letter Interface, %D subtitle=Default Interface, %D author=Wolfgang Schuster, @@ -286,6 +286,136 @@ \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? + +\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 + \lettervalue\c!fromname + \ifnum\!!fromrule=\plusone + \doifelselettervalue\c!fromlogo + {\setbox\scratchbox\hbox{\lettervalue\c!fromlogo}% + \scratchdimen\dimexpr\letterstylevalue\v!head\c!rulewidth-\wd\scratchbox\relax} + {\scratchdimen\letterstylevalue\v!head\c!rulewidth}% + \vskip-.5\lineheight\blackrule + [width=\scratchdimen, + height=\letterstylevalue\v!head\c!rulethickness, + color=\letterstylevalue\v!head\c!rulecolor]% + \fi + \dostopattributes + \\ + \dostartattributes{\????ld\c!fromaddress}\c!style\c!color + \lettervalue\c!fromaddress + \doiflettervalue\c!fromphone{\\\lettervalue\c!fromphone}% + \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% + \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% + \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% + \ifnum\!!fromrule=\plustwo + \ifzeropt\letterstylevalue\v!head\c!rulewidth + \scratchdimen\hsize + \else + \scratchdimen\letterstylevalue\v!head\c!rulewidth + \fi + \vskip-.5\lineheight\blackrule + [width=\scratchdimen, + height=\letterstylevalue\v!head\c!rulethickness, + color=\letterstylevalue\v!head\c!rulecolor]% + \fi + \dostopattributes}% + \doiflettervalue\c!fromlogo{\llap{\lettervalue\c!fromlogo}}}}% + +\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 + \lettervalue\c!fromname + \ifnum\!!fromrule=\plusone + \ifzeropt\letterstylevalue\v!head\c!rulewidth + \scratchdimen\hsize + \else + \scratchdimen\letterstylevalue\v!head\c!rulewidth + \fi + \vskip-.5\lineheight\blackrule + [width=\scratchdimen, + height=\letterstylevalue\v!head\c!rulethickness, + color=\letterstylevalue\v!head\c!rulecolor]% + \fi + \dostopattributes + \\ + \dostartattributes{\????ld\c!fromaddress}\c!style\c!color + \lettervalue\c!fromaddress + \doiflettervalue\c!fromphone{\\\lettervalue\c!fromphone}% + \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% + \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% + \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% + \ifnum\!!fromrule=\plustwo + \ifzeropt\letterstylevalue\v!head\c!rulewidth + \scratchdimen\hsize + \else + \scratchdimen\letterstylevalue\v!head\c!rulewidth + \fi + \vskip-.5\lineheight\blackrule + [width=\scratchdimen, + height=\letterstylevalue\v!head\c!rulethickness, + color=\letterstylevalue\v!head\c!rulecolor]% + \fi + \dostopattributes}}} + +\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}}% + \framed[frame=off,location=bottom,align=left,width=\hsize] + {\dostartattributes{\????ld\c!fromname}\c!style\c!color + \lettervalue\c!fromname + \ifnum\!!fromrule=\plusone + \ifzeropt\letterstylevalue\v!head\c!rulewidth + \scratchdimen\hsize + \else + \doifelselettervalue\c!fromlogo + {\setbox\scratchbox\hbox{\lettervalue\c!fromlogo}% + \scratchdimen\dimexpr\letterstylevalue\v!head\c!rulewidth-\wd\scratchbox\relax} + {\scratchdimen\letterstylevalue\v!head\c!rulewidth}% + \fi + \vskip-.5\lineheight\blackrule + [width=\scratchdimen, + height=\letterstylevalue\v!head\c!rulethickness, + color=\letterstylevalue\v!head\c!rulecolor]% + \fi + \dostopattributes + \\ + \dostartattributes{\????ld\c!fromaddress}\c!style\c!color + \\\lettervalue\c!fromaddress + \doiflettervalue\c!fromphone{\\\lettervalue\c!fromphone}% + \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% + \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% + \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% + \ifnum\!!fromrule=\plustwo + \ifzeropt\letterstylevalue\v!head\c!rulewidth + \scratchdimen\hsize + \else + \scratchdimen\letterstylevalue\v!head\c!rulewidth + \fi + \vskip-.5\lineheight\blackrule + [width=\scratchdimen, + height=\letterstylevalue\v!head\c!rulethickness, + color=\letterstylevalue\v!head\c!rulecolor]% + \fi + \dostopattributes}}} + \startsetups[\v!letter:\v!head] \def\\{\letterstylevalue\v!head\c!separator} \executeifdefined{\v!letter:\v!head:\@@@@lsheadalternative}{\letterelement[\v!head][\v!a]} @@ -541,7 +671,8 @@ %D The labels are stored in a common file, you could use them in your own interface %D but you have to live with my names. -\useletterstyle [dinb] % layout -\useletterextension[label] % labels +\useletterstyle [dinb] % layout +\useletterextension[label] % labels +\useletterextension[addrentry] % database \protect \endinput diff --git a/Master/texmf-dist/tex/context/third/letter/interface/default.nri b/Master/texmf-dist/tex/context/third/letter/interface/default.nri index c417951987e..0778da379c2 100644 --- a/Master/texmf-dist/tex/context/third/letter/interface/default.nri +++ b/Master/texmf-dist/tex/context/third/letter/interface/default.nri @@ -1,6 +1,6 @@ %D \module %D [ file=default, -%D version=2009.02.14, +%D version=2009.03.31, %D title=\CONTEXT\ Resume Interface, %D subtitle=Default Interface, %D author=Wolfgang Schuster, @@ -52,16 +52,6 @@ %D \stopcontent %D \stoptyping -% \def\startresume -% {\bgroup\dosingleempty\dostartresume} -% -% \def\dostartresume[#1]% -% {\iffirstargument -% \getparameters[\????rd][#1]% -% \fi -% \def\stopresume{\directsetup{\v!resume:\v!place}\egroup\setupsubpagenumber[\c!state=\v!start]}% -% \dostartbuffer[resumecontent][startresume][stopresume]} - \long\def\dosetbuffer[#1]#2\endbuffer % added \long {\begingroup \setcurrentbuffer{#1}% diff --git a/Master/texmf-dist/tex/context/third/letter/interface/moderncv.nri b/Master/texmf-dist/tex/context/third/letter/interface/moderncv.nri new file mode 100644 index 00000000000..94a626422fd --- /dev/null +++ b/Master/texmf-dist/tex/context/third/letter/interface/moderncv.nri @@ -0,0 +1,153 @@ +%D \module +%D [ file=moderncv, +%D version=2009.03.31, +%D title=\CONTEXT\ Resume Interface, +%D subtitle=moderncv Interface, +%D author=Wolfgang Schuster, +%D date=\currentdate, +%D copyright=Wolfgang Schuster, +%D email=schuster.wolfgang@googlemail.com, +%D license=Public Domain] + +\unprotect + +\setupcolors[\c!state=\v!start] + +\definemeasure[quotewidth] [.65\textwidth] +\definemeasure[separatorcolumnwidth] [.025\textwidth] +\definemeasure[hintscolumnwidth] [.15\textwidth] +\definemeasure[maincolumnwidth] [\dimexpr\textwidth-\measure{separatorcolumnwidth}-\measure{hintscolumnwidth}\relax] +\definemeasure[doubleitemmaincolumnwidth] [\dimexpr(\measure{maincolumnwidth}-\measure{hintscolumnwidth}-\measure{separatorcolumnwidth})/2\relax] +\definemeasure[listitemsymbolwidth] [2em] % LaTeX assingnment is not possible in ConTeXt +\definemeasure[listitemmaincolumnwidth] [\dimexpr\measure{maincolumnwidth}-\measure{listitemsymbolwidth}\relax] +\definemeasure[listdoubleitemmaincolumnwidth][\dimexpr.475\measure{listitemmaincolumnwidth}\relax] + +\def\ModerncvSectionCommand#1#2% + {\hbox to \hsize + {\blackrule[\c!width=\measure{hintscolumnwidth},\c!height=1ex,\c!depth=-.5ex,\c!color=resume:6]% + \hskip\measure{separatorcolumnwidth}% + \vtop{\hsize\measure{maincolumnwidth}#2}}} + +\setuphead + [\v!section] + [\c!color=resume:7, + \c!incrementnumber=\v!no, + \c!before={\blank[2*\v!medium]}, + \c!after={\blank[\v!medium]}, + \c!command=\ModerncvSectionCommand] + +\def\ModerncvSubsectionCommand#1#2% + {\hbox to \hsize + {\hskip\dimexpr\measure{hintscolumnwidth}+\measure{separatorcolumnwidth}\relax + \vtop{\hsize\measure{maincolumnwidth}#2}}} + +\setuphead + [\v!subsection] + [\c!color=resume:8, + \c!incrementnumber=\v!no, + \c!before={\blank[2*\v!medium]}, + \c!after={\blank[\v!medium]}, + \c!command=\ModerncvSubsectionCommand] + +%D Moderncv compatible commands for the user data. + +\def\cvline + {\dosingleempty\docvline} + +\def\docvline[#1]#2#3% + {\bgroup\dontcomplain + \starttable[s0|s0rp(\measure{hintscolumnwidth})|s0w(\measure{separatorcolumnwidth})|s0p(\measure{maincolumnwidth})|] + \NC\doifelsenothing{#2}{~}{\setupinterlinespace\relax#2}\NC\NC\setupinterlinespace\relax#3\NC\NR + \stoptable + \egroup + \doifelsenothing{#1}{\blank[.25em]}{\blank[#1]}} + +\def\cvdoubleitem#1#2#3#4% + {\cvline{#1} + {\hbox\bgroup + \vtop{\hsize\measure{doubleitemmaincolumnwidth}#2}% + \hfill + \vtop{\hsize\measure{hintscolumnwidth}\raggedleft#3}% + \hskip\measure{separatorcolumnwidth}% + \vtop{\hsize\measure{doubleitemmaincolumnwidth}#4}% + \egroup}} + +\def\cvlistitem + {\dosingleempty\docvlistitem} + +\def\docvlistitem[#1]#2% default symbol is \textbullet and not \endash + {\cvline[none]{}{\doifelsenothing{#1}{--}{#1}~\vtop{\hsize\measure{listitemmaincolumnwidth}#2}}} + +\def\cvlistdoubleitem + {\dosingleempty\docvlistdoubleitem} + +\def\docvlistdoubleitem[#1]#2#3% + {\cvline[none]{}% + {\hbox\bgroup + \doifelsenothing{#1}{--}{#1}~\vtop{\hsize\measure{listdoubleitemmaincolumnwidth}#2}% + \hfill + \doifsomething{#3}{\doifelsenothing{#1}{--}{#1}~\vtop{\hsize\measure{listdoubleitemmaincolumnwidth}#3}}% + \egroup}} + +\def\cventry#1#2#3#4#5#6% + {\cvline{#1} + {{\bf#2}% + \doifsomething{#3}{, {\it#3}}% + \doifsomething{#4}{, {#4}}% + \doifsomething{#5}{, {#5}}% + .% + \doifsomething{#6}{\crlf\tx#6}}} + +\def\cvlanguage#1#2#3% + {\cvline{#1} + {\hbox\bgroup + \vtop{\hsize\dimexpr.225\measure{maincolumnwidth}\relax\bf#2}% + \hfill + \vtop{\hsize\dimexpr.725\measure{maincolumnwidth}\relax\raggedleft\itx#3}% + \egroup}} + +\def\cvcomputer#1#2#3#4% + {\cvdoubleitem{#1}{\tx#2}{#3}{\tx#4}} + +%D Page optimation, change the topspace to produce a distance of 2.5em +%D between the bottom of the header and the first line of text. + +\newdimen\resume!height!head + +\startsetups[\v!resume:\v!optimize] + + \setbox\scratchbox\vbox{\dontcomplain\getvalue{\v!resume:\v!head:\@@@@rsheadalternative}} + + \ifdim\htdp\scratchbox>\zeropoint + + \global\resume!height!head\htdp\scratchbox + + \setupresumestyle + [\v!firstpage] + [\c!topspace=\dimexpr\resume!height!head+\resumestylevalue{\v!head\v!layer}\c!voffset+2.5em\relax] + + \fi + +\stopsetups + +\setupresumestyle + [\v!firstpage,\v!secondpage] + [\c!backspace=20mm, + \c!width=168mm, + \c!header=0pt, + \c!footer=0pt, + \c!topspace=30mm, + \c!bottomspace=40mm, + \c!height=\v!fit] + +\setupresumestyle + [\v!head,\v!foot] + [\c!state=\v!start] + +\setupresumestyle + [\v!nexthead,\v!nextfoot] + [\c!state=\v!next] + +\useresumestyle[classic] + +\protect \endinput diff --git a/Master/texmf-dist/tex/context/third/letter/style/casual.nrs b/Master/texmf-dist/tex/context/third/letter/style/casual.nrs index 0bb0ba543f0..a0185265f17 100644 --- a/Master/texmf-dist/tex/context/third/letter/style/casual.nrs +++ b/Master/texmf-dist/tex/context/third/letter/style/casual.nrs @@ -1,6 +1,6 @@ %D \module %D [ file=casual, -%D version=2009.02.11, +%D version=2009.03.31, %D title=\CONTEXT\ Resume Style, %D subtitle=Casual Style, %D author=Wolfgang Schuster, diff --git a/Master/texmf-dist/tex/context/third/letter/style/classic.nrs b/Master/texmf-dist/tex/context/third/letter/style/classic.nrs index c5f9b67af8a..c386fe1b770 100644 --- a/Master/texmf-dist/tex/context/third/letter/style/classic.nrs +++ b/Master/texmf-dist/tex/context/third/letter/style/classic.nrs @@ -1,6 +1,6 @@ %D \module %D [ file=classic, -%D version=2009.02.11, +%D version=2009.03.31, %D title=\CONTEXT\ Resume Style, %D subtitle=Classic 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 fa557bbc3ef..e4f10ee918c 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.04, +%D version=2009.03.27, %D title=\CONTEXT\ Letter Style, %D subtitle=Blockstyle initalization, %D author=Wolfgang Schuster, @@ -62,6 +62,12 @@ [\c!state=\v!start] \setupletterstyle + [\v!head] + [\c!rulewidth=\hsize, + \c!fromrule=\v!no, + \c!alternative=\v!left] + +\setupletterstyle [\v!nexthead,\v!nextfoot] [\c!state=\v!next] diff --git a/Master/texmf-dist/tex/context/third/letter/style/modern.nrs b/Master/texmf-dist/tex/context/third/letter/style/modern.nrs index d0137e101e5..47944a57325 100644 --- a/Master/texmf-dist/tex/context/third/letter/style/modern.nrs +++ b/Master/texmf-dist/tex/context/third/letter/style/modern.nrs @@ -1,6 +1,6 @@ %D \module %D [ file=modern, -%D version=2009.03.22, +%D version=2009.04.10, %D title=\CONTEXT\ Resume Style, %D subtitle=Modern Style, %D author=Wolfgang Schuster, @@ -33,6 +33,7 @@ \setuphead [\v!section] [\c!color=resume:7, + \c!number=\v!no, \c!incrementnumber=\v!no, \c!before={\blank[2*\v!medium]}, \c!after={\blank[\v!medium]}, @@ -46,6 +47,7 @@ \setuphead [\v!subsection] [\c!color=resume:8, + \c!number=\v!no, \c!incrementnumber=\v!no, \c!before={\blank[2*\v!medium]}, \c!after={\blank[\v!medium]}, |