diff options
author | Karl Berry <karl@freefriends.org> | 2012-01-23 00:42:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-01-23 00:42:59 +0000 |
commit | 7eda4d8bf325fdecf946c12f60e9a1d577e7b2cd (patch) | |
tree | ddb3fb14484c4592662f403026e4c9b7b753d71a | |
parent | eb40e72deb1933ed11313482d7765efb1350fb23 (diff) |
context-letter (22jan12)
git-svn-id: svn://tug.org/texlive/trunk@25174 c570f23f-e606-0410-a88d-b1316a301751
4 files changed, 69 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua index e31ad21ec30..84f3a6fb28b 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua +++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.lua @@ -273,4 +273,18 @@ function correspondence.letter.reference_e(environment,list) end end end ) +end + +function thirddata.correspondence.description_split(list) + local format, items = nil, nil + if string.find(list,":") then + format, items = string.splitup(list,":") + else + items = list + end + -- the macros are empty be default, change this only when necessary + context.unprotect() + if format then context.setvalue("m_correspondence_description_format",format) end + if items then context.setvalue("m_correspondence_description_items" ,items ) end + context.protect() end
\ No newline at end of file diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii index df06715010a..07dc48704f9 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii +++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkii @@ -1,6 +1,6 @@ %D \module %D [ file=s-cor-00, -%D version=2012.01.15, +%D version=2012.01.21, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -470,10 +470,7 @@ \unexpanded\def\definecorrespondencedescription[#1][#2]% {\edef\currentcorrespondencedescription{#1:#2}% - \setupcurrentcorrespondencedescription - [\s!parent=\????correspondencedescription, - \c!width=\v!fit, - \c!distance=1em]} + \expandafter\let\csname\????correspondencedescription\currentcorrespondencedescription\s!parent\endcsname\????correspondencedescription} \unexpanded\def\setupcorrespondencedescription[#1][#2][#3]% {\def\dosetupcorrespondencedescription##1% @@ -517,13 +514,19 @@ \setvalue{\????correspondencedescriptionlocation\v!top}% {\noindent\box\scratchbox - \doisomethingelse{\correspondencedescriptionparameter\c!spaceinbetween} + \doifsomethingelse{\correspondencedescriptionparameter\c!spaceinbetween} {\blank[\correspondencedescriptionparameter\c!spaceinbetween]} {\nobreak\endgraf}% \correspondencedescriptionparameter\c!textcommand} \setvalue{\????correspondencedescriptionlocation\v!text}% - {\noindent\scratchbox\scratchbox\correspondencedescriptionparameter\c!textcommand} + {\noindent\box\scratchbox\correspondencedescriptionparameter\c!textcommand} + +\getparameters + [\????correspondencedescription] + [\c!width=\v!fit, + \c!distance=1em, + \c!symbol=dash] % Elements diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi index e9b8446569f..57c23508834 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi +++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-00.mkvi @@ -1,6 +1,6 @@ %D \module %D [ file=s-cor-00, -%D version=2012.01.15, +%D version=2012.01.21, %D title=\CONTEXT\ User Module, %D subtitle=Correspondence, %D author=Wolfgang Schuster, @@ -138,6 +138,7 @@ \installnamespace {correspondenceoption} \installnamespace {correspondencedescription} \installnamespace {correspondencedescriptionlocation} +\installnamespace {correspondencedescriptionformat} \installnamespace {correspondencestyle} \installnamespace {correspondenceelement} \installnamespace {correspondencelayout} @@ -367,6 +368,10 @@ \installsimplecommandhandler \????correspondencedescription {correspondencedescription} \????correspondencedescription +\let\m_correspondence_description_string\empty +\let\m_correspondence_description_format\empty +\let\m_correspondence_description_items \empty + \unexpanded\def\correspondence_description_define[#environment][#element]% {\def\currentcorrespondencedescription{#environment:#element}% \checkcorrespondencedescriptionparent} @@ -393,6 +398,7 @@ {\scratchdimen} {\unhcopy\scratchbox} {\correspondencedescriptionparameter\c!distance}% + \ctxlua{thirddata.correspondence.description_split("\correspondencedescriptionparameter\c!textcommand")}% \expandcheckedcsname\????correspondencedescriptionlocation{\correspondencedescriptionparameter\c!location}\v!left \correspondencedescriptionparameter\c!after \doifsomethingelse{\correspondencedescriptionparameter\c!spaceafter}{\blank[\correspondencedescriptionparameter\c!spaceafter]}{\endgraf}% @@ -403,23 +409,41 @@ \endgroup} \setvalue{\????correspondencedescriptionlocation\v!left}% - {\EveryPar{\hangindent\scratchdimen\hangafter\zerocount}% + {\doadaptleftskip\scratchdimen \setbox\scratchbox\hbox to \scratchdimen{\box\scratchbox\hss}% - \noindent\llap{\box\scratchbox}\correspondencedescriptionparameter\c!textcommand} + \noindent\llap{\box\scratchbox}\correspondence_description_place_text} \setvalue{\????correspondencedescriptionlocation\v!top}% {\noindent\box\scratchbox - \doisomethingelse{\correspondencedescriptionparameter\c!spaceinbetween} + \doifsomethingelse{\correspondencedescriptionparameter\c!spaceinbetween} {\blank[\correspondencedescriptionparameter\c!spaceinbetween]} {\nobreak\endgraf}% - \correspondencedescriptionparameter\c!textcommand} + \doadaptleftskip {\correspondencedescriptionparameter\c!leftmargin }% + \doadaptrightskip{\correspondencedescriptionparameter\c!rightmargin}% + \correspondence_description_place_text} \setvalue{\????correspondencedescriptionlocation\v!text}% - {\noindent\scratchbox\scratchbox\correspondencedescriptionparameter\c!textcommand} + {\noindent\box\scratchbox\correspondence_description_place_text} + +\unexpanded\def\correspondence_description_place_text + {\expandcheckedcsname\????correspondencedescriptionformat\m_correspondence_description_format\v!none} + +\setvalue{\????correspondencedescriptionformat\v!list}% + {\def\correspondence_description_format_item#text{\startitem#text\stopitem}% + \dontleavehmode\vtop\bgroup + \leftskip\zeropoint % prevent additional offset when “location=left” is used + \startitemize[\v!packed,\correspondencedescriptionparameter\c!symbol]% + \processcommacommand[\m_correspondence_description_items]\correspondence_description_format_item + \stopitemize + \egroup} + +\setvalue{\????correspondencedescriptionformat\v!none}% + {\m_correspondence_description_items} \setupcorrespondencedescription [\c!width=\v!fit, - \c!distance=1em] + \c!distance=1em, + \c!symbol=dash] % Elements diff --git a/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi b/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi index ed31fce624c..eb5bfd63771 100644 --- a/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi +++ b/Master/texmf-dist/tex/context/third/letter/base/s-cor-01.mkvi @@ -1,6 +1,6 @@ %D \module %D [ file=s-cor-01, -%D version=2012.01.15, +%D version=2012.01.20, %D title=\CONTEXT\ User Module, %D subtitle=Letters, %D author=Wolfgang Schuster, @@ -634,23 +634,23 @@ \setuplettertext[\s!it][\v!subject=] % Oggetto \setuplettertext[\s!es][\v!subject=] % Asunto -% cc: +% copy: -\setuplettertext[\s!en][\v!copy=cc] -\setuplettertext[\s!nl][\v!copy=Kopie aan] -\setuplettertext[\s!de][\v!copy=Kopien an] -\setuplettertext[\s!fr][\v!copy=Copieà] -\setuplettertext[\s!it][\v!copy=Per conoscenza] -\setuplettertext[\s!es][\v!copy=Copias] +\setuplettertext[\s!en][\v!copy=cc: ] +\setuplettertext[\s!nl][\v!copy=Kopie aan: ] +\setuplettertext[\s!de][\v!copy=Kopien an: ] +\setuplettertext[\s!fr][\v!copy=Copieà: ] +\setuplettertext[\s!it][\v!copy=Per conoscenza: ] +\setuplettertext[\s!es][\v!copy=Copias: ] % enclosure: -\setuplettertext[\s!en][\v!enclosure=encl] -\setuplettertext[\s!nl][\v!enclosure=Bijlage(n)] -\setuplettertext[\s!de][\v!enclosure=Anlagen] -\setuplettertext[\s!fr][\v!enclosure=Annexes] -\setuplettertext[\s!it][\v!enclosure=Allegato] -\setuplettertext[\s!es][\v!enclosure=Adjunto] +\setuplettertext[\s!en][\v!enclosure=encl: ] +\setuplettertext[\s!nl][\v!enclosure=Bijlage(n): ] +\setuplettertext[\s!de][\v!enclosure=Anlagen: ] +\setuplettertext[\s!fr][\v!enclosure=Annexes: ] +\setuplettertext[\s!it][\v!enclosure=Allegato: ] +\setuplettertext[\s!es][\v!enclosure=Adjunto: ] % to: |