summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-02-19 23:41:06 +0000
committerKarl Berry <karl@freefriends.org>2009-02-19 23:41:06 +0000
commit61729aa78643d50e6f703008e8f9a772e2b4d942 (patch)
treeb9f0df8964082b0135e437dba0a49a5ffa55683b /Master
parentd17b7b0e7c7cc4d50f36b2144aa877d4bffc90a4 (diff)
context-letter update (19feb09)
git-svn-id: svn://tug.org/texlive/trunk@12189 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex70
-rw-r--r--Master/texmf-dist/tex/context/third/letter/interface/default.nli4
2 files changed, 24 insertions, 50 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 01694a9875b..79ce09e5420 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=2008.02.17,
+%D version=2008.02.18,
%D title=\CONTEXT\ User Module,
%D subtitle=Correspondence,
%D author=Wolfgang Schuster,
@@ -304,12 +304,7 @@
{\getparameters[#2#3][#4]}
\def\dosetupcorrespondencedescription[#1][#2][#3][#4]%
- {\setupdescriptions[#1:#3][#4]}
-
-% used in the upcoming version
-%
-% \def\dosetupcorrespondencedescription[#1][#2][#3][#4]%
-% {\getparameters[#1#3][#4]}
+ {\getparameters[#2#3][#4]}
\def\dosetupcorrespondencelayer[#1][#2][#3][#4]%
{\dodosetupcorrespondencelayer[#1][#2][#3][\v!layer,\v!frame,\v!option][#4]}
@@ -572,36 +567,11 @@
%D Descriptions
-%D I use \CONTEXT's own description environment to format the appendices,
-%D but the mechanism is to complex for such the cases I need in my module
-%D and the code will be replaced in the future by my own code.
-
\def\definecorrespondencedescription[#1][#2]%
{\setvalue{\s!do\e!define#1\v!description}{\dodefinecorrespondencedescription[#1][#2]}%
\setvalue{\s!do\e!set #1\v!description}{\dosetcorrespondencedescription [#1][#2]}%
\setvalue{\s!do\e!flush #1\v!description}{\doflushcorrespondencedescription [#1][#2]}}
-% \def\dodefinecorrespondencedescription[#1][#2][#3]%
-% {\setvalue{#2\v!option#3}{\v!yes}%
-% \doifundefined{#1:#2:#3}
-% {\setvalue{#1:#2:#3}{\v!description}%
-% \appendtovaluelist{#1!list!descriptions}{#3}}%
-% \definedescription
-% [#1:#3]
-% [\c!location=\v!top,
-% \c!inbetween=\nowhitespace]}
-%
-% \def\dosetcorrespondencedescription[#1][#2][#3]%
-% {\doiftext{\directsetup{#1:#3}}
-% {\csname\e!start#1:#3\endcsname{\labeltext{#1:#3}}
-% \directsetup{#1:#3}%
-% \csname\e!stop #1:#3\endcsname}}
-%
-% \def\doflushcorrespondencedescription[#1][#2]%
-% {\def\dodoflushcorrespondencedescription##1%
-% {\doif{\correspondencestylevalue{#2}\v!option{##1}}\v!yes{\dosetcorrespondencedescription[#1][#2][##1]}}%
-% \processcommacommand[\csname#1!list!descriptions\endcsname]\dodoflushcorrespondencedescription}
-
\def\dodefinecorrespondencedescription[#1][#2][#3]%
{\setvalue{#2\v!option#3}{\v!yes}%
\doifundefined{#1:#2:#3}{\setvalue{#1:#2:#3}{\v!description}}%
@@ -612,6 +582,9 @@
\c!before=\blank,
\c!after=\blank,
\c!width=\v!broad,
+ \c!distance=\zeropoint,
+ \c!headstyle=,
+ \c!headcolor=,
\c!distance=\zeropoint]}
\def\dosetcorrespondencedescription[#1][#2][#3]%
@@ -619,20 +592,16 @@
\doifelsecorrespondencestylevalue{#2}{#3}\c!before
{\correspondencestylevalue{#2}{#3}\c!before}
\endgraf
- \setbox\scratchbox\hbox{\labeltext{#1:#3}}%
- \ifdim\wd\scratchbox>\zeropoint
- \processaction
- [\correspondencestylevalue{#2}{#3}\c!width]
- [ \v!fit=>\scratchdimen\dimexpr\wd\scratchbox+\correspondencestylevalue{#2}{#3}\c!distance\relax,
- \v!broad=>\scratchdimen\dimexpr\wd\scratchbox+1em\relax,
- \s!unknown=>\scratchdimen\dimexpr\correspondencestylevalue{#2}{#3}\c!width+\correspondencestylevalue{#2}{#3}\c!distance\relax]%
- \else
- \processaction
- [\correspondencestylevalue{#2}{#3}\c!width]
- [ \v!fit=>\scratchdimen\zeropoint,
- \v!broad=>\scratchdimen\zeropoint,
- \s!unknown=>\scratchdimen\dimexpr\correspondencestylevalue{#2}{#3}\c!width+\correspondencestylevalue{#2}{#3}\c!distance\relax]%
- \fi
+ \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{\v!correspondence\v!description\correspondencestylevalue{#2}{#3}\c!location}\gobblethreearguments{#1}{#2}{#3}%
\doifelsecorrespondencestylevalue{#2}{#3}\c!after
{\endgraf\correspondencestylevalue{#2}{#3}\c!after}
@@ -640,11 +609,16 @@
\egroup}
\setvalue{\v!correspondence\v!description\v!left}#1#2#3%
- {\hangindent\scratchdimen
- \hangafter\zerocount
+ {\EveryPar{\hangindent\scratchdimen\hangafter\zerocount}%
\setbox\scratchbox\hbox\!!to\scratchdimen{\box\scratchbox\hss}%
\noindent\llap{\box\scratchbox}\directsetup{#1:#3}}
+\setvalue{\v!correspondence\v!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{\v!correspondence\v!description\v!top}#1#2#3%
{\box\scratchbox\par
\nobreak
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 4954da130b4..2a4fb1b4054 100644
--- a/Master/texmf-dist/tex/context/third/letter/interface/default.nli
+++ b/Master/texmf-dist/tex/context/third/letter/interface/default.nli
@@ -249,8 +249,8 @@
\newtoks\letter!local!commands
\def\processlettervalues
- {\global\let\letter!list!descriptions\empty
- \global \letter!local!commands \emptytoks
+ {\globalletempty\letter!list!descriptions
+ \global\letter!local!commands\emptytoks
\def\opening##1{\doglobal\appendtoks\setvalue{\????ld\c!opening }{##1}\to\letter!local!commands}%
\def\closing##1{\doglobal\appendtoks\setvalue{\????ld\c!closing }{##1}\to\letter!local!commands}%
\def\ps ##1{\doglobal\appendtoks\setvalue{\????ld\c!postscript}{##1}\to\letter!local!commands\doglobal\appendtocommalist\c!postscript\letter!list!descriptions}%