summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third/letter
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-12-24 23:27:27 +0000
committerKarl Berry <karl@freefriends.org>2008-12-24 23:27:27 +0000
commit0fd42e8b1cfdd8822493c6f1424c6e53691e23e4 (patch)
tree3c8bd10081039764cf828d47d8f5c225d97b0ce5 /Master/texmf-dist/tex/context/third/letter
parentb32f575da15f39882f8c3e83c838ef841cba2304 (diff)
context-letter update (24dec08)
git-svn-id: svn://tug.org/texlive/trunk@11707 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/third/letter')
-rwxr-xr-xMaster/texmf-dist/tex/context/third/letter/base/t-correspondence.tex67
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/t-letter.tex64
-rwxr-xr-xMaster/texmf-dist/tex/context/third/letter/base/t-resume.tex20
-rw-r--r--Master/texmf-dist/tex/context/third/letter/interface/default.nli3
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/default.nls51
-rw-r--r--Master/texmf-dist/tex/context/third/letter/style/dinb.nls17
6 files changed, 134 insertions, 88 deletions
diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex
index ffb080da59b..780dac194d9 100755
--- 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=2008.12.21,
+%D version=2008.12.23,
%D title=\CONTEXT\ User Module,
%D subtitle=Correspondence,
%D author=Wolfgang Schuster,
@@ -35,6 +35,8 @@
\setinterfaceconstant {leftfoot} {leftfoot}
\setinterfaceconstant {rightfoot} {rightfoot}
\setinterfaceconstant {content} {content}
+ \setinterfaceconstant {backaddress} {backaddress}
+ \setinterfaceconstant {optimize} {optimize}
\stopinterface
\startinterface all
@@ -64,6 +66,20 @@
\setinterfacevariable {style} {style}
\setinterfacevariable {extension} {extension}
\setinterfacevariable {interface} {interface}
+ \setinterfacevariable {resume} {resume}
+ \setinterfacevariable {letter} {letter}
+ \setinterfacevariable {backaddress} {backaddress}
+ \setinterfacevariable {reference} {reference}
+ \setinterfacevariable {location} {location}
+ \setinterfacevariable {address} {address}
+ \setinterfacevariable {opening} {opening}
+ \setinterfacevariable {closing} {closing}
+ \setinterfacevariable {letternext} {letternext}
+ \setinterfacevariable {lettermain} {lettermain}
+ \setinterfacevariable {special} {special}
+ \setinterfacevariable {notation} {notation}
+ \setinterfacevariable {inside} {inside}
+ \setinterfacevariable {optimize} {optimize}
\stopinterface
\startinterface all
@@ -76,6 +92,14 @@
\setinterfaceelement {flush} {flush}
\stopinterface
+\definemessageconstant {correspondence}
+
+\startmessages all library: correspondence
+ title: correspondence
+ 1: loading -- -- --
+ 2: -- -- -- not found
+\stopmessages
+
%D Value list
\ifx\appendtovaluelist\undefined
@@ -226,13 +250,15 @@
%D External files
-\def\definecorrespondencefile[#1][#2]%
- {\setvalue{\e!use#1}[##1]{\usecorrespondencefile[#2][##1]}}
+\def\definecorrespondencefile[#1][#2][#3]%
+ {\setvalue{\e!use#1#2}[##1]{\usecorrespondencefile[#1][#2][#3][##1]}}
-\def\usecorrespondencefile[#1][#2]%
+\def\usecorrespondencefile[#1][#2][#3][#4]%
{\def\dousecorrespondencefile##1%
- {\readfile{##1.#1}\donothing\donothing}%
- \processcommacommand[#2]\dousecorrespondencefile}
+ {\readfile{##1.#3}
+ {\showmessage\m!correspondence{1}{#1,#2,##1.#3}}
+ {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}}%
+ \processcommacommand[#4]\dousecorrespondencefile}
%D Layers
@@ -302,6 +328,35 @@
\v!left=>\chardef\headerfooter\plusfour,
\v!right=>\chardef\headerfooter\plusfive]}
+\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
+ \!!donebfalse
+ \!!donecfalse
+ \!!donedfalse
+ \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\subpagenumber=\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}
+
%D Sections
\def\definecorrespondencesection[#1][#2]%
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 5df88487264..a0273f330d8 100644
--- a/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex
+++ b/Master/texmf-dist/tex/context/third/letter/base/t-letter.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-letter,
-%D version=2008.12.16,
+%D version=2008.12.23,
%D title=\CONTEXT\ User Module,
%D subtitle=Framework for Letters,
%D author=Wolfgang Schuster,
@@ -20,35 +20,11 @@
\usemodule[correspondence]
-%D I use a few extra constants and variables in my module.
-
-\startinterface all
- \setinterfaceconstant {backaddress} {backaddress}
- \setinterfaceconstant {optimize} {optimize}
-\stopinterface
-
-\startinterface all
- \setinterfacevariable {letter} {letter}
- \setinterfacevariable {backaddress} {backaddress}
- \setinterfacevariable {reference} {reference}
- \setinterfacevariable {location} {location}
- \setinterfacevariable {address} {address}
- \setinterfacevariable {opening} {opening}
- \setinterfacevariable {closing} {closing}
- \setinterfacevariable {letternext} {letternext}
- \setinterfacevariable {lettermain} {lettermain}
- \setinterfacevariable {special} {special}
- \setinterfacevariable {notation} {notation}
- \setinterfacevariable {inside} {inside}
- \setinterfacevariable {optimize} {optimize}
-\stopinterface
-
%D Before we start the real module let us introduce two namespaces
%D for the style and content setup commands.
\def\????ld{@@@@ld} % LetterData
\def\????ls{@@@@ls} % LetterStyle
-\def\????lv{@@@@lv} % LetterValue
\startmodule[letter]
@@ -111,9 +87,9 @@
%D want to create such a file, this has the advantage to use the same name
%D for a collection of macros.
-\def\letter!suffix!style {nls}
-\def\letter!suffix!extension{nle}
-\def\letter!suffix!interface{nli}
+\definefileconstant {letterstyle} {nls}
+\definefileconstant {letterextension} {nle}
+\definefileconstant {letterinterface} {nli}
%D Let us begin now to talk about the different types of files.
%D
@@ -168,7 +144,7 @@
%D
%D \showsetup{useletterinterface}
-\definecorrespondencefile[\v!letter\v!interface][\letter!suffix!interface]
+\definecorrespondencefile[\v!letter][\v!interface][\f!letterinterface]
%D \subsubject{letter extension}
%D
@@ -190,7 +166,7 @@
%D
%D \showsetup{useletterextension}
-\definecorrespondencefile[\v!letter\v!extension][\letter!suffix!extension]
+\definecorrespondencefile[\v!letter][\v!extension][\f!letterextension]
%D \subsubject{letter styles}
%D
@@ -209,7 +185,7 @@
%D
%D \showsetup{useletterstyle}
-\definecorrespondencefile[\v!letter\v!style][\letter!suffix!style]
+\definecorrespondencefile[\v!letter][\v!style][\f!letterstyle]
%D \macros
%D {letterstylevalue,lettervalue}
@@ -277,7 +253,7 @@
\startlocalsetups[\v!letter:\v!place:\v!firsthead]
- \ifnum\subpagenumber=\plusone\relax\dosetletterlayer[\v!head]\fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!head]
\stoplocalsetups
@@ -285,7 +261,7 @@
\startlocalsetups[\v!letter:\v!place:\v!nexthead]
- \ifnum\subpagenumber>\plusone\relax\dosetletterlayer[\v!nexthead]\fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!nexthead]
\stoplocalsetups
@@ -293,9 +269,7 @@
\startlocalsetups[\v!letter:\v!place:\v!lefthead]
- \ifnum\subpagenumber>\plusone
- \ifodd\subpagenumber\else\dosetletterlayer[\v!lefthead]\fi
- \fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!lefthead]
\stoplocalsetups
@@ -303,9 +277,7 @@
\startlocalsetups[\v!letter:\v!place:\v!righthead]
- \ifnum\subpagenumber>\plusone
- \ifodd\subpagenumber\relax\dosetletterlayer[\v!righthead]\fi
- \fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!righthead]
\stoplocalsetups
@@ -367,9 +339,9 @@
% First page
- \startlocalsetups[\v!letter:\v!place:\v!foot]
+ \startlocalsetups[\v!letter:\v!place:\v!firstfoot]
- \ifnum\subpagenumber=\plusone\relax\dosetletterlayer[\v!foot]\fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!foot]
\stoplocalsetups
@@ -377,7 +349,7 @@
\startlocalsetups[\v!letter:\v!place:\v!nextfoot]
- \ifnum\subpagenumber>\plusone\relax\dosetletterlayer[\v!nextfoot]\fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!nextfoot]
\stoplocalsetups
@@ -385,9 +357,7 @@
\startlocalsetups[\v!letter:\v!place:\v!leftfoot]
- \ifnum\subpagenumber>\plusone
- \ifodd\subpagenumber\else\dosetletterlayer[\v!leftfoot]\fi
- \fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!leftfoot]
\stoplocalsetups
@@ -395,9 +365,7 @@
\startlocalsetups[\v!letter:\v!place:\v!rightfoot]
- \ifnum\subpagenumber>\plusone
- \ifodd\subpagenumber\relax\dosetletterlayer[\v!rightfoot]\fi
- \fi
+ \dosetheaderfooterlayer[\v!letter][\????ls][\v!rightfoot]
\stoplocalsetups
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 df948ae2ca0..d663e3c9865 100755
--- a/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex
+++ b/Master/texmf-dist/tex/context/third/letter/base/t-resume.tex
@@ -1,6 +1,6 @@
%D \module
%D [ file=t-resume,
-%D version=2008.12.21,
+%D version=2008.12.23,
%D title=\CONTEXT\ User Module,
%D subtitle=Resumes,
%D author=Wolfgang Schuster,
@@ -15,12 +15,6 @@
\usemodule[correspondence]
-%D I use a few extra constants and variables in my module.
-
-\startinterface all
- \setinterfacevariable {resume} {resume}
-\stopinterface
-
\def\????rd{@@@@rd} % ResumeData
\def\????rs{@@@@rs} % ResumeStyle
@@ -52,13 +46,13 @@
%D \macros
%D {useresumeextension,useresumestyle,useresumeinterface}
-\def\resume!suffix!style {nrs}
-\def\resume!suffix!extension{nre}
-\def\resume!suffix!interface{nri}
+\definefileconstant {resumestyle} {nrs}
+\definefileconstant {resumeextension} {nre}
+\definefileconstant {resumeinterface} {nri}
-\definecorrespondencefile[\v!resume\v!interface][\resume!suffix!interface]
-\definecorrespondencefile[\v!resume\v!extension][\resume!suffix!extension]
-\definecorrespondencefile[\v!resume\v!style ][\resume!suffix!style ]
+\definecorrespondencefile[\v!resume][\v!interface][\f!resumeinterface]
+\definecorrespondencefile[\v!resume][\v!extension][\f!resumeextension]
+\definecorrespondencefile[\v!resume][\v!style ][\f!resumestyle ]
%D \macros
%D {resumestylevalue,resumevalue}
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 138205a92aa..7b05038b5bf 100644
--- a/Master/texmf-dist/tex/context/third/letter/interface/default.nli
+++ b/Master/texmf-dist/tex/context/third/letter/interface/default.nli
@@ -20,7 +20,6 @@
\startinterface all
\setinterfaceconstant {opening} {opening}
- \setinterfaceconstant {content} {content}
\setinterfaceconstant {closing} {closing}
\setinterfaceconstant {signature} {signature}
\setinterfaceconstant {dispatch} {dispatch}
@@ -424,7 +423,7 @@
\doif\@@@@lsoptionaddressee\v!yes{\directsetup{\v!letter:\v!place:\v!addressee}}}
\startsetups[\v!letter:\v!address]
-\offinterlineskip\vskip-\lineheight
+\offinterlineskip\endgraf
\executeifdefined{\v!letter:\v!address:\@@@@lsaddressalternative}{\getvalue{\v!letter:\v!address:\v!a}}%
\stopsetups
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 cf6726bc184..a85c3547617 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/default.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/default.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=default,
-%D version=2008.12.16,
+%D version=2008.12.23,
%D title=\CONTEXT\ Letter Style,
%D subtitle=Blockstyle initalization,
%D author=Wolfgang Schuster,
@@ -19,18 +19,18 @@
\setupletterstyle
[\v!firstpage,\v!secondpage]
- [\c!topspace=.08417508418\paperheight,
+ [\c!topspace=\dimexpr\paperheight/297*25\relax,
\c!top=\!!zeropoint,
\c!topdistance=\!!zeropoint,
- \c!header=.06734006734\paperheight,
+ \c!header=\dimexpr\paperheight/297*20\relax,
\c!headerdistance=\!!zeropoint,
- \c!height=.84175084175\paperheight,
+ \c!height=\dimexpr\paperheight/297*250\relax,
\c!footerdistance=\!!zeropoint,
- \c!footer=.06734006734\paperheight,
+ \c!footer=\dimexpr\paperheight/297*20\relax,
\c!bottomdistance=\!!zeropoint,
\c!bottom=\!!zeropoint,
- \c!backspace=.11904761905\paperwidth,
- \c!width=.71428571429\paperwidth,
+ \c!backspace=\dimexpr\paperwidth/210*25\relax,
+ \c!width=\dimexpr\paperwidth/210*150\relax,
\c!bottomspace=\!!zeropoint]
\setupletter
@@ -45,10 +45,33 @@
\c!addressee=\v!yes]
\setupletterstyle
- [\v!nexthead,\v!nextfoot]
- [\c!state=\v!start,
+ [\v!head,\v!nexthead,\v!lefthead,\v!righthead]
+ [\c!hoffset=\backspace,
+ \c!voffset=\topspace,
+ \c!width=\textwidth]
+
+\setupletterstyle
+ [\v!foot,\v!nextfoot,\v!leftfoot,\v!rightfoot]
+ [\c!preset=\v!left\v!bottom,
\c!hoffset=\backspace,
- \c!voffset=\topspace]
+ \c!voffset=\bottomspace,
+ \c!width=\textwidth]
+
+\setupletterstyle
+ [\v!head,\v!foot]
+ [\c!state=\v!start]
+
+\setupletterstyle
+ [\v!nexthead,\v!nextfoot]
+ [\c!state=\v!next]
+
+\setupletterstyle
+ [\v!lefthead,\v!leftfoot]
+ [\c!state=\v!left]
+
+\setupletterstyle
+ [\v!righthead,\v!rightfoot]
+ [\c!state=\v!right]
\setupletterstyle
[\v!reference]
@@ -63,6 +86,10 @@
\c!separator=\textcomma\space]
\setupletterstyle
+ [\v!address]
+ [\c!strut=\v!no]
+
+\setupletterstyle
[\v!dispatch,\v!addressee]
[\c!align=\v!right,
\c!width=\hsize,
@@ -74,12 +101,12 @@
\setupletterstyle
[\v!dispatch]
[\c!location=\v!bottom,
- \c!height=\dimexpr(\vsize/9)*3\relax]
+ \c!height=\dimexpr\vsize/33*9\relax]
\setupletterstyle
[\v!addressee]
[\c!location=\v!top,
- \c!height=\dimexpr(\vsize/9)*6\relax]
+ \c!height=\dimexpr\vsize/33*24\relax]
\setupletterstyle
[\v!closing]
diff --git a/Master/texmf-dist/tex/context/third/letter/style/dinb.nls b/Master/texmf-dist/tex/context/third/letter/style/dinb.nls
index 69da94987e0..463e896d8fc 100644
--- a/Master/texmf-dist/tex/context/third/letter/style/dinb.nls
+++ b/Master/texmf-dist/tex/context/third/letter/style/dinb.nls
@@ -1,6 +1,6 @@
%D \module
%D [ file=dinb,
-%D version=2008.05.01,
+%D version=2008.12.23,
%D title=\CONTEXT\ Letter Style,
%D subtitle=DIN 676 B,
%D author=Wolfgang Schuster,
@@ -74,18 +74,21 @@
\c!symbol={\blackrule[\c!width=\plusfour\c!mm,\c!height=.4\points]}]
\setupletterstyle
- [\v!head]
+ [\v!head,\v!nexthead,\v!lefthead,\v!righthead]
[\c!hoffset=\backspace,
\c!voffset=16.9mm,
\c!width=\textwidth,
\c!height=28.1mm]
\setupletterstyle
- [\v!foot]
- [\c!width=\textwidth,
- \c!height=10mm,
- \c!hoffset=\backspace,
- \c!voffset=\dimexpr\paperheight-\letterstylevalue\v!foot\c!height-5mm\relax]
+ [\v!foot,\v!nextfoot,\v!leftfoot,\v!rightfoot]
+ [\v!layer]
+ [\c!voffset=20mm] % unknown value!
+
+\setupletterstyle
+ [\v!foot,\v!nextfoot,\v!leftfoot,\v!rightfoot]
+ [\v!frame]
+ [\c!height=10mm] % unknown value!
\setupletterstyle
[\v!address]