From ec54778b6f178371dcf1392b3f8b02e31604f0ed Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Jul 2009 00:55:52 +0000 Subject: context-letter update (19jul09) git-svn-id: svn://tug.org/texlive/trunk@14333 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/context/third/letter/correspondence.pdf | Bin 421659 -> 442636 bytes .../letter/doc/correspondence-environment.tex | 48 ++- .../third/letter/doc/correspondence-labeltext.tex | 36 +++ .../letter/doc/correspondence-letter-beginner.tex | 18 +- .../letter/doc/correspondence-letter-examples.tex | 70 ++--- .../letter/doc/correspondence-letter-header.tex | 67 ++++- .../letter/doc/correspondence-letter-interface.tex | 24 +- .../letter/doc/correspondence-letter-values.tex | 135 +++++++++ .../third/letter/doc/correspondence-pragma.tex | 335 --------------------- .../letter/doc/correspondence-resume-examples.tex | 8 +- .../third/letter/doc/correspondence-revision.tex | 19 +- .../context/third/letter/doc/correspondence.tex | 2 + .../tex/context/interface/third/t-letter.xml | 56 +++- .../third/letter/base/t-correspondence.mkii | 70 ++--- .../third/letter/base/t-correspondence.mkiv | 87 +++--- .../context/third/letter/base/t-correspondence.tex | 3 +- .../tex/context/third/letter/interface/default.nli | 134 ++++++--- .../tex/context/third/letter/interface/pragma.nli | 2 +- .../tex/context/third/letter/style/default.nls | 3 +- 19 files changed, 545 insertions(+), 572 deletions(-) create mode 100644 Master/texmf-dist/source/context/third/letter/doc/correspondence-labeltext.tex create mode 100644 Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-values.tex delete mode 100644 Master/texmf-dist/source/context/third/letter/doc/correspondence-pragma.tex (limited to 'Master') diff --git a/Master/texmf-dist/doc/context/third/letter/correspondence.pdf b/Master/texmf-dist/doc/context/third/letter/correspondence.pdf index 56cd9c8c1b1..cf90cc0a67c 100644 Binary files a/Master/texmf-dist/doc/context/third/letter/correspondence.pdf and b/Master/texmf-dist/doc/context/third/letter/correspondence.pdf differ diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex index 860df76f26b..fee67158a03 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex @@ -75,7 +75,9 @@ \setsansfont[Lucida Sans] \setmonofont[Lucida Sans Typewriter] -\definefontfamily[delicious][Delicious] +\setupbodyfontenvironment[default][em=italic] + +\definefontfamily[examplefont][Delicious] \stopmode @@ -89,7 +91,7 @@ \setsansfont[Latin Modern Sans] \setmonofont[Latin Modern Mono] -\definefontfamily[modern][Latin Modern Sans] +\definefontfamily[examplefont][Latin Modern Sans] \stopnotmode @@ -98,13 +100,10 @@ %% Einnstellungen für die Musterbriefe -\doifmodeelse{wolf} - {\setupletterstyle[option][bodyfont=delicious]} - {\setupletterstyle[option][bodyfont=modern]} - \setupletterstyle [option] - [whitespace=line, + [bodyfont=examplefont, + whitespace=line, marking=no, before={\page[left]}, backgroundcolor=gray] @@ -122,13 +121,10 @@ [closing] [after={\blank[2*line]}] -\doifmodeelse{wolf} - {\setupresumestyle[option][bodyfont=delicious]} - {\setupresumestyle[option][bodyfont=modern]} - \setupresumestyle [option] - [whitespace=none, + [bodyfont=examplefont, + whitespace=none, before={\page[left]}, backgroundcolor=gray] @@ -137,25 +133,31 @@ \setupwhitespace[line] \setupalign[stretch,hanging,hz] +%\setupalign[stretch,hanging] %\setupalign[right,broad] %% Überschriften +\definestructureresetset[default][0,0][1] + \setuphead [part] [placehead=yes, + header=empty, + sectionresetset=default, alternative=middle, - resetnumber=no, style=\tfd] \setuphead [chapter] [header=empty, - style=\tfc] + style=\tfc, + sectionsegments=2:100] \setuphead [section,subject] - [style=\tfb] + [style=\tfb, + sectionsegments=2:100] \setuphead [subsection,subsubject] @@ -166,22 +168,13 @@ \setupcombinedlist [content] [interaction=all, - color=black, - partnumber=no] - -%% Index - -\setupregister - [index] - [partnumber=no] + color=black] %% Seitennummerierung \setuppagenumbering [alternative=doublesided, - location=footer, - way=bytext, - partnumber=no] + location=footer] %% Kopf- und Fußzeilen @@ -191,6 +184,9 @@ \doifmode{wolf}{\setuptyping[bodyfont=10pt]} +\setuptyping + [before={\blank\testpage[2]}] + %% Misc \setupmakeup diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-labeltext.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-labeltext.tex new file mode 100644 index 00000000000..92d3be3ae1d --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-labeltext.tex @@ -0,0 +1,36 @@ +\startcomponent correspondence-labeltext + +\environment correspondence-environment + +\chapter{Labeltexts} + +The following table presents the text for all predefined labels in the module, +only the labels for the {\em memo} style are not included. + +\page[left] + +\start + +\setuplinetable [nx=2,stretch=no,width=.125\textwidth] +\setuplinetable[r][1][style=bold] + +\startlinetable +\NC label \NC english \NC dutch \NC german \NC french \NC italian \NC spanish \NC\NR +\startprocesscommalist + [name,room,yourref,yourmail,myref,mymail,customer,invoice, + attention,subject,cc,enclosure,to,toname,from,fromname,date, + phone,fax,email,url,bank,organization,city,zip,country,street] + \NC #1 + \NC \mainlanguage[en]\labeltext{letter:#1} + \NC \mainlanguage[nl]\labeltext{letter:#1} + \NC \mainlanguage[de]\labeltext{letter:#1} + \NC \mainlanguage[fr]\labeltext{letter:#1} + \NC \mainlanguage[it]\labeltext{letter:#1} + \NC \mainlanguage[es]\labeltext{letter:#1} + \NC\NR +\stopprocesscommalist +\stoplinetable + +\stop + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex index 1c7fed9ae7a..03c3a467e7a 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex @@ -66,7 +66,7 @@ You're not restricted to only one letter in file, it is possible to write as man \stop -\section{Opening\index{opening} and closing\index{closing}} +\section{Opening and closing}\index{opening}\index{closing} You saw in the last example how to write a simple text but shouldn't it be possible to give a few opening and also closing words for the letter, because the reader should know for whom the content is. @@ -94,7 +94,7 @@ Thus, I came to the conclusion ... \stopletter \stoptyping -\startframedtext[width=\textwidth,framecolor=red,align=flushleft,corner=00] +\startframedtext[width=\textwidth,framecolor=red,align=flushleft,corner=00]\index{\tex{setlettervalue}} The definition of the \type{\setuplettervalue} has changed in the module version from 2009.07.03, only braces are allowed to set values, brackets are optional and used to set the labeltext for the value in the current mainlanguage, the setup for both variants is: @@ -146,7 +146,7 @@ This could not happen if you set the values with the \type {\setlettervalue} com \stop -\section{Subject\index{subject}} +\section{Subject}\index{subject} After you read how to write the text and set values for the opening and closing we mention now how we could write a subject. @@ -183,7 +183,7 @@ Besides the {\em subject} you have also the option to set a {\em title} for the \stop -\section{Address\index{toname}\index{toaddress}} +\section{Address}\flushatnextpar{\index{toname}\index{toaddress}} Letter are normally meant to be send by post and to prevent you from writing the address by hand on the envelope you could buy envelopes with windows. To use these envelopes the address has to be written on the letter and to do this you have to set the {\em name} and the {\em address} for the addressee with the two values {\em toname} and {\em toaddress}. @@ -220,7 +220,7 @@ The author prefer to set the values for the addressee not with \type {\startlett \stop -\section{Sender\index{fromname}\index{fromaddress}} +\section{Sender}\index{fromname}\index{fromaddress} It is not often enough to have just the addressee information on the letter, you're looking also for way to put the {\em name} and {\em address} for the sender into the header. @@ -292,7 +292,7 @@ If you change the content for the {\em list} key in your file the module will sh \stop -\section{Signature\index{signature}} +\section{Signature}\index{signature} You know now ho to set the letter text, the opening and closing lines, the values for the addressee and the sender and also how define your own values for the reference line. @@ -346,7 +346,7 @@ How to adjust the space between the closing line and the signature for this way \stop -\section{Postscript\index{postscript}\index{\tex{ps}}} +\section{Postscript}\index{postscript}\index{\tex{ps}} \starttyping \startletter @@ -392,7 +392,7 @@ How to adjust the space between the closing line and the signature for this way \stop -\section{Enclosure\index{enclosure}\index{\tex{encl}}} +\section{Enclosure}\index{enclosure}\index{\tex{encl}} \starttyping \startletter @@ -441,7 +441,7 @@ How to adjust the space between the closing line and the signature for this way \stop -\section{Copy\index{copy}\index{\tex{cc}}} +\section{Copy}\index{copy}\index{\tex{cc}} \starttyping \startletter diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex index e4714857526..7929972cf5a 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex @@ -80,13 +80,13 @@ This section will give you a overview of all included styles you could use with \stopexamplecontent -\section{DIN 676 B\index{DIN 676 B}} +\section{DIN 676 B}\index{DIN 676 B} The letter style \filename{dinb} is the defualt style for the module and is used if nothing else is specified by the user. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[dinb][1]}{First page} {\examplecontent[dinb][2]}{Second page} @@ -112,13 +112,13 @@ The letter style \filename{dinb} is the defualt style for the module and is used \stopexamplecontent -\section{DIN 676 A\index{DIN 676 A}} +\section{DIN 676 A}\index{DIN 676 A} The second style \filename{dina} follows the same rules as the style \filename{dinb} but all fields shifted by the same value upwards to give you more space for the lettercontent. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[dina][1]}{First page} {\examplecontent[dina][2]}{Second page} @@ -144,13 +144,13 @@ The second style \filename{dina} follows the same rules as the style \filename{d \stopexamplecontent -\section{NEN 1026\index{NEN 1026}} +\section{NEN 1026}\index{NEN 1026} The third style supported by the letter module is for dutch letters, the name of the style is called \filename{dutch}. The values and examples for the style are provided by Willi Egger. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[dutch][1]}{First page} {\examplecontent[dutch][2]}{Second page} @@ -183,8 +183,8 @@ The third style supported by the letter module is for dutch letters, the name of The french style is based on values given to me by Olivier Guéry. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[french][1]}{First page} {\examplecontent[french][2]}{Second page} @@ -210,7 +210,7 @@ The french style is based on values given to me by Olivier Guéry. \stopexamplecontent -\section{Full-block Style\index{Full-block}} +\section{Full-block Style}\index{Full-block} The full-block format is the simplest of all six blockstyle formats. Every part of the letter starts at the left margin with a blank line between @@ -220,8 +220,8 @@ The order of the parts is date, inside address, attention line, salutation, subject line, body, complimentary close, signature and additional information. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[fullblock][1]}{First page} {\examplecontent[fullblock][2]}{Second page} @@ -247,14 +247,14 @@ subject line, body, complimentary close, signature and additional information. \stopexamplecontent -\section{Modified Block Style\index{Modified}} +\section{Modified Block Style}\index{Modified} The modified style has the same layout as the full-block style but the date, signature and closing moved to the right, which allows them to stand. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[modified][1]}{First page} {\examplecontent[modified][2]}{Second page} @@ -280,7 +280,7 @@ signature and closing moved to the right, which allows them to stand. \stopexamplecontent -\section{Semiblock Style\index{Semiblock}} +\section{Semiblock Style}\index{Semiblock} The semiblock style is the format most people recognize as business letter. @@ -289,8 +289,8 @@ by five spaces\footnote{The semiblock letter style use the \type{medium} value for \type{\setupindenting} to indent the paragraphs.}. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[semiblock][1]}{First page} {\examplecontent[semiblock][2]}{Second page} @@ -316,7 +316,7 @@ value for \type{\setupindenting} to indent the paragraphs.}. \stopexamplecontent -\section{Simplified Style\index{Simplified}} +\section{Simplified Style}\index{Simplified} The simplified style is used when you don't know the name of the person you're writing to or when you write to a company. @@ -325,8 +325,8 @@ It contains no title, salutation or complimentary closing. The main focus is the body of the letter. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[simplified][1]}{First page} {\examplecontent[simplified][2]}{Second page} @@ -352,14 +352,14 @@ is the body of the letter. \stopexamplecontent -\section{Hanging indented Style\index{Hanging}} +\section{Hanging indented Style}\index{Hanging} The hanging indented format is seldom used. It's main advantage is that it calls attention to the body and each paragraph. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[hanging][1]}{First page} {\examplecontent[hanging][2]}{Second page} @@ -385,7 +385,7 @@ is that it calls attention to the body and each paragraph. \stopexamplecontent -\section{Memo Style\index{Memo}} +\section{Memo Style}\index{Memo} The memo style used primarily for interoffice communication. The top of the memo indicates the date, the name of the recipient, the name of the @@ -397,8 +397,8 @@ A signature and additional information are optional. The signature is placed near the center with the additional information at the left margin. \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[memo][1]}{First page} {\examplecontent[memo][2]}{Second page} @@ -429,8 +429,8 @@ near the center with the additional information at the left margin. \section{English Style} \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[english][1]}{First page} {\examplecontent[english][2]}{Second page} @@ -466,8 +466,8 @@ me information about the correct margins and position of the elements. \stopframedtext \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[swiss][1]}{First page} {\examplecontent[swiss][2]}{Second page} @@ -501,8 +501,8 @@ me information about the correct margins and position of the elements. \stopframedtext \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[swissleft][1]}{First page} {\examplecontent[swissleft][2]}{Second page} diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-header.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-header.tex index 8567fd992b7..68c34f640e4 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-header.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-header.tex @@ -16,16 +16,68 @@ \section{Header} +The head of a letter is the part where you can make the most customization, +when you don't want to do this the module provides a few predefined alternatives +which can be decorated with rules. + +The layout of the head is the selected with the \type{\setupletterstyle} command +and the \type{alternative} key, the second key \type{fromrule} is used for the three +alternatives {\em a, b} and {\em c.} + \starttyping \setupletterstyle [head] - [alternative=left|middle|right, - fromrule=top|bottom|no] + [alternative=..., + fromrule=...] \stoptyping +You can select between the following alternatives: + +\startitemize[columns,three,packed] +\item a +\item left +\item middle +\item right +\stopitemize + +The \type{fromrule} key accepts the following parameters which can be combined to get +a rule at the top and bottom of the header. + +\startitemize[columns,three,packed] +\item no +\item none +\item off +\item top +\item before +\item bottom +\item after +\item yes +\item on +\stopitemize + +The default alternative {\em a} prints the firstname and surname of the author in +the first line and the address in the following lines, the text is left aligned +but this can be changed with the \type{align} key. + +\start + +\setlettervalue{fromname} {Max Mustermann} +\setlettervalue{fromaddress}{Musterweg 12\\12345 Musterstadt} + +\startelement +\letterelement[head][a] +\stopelement + +\stop + +The other three alternatives {\em left, middle} and {\em right} place the text according +to their names in the left, center or right of the head with a few information than the +default layout provides. You can enable a option rule after the name of the addressee and +at the bottom of the address block. + \placefigure - [fixed] - {none} + [force,none] + {} {\setupcombinations[before=] \startcombination[3*3] {\startsmallelement @@ -111,4 +163,11 @@ \stoptable} \stopcombination} +\section{Footer} + +\startframedtext[width=\textwidth,framecolor=red,align=middle,corner=00] +No default style/alternatives for the foot are provided from the module, +the current section will therefore show ways to create own ones. +\stopframedtext + \stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex index 1b3bbb46dcd..a714b3b975e 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex @@ -1,6 +1,16 @@ \startcomponent correspondence-letter-interface -\environment correspondence-environment +%\environment correspondence-environment + +\usemodule[letter] + +\ifx\startexamplecontent\undefined + + \def\startexamplecontent {\gobbleuntil\stopexamplecontent} + \def\examplecontent {\dodoubleempty\doexamplecontent} + \def\doexamplecontent[#1][#2]{\framed[width=6cm,height=8cm]{}} + +\fi \chapter{Interface} @@ -29,8 +39,8 @@ \section{Default} \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[interface:default][1]}{First page} {\examplecontent[interface:default][2]}{Second page} @@ -70,8 +80,8 @@ \section{Pragma} \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[interface:pragma][1]}{First page} {\examplecontent[interface:pragma][2]}{Second page} @@ -171,8 +181,8 @@ Professor \section{Knuth} \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[interface:knuth][1]}{First page} {\examplecontent[interface:knuth][2]}{Second page} diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-values.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-values.tex new file mode 100644 index 00000000000..73a2a40fd50 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-values.tex @@ -0,0 +1,135 @@ +\startcomponent correspondence-letter-values + +\environment correspondence-environment + +\chapter{Values and Labels} + +\section{Values} + +When you write a letter you have to set some values for the reference line like the date +and other ones like the name and address of the addressee for the address block, these can +be done with the two commands \type{\setlettervalue} and \type{\setupletter}. + +\setup[setlettervalue]\flushatnextpar{\index{\tex{setlettervalue}}} + +\setup[setupletter:value]\flushatnextpar{\index{\tex{setupletter}}} + +The first command \type{\setlettervalue} takes two commands like \type{\setvalue} or +\type{\setvariable} and could be used like: + +\starttyping +\setlettervalue{firstname} {Mike} +\setlettervalue{familyname}{Johnson} +\stoptyping + +There is also a optional argument between the name and the content of the value +which is explained in the next section. + +With the second command \type{\setupletter} you can set multiple values separated +by commas, it's similar to \type{\setvariables}, the above setting will look then: + +\starttyping +\setupletter + [firstname=Mike, + familyname=Johnson] +\stoptyping + +As you can seen in the following command overview for \type{\setupletter} the command has +two arguments while we used in the last example only one, the two argument form is used +to change the layout for the values in the reference (and others) line like: + +\starttyping +\setupletter + [date,name] + [titlestyle=\tfx, + titlecolor=gray] +\stoptyping + +The complete list of argument are: + +\setup[setupletter:setup]\flushatnextpar{\index{\tex{setupletter}}} + +\starttyping +\setupletter[..,..=..,..] +\setupletter[...,...][..,..=..,..] + +\setlettervalue{...}{...} +\stoptyping + +\section{Labels} + +When you take a look at the examples in the reference section you can see all of them +have a label above or on the left or the content but this did only happen because the +module provides preset texts for them. + +When you try to use a non defined label like e.g. {\em skype} you the content of the value +as seen below but no label above. + +The following code + +\starttyping +\setlettervalue{date} {\currentdate} +\setlettervalue{skype}{corres.context} + +\setupletterstyle[reference][list={skype,date}] +\stoptyping + +result in this reference line: + +\start + +\setlettervalue{date} {\currentdate} +\setlettervalue{skype}{corres.context} + +\setupletterstyle[reference][list={skype,date}] + +\startelement +\letterelement[reference][a] +\stopelement + +\stop + +The module use ConTeXt’s labeltext mechanism to define text for various languages +which can be found in the file \filename{default.nle}. To define your own text use +the \type{\setuplabeltext} command, to prevent problems with other macros the names +of the labels are prefixed with {\em letter:}.\footnote{The {\em memo} style makes +a exception to this concept and use {\em memo:} as prefix for the label names.} + +\setup[setuplabeltext]\flushatnextpar{\index{\tex{setuplabeltext}}} + +To add now a label for our currently used {\em skype} value put the following +line in your document and change the language tag to the mainlanguage you use +in your document. + +\starttyping +\setuplabeltext[en][letter:skype=Skype] +\stoptyping + +The reference looks now like: + +\start + +\setuplabeltext[en][letter:skype=Skype] + +\setlettervalue{date} {\currentdate} +\setlettervalue{skype}{corres.context} + +\setupletterstyle[reference][list={skype,date}] + +\startelement +\letterelement[reference][a] +\stopelement + +\stop + +When you use \type{\setlettervalue} to set the content of the values the optional +argument can be used instead of \type{\setuplabeltext} to define a text for the label +in the current mainlanguage, a empty argument results in a empty labeltext. + +The two step setting for the value {\em skype} can the be done with this setting. + +\starttyping +\setlettervalue{skype}[Skype]{corres.context} +\stoptyping + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-pragma.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-pragma.tex deleted file mode 100644 index 6c3026b98d7..00000000000 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-pragma.tex +++ /dev/null @@ -1,335 +0,0 @@ -\startcomponent correspondence-pragma - -\environment correspondence-environment - -\chapter{Pragma ADE Interface} - -\start - -\useletterinterface[pragma] - -\setups[letter:test] - -\setups[letter:place] - -\stop - -\section{Example 1} - -\starttyping -\usemodule[letter][interface=pragma] - -\setups[letter:test] - -\starttext -\setups[letter:place] -\stoptext -\stoptyping - -\start - -\useletterinterface[pragma] - -\setups[letter:test] - -\setvariables - [letter:head] - [graphic=corrlogo] - -\setups[letter:place] - -\stop - -\section{Example 2} - -\starttyping -\usemodule[letter][interface=pragma] - -\setups[letter:test] - -\setvariables - [letter:head] - [graphic=corrlogo] - -\starttext -\setups[letter:place] -\stoptext -\stoptyping - -\start - -\useletterinterface[pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=righttop] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setlayerframed - [letter:lettermain] - [preset=rightbottom] - [height=1cm] - {Here you can find some additional data about me.} - -\setups[letter:place] - -\stop - -\section{Example 3} - -\starttyping -\usemodule[letter][interface=pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=righttop] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setlayerframed - [letter:lettermain] - [preset=rightbottom] - [height=1cm] - {Here you can find some additional data about me.} - -\starttext -\setups[letter:place] -\stoptext -\stoptyping - -\start - -\useletterinterface[pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=righttop, - offset=\backspace] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setlayerframed - [letter:lettermain] - [preset=rightbottom, - hoffset=\backspace, - voffset=.5\backspace] - [height=1cm, - offset=overlay, - frame=off, - strut=yes] - {Here you can find some additional data about me.} - -\setups[letter:place] - -\stop - -\section{Example 4} - -\starttyping -\usemodule[letter][interface=pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=righttop, - offset=\backspace] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setlayerframed - [letter:lettermain] - [preset=rightbottom, - hoffset=\backspace, - voffset=.5\backspace] - [height=1cm, - offset=overlay, - frame=off, - strut=yes] - {Here you can find some additional data about me.} - -\starttext -\setups[letter:place] -\stoptext -\stoptyping - -\start - -\useletterinterface[pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=rightbottom, - offset=\backspace] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setvariables - [letter:address] - [line=1, - hoffset=1cm, - width=10cm, - noflines=7] - -\setups[letter:place] - -\stop - -\section{Example 5} - -\starttyping -\usemodule[letter][interface=pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=rightbottom, - offset=\backspace] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setvariables - [letter:address] - [line=1, - hoffset=1cm, - width=10cm, - noflines=7] - -\starttext -\setups[letter:place] -\stoptext -\stoptyping - -\start - -\useletterinterface[pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=rightbottom, - offset=\backspace] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setvariables - [letter:address] - [line=1, - hoffset=1cm, - width=10cm, - noflines=7] - -\setvariables - [letter:reference] - [line=1, - noflines=3] - -\setups[letter:place] - -\stop - -\section{Example 6} - -\starttyping -\usemodule[letter][interface=pragma] - -\setups[letter:test] - -\setlayer - [letter:lettermain] - [preset=rightbottom, - offset=\backspace] - {\externalfigure[corrlogo][width=.2\paperwidth]} - -\setvariables - [letter:address] - [line=1, - hoffset=1cm, - width=10cm, - noflines=7] - -\setvariables - [letter:reference] - [line=1, - noflines=3] - -\starttext -\setups[letter:place] -\stoptext -\stoptyping - -\start - -\useletterinterface[pragma] - -\setvariables - [letter:data] - [address={Name\\Street\\Place\\Country}] - -\setvariables - [letter:data] - [subject=Some Topic, - data=\currentdate, - concerns=Whatever, - residence=Here Here, - reference=YourOrMine] - -\startbuffer[texletter] -\input ward -\stopbuffer - -\setvariables - [letter:data] - [author=Me, - greeting=See You] - -\setvariables - [letter:data] - [appendices=No Goddies] - -\setups[letter:place] - -\stop - -\section{Example 7} - -\starttyping -\usemodule[letter][interface=pragma] - -\setvariables - [letter:data] - [address={Name\\Street\\Place\\Country}] - -\setvariables - [letter:data] - [subject=Some Topic, - data=\currentdate, - concerns=Whatever, - residence=Here Here, - reference=YourOrMine] - -\startbuffer[texletter] -\input ward -\stopbuffer - -\setvariables - [letter:data] - [author=Me, - greeting=See You] - -\setvariables - [letter:data] - [appendices=No Goddies] - -\starttext -\setups[letter:place] -\stoptext -\stoptyping - -\stoptext - -\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-examples.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-examples.tex index 2989e048b95..161823862fb 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-examples.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-examples.tex @@ -163,8 +163,8 @@ \section{Classic} \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[resume:classic][1]}{First page} {\examplecontent[resume:classic][2]}{Second page} @@ -195,8 +195,8 @@ \section{Casual} \placefigure - [fixed] - {none} + [force,none] + {} {\startcombination {\examplecontent[resume:casual][1]}{First page} {\examplecontent[resume:casual][2]}{Second page} diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-revision.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-revision.tex index 353f38f207e..c174ff8fe37 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-revision.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-revision.tex @@ -15,17 +15,18 @@ version tag at the bottom of each file in the field date. \stoptabulatehead \startmodulecode -tex.sprint(tex.ctxcatcodes,"\\starttabulate[|l|l|l|]") +global.context.starttabulate( { "|l|l|l|" } ) for k,v in global.pairs(correspondence.files) do - tex.sprint(tex.ctxcatcodes,"\\NC") - tex.sprint(tex.ctxcatcodes,correspondence.files[k]["name"]) - tex.sprint(tex.ctxcatcodes,"\\NC") - tex.sprint(tex.ctxcatcodes,correspondence.files[k]["version"]) - tex.sprint(tex.ctxcatcodes,"\\NC") - tex.sprint(tex.ctxcatcodes,correspondence.files[k]["description"]) - tex.sprint(tex.ctxcatcodes,"\\NC\\NR") + global.context.NC() + global.context("%s",correspondence.files[k]["name"]) + global.context.NC() + global.context("%s",correspondence.files[k]["version"]) + global.context.NC() + global.context("%s",correspondence.files[k]["description"]) + global.context.NC() + global.context.NR() end -tex.sprint(tex.ctxcatcodes,"\\stoptabulate") +global.context.stoptabulate() \stopmodulecode \stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex index 6800b3ce568..1a61c8b3764 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex @@ -20,6 +20,7 @@ \component correspondence-letter-interface \component correspondence-letter-layout \component correspondence-letter-extension +\component correspondence-letter-values \component correspondence-letter-reference \component correspondence-letter-header \component correspondence-letter-examples @@ -36,6 +37,7 @@ \CommandList \component correspondence-revision +\component correspondence-labeltext \completeindex diff --git a/Master/texmf-dist/tex/context/interface/third/t-letter.xml b/Master/texmf-dist/tex/context/interface/third/t-letter.xml index 1e775d95173..5b5650e2487 100644 --- a/Master/texmf-dist/tex/context/interface/third/t-letter.xml +++ b/Master/texmf-dist/tex/context/interface/third/t-letter.xml @@ -293,7 +293,61 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii index 1227f78f340..85eb2615583 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkii @@ -1,6 +1,6 @@ %D \module %D [ file=t-correspondence, -%D version=2009.07.03, +%D version=2009.07.18, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -177,40 +177,11 @@ %D Tests -\long\def\doifcorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\long\def\doifcorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\def\correspondencestylevalue#1#2#3% - {\csname#1#2#3\endcsname} +\long\def\doifcorrespondencevalue #1#2{\doifsomething {\csname #1#2\endcsname}} +\long\def\doifelsecorrespondencevalue #1#2{\doifsomethingelse{\csname #1#2\endcsname}} +\long\def\doifcorrespondencestylevalue #1#2#3{\doifsomething {\csname#1#2#3\endcsname}} +\long\def\doifelsecorrespondencestylevalue#1#2#3{\doifsomethingelse{\csname#1#2#3\endcsname}} +\long\def\correspondencestylevalue #1#2#3{\csname#1#2#3\endcsname} %D External files @@ -234,9 +205,9 @@ {\def\dodododefinecorrespondencelayer##1{\dododefinecorrespondencelayer[#1][#2][##1]}% \processaction [#3] - [\v!foldmark=>{\processcommacommand[\csname#1!list!marking\endcsname]\dodododefinecorrespondencelayer}, - \v!header=>{\processcommacommand[\csname#1!list!header\endcsname ]\dodododefinecorrespondencelayer}, - \v!footer=>{\processcommacommand[\csname#1!list!footer\endcsname ]\dodododefinecorrespondencelayer}, + [\v!foldmark=>{\processcommacommand[\getvalue{#1!list!marking}]\dodododefinecorrespondencelayer}, + \v!header=>{\processcommacommand[\getvalue{#1!list!header}]\dodododefinecorrespondencelayer}, + \v!footer=>{\processcommacommand[\getvalue{#1!list!footer}]\dodododefinecorrespondencelayer}, \s!unknown=>{\dododefinecorrespondencelayer[#1][#2][#3]}]} \def\dododefinecorrespondencelayer[#1][#2][#3]% @@ -325,7 +296,7 @@ \!!donebfalse % even numbered pages \!!donecfalse % odd numbered pages \!!donedfalse % real pagenumber - \processcommacommand[\csname#2#3\c!state\endcsname]\dodosetheaderfooterlayer + \processcommacommand[\getvalue{#2#3\c!state}]\dodosetheaderfooterlayer \doifnotvalue{#2#3\v!layer\c!state}\v!stop{\setuplayer[#1:#3][\c!state=\v!start]}% \ifnum\if!!doned\pagenumber\else\correspagenumber\fi=\plusone \if!!donea\dosetcorrespondencelayer[#1][#2][#3]\fi @@ -364,10 +335,11 @@ \def\dosetcorrespondencesection[#1][#2][#3]% {\begingroup + \edef\currentcorrespondenceelement{#3}% \doifelsecorrespondencestylevalue{#2}{#3}\c!before {\correspondencestylevalue{#2}{#3}\c!before} \endgraf - \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}% + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin }% \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% \doifcorrespondencestylevalue{#2}{#3}\c!align {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}% @@ -446,14 +418,22 @@ \def\doflushcorrespondencedescription[#1][#2]% {\def\dodoflushcorrespondencedescription##1% {\doif{\correspondencestylevalue{#2}\v!option{##1}}\v!yes{\dosetcorrespondencedescription[#1][#2][##1]}}% - \processcommacommand[\csname#1!list!descriptions\endcsname]\dodoflushcorrespondencedescription} + \processcommacommand[\getvalue{#1!list!descriptions}]\dodoflushcorrespondencedescription} %D Commands to define named elements for header, footer etc. and use them, %D clone them or delete their content. -\def\definecorrespondenceelement [#1]#2[#3]#4[#5]#6{\setvalue{#1:#3:#5}{#6}} -\def\resetcorrespondenceelement [#1]#2[#3]#4[#5]{\resetvalue{#1:#3:#5}} -\def\copycorrespondenceelement[#1]#2[#3]#4[#5]#6[#7]{\copycsname#1:#3:#5\endcsname\csname#1:#3:#7\endcsname} -\def\correspondenceelement [#1]#2[#3]#4[#5]{\csname#1:#3:#5\endcsname} +\def\definecorrespondenceelement{\dotripleargument\dodefinecorrespondenceelement } +\def\resetcorrespondenceelement {\dotripleargument\doresetcorrespondenceelement } +\def\copycorrespondenceelement {\doquadrupleargument\docopycorrespondenceelement} +\def\correspondenceelement {\dotripleargument\docorrespondenceelement } + +\def\dodefinecorrespondenceelement[#1][#2][#3]#4{\setvalue{#1:#2:#3}{#4}} +\def\doresetcorrespondenceelement [#1][#2][#3]{\resetvalue{#1:#2:#3}} +\def\docopycorrespondenceelement[#1][#2][#3][#4]{\copycsname#1:#2:#3\endcsname\csname#1:#2:#4\endcsname} + +\def\docorrespondenceelement[#1][#2][#3]% + {\edef\currentcorrespondenceelement{#2}% + \csname#1:#2:#3\endcsname} \protect \endinput diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv index ffb3a6b7ed3..d1e30705a3b 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.mkiv @@ -1,6 +1,6 @@ %D \module %D [ file=t-correspondence, -%D version=2009.07.03, +%D version=2009.07.18, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -177,40 +177,11 @@ %D Tests -\long\def\doifcorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencevalue#1#2% - {\edef\!!stringa{\csname#1#2\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\long\def\doifcorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\gobbleoneargument - \else - \@EA\firstofoneargument - \fi} - -\long\def\doifelsecorrespondencestylevalue#1#2#3% - {\edef\!!stringa{\csname#1#2#3\endcsname}% - \ifx\!!stringa\empty - \@EA\secondoftwoarguments - \else - \@EA\firstoftwoarguments - \fi} - -\def\correspondencestylevalue#1#2#3% - {\csname#1#2#3\endcsname} +\long\def\doifcorrespondencevalue #1#2{\doifsomething {\csname #1#2\endcsname}} +\long\def\doifelsecorrespondencevalue #1#2{\doifsomethingelse{\csname #1#2\endcsname}} +\long\def\doifcorrespondencestylevalue #1#2#3{\doifsomething {\csname#1#2#3\endcsname}} +\long\def\doifelsecorrespondencestylevalue#1#2#3{\doifsomethingelse{\csname#1#2#3\endcsname}} +\long\def\correspondencestylevalue #1#2#3{\csname#1#2#3\endcsname} %D External files @@ -224,6 +195,15 @@ {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}}% \processcommacommand[#4]\dousecorrespondencefile} +% \def\usecorrespondencefile[#1][#2][#3][#4]% +% {\def\dousecorrespondencefile##1% +% {\startreadingfile +% \readfile{##1.#3} +% {\showmessage\m!correspondence{1}{#1,#2,##1.#3}\registercorrespondencefile{##1.#3}} +% {\showmessage\m!correspondence{2}{#1,#2,##1.#3}}% +% \stopreadingfile}% +% \processcommacommand[#4]\dousecorrespondencefile} + %D Layers \def\correspondencelayerkeys @@ -238,9 +218,9 @@ {\def\dodododefinecorrespondencelayer##1{\dododefinecorrespondencelayer[#1][#2][##1]}% \processaction [#3] - [\v!foldmark=>{\processcommacommand[\csname#1!list!marking\endcsname]\dodododefinecorrespondencelayer}, - \v!header=>{\processcommacommand[\csname#1!list!header\endcsname ]\dodododefinecorrespondencelayer}, - \v!footer=>{\processcommacommand[\csname#1!list!footer\endcsname ]\dodododefinecorrespondencelayer}, + [\v!foldmark=>{\processcommacommand[\getvalue{#1!list!marking}]\dodododefinecorrespondencelayer}, + \v!header=>{\processcommacommand[\getvalue{#1!list!header}]\dodododefinecorrespondencelayer}, + \v!footer=>{\processcommacommand[\getvalue{#1!list!footer}]\dodododefinecorrespondencelayer}, \s!unknown=>{\dododefinecorrespondencelayer[#1][#2][#3]}]} \def\dododefinecorrespondencelayer[#1][#2][#3]% @@ -330,7 +310,7 @@ \!!donebfalse % even numbered pages \!!donecfalse % odd numbered pages \!!donedfalse % real pagenumber - \processcommacommand[\csname#2#3\c!state\endcsname]\dodosetheaderfooterlayer + \processcommacommand[\getvalue{#2#3\c!state}]\dodosetheaderfooterlayer \doifnotvalue{#2#3\v!layer\c!state}\v!stop{\setuplayer[#1:#3][\c!state=\v!start]}% \ifnum\if!!doned\pagenumber\else\correspagenumber\fi=\plusone \if!!donea\dosetcorrespondencelayer[#1][#2][#3]\fi @@ -374,10 +354,11 @@ \def\dosetcorrespondencesection[#1][#2][#3]% {\begingroup + \edef\currentcorrespondenceelement{#3}% \doifelsecorrespondencestylevalue{#2}{#3}\c!before {\correspondencestylevalue{#2}{#3}\c!before} \endgraf - \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin}% + \doadaptleftskip {\correspondencestylevalue{#2}{#3}\c!leftmargin }% \doadaptrightskip{\correspondencestylevalue{#2}{#3}\c!rightmargin}% \doifcorrespondencestylevalue{#2}{#3}\c!align {\setupalign[\correspondencestylevalue{#2}{#3}\c!align]}% @@ -460,15 +441,23 @@ \def\doflushcorrespondencedescription[#1][#2]% {\def\dodoflushcorrespondencedescription##1% {\doif{\correspondencestylevalue{#2}\v!option{##1}}\v!yes{\dosetcorrespondencedescription[#1][#2][##1]}}% - \processcommacommand[\csname#1!list!descriptions\endcsname]\dodoflushcorrespondencedescription} + \processcommacommand[\getvalue{#1!list!descriptions}]\dodoflushcorrespondencedescription} %D Commands to define named elements for header, footer etc. and use them, %D clone them or delete their content. -\def\definecorrespondenceelement [#1]#2[#3]#4[#5]#6{\setvalue{#1:#3:#5}{#6}} -\def\resetcorrespondenceelement [#1]#2[#3]#4[#5]{\resetvalue{#1:#3:#5}} -\def\copycorrespondenceelement[#1]#2[#3]#4[#5]#6[#7]{\copycsname#1:#3:#5\endcsname\csname#1:#3:#7\endcsname} -\def\correspondenceelement [#1]#2[#3]#4[#5]{\csname#1:#3:#5\endcsname} +\def\definecorrespondenceelement{\dotripleargument\dodefinecorrespondenceelement } +\def\resetcorrespondenceelement {\dotripleargument\doresetcorrespondenceelement } +\def\copycorrespondenceelement {\doquadrupleargument\docopycorrespondenceelement} +\def\correspondenceelement {\dotripleargument\docorrespondenceelement } + +\def\dodefinecorrespondenceelement[#1][#2][#3]#4{\setvalue{#1:#2:#3}{#4}} +\def\doresetcorrespondenceelement [#1][#2][#3]{\resetvalue{#1:#2:#3}} +\def\docopycorrespondenceelement[#1][#2][#3][#4]{\copycsname#1:#2:#3\endcsname\csname#1:#2:#4\endcsname} + +\def\docorrespondenceelement[#1][#2][#3]% + {\edef\currentcorrespondenceelement{#2}% + \csname#1:#2:#3\endcsname} \def\registercorrespondencefile#1% {\doifundefined{@@@@#1@@@@} @@ -489,7 +478,7 @@ correspondence.files = { name = "t-correspondence.tex", path = "tex/context/third/letter/base/", type = "base", - version = "2009.07.03", + version = "2009.07.18", description = "Core module" } , { @@ -511,7 +500,7 @@ correspondence.files = { name = "default.nli", path = "tex/context/third/letter/interface/", type = "interface", - version = "2009.05.10", + version = "2009.07.18", description = "Default letter interface" } , @@ -519,7 +508,7 @@ correspondence.files = { name = "pragma.nli", path = "tex/context/third/letter/interface/", type = "interface", - version = "2009.02.12", + version = "2009.07.18", description = "m-letter.tex Interface" } , { @@ -631,7 +620,7 @@ correspondence.files = { name = "default.nls", path = "tex/context/third/letter/style/", type = "style", - version = "2009.03.27", + version = "2009.07.16", description = "Basic style" } , { diff --git a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex index d006ce9885d..8eafbf3fa7e 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex +++ b/Master/texmf-dist/tex/context/third/letter/base/t-correspondence.tex @@ -1,6 +1,6 @@ %D \module %D [ file=t-correspondence, -%D version=2009.06.30, +%D version=2009.07.18, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -171,6 +171,7 @@ \setinterfacevariable {correspondence} {correspondence} \setinterfacevariable {resumemain} {resumemain} \setinterfacevariable {resumenext} {resumenext} + \setinterfacevariable {black} {black} \stopinterface \startinterface all diff --git a/Master/texmf-dist/tex/context/third/letter/interface/default.nli b/Master/texmf-dist/tex/context/third/letter/interface/default.nli index 5d26324f909..5e220cb5803 100644 --- a/Master/texmf-dist/tex/context/third/letter/interface/default.nli +++ b/Master/texmf-dist/tex/context/third/letter/interface/default.nli @@ -1,6 +1,6 @@ %D \module %D [ file=default, -%D version=2009.05.10, +%D version=2009.07.18, %D title=\CONTEXT\ Letter Interface, %D subtitle=Default Interface, %D author=Wolfgang Schuster, @@ -43,12 +43,20 @@ \egroup \hfill} +% \defineletterelement[\v!reference][\v!a] +% {\setbox\scratchbox\hbox\!!to\hsize +% {\getcommacommandsize[\@@@@lsreferencelist]% \@@@@ldreference? +% \ifnum\commalistsize<\plustwo\hfill\fi +% \processcommacommand[\@@@@lsreferencelist]\formatreferencelista\unskip}% +% \global\letter!height!reference\htdp\scratchbox +% \box\scratchbox} + \defineletterelement[\v!reference][\v!a] {\setbox\scratchbox\hbox\!!to\hsize - {\getcommacommandsize[\@@@@lsreferencelist]% \@@@@ldreference? + {\getcommacommandsize[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]% \ifnum\commalistsize<\plustwo\hfill\fi - \processcommacommand[\@@@@lsreferencelist]\formatreferencelista\unskip}% - \global\letter!height!reference\htdp\scratchbox + \processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelista\unskip}% + \ifx\currentcorrespondenceelement\v!reference\global\letter!height!reference\htdp\scratchbox\fi \box\scratchbox} \startsetups[\v!letter:\v!reference:\v!a] @@ -80,9 +88,12 @@ {\lettervalue{#1}}}}% \egroup} +% \defineletterelement[\v!reference][\v!b] +% {\vtop % why not \vbox? +% {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistb}} + \defineletterelement[\v!reference][\v!b] - {\vtop % why not \vbox? - {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistb}} + {\vtop{\processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelistb}} \startsetups[\v!letter:\v!reference:\v!b] @@ -116,9 +127,13 @@ {\lettervalue\ascii}% \egroup} +% \defineletterelement[\v!reference][\v!c] +% {\hbox\!!to\hsize +% {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistc}} + \defineletterelement[\v!reference][\v!c] {\hbox\!!to\hsize - {\processcommacommand[\@@@@lsreferencelist]\formatreferencelistc}} + {\processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelistc}} \startsetups[\v!letter:\v!reference:\v!c] @@ -140,10 +155,19 @@ \def\formatreferencelistd#1% {\appendtoks\doformatreferencelistd{#1}\to\scratchtoks} +% \defineletterelement[\v!reference][\v!d] +% {\vtop % why not \vbox? +% {\scratchtoks\emptytoks +% \processcommacommand[\@@@@lsreferencelist]\formatreferencelistd +% \setuptabulate[\c!before=,\c!after=]% +% \starttabulate[|l|l|] +% \the\scratchtoks +% \stoptabulate}} + \defineletterelement[\v!reference][\v!d] - {\vtop % why not \vbox? + {\vtop {\scratchtoks\emptytoks - \processcommacommand[\@@@@lsreferencelist]\formatreferencelistd + \processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferencelistd \setuptabulate[\c!before=,\c!after=]% \starttabulate[|l|l|] \the\scratchtoks @@ -185,9 +209,13 @@ {\doformatreferenceliste{\lettervalue\ascii}}}}}% \egroup} +% \defineletterelement[\v!reference][\v!e] +% {\hbox\!!to\hsize +% {\processcommacommand[\@@@@lsreferencelist]\formatreferenceliste\hss}} + \defineletterelement[\v!reference][\v!e] {\hbox\!!to\hsize - {\processcommacommand[\@@@@lsreferencelist]\formatreferenceliste\hss}} + {\processcommacommand[\csname\????ls\currentcorrespondenceelement\c!list\endcsname]\formatreferenceliste\hss}} \startsetups[\v!letter:\v!reference:\v!e] @@ -220,10 +248,13 @@ %D local in this case and not global like the values you could set with %D \tex{setupletter}. +\newtoks\letter!local!commands + \def\startletter - {\bgroup\dodoubleempty\dostartletter} + {\begingroup + \dodoubleempty\dostartletter} -\long\def\dostartletter[#1][#2]#3\stopletter +\def\dostartletter[#1][#2]% {\ifsecondargument \getparameters[\????ld][#1]% \doifundefinedelse{\????ld\????ld#2} @@ -236,11 +267,17 @@ {\setvalue{\????ld\c!toaddress}{#1}} {\setvalue{\????ld\c!toaddress}{\getvalue{\????ld\????ld#1}}}}% \fi\fi - \setbuffer[lettercontent]#3\endbuffer + \begingroup + \obeylines + \dodostartletter} + +\long\def\dodostartletter#1\stopletter + {\endgroup + \scratchtoks{#1}% + \@EA\setbuffer\@EA[lettercontent]\the\scratchtoks\endbuffer \processlettervalues - \directsetup{\v!letter:\v!place}\egroup} - -\newtoks\letter!local!commands + \directsetup{\v!letter:\v!place}% + \endgroup} \def\processlettervalues {\globalletempty\letter!list!descriptions @@ -280,25 +317,29 @@ \doiflettervalue\c!fromname\\ \lettervalue\c!fromaddress} -\setvalue{@@head@@\c!rule\v!no }{0} -\setvalue{@@head@@\c!rule\v!none }{0} -\setvalue{@@head@@\c!rule\v!off }{0} -\setvalue{@@head@@\c!rule\v!top }{1} -\setvalue{@@head@@\c!rule\v!before}{1} -\setvalue{@@head@@\c!rule\v!bottom}{2} -\setvalue{@@head@@\c!rule\v!after }{2} -\setvalue{@@head@@\c!rule\v!yes }{2} -\setvalue{@@head@@\c!rule\v!on }{2} - -\def\simpleexecuteifdefined#1#2{\ifcsname#1\endcsname\csname#1\endcsname\else#2\fi}% -> t-correspondence? - +\setvalue{@@head@@\c!rule\v!no }{\!!doneafalse\!!donebfalse} +\setvalue{@@head@@\c!rule\v!none }{\!!doneafalse\!!donebfalse} +\setvalue{@@head@@\c!rule\v!off }{\!!doneafalse\!!donebfalse} +\setvalue{@@head@@\c!rule\v!top }{\!!doneatrue } +\setvalue{@@head@@\c!rule\v!before}{\!!doneatrue } +\setvalue{@@head@@\c!rule\v!bottom}{\!!donebtrue } +\setvalue{@@head@@\c!rule\v!after }{\!!donebtrue } +\setvalue{@@head@@\c!rule\v!yes }{\!!donebtrue } +\setvalue{@@head@@\c!rule\v!on }{\!!donebtrue } + +\def\doletterelementheadrule + {\!!doneafalse + \!!donebfalse + \def\dodoletterelementheadrule##1{\csname @@head@@\c!rule##1\endcsname}% + \processcommacommand[\letterstylevalue\v!head\c!fromrule]\dodoletterelementheadrule} + \defineletterelement[\v!head][\v!left] {\normalhbox - {\def\!!fromrule{\simpleexecuteifdefined{@@head@@\c!rule\letterstylevalue\v!head\c!fromrule}{0}}% - \framed[frame=off,location=bottom,align=right,width=\hsize] - {\dostartattributes{\????ld\c!fromname}\c!style\c!color + {\framed[frame=off,location=bottom,align=right,width=\hsize] + {\doletterelementheadrule + \dostartattributes{\????ld\c!fromname}\c!style\c!color \lettervalue\c!fromname - \ifnum\!!fromrule=\plusone + \if!!donea \doifelselettervalue\c!fromlogo {\setbox\scratchbox\hbox{\lettervalue\c!fromlogo}% \scratchdimen\dimexpr\letterstylevalue\v!head\c!rulewidth-\wd\scratchbox\relax} @@ -316,7 +357,7 @@ \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% - \ifnum\!!fromrule=\plustwo + \if!!doneb \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -332,11 +373,11 @@ \defineletterelement[\v!head][\v!middle] {\normalhbox - {\def\!!fromrule{\simpleexecuteifdefined{@@head@@\c!rule\letterstylevalue\v!head\c!fromrule}{0}}% - \framed[frame=off,location=bottom,align=middle,width=\hsize] - {\dostartattributes{\????ld\c!fromname}\c!style\c!color + {\framed[frame=off,location=bottom,align=middle,width=\hsize] + {\doletterelementheadrule + \dostartattributes{\????ld\c!fromname}\c!style\c!color \lettervalue\c!fromname - \ifnum\!!fromrule=\plusone + \if!!donea \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -355,7 +396,7 @@ \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% - \ifnum\!!fromrule=\plustwo + \if!!doneb \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -370,12 +411,12 @@ \defineletterelement[\v!head][\v!right] {\normalhbox - {\def\!!fromrule{\simpleexecuteifdefined{@@head@@\c!rule\letterstylevalue\v!head\c!fromrule}{0}}% - \doiflettervalue\c!fromlogo{\rlap{\lettervalue\c!fromlogo}}% + {\doiflettervalue\c!fromlogo{\rlap{\lettervalue\c!fromlogo}}% \framed[frame=off,location=bottom,align=left,width=\hsize] - {\dostartattributes{\????ld\c!fromname}\c!style\c!color + {\doletterelementheadrule + \dostartattributes{\????ld\c!fromname}\c!style\c!color \lettervalue\c!fromname - \ifnum\!!fromrule=\plusone + \if!!donea \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -397,7 +438,7 @@ \doiflettervalue\c!fromfax {\\\lettervalue\c!fromfax }% \doiflettervalue\c!frommail {\\\lettervalue\c!frommail }% \doiflettervalue\c!fromurl {\\\lettervalue\c!fromurl }% - \ifnum\!!fromrule=\plustwo + \if!!doneb \ifzeropt\letterstylevalue\v!head\c!rulewidth \scratchdimen\hsize \else @@ -651,8 +692,11 @@ \startsetups[\v!letter:\v!optimize] - \setbox\scratchbox\hbox % trial typesetting to get the heigth of the reference line - {\dontcomplain\executeifdefined{\v!letter:\v!reference:\@@@@lsreferencealternative}\donothing} + \startnointerference % trial typesetting to get the heigth of the reference line + \dontcomplain + \let\currentcorrespondenceelement\v!reference + \executeifdefined{\v!letter:\v!reference:\@@@@lsreferencealternative}\donothing + \stopnointerference \setups[\v!letter:\v!reference:\@@@@lsreferencealternative] diff --git a/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli b/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli index a907a3c7c43..e11cbff1dc6 100644 --- a/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli +++ b/Master/texmf-dist/tex/context/third/letter/interface/pragma.nli @@ -1,6 +1,6 @@ %D \module %D [ file=pragma, -%D version=2009.02.19, +%D version=2009.07.18, %D title=\CONTEXT\ Letter Extension, %D subtitle=Pragma Style, %D author=Wolfgang Schuster, diff --git a/Master/texmf-dist/tex/context/third/letter/style/default.nls b/Master/texmf-dist/tex/context/third/letter/style/default.nls index e4f10ee918c..1e51f661fea 100644 --- a/Master/texmf-dist/tex/context/third/letter/style/default.nls +++ b/Master/texmf-dist/tex/context/third/letter/style/default.nls @@ -1,6 +1,6 @@ %D \module %D [ file=default, -%D version=2009.03.27, +%D version=2009.07.16, %D title=\CONTEXT\ Letter Style, %D subtitle=Blockstyle initalization, %D author=Wolfgang Schuster, @@ -65,6 +65,7 @@ [\v!head] [\c!rulewidth=\hsize, \c!fromrule=\v!no, + \c!rulecolor=\v!black, \c!alternative=\v!left] \setupletterstyle -- cgit v1.2.3