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 | |
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')
27 files changed, 5063 insertions, 750 deletions
diff --git a/Master/texmf-dist/doc/context/third/letter/correspondence.pdf b/Master/texmf-dist/doc/context/third/letter/correspondence.pdf Binary files differindex 6d00b374fd1..db0e2b1899d 100644 --- a/Master/texmf-dist/doc/context/third/letter/correspondence.pdf +++ b/Master/texmf-dist/doc/context/third/letter/correspondence.pdf 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 new file mode 100644 index 00000000000..ff583c3a5bc --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex @@ -0,0 +1,261 @@ +\startenvironment correspondence-environment + +%%%% Anleitung für das Correspondenz-Modul + +% Um die Anleitung Erstellen zu können muss LuaTeX benutzt werden, +% um das gleiche Aussehen wie in der fertigen PDF-Version zu erhalten +% müssen die Lucida- und Delicious-Schriften installiert sein. + + +%%%% Variablen für das Dokument + +\setvariables + [correspondence] + [title=Correspondence with \ConTeXt, + version=\ctxlua{tex.sprint(tex.ctxcatcodes,thirddata.correspondence.files[1]["version"])}] + + +%%%% Farbe + +\setupcolor[hex] + +\setupcolors[state=start] + +\definecolor[lettercolor][green] +\definecolor[lettercolor][h=BBD0B4] +%\definecolor[lettercolor][h=E7DDAF] +\definecolor[fakerulecolor][darkgray] + +\definecolor[twhite][r=1,g=1,b=1,t=.75,a=1] + + +%%%% Bilder + +\setupexternalfigures[directory=images] + + +%%%% Hyperlinks etc. + +\appendtoks\def\\{ }\to\simplifiedcommands + +\setupinteraction + [state=stop, + title={Correspondence with ConTeXt}, + author={Wolfgang Schuster}, + color=black, + style=] + + +%%%% Zusätzliche Module + +\usemodule[visual] +\usemodule[letter] +\usemodule[resume] +\usemodule[set-11]\loadsetups[cont-en.xml]\loadsetups[t-letter.xml]\loadsetups[t-resume.xml] +\usemodule[examplecontent] + +\setupframedtexts + [setuptext] + [frame=on, + rulethickness=1pt, + corner=round, + framecolor=lettercolor] + + +%%%% Schriften + +\startmode[wolf] + +\definefontfeature[default][default][mode=node,expansion=quality,protrusion=quality] + +\usetypescriptfile[type-delicious] +\usetypescriptfile[type-lucida] + +\usetypescript[lucida,delicious] +\setupbodyfont[lucida,11pt] + +\stopmode + +\startnotmode[wolf] + +\definefontfeature[default][default][mode=node,expansion=quality,protrusion=quality] + +\usetypescript[palatino,modern] +\setupbodyfont[palatino,12pt] + +\stopnotmode + + +%%%% Layout + +%% Einnstellungen für die Musterbriefe + +\doifmodeelse{wolf} + {\setupletterstyle[option][bodyfont={delicious,ss}]} + {\setupletterstyle[option][bodyfont={modern,ss}]} + +\setupletterstyle + [option] + [whitespace=line, + marking=no, + before={\page[left]}, + backgroundcolor=gray] + +\setupletterstyle + [content] + [align=normal] + +\setupletterstyle + [enclosure,copy,postscript] + [before=\nowhitespace, + after=\nowhitespace] + +\setupletterstyle + [closing] + [after={\blank[2*line]}] + +\doifmodeelse{wolf} + {\setupresumestyle[option][bodyfont={delicious,ss}]} + {\setupresumestyle[option][bodyfont={modern,ss}]} + +\setupresumestyle + [option] + [whitespace=none, + before={\page[left]}, + backgroundcolor=gray] + +%% Absatzeinstellungen + +\setupwhitespace[line] + +\setupalign[stretch,hanging,hz] +%\setupalign[right,broad] + +%% Überschriften + +\setuphead + [part] + [placehead=yes, + alternative=middle, + resetnumber=no, + style=\tfd] + +\setuphead + [chapter] + [header=empty, + style=\tfc] + +\setuphead + [section,subject] + [style=\tfb] + +\setuphead + [subsection,subsubject] + [style=\tfa] + +%% Inhaltsverzeichnis + +\setupcombinedlist + [content] + [interaction=all, + color=black, + partnumber=no] + +%% Index + +\setupregister + [index] + [partnumber=no] + +%% Seitennummerierung + +\setuppagenumbering + [alternative=doublesided, + location=footer, + way=bytext, + partnumber=no] + +%% Kopf- und Fußzeilen + +\setupheadertexts[{\getmarking[chapter]}] + +%% Verbatim + +\doifmode{wolf}{\setuptyping[bodyfont=10pt]} + +%% Misc + +\setupmakeup + [standard] + [pagestate=start, + page=no] + +%% Cover + +\defineoverlay[coverfigure][\overlayfigure{980559_60280625}] + +\def\TitlePage + {%\setupbackgrounds[page][background={coverfigure,color},backgroundcolor=twhite]% später + \setupbackgrounds[page][background=color,backgroundcolor=lettercolor] + \startstandardmakeup[align=middle] + \vfill + \definedfont[SansBold sa 4]\setupinterlinespace\getvariable{correspondence}{title}\par + \blank[2*medium] + \definedfont[Sans sa 2]\setupinterlinespace Version: \getvariable{correspondence}{version}\par + \vfill\vfill\vfill + \stopstandardmakeup + \setupbackgrounds[page][background=]} + +\def\LastPage + {\page[yes,left] + \setupbackgrounds[page][background=color,backgroundcolor=lettercolor] + \startstandardmakeup % warum nicht + \stopstandardmakeup % \page[empty]? + \setupbackgrounds[page][background=]} + +\def\CommandList + {\chapter{Command definitions} + \placesetup} + +%% Beispiele für die Briefelemente + +\defineframedtext + [element] + [width=\textwidth, + rulethickness=1pt, + corner=round, + framecolor=lettercolor] + +\defineframedtext + [smallelement] + [width=.35\textwidth, + rulethickness=1pt, + corner=round, + framecolor=lettercolor] + +%% Test-Modus + +\startmode[test] + + \showframe + \showgrid + +\stopmode + +%% Notwendig for TeX Live um das Dokument auch bei einem fehlenden +%% examplecontent Modul erstellen zu können. + +\ifx\startexamplecontent\undefined + + \def\startexamplecontent {\gobbleuntil\stopexamplecontent} + \def\examplecontent {\dodoubleempty\doexamplecontent} + \def\doexamplecontent[#1][#2]{\framed[width=6cm,height=8cm]{}} + +\fi + +%% Parameter-Check + +% \idefined\enablecheckparameters \enablecheckparameters \fi + + +\stopenvironment diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-introduction.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-introduction.tex new file mode 100644 index 00000000000..6466e41fd1b --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-introduction.tex @@ -0,0 +1,28 @@ +\startcomponent correspondence-introduction + +\environment correspondence-environment + +\chapter{Introduction} + +This is the manual for the \CONTEXT||correspondence manual. + +The module was written at the start as a package to write letters with a consistent +and use to use interface and a few options to change the layout in a consistent way. + +The core for the first version was based on the letter manual from Hans Hagen +(\filename{m-letter.tex}) and parts of this still remain in the low level code of +the module. + +As the time past more and more parts had been added to the package and it ended up +in a similar interface as the \LaTeX-classes but with it’s own commands to set user +values. Because of it’s origin in Hans module the user interface and the low level +parts are split in two different files and many more interfaces for the users are +possible, one of them tries to mimic the style of Hans module. + +As the time past the author wrote generic version of the complete setup commands +and a few other in the letter core and created the new file \filename{t-correspondence.tex} +which holds now the low level code. As a result of this the new file +\filename{t-resume.tex} became part of the package with it’s own setup commands +and external style and interface files. + +\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 new file mode 100644 index 00000000000..932c8b1d38c --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex @@ -0,0 +1,447 @@ +\startcomponent correspondence-letter-beginner + +\environment correspondence-environment + +\chapter{Beginners guide} + +%This chapter will help you to write your own letter without studying first the complete manual, only the most important information are given to get a result with the default styles. + +The most important in the module for the users is the interface to write the letter text and to set the values for one or more letters. + +You will learn how to write a letter with the module step by step, beginning with just a few lines of text, following with opening and closing sentences and at the end after you know how to set every kind of information you will finally learn how to change the position of the reference line and how to change the texts for the labels and to customise their style and color. + +\startbuffer[interface:text] +\startletter +\input knuth\par +\stopletter +\stopbuffer + +\start + +\setupletter[alternative=none] + +\getbuffer[interface:text] + +\stop + +\section{Pure text} + +To understand how a letter is written let's study the code for the example letter on the left page. + +\starttyping +\usemodule[letter] + +\starttext + +\startletter +Thus, I came to the conclusion ... +\stopletter + +\stoptext +\stoptyping + +As you could see from the first line the letter module has to be loaded before it could used because it is none of the functions \CONTEXT\ provides by default, to make the examples in the following sections a little bit shorter I will no longer add \type {\usemodule}, \type {\starttext} and \type {\stoptext} but you shouldn't forgot to add all of them in your files. + +The content for your letter is written between the letter environment, it doesn't matter if you use blank lines before and after the letter text. + +If you take a closer look at the result on the left side you could see the paragraphs are separated by blank lines, this could be changed with the \type {\setupletterstyle} command but let us keep this for later. + +You're not restricted to only one letter in file, it is possible to write as many as you like in a file and you could use this to write serial letters but a easier method to do this is described later in the manual. + +\startbuffer[interface:opening] + +\setupletter + [opening={Dear Reader,}, + closing={Greetings from the Author}] + +\getbuffer[interface:text] + +\stopbuffer + +\start + +\setupletter[alternative=none] + +\getbuffer[interface:opening] + +\stop + +\section{Opening\index{opening} and closing\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. + +To achieve this the module provides the two variables {\em opening} and {\em closing}. To feed them with text you could either use the optional argument for \type {\startletter} as done in the current or you could set them before the content of the letter with the two commands \type {\setupletter} and \type {\setlettervalue}. + +Let us begin with first alternative and set them as argument with \type {\startletter}: + +\starttyping +\startletter + [opening={Dear Reader,}, + closing={Greetings from the Author}] +Thus, I came to the conclusion ... +\stopletter +\stoptyping + +If you don't like this method you could set the two value before the letter environment with the \type {\setupletter} command, the text in your file should now look like: + +\starttyping +\setupletter + [opening={Dear Reader,}, + closing={Greetings from the Author}] + +\startletter +Thus, I came to the conclusion ... +\stopletter +\stoptyping + +If you are more interested in a KOMA-Script like solution to set with every command only one value their is as last alternative the \type {\setlettervalue} command, it comes in two different versions where the keyword is either written in braces or in bracket but the content itself is written between braces. + +The first version with braces for two values has the following look. + +\starttyping +\setlettervalue{opening}{Dear Reader,} +\setlettervalue{closing}{Greetings from the Author} +\stoptyping + +The nearly no difference to the second version and both give the same result and you could the one which you prefer. + +\starttyping +\setlettervalue[opening]{Dear Reader,} +\setlettervalue[closing]{Greetings from the Author} +\stoptyping + +The values itself had to be given before the letter environment because values in the letter text are ignored and will never be shown in the output. + +You have also to be careful with the content for the values because commas are interpreted as end of the value if you write it as argument for \type {\startletter} or with \type {\setupletter} and the text has to be protected with braces in this case but you don't need them is their is no comma in you text. + +This could not happen if you set the values with the \type {\setlettervalue} command because the content is delimited by the braces and commas are just normal text. + +\page[left] + +\startbuffer[interface:subject] + +\setupletter + [subject={Step by step guide to write a letter}] + +\getbuffer[interface:opening] + +\stopbuffer + +\start + +\setupletter[alternative=none] + +\getbuffer[interface:subject] + +\stop + +\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. + +Instead of integrating this point in the last section I wrote a new to let you understand the system. Before I will tell more let's take a look at the code. + +\starttyping +\startletter + [opening={Dear Reader,}, + subject={Step by step guide to write a letter}, + closing={Greetings from the Author}] +Thus, I came to the conclusion ... +\stopletter +\stoptyping + +The text for the subject is written as argument for {\em subject} as argument for \type {\startletter}, as you already guess you could have set it also with \type {\setupletter} or \type {\setlettervalue} and this is also possible and true for the values in the following sections. + +Besides the {\em subject} you have also the option to set a {\em title} for the letter, the is no big difference between them but the title is normally written before the subject and has and use a slightly bigger size or is emphasized in another way. + +\startbuffer[interface:address] + +\setupletter + [toname={Mike Wilson}, + toaddress={Linden street 12\\78569 TeX City}] + +\getbuffer[interface:subject] + +\stopbuffer + +\start + +\setupletterstyle[whitespace=line] + +\getbuffer[interface:address] + +\stop + +\section{Address\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}. + +The input for the example on the left page looks like: + +\starttyping +\setupletter + [toname={Mike Wilson}, + toaddress={Linden street 12\\78569 TeX City}] + +\startletter + [opening={Dear Reader,}, + subject={Step by step guide to write a letter}, + closing={Greetings from the Author}] +Thus, I came to the conclusion ... +\stopletter +\stoptyping + +The author prefer to set the values for the addressee not with \type {\startletter} but with \type {\setupletter} but this is just a matter of style and you could select what fits best to your own working style. + +\startbuffer[interface:sender] + +\setupletter + [fromname={The Author}, + fromaddress={Hidden Street 2\\57895 Mystery town}] + +\getbuffer[interface:address] + +\stopbuffer + +\start + +\getbuffer[interface:sender] + +\stop + +\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. + +If you have wondered why the author hasn't just used {\em name} and {\em address} as keys for the addressee values you will now find the solution. To make the system consistent to set the values for addressee and the sender both needed key names to prevent confusions which value should use the the simpler and which one a more verbose one both got e prefix to the key to differentiate them, so got addressee information the prefix {\em to} and sender information the prefix {\em from}.%\footnote{The real answer is the author took the names for the new user interface from KOMA-Script and this is where most of the commands have their name from.} + +The additional input for the example on the left page to the one from the previous examples is: + +\starttyping +\setupletter + [fromname={The Author}, + fromaddress={Hidden Street 2\\57895 Mystery town}] +\stoptyping + +The manual will describe in a later section how to write a own header with a personal look and feel but this is outside of the user interface and requires knowledge about the layout. + +\startbuffer[interface:reference] + +\setupletter + [name={Ben Johnson}, + phone={4922-89564}, + fax={4922-89564}] + +\setupletter + [list={name,phone,fax,date}] + +\getbuffer[interface:sender] + +\stopbuffer + +\start + +\getbuffer[interface:reference] + +\stop + +\section{Reference line} + +If you're in a company or a organisation you need sometimes a few extra information on your letter. The reference line or block is the right place where you can place these information. + +Our old example from the last section was now extended by a reference line between the information from our addressee and the subject line, the information for the four fields were set with the following code. + +\starttyping +\setupletter + [name={Ben Johnson}, + phone={4922-89564}, + fax={4922-89564}, + date=\currentdate] + +\setupletter + [list={name,phone,fax,date}] +\stoptyping + +The first \type {\setupletter} set the content for the four fields {\em name}, {\em phone}, {\em fax} and {\em date}. Although the values are set none of them will appear in the output but we have to declare the fields for the reference line first, this is done in the second \type {\setupletter} command with the key {\em list}, the entries will appear in the in the same order as you write them in the list, if one or more of the keys in the list have no values they will still appear in the output but no content is shown. + +If you change the content for the {\em list} key in your file the module will show by default the date of the current date at the right side of the reference line, this will normally always happen and you could say the result in the examples of the two preceding sections. + +\startbuffer[interface:signature] + +\setupletter + [signature={Arthur Thor}] + +\getbuffer[interface:reference] + +\stopbuffer + +\start + +\getbuffer[interface:signature] + +\stop + +\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. + +Most of the things need for a letter are already told but a few fields at the end of the letter remains untold, the first line you will add to our example letter is the signature. It is set with the {\em signature} in se same way as the other values in the former examples. What the author did in the left example was: + +\starttyping +\setupletter + [signature={Arthur Thor}] +\stoptyping + +There is some space between the closing and the signature to give you the possibility to sign the letter also by hand after you have printed the letter. + +You're not limited to simple text for the signature, it is also possible to use a graphic if you won't sign the letter by hand after you printed it, such a solution would have been for the author the next code. + +\starttyping +\setupletter + [signature={\externalfigure[autograph][height=2\lineheight]}] +\stoptyping + +How to adjust the space between the closing line and the signature for this way will be shown in the letter style section. + +\start + +\setupletter + [name={Ben Johnson}, + phone={4922-89564}, + fax={4922-89564}] + +\setupletter + [list={name,phone,fax,date}] + +\setupletter + [fromname={The Author}, + fromaddress={Hidden Street 2\\57895 Mystery town}] + +\setupletter + [toname={Mike Wilson}, + toaddress={Linden street 12\\78569 TeX City}] + +\startletter + [opening={Dear Reader,}, + subject={Step by step guide to write a letter}, + closing={Greetings from the Author}, + signature={Arthur Thor}] + +\input knuth\par + +\ps{Posctscript} + +\stopletter + +\stop + +\section{Postscript\index{postscript}\index{\tex{ps}}} + +\starttyping +\startletter + +... + +\ps{...} + +\stopletter +\stoptyping + +\start + +\setupletter + [name={Ben Johnson}, + phone={4922-89564}, + fax={4922-89564}] + +\setupletter + [list={name,phone,fax,date}] + +\setupletter + [fromname={The Author}, + fromaddress={Hidden Street 2\\57895 Mystery town}] + +\setupletter + [toname={Mike Wilson}, + toaddress={Linden street 12\\78569 TeX City}] + +\startletter + [opening={Dear Reader,}, + subject={Step by step guide to write a letter}, + closing={Greetings from the Author}, + signature={Arthur Thor}] + +\input knuth\par + +\ps{Postscript} + +\encl{Appendices} + +\stopletter + +\stop + +\section{Enclosure\index{enclosure}\index{\tex{encl}}} + +\starttyping +\startletter + +... + +\ps{...} +\encl{...} + +\stopletter +\stoptyping + +\start + +\setupletter + [name={Ben Johnson}, + phone={4922-89564}, + fax={4922-89564}] + +\setupletter + [list={name,phone,fax,date}] + +\setupletter + [fromname={The Author}, + fromaddress={Hidden Street 2\\57895 Mystery town}] + +\setupletter + [toname={Mike Wilson}, + toaddress={Linden street 12\\78569 TeX City}] + +\startletter + [opening={Dear Reader,}, + subject={Step by step guide to write a letter}, + closing={Greetings from the Author}, + signature={Arthur Thor}] + +\input knuth\par + +\ps{Postscript} + +\encl{Appendices} + +\cc{List of recipients} + +\stopletter + +\stop + +\section{Copy\index{copy}\index{\tex{cc}}} + +\starttyping +\startletter + +... + +\ps{...} +\encl{...} +\cc{...} + +\stopletter +\stoptyping + +\stopcomponent 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 new file mode 100644 index 00000000000..e4714857526 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex @@ -0,0 +1,511 @@ +\startcomponent correspondence-letter-examples + +\environment correspondence-environment + + + +% short example for single page layouts + +\startbuffer[example:content] + +\setupletter + [fromname={John Simmons}, + fromaddress={Parkstreet 12\\8257 Green Bay}] + +\setupletter + [toname={Steve Wilson}, + toaddress={Nightstreet 4a\\9183 Cotton Village}] + +\startletter + [opening={Dear Mr Wilson,}, + subject={Brand new templates for Word}, + closing={Best regards}, + signature={John Simmons}] + +\input knuth\par + +\stopletter + +\stopbuffer + +% long example for double page examples (included in running text) + +\startbuffer[example:long] + +\setupletterstyle[option][backgroundcolor=,before=] + +\setupletter + [fromname={John Simmons}, + fromaddress={Parkstreet 12\\8257 Green Bay}] + +\setupletter + [toname={Steve Wilson}, + toaddress={Nightstreet 4a\\9183 Cotton Village}] + +\startletter + [opening={Dear Mr Wilson,}, + subject={Brand new templates for Word}, + closing={Best regards}, + signature={John Simmons}] + +\dorecurse{4}{\input knuth\par} + +\stopletter + +\stopbuffer + + + +% general text about the example + +\chapter{Letter Examples} + +The letter module consits not only of just the main module, it contains also a few already defined styles for different countries and each of them use slightly different position for the layers and other setups. + +This section will give you a overview of all included styles you could use with the module without the need to write your own style. + + + +% DIN 676 B + +\start + +\getbuffer[example:content] + +\stop + +\startexamplecontent[dinb] + +\getbuffer[example:long] + +\stopexamplecontent + +\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} + {\startcombination + {\examplecontent[dinb][1]}{First page} + {\examplecontent[dinb][2]}{Second page} + \stopcombination} + + + +% DIN 676 A + +\start + +\useletterstyle[dina] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[dina] + +\useletterstyle[dina] + +\getbuffer[example:long] + +\stopexamplecontent + +\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} + {\startcombination + {\examplecontent[dina][1]}{First page} + {\examplecontent[dina][2]}{Second page} + \stopcombination} + + + +% NEN 1026 + +\start + +\useletterstyle[dutch] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[dutch] + +\useletterstyle[dutch] + +\getbuffer[example:long] + +\stopexamplecontent + +\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} + {\startcombination + {\examplecontent[dutch][1]}{First page} + {\examplecontent[dutch][2]}{Second page} + \stopcombination} + + + +% French style + +\start + +\useletterstyle[french] + +\setupletterstyle[indenting={yes,1cm}] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[french] + +\useletterstyle[french] + +\getbuffer[example:long] + +\stopexamplecontent + +\section{French} + +The french style is based on values given to me by Olivier Guéry. + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[french][1]}{First page} + {\examplecontent[french][2]}{Second page} + \stopcombination} + + + +% Full block + +\start + +\useletterstyle[fullblock] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[fullblock] + +\useletterstyle[fullblock] + +\getbuffer[example:long] + +\stopexamplecontent + +\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 +each part. + +The order of the parts is date, inside address, attention line, salutation, +subject line, body, complimentary close, signature and additional information. + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[fullblock][1]}{First page} + {\examplecontent[fullblock][2]}{Second page} + \stopcombination} + + + +% Modified + +\start + +\useletterstyle[modified] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[modified] + +\useletterstyle[modified] + +\getbuffer[example:long] + +\stopexamplecontent + +\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} + {\startcombination + {\examplecontent[modified][1]}{First page} + {\examplecontent[modified][2]}{Second page} + \stopcombination} + + + +% Semiblock + +\start + +\useletterstyle[semiblock] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[semiblock] + +\useletterstyle[semiblock] + +\getbuffer[example:long] + +\stopexamplecontent + +\section{Semiblock Style\index{Semiblock}} + +The semiblock style is the format most people recognize as business letter. + +The layout is the same as in the modified style. Paragraphs are intended +by five spaces\footnote{The semiblock letter style use the \type{medium} +value for \type{\setupindenting} to indent the paragraphs.}. + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[semiblock][1]}{First page} + {\examplecontent[semiblock][2]}{Second page} + \stopcombination} + + + +% Simplified + +\start + +\useletterstyle[simplified] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[simplified] + +\useletterstyle[simplified] + +\getbuffer[example:long] + +\stopexamplecontent + +\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. + +It contains no title, salutation or complimentary closing. The main focus +is the body of the letter. + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[simplified][1]}{First page} + {\examplecontent[simplified][2]}{Second page} + \stopcombination} + + + +% Hanging style + +\start + +\useletterstyle[hanging] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[hanging] + +\useletterstyle[hanging] + +\getbuffer[example:long] + +\stopexamplecontent + +\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} + {\startcombination + {\examplecontent[hanging][1]}{First page} + {\examplecontent[hanging][2]}{Second page} + \stopcombination} + + + +% Memorandum + +\start + +\useletterstyle[memo] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[memo] + +\useletterstyle[memo] + +\getbuffer[example:long] + +\stopexamplecontent + +\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 +sender and the subject. + +The abbreviation \quotation{RE} is sometimes used instead of \quotation{Subject}. + +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} + {\startcombination + {\examplecontent[memo][1]}{First page} + {\examplecontent[memo][2]}{Second page} + \stopcombination} + + + +% English style + +\starthiding + +\start + +\useletterstyle[english] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[english] + +\useletterstyle[english] + +\getbuffer[example:long] + +\stopexamplecontent + +\section{English Style} + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[english][1]}{First page} + {\examplecontent[english][2]}{Second page} + \stopcombination} + +\stophiding + + + +% Swiss style + +\start + +\useletterstyle[swiss] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[swiss] + +\useletterstyle[swiss] + +\getbuffer[example:long] + +\stopexamplecontent + +\section{Swiss Style A} + +\startframedtext[width=\textwidth,framecolor=red,align=middle,corner=00] +The layout of this style is not finished, if you want to use it give +me information about the correct margins and position of the elements. +\stopframedtext + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[swiss][1]}{First page} + {\examplecontent[swiss][2]}{Second page} + \stopcombination} + + + +% Swiss left style + +\start + +\useletterstyle[swissleft] + +\getbuffer[example:content] + +\stop + +\startexamplecontent[swissleft] + +\useletterstyle[swissleft] + +\getbuffer[example:long] + +\stopexamplecontent + +\section{Swiss Style B} + +\startframedtext[width=\textwidth,framecolor=red,align=middle,corner=00] +The layout of this style is not finished, if you want to use it give +me information about the correct margins and position of the elements. +\stopframedtext + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[swissleft][1]}{First page} + {\examplecontent[swissleft][2]}{Second page} + \stopcombination} + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-extension.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-extension.tex new file mode 100644 index 00000000000..a6fb1a71405 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-extension.tex @@ -0,0 +1,28 @@ +\startcomponent correspondence-letter-extension + +\environment correspondence-environment + +\chapter{Extensions} + +The letter module provides a special type of files, called extensions. +They provide functions that could be used by different files like the +labels for each language (\filename{label.nle}) or extra features for +one purpose like the page optimation (\filename{optimize.nle}). + +You can load extension files either with the letter module and write +their names as argument to the \type{extension} key or afterwards in +your file with the \type{useletterextension} command. + +\setup[useletterextension] + +The module comes itself with the following extensions: + +\starttabulate[|f{\bf}l|p|] +\NC label \NC Labeltexts for different languages \NC\NR +\NC pragma \NC Example content for Hans own letter module \NC\NR +\NC optimize \NC Increase or decrease the distance between + paragraphs to fill a page with at least 25\% + of the text height \NC\NR +\stoptabulate + +\stopcomponent 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 new file mode 100644 index 00000000000..8a307320eee --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-header.tex @@ -0,0 +1,107 @@ +\startcomponent correspondence-letter-header + +\environment correspondence-environment + +\startbuffer[firsthead] +\switchtobodyfont[6pt] +\setlettervalue[fromname] {Max Mustermann} +\setlettervalue[fromaddress]{Musterweg 12\\12345 Musterstadt} +\setlettervalue[fromphone] {1234/567890} +\setlettervalue[fromfax] {1234/567891} +\setlettervalue[fromemail] {max.mustermann@muster.com} +\setlettervalue[fromurl] {max.mustermann.com} +\stopbuffer + +\chapter{Header and Footer} + +\section{Header} + +\placefigure + [fixed] + {none} + {\setupcombinations[before=] + \startcombination[3*3] + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=no] + \letterelement[head][left] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC left \NC\AR + \NC fromrule \NC = \NC no \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=no] + \letterelement[head][middle] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC middle \NC\AR + \NC fromrule \NC = \NC no \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=no] + \letterelement[head][right] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC right \NC\AR + \NC fromrule \NC = \NC no \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=top] + \letterelement[head][left] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC left \NC\AR + \NC fromrule \NC = \NC top \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=top] + \letterelement[head][middle] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC middle \NC\AR + \NC fromrule \NC = \NC top \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=top] + \letterelement[head][right] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC right \NC\AR + \NC fromrule \NC = \NC top \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=bottom] + \letterelement[head][left] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC left \NC\AR + \NC fromrule \NC = \NC bottom \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=bottom] + \letterelement[head][middle] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC middle \NC\AR + \NC fromrule \NC = \NC bottom \NC\AR + \stoptable} + {\startsmallelement + \getbuffer[firsthead] + \setupletterstyle[head][fromrule=bottom] + \letterelement[head][right] + \stopsmallelement} + {\starttable[s1|r|c|l|] + \NC alternative \NC = \NC right \NC\AR + \NC fromrule \NC = \NC bottom \NC\AR + \stoptable} + \stopcombination} + +\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 new file mode 100644 index 00000000000..1b3bbb46dcd --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex @@ -0,0 +1,191 @@ +\startcomponent correspondence-letter-interface + +\environment correspondence-environment + +\chapter{Interface} + + + +% Default interface + +\startexamplecontent[interface:default] + +\setupletterstyle[option][backgroundcolor=] + +\startletter +\dorecurse{4}{\input knuth\par} +\stopletter + +\stopexamplecontent + +\start + +\startletter +\input knuth +\stopletter + +\stop + +\section{Default} + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[interface:default][1]}{First page} + {\examplecontent[interface:default][2]}{Second page} + \stopcombination} + +\setup[letter] + + +% Pragma interface + +\startexamplecontent[interface:pragma] + +\useletterinterface[pragma] + +\setupletterstyle[option][backgroundcolor=] + +\setups[letter:test] + +\startsetups[letter:content] +\dorecurse{6}{\input tufte\par} +\stopsetups + +\setups[letter:place] + +\stopexamplecontent + +\start + +\useletterinterface[pragma] + +\setups[letter:test] + +\setups[letter:place] + +\stop + +\section{Pragma} + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[interface:pragma][1]}{First page} + {\examplecontent[interface:pragma][2]}{Second page} + \stopcombination} + +\starttyping +\startbuffer[texletter] +... +\stopbuffer + +\setups[letter:place] +\stoptyping + + + +% Knuth interface + +\startexamplecontent[interface:knuth] + +\useletterinterface[knuth] + +\setupletterstyle[option][backgroundcolor=] + +\setuppapersize[A4][A4] + +\address +Prof.~Brian~K. Reid +Department of Electricial Engineering +Stanford University +Stanford, CA 94305 + +\body +Dear Prof.~Reid: + +I understand that you are having difficulties with +Alka-Seltzer tablets. Since there are 25~pills +per bottle, while the manufacturer's directions +recommend ``plop,~plop, fizz,~fizz,'' my colleagues +tell me that you have accumulated a substantial +number of bottles in which there is one tablet +left. % (See the 1978 SCRIBE User Manual, page 90.) + +\dorecurse{10} + {At present I am engaged in research on the potential + applications of isolated analgesics. If you would + be so kind as to donate your Alka||Seltzer collection + to our project, I would be more than happy to send + you preprints of any progress reports that we may + publish concerning this critical problem.\par} + +\closing +Sincerly, +R. J. Drofnats +Professor +\endletter + +\stopexamplecontent + +\start + +\useletterinterface[knuth] + +\setuppapersize[A4][A4] + +\address +Prof.~Brian~K. Reid +Department of Electricial Engineering +Stanford University +Stanford, CA 94305 + +\body +Dear Prof.~Reid: + +I understand that you are having difficulties with +Alka-Seltzer tablets. Since there are 25~pills +per bottle, while the manufacturer's directions +recommend ``plop,~plop, fizz,~fizz,'' my colleagues +tell me that you have accumulated a substantial +number of bottles in which there is one tablet +left. % (See the 1978 SCRIBE User Manual, page 90.) + +At present I am engaged in research on the potential +applications of isolated analgesics. If you would +be so kind as to donate your Alka||Seltzer collection +to our project, I would be more than happy to send +you preprints of any progress reports that we may +publish concerning this critical problem. + +\closing +Sincerly, +R. J. Drofnats +Professor +\endletter + +\stop + +\section{Knuth} + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[interface:knuth][1]}{First page} + {\examplecontent[interface:knuth][2]}{Second page} + \stopcombination} + +\starttyping +\address +... +\body +... +\closing +... +\endletter +\stoptyping + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-layout.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-layout.tex new file mode 100644 index 00000000000..9ac34484a9e --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-layout.tex @@ -0,0 +1,175 @@ +\startcomponent correspondence-letter-examples + +\environment correspondence-environment + +\chapter{Layout} + +The components for the letter can be divided in to groups, the first are letter layers, you can position them on the page wherever you want and it is also possible to put one layer bevor or behind another layer. + +The underliying machanism behind letter layers are \CONTEXT's normal layer mechanism in combination with localframed environments, this is a very powerful combination and you could create complicated layouts with them. + +The second group of components for the layout are letter sections, they are not as powerfule as letter layers and you have only a limited number of elements to control their layout. + +\setup[setupletterstyle:layout] + +\setup[setupletterstyle:option] + +\start + +\setupletter + [alternative=none] + +\setupletterstyle + [option] + [marking=off, + backaddress=yes] + +\setupletterstyle + [backaddress] + [bottomframe=off] + +\setupletterstyle + [head,foot,address,backaddress,reference] + [background=color, + backgroundcolor=darkgray, + backgroundoffset=-1.5pt] + +\startletter +\dontleavehmode +\stopletter + +\stop + +\section{Letter layers} + +Layer are used to position elements one page independant of the page layout. +They are used for the header and footer, address block\footnote{The block styles +use a different structure and use a letter section for the address block.} etc. + +The complete list of all available layers is: + +\startitemize[packed,columns,three] +\item head +\item letternext +\item lettermain +\item foot +\item address +\item reference +\item location +\item nexthead +\item lefthead +\item righthead +\item nextfoot +\item leftfoot +\item rightfoot +\item topmark +\item botmark +\item cutmark +\item endmark +\item usermark +\item backaddress +\stopitemize + +\starttyping +\setlayer[...]{\framed{...}} +\stoptyping + +The position and layout of the layers can be changed with the \type {\setupletterstyle} command. + +\starttyping +\setupframed[...][..,..=..,..] +\stoptyping + +\setup[setupletterlayer:frame] + +\starttyping +\setuplayer[...][..,..=..,..] +\stoptyping + +\setup[setupletterlayer:layer] + +\starttyping +\getparameters[...][..,..=..,..] +\stoptyping + +\setup[setupletterlayer:option] + +\start + +\definecolor[fakerulecolor][darkgray] + +\setupletterstyle + [reference] + [alternative=none] + +\setupletterstyle + [enclosure,copy,postscript] + [location=left,width=0pt,before=\nowhitespace,after=\nowhitespace] + +\setuplabeltext + [letter:enclosure=, + letter:copy=, + letter:postscript=] + +\setupletter + [title={\blackrule[width=\hsize,height=\lineheight,color=darkgray]}, + subject={\blackrule[width=\hsize,height=\lineheight,color=darkgray]}, + opening={\blackrule[width=\hsize,height=\lineheight,color=darkgray]}, + closing={\blackrule[width=.33\hsize,height=4\lineheight,color=darkgray]}, + appendices={\blackrule[width=.33\hsize,height=3\lineheight,color=darkgray]}] + +\setlettervalue[title] {\fakewords {5} {10}} +\setlettervalue[subject] {\fakewords {5} {10}} +\setlettervalue[opening] {\fakewords {3} {5}} +\setlettervalue[content] {\fakewords{100}{150}} +\setlettervalue[closing] {\fakewords {2} {4}} +\setlettervalue[enclosure] {\fakewords {3} {6}} +\setlettervalue[copy] {\fakewords {3} {6}} +\setlettervalue[postscript]{\fakewords {3} {6}} + +\startletter +\fakewords{100}{150} +\stopletter + +\stop + +\section{Letter sections} + +\startitemize[packed,columns,three] +\item letterhead\footnote[section:blockstyle]{Only used for the blockstyle layouts.} +\item dateline\note[section:blockstyle] +\item referenceline\note[section:blockstyle] +\item specialnotation\note[section:blockstyle] +\item insideaddress\note[section:blockstyle] +\item title +\item subject +\item opening +\item content +\item closing +\item appendices +\stopitemize + +You can change the layout of a letter section with the \type {\setupletterstyle} +command, the syntax is: + +\setup[setuplettersection] + +\start + +\definecolor[fakerulecolor][darkgray] + +\setupletterstyle + [reference] + [alternative=none] + +\startletter +\fakewords{100}{150} +\stopletter + +\stop + +\section{Letter descriptions} + +\setup[setupletterdescription] + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-reference.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-reference.tex new file mode 100644 index 00000000000..e4072840d40 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-reference.tex @@ -0,0 +1,746 @@ +\startcomponent correspondence-letter-reference + +\environment correspondence-environment + +% Text for each example + +\startbuffer[reference] + +\setupletterstyle + [whitespace=line] + +\setupletter + [name=Willi Maier, + phone=01234-56789, + fax=3456-9853, + date=\currentdate] + +\setupletter + [fromname={Max Mustermann}, + fromaddress={Musterstraße 12\\12345 Musterstadt}] + +\setupletter + [toname={Hans Hansen}, + toaddress={Zielgasse 23\\34789 New Mustertown}] + +\setupletter + [subject={Grund des Anschreibens}, + opening={Sehr geehrte Damen und Herren,}, + closing={Mit freundlichen Grüßen}] + +\stopbuffer + + + +% Chapter intro + +\chapter{Reference line} + +The reference lines is used to show information like the date and other information. + +A few styles are predefined and you can select them with: + +\starttyping +\setupletterstyle[reference][alternative=...] +\stoptyping + +By default only the current date is shown in the reference line but you can change +this with list key, you can give a single value or a comma list as argument. + +\starttyping +\setupletterstyle[reference][list=...] +\stoptyping + +For backward compatibility you could set both values also with the \type{\setupletter} +command which are passed down to the \type{\setupletterstyle} command. + +\starttyping +\setupletter + [alternative=..., + list=...] +\stoptyping + + + +% Alternative a + +\start + +\getbuffer[reference] + +\setupletter + [alternative=a, + list={name,phone,date}] + +\setupletter + [name,date,phone] + [titlestyle=\tfx] + +\startletter +\input knuth\par +\stopletter + +\stop + +\section{Alternative \type{a}} + +The reference alternative \type{a} is enabled with the default style, the only +value you can see is the date. The setup in the default style for the reference +line is like this: + +\starttyping +\setupletterstyle + [reference] + [alternative=a, + list=date] +\stoptyping + +This leads to the following output, you get two lines which are aligned to the right +side with a label in the current mainlanguage on the top line and the current date +on the bottom line. + +\start + +\startelement +\letterelement[reference][a] +\stopelement + +\stop + +You could also show more elements in the reference line when you write them +as argument the list key. + +\starttyping +\setupletterstyle + [reference] + [list={name,phone,date}] +\stoptyping + +The values are shown in the given order and spread across the line like below. +To get this effect you need a list with at least two elements, otherwise it +is moved to the right side lie you can see in the first example. + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][alternative=a,list={name,phone,date}] + +\startelement +\letterelement[reference][a] +\stopelement + +\stop + + + +% Alternative b + +\start + +\getbuffer[reference] + +\setupletter + [alternative=b, + list={yourref,yourmail,myref,mymail,line,name,room,phone,fax,line,date}] + +\setupletter + [yourref,yourmail,myref,mymail,line,name,room,phone,fax,line,date] + [titlestyle=\tfxx, + separator=: ] + +\setupletter + [yourref=, + yourmail={2880-01-15}, + myref={IV 1 - 24 00}, + mymail=, + name={Max Mustermann}, + phone={01234-56789}, + fax={3456-9853}, + date=\currentdate] + +\startletter +\input knuth\par +\stopletter + +\stop + +\section{Alternative \type{b}} + +\starttyping +\setupletterstyle + [reference] + [alternative=b] + +\setupletter[date][separator=: ] +\stoptyping + +\start + +\setupletter[date][separator=: ] + +\startelement +\letterelement[reference][b] +\stopelement + +\stop + +\starttyping +\setupletterstyle + [reference] + [alternative=b, + list={name,phone,date}] + +\setupletter + [name,phone,date] + [separator=: ] +\stoptyping + +\start + +\getbuffer[reference] + +\setupletter + [name,phone,date] + [%titlestyle=\tfxx, + separator=: ] + +\setupletterstyle[reference][list={name,phone,date}] + +\startelement +\letterelement[reference][b] +\stopelement + +\stop + +\starttyping +\setupletter + [name,phone,date] + [titlestyle=\tx, + separator=: ] +\stoptyping + +\start + +\getbuffer[reference] + +\setupletter + [name,phone,date] + [titlestyle=\tx, + separator=: ] + +\setupletterstyle[reference][list={name,phone,date}] + +\startelement +\letterelement[reference][b] +\stopelement + +\stop + + + +% Alternative c + +\start + +\getbuffer[reference] + +\setupletter + [alternative=c, + list=reference] + +\setupletter + [reference=\rightaligned{Place, \currentdate}] + +\startletter +\input knuth\par +\stopletter + +\stop + +\section{Alternative \type{c}} + +\starttyping +\setupletterstyle + [reference] + [alternative=c, + list=reference] + +\setupletter[reference=\rightaligned{\currentdate}] +\stoptyping + +\start + +\setupletterstyle[reference][list=reference] + +\setupletter[reference=\rightaligned{\currentdate}] + +\startelement +\letterelement[reference][c] +\stopelement + +\stop + +\starttyping +\setupletterstyle + [reference] + [alternative=c, + list=reference] + +\setupletter + [reference=\line{\lettervalue{name}\hfill\lettervalue{date}}] +\stoptyping + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][list=reference] + +\setupletter[reference=\line{\lettervalue{name}\hfill\lettervalue{date}}] + +\startelement +\letterelement[reference][c] +\stopelement + +\stop + +You could also use the alternative \type{c} to create your own reference line. + +The following example show you a way to create own similar the alternative \type{a} +but now with a natural table and a hard coded order of the elements. + +\starttyping +\setupletterstyle + [reference] + [alternative=c, + list=reference] + +\startsetups reference:customized + + \bTABLE[frame=off,offset=0pt,width=.25\hsize] + \bTR + \bTD \labeltext{letter:name} \eTD + \bTD \labeltext{letter:phone} \eTD + \bTD \labeltext{letter:fax} \eTD + \bTD \labeltext{letter:date} \eTD + \eTR + \bTR + \bTD \lettervalue{name} \eTD + \bTD \lettervalue{phone} \eTD + \bTD \lettervalue{fax} \eTD + \bTD \lettervalue{date} \eTD + \eTR + \eTABLE + +\stopsetups + +\setupletter + [reference=\setups{reference:customized}] +\stoptyping + +The code results in the following result. + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][list=reference] + +\startsetups reference:customized +\bTABLE[frame=off,offset=0pt,width=.25\hsize] + \bTR + \bTD \labeltext{letter:name} \eTD + \bTD \labeltext{letter:phone} \eTD + \bTD \labeltext{letter:fax} \eTD + \bTD \labeltext{letter:date} \eTD + \eTR + \bTR + \bTD \lettervalue{name} \eTD + \bTD \lettervalue{phone} \eTD + \bTD \lettervalue{fax} \eTD + \bTD \lettervalue{date} \eTD + \eTR +\eTABLE +\stopsetups + +\setupletter[reference=\setups{reference:customized}] + +\startelement +\letterelement[reference][b] +\stopelement + +\stop + + +% Alternative d + +\start + +\getbuffer[reference] + +\setupletter + [alternative=d, + list={yourref,yourmail,myref,mymail,line,name,room,phone,fax,line,date}] + +\setupletter + [yourref,yourmail,myref,mymail,line,name,room,phone,fax,line,date] + [titlestyle=\tfxx, + separator=: ] + +\setupletter + [yourref=, + yourmail={2880-01-15}, + myref={IV 1 - 24 00}, + mymail=, + name={Max Mustermann}, + phone={01234-56789}, + fax={3456-9853}, + date=\currentdate] + +\startletter +\input knuth\par +\stopletter + +\stop + +\section{Alternative \type{d}} + +\starttyping +\setupletterstyle + [reference] + [alternative=b] +\stoptyping + +\start + +\startelement +\letterelement[reference][d] +\stopelement + +\stop + +\starttyping +\setupletterstyle + [reference] + [alternative=d, + list={name,phone,date}] +\stoptyping + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][list={name,phone,date}] + +\startelement +\letterelement[reference][d] +\stopelement + +\stop + +\starttyping +\setupletter + [name,phone,date] + [separator=: ] +\stoptyping + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][list={name,phone,date}] + +\setupletter[name,phone,date][separator=: ] + +\startelement +\letterelement[reference][d] +\stopelement + +\stop + +\starttyping +\setupletter + [name,phone,date] + [titlestyle=\tx, + separator=: ] +\stoptyping + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][list={name,phone,date}] + +\setupletter[name,phone,date][titlestyle=\tx,separator=: ] + +\startelement +\letterelement[reference][d] +\stopelement + +\stop + + + +% Alternative e + +\start + +\getbuffer[reference] + +\setupletter + [alternative=e, + list={name,phone,date}] + +\setupletter + [name,date,phone] + [titlestyle=\tfx, + width=\dimexpr\textwidth/3\relax] + +\startletter +\input knuth\par +\stopletter + +\stop + +\section{Alternative \type{e}} + +\starttyping +\setupletterstyle + [reference] + [alternative=b] +\stoptyping + +\start + +\startelement +\letterelement[reference][e] +\stopelement + +\stop + +\starttyping +\setupletterstyle + [reference] + [alternative=e, + list={name,phone,date}] + +\setupletter + [name,date,phone] + [width=.25\textwidth] +\stoptyping + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][list={name,phone,date}] + +\setupletter[name,date,phone][width=.25\hsize] + +\startelement +\letterelement[reference][e] +\stopelement + +\stop + + + +% Alternative none + +\start + +\getbuffer[reference] + +\setupletterstyle[reference][alternative=none] + +\startletter +\input knuth\par +\stopletter + +\stop + +\section{Alternative \type{none}} + +The last alternative \type{none} is different from the previous alternatives. + +It disables the complete reference line and use as only alternative the values +from layout for the first page to the distance till the first line of the letter +while the other ignores this values and calculate it based on the position, height +and distance after the reference line. + +You choose in the same way as the other alternatives. + +\starttyping +\setupletterstyle + [reference] + [alternative=none] +\stoptyping + + + +% User defined line + +\start + +\getbuffer[reference] + +\defineletterelement[reference][customized] + {\setupTABLE [height=18mm,frame=off,offset=0pt]% + \setupTABLE[c][1,2] [width=50.8mm]% + \setupTABLE[c][3,4,5][width=25.4mm]% + \bTABLE + \bTR + \bTD[m=3] \labeltext{letter:fax} \\\lettervalue{fax} \eTD + \bTD \labeltext{letter:email} \\\lettervalue{email} \eTD + \eTR + \bTR + \bTD \labeltext{letter:yourref}\\\lettervalue{yourref} \eTD + \bTD \labeltext{letter:myref} \\\lettervalue{myref} \eTD + \bTD[nx=2] \labeltext{letter:phone} \\\lettervalue{phone} \eTD + \bTD \labeltext{letter:date} \\\lettervalue{date} \eTD + \eTR + \eTABLE} + +\setupletterstyle + [reference] + [alternative=customized, + voffset=\dimexpr80.4mm-\strutht\relax] + +\setupletterstyle + [firstpage] + [topspace=11.5cm] + +\setupletter + [yourref={2880-01-15}, + myref={IV 1 - 24 00}, + name={Max Mustermann}, + phone={01234-56789}, + fax={3456-9853}, + date={\currentdate[year,--,mm,--,dd]}] + +\startletter +\input knuth\par +\stopletter + +\stop + +\section{Customized reference line} + +\start\setuptyping[bodyfont=small] +\starttyping +\defineletterelement[reference][customized]% + {\setupTABLE [height=18mm,frame=off,offset=0pt]% + \setupTABLE[c][1,2] [width=50.8mm]% + \setupTABLE[c][3,4,5][width=25.4mm]% + \bTABLE + \bTR + \bTD[m=3] \labeltext{letter:fax} \\\lettervalue{fax} \eTD + \bTD \labeltext{letter:email} \\\lettervalue{email} \eTD + \eTR + \bTR + \bTD \labeltext{letter:yourref}\\\lettervalue{yourref} \eTD + \bTD \labeltext{letter:myref} \\\lettervalue{myref} \eTD + \bTD[nx=2] \labeltext{letter:phone} \\\lettervalue{phone} \eTD + \bTD \labeltext{letter:date} \\\lettervalue{date} \eTD + \eTR + \eTABLE} +\stoptyping +\stop + +%\starttyping +%\defineletterelement[reference][sideline]% +% {} +%\stoptyping + +\starttyping +\setupletterstyle + [firstpage] + [topspace=11.5cm] + +\setupletterstyle + [reference] + [alternative=customized] +\stoptyping + +\page[right] + +\starttyping +\defineletterelement[reference][customized]% + {\bTABLE[frame=off,offset=0pt,width=.25\hsize] + \bTR + \bTD \labeltext{letter:name} \eTD + \bTD \labeltext{letter:phone} \eTD + \bTD \labeltext{letter:fax} \eTD + \bTD \labeltext{letter:date} \eTD + \eTR + \bTR + \bTD \lettervalue{name} \eTD + \bTD \lettervalue{phone} \eTD + \bTD \lettervalue{fax} \eTD + \bTD \lettervalue{date} \eTD + \eTR + \eTABLE} +\stoptyping + +\page[left] + +\start + +\useletterstyle[dina] + +\getbuffer[reference] + +\defineletterelement[reference][sideline] + {\framed + [frame=off, + align={right,high}, + foregroundstyle=small, + width=4cm, + height=\textwidth] + {Vorname Nachname\\ + 01234/567890\\ + hans.meier@muster.de}} + +\setupletterstyle + [firstpage,secondpage] + [topspace=8cm, + width=13cm] + +\setupletterstyle + [reference] + [alternative=sideline, + hoffset=\dimexpr\backspace+\textwidth+1em\relax, + voffset=\topspace] + +\startletter +\input knuth\par +\stopletter + +\stop + +\starttyping +\defineletterelement[reference][sideline] + {\framed + [frame=off, + align={right,high}, + foregroundstyle=small, + width=4cm, + height=\textwidth] + {Vorname Nachname\\ + 01234/567890\\ + hans.meier@muster.de}} + +\setupletterstyle + [firstpage,secondpage] + [topspace=8cm, + width=13cm] + +\setupletterstyle + [reference] + [alternative=sideline, + hoffset=\dimexpr\backspace+\textwidth+1em\relax, + voffset=\topspace] +\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 new file mode 100644 index 00000000000..6c3026b98d7 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-pragma.tex @@ -0,0 +1,335 @@ +\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 new file mode 100644 index 00000000000..9bc48ce12ea --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-examples.tex @@ -0,0 +1,201 @@ +\startcomponent correspondence-resume-examples + +\environment correspondence-environment + + + +% short example for full page examples + +\startbuffer[resume:short] + +\setresumevalue[image] {\blackrule[width=25mm,height=25mm]} +\setresumevalue[firstname] {John} +\setresumevalue[familyname]{Doe} +\setresumevalue[title] {Resum\'e title (optional)} +\setresumevalue[quote] {Some quote (optional)} +\setresumevalue[street] {street and number} +\setresumevalue[town] {postcode city} +\setresumevalue[mobile] {mobile (optional)} +\setresumevalue[phone] {phone (optional)} +\setresumevalue[fax] {fax (optional)} +\setresumevalue[email] {email (optional)} +\setresumevalue[info] {additional information (optional)} + +\startresume + +\section{Education} + +\cventry{year--year}{Degree}{Institution}{City}{\it Grade}{Description} +\cventry{year--year}{Degree}{Institution}{City}{\it Grade}{Description} + +\section{Master thesis} + +\cvline{title}{\em Title} +\cvline{supervisors}{Supervisors} +\cvline{description}{\tx Short thesis abstract} + +\section{Experience} + +\subsection{Vocational} + +\cventry{year--year}{Job title}{Employer}{City}{}{Description} +%\cventry{year--year}{Job title}{Employer}{City}{}{Description} + +\subsection{Miscellaneous} + +\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\crlf Description line 2} + +\section{Languages} + +\cvlanguage{language 1}{Skill level}{Comment} +\cvlanguage{language 2}{Skill level}{Comment} +%\cvlanguage{language 3}{Skill level}{Comment} + +\stopresume + +\stopbuffer + +% long examples with two pages (included in the runnung text) + +\startbuffer[resume:long] + +\setupresumestyle[option][backgroundcolor=white,before=] + +\setresumevalue[image] {\blackrule[width=25mm,height=25mm]} +\setresumevalue[firstname] {John} +\setresumevalue[familyname]{Doe} +\setresumevalue[title] {Resum\'e title (optional)} +\setresumevalue[quote] {Some quote (optional)} +\setresumevalue[street] {street and number} +\setresumevalue[town] {postcode city} +\setresumevalue[mobile] {mobile (optional)} +\setresumevalue[phone] {phone (optional)} +\setresumevalue[fax] {fax (optional)} +\setresumevalue[email] {email (optional)} +\setresumevalue[info] {additional information (optional)} + +\startresume + +\section{Education} + +\cventry{year--year}{Degree}{Institution}{City}{\it Grade}{Description} +\cventry{year--year}{Degree}{Institution}{City}{\it Grade}{Description} + +\section{Master thesis} + +\cvline{title}{\em Title} +\cvline{supervisors}{Supervisors} +\cvline{description}{\tx Short thesis abstract} + +\section{Experience} + +\subsection{Vocational} + +\cventry{year--year}{Job title}{Employer}{City}{}{Description} +\cventry{year--year}{Job title}{Employer}{City}{}{Description} + +\subsection{Miscellaneous} + +\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\crlf Description line 2} + +\section{Languages} + +\cvlanguage{language 1}{Skill level}{Comment} +\cvlanguage{language 2}{Skill level}{Comment} +\cvlanguage{language 3}{Skill level}{Comment} + +\section{Computer skills} + +\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ} +\cvcomputer{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ} +\cvcomputer{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ} + +\section{Interests} + +\cvline{hobby 1}{\small Description} +\cvline{hobby 2}{\small Description} +\cvline{hobby 3}{\small Description} + +\section{Extra 1} + +\cvlistitem{Item 1} +\cvlistitem{Item 2} +\cvlistitem[+]{Item 3} + +\section{Extra 2} + +\cvlistdoubleitem[$\circ$]{Item 1}{Item 4} +\cvlistdoubleitem[$\circ$]{Item 2}{Item 5} +\cvlistdoubleitem[$\circ$]{Item 3}{} + +\stopresume + +\stopbuffer + + + +% intro text about the résumé example + +\chapter{Résumé Examples} + + + +% moderncv classic style + +\start + +\useresumestyle[classic] + +\getbuffer[resume:short] + +\stop + +\startexamplecontent[resume:classic] + +\useresumestyle[classic] + +\getbuffer[resume:long] + +\stopexamplecontent + +\section{Classic} + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[resume:classic][1]}{First page} + {\examplecontent[resume:classic][2]}{Second page} + \stopcombination} + + + +% moderncv cassual style + +\start + +\useresumestyle[casual] + +\getbuffer[resume:short] + +\stop + +\startexamplecontent[resume:casual] + +\useresumestyle[casual] + +\getbuffer[resume:long] + +\stopexamplecontent + +\section{Casual} + +\placefigure + [fixed] + {none} + {\startcombination + {\examplecontent[resume:casual][1]}{First page} + {\examplecontent[resume:casual][2]}{Second page} + \stopcombination} + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-interface.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-interface.tex new file mode 100644 index 00000000000..395821942bb --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-resume-interface.tex @@ -0,0 +1,237 @@ +\startcomponent lm-resume-interface + +\environment lm-environment + +\chapter{Interface} + +\page + +\section{Default} + +\setup[resume] + +\page + +\section{moderncv} + +The moderncv interface is based on the layout of the moderncv-package for \LaTeX{} +and with the same elements and styles. The difference between the \LaTeX{} and the +\ConTeXt-version is that you don't need a \type{\maketitle} command to place the +header for each style and it is placed by default. + +\startframedtext[width=\textwidth,framecolor=red,align=middle,corner=00] +The current implementation of the moderncv interface is written as resume style and +not as interface, this means you load it with \type{\useresumestyle} or as argument +for \type{\usemodule} with the style key. +\stopframedtext + +The available elements for the interface are described below. + +\subsubject{\tex{cvline}} + +The \type{\cvline} take two arguments, the first place the text in the left margin +and accepts only short entries, the second argument accepts longer texts which are +placed in the text area. You could change the distance after the entry with the +optional argument. + +\startnointerference +\setup[cvline] +\stopnointerference + +\starttyping +\cvline{...}{...} +\stoptyping + +The two lines + +\starttyping +\cvline{supervisors}{Supervisors} +\cvline{description}{\tx Short thesis abstract} +\stoptyping + +results in + +\start + +\useresumestyle[modern] + +\startelement +\cvline{supervisors}{Supervisors} +\cvline{description}{\tx Short thesis abstract} +\stopelement + +\stop + +\subsubject{\tex{cvlistitem}} + +The \type{\cvlistitem} is similar to the \type{\cvline} command above but it +takes only one argument which is placed in the text area. In the left margin +appear a symbol like a itemize, you could change this symbol with the optional +argument before the text. + +\startnointerference +\setup[cvlistitem] +\stopnointerference + +\starttyping +\cvlistitem[<symbol>]{...} +\stoptyping + +The two example line below + +\starttyping +\cvlistitem{Item 1} +\cvlistitem[+]{Item 2} +\stoptyping + +result in the following output + +\start + +\useresumestyle[modern] + +\startelement +\cvlistitem{Item 1} +\cvlistitem[+]{Item 2} +\stopelement + +\stop + +\subsubject{\tex{cvlistdoubleitem}} + +The \type{\cvlistdoubleitem} is a enhanced version of the \type{\cvlistitem} command +and place two text side by side, if you change the symbol it affects the symbol for +both texts. + +\startnointerference +\setup[cvlistdoubleitem] +\stopnointerference + +\starttyping +\cvlistdoubleitem[<symbol>]{...}{...} +\stoptyping + +As you can see in the next example you have to write the text in two command if you +want one below the other. + +\starttyping +\cvlistdoubleitem[$\circ$]{Item 1}{Item 3} +\cvlistdoubleitem[$\circ$]{Item 2}{Item 4} +\stoptyping + +You can see this in the output from the example above. + +\start + +\useresumestyle[modern] + +\startelement +\cvlistdoubleitem[$\circ$]{Item 1}{Item 3} +\cvlistdoubleitem[$\circ$]{Item 2}{Item 4} +\stopelement + +\stop + +\subsubject{\tex{cventry}} + +The \type{\cventry} has six argument and prints the argument two to five in the first +line of the text with a certain format for each text and separates them with commas. +The first argument is typed in the left margin and the last in the text on a separate +line. + +\startnointerference +\setup[cventry] +\stopnointerference + +\starttyping +\cventry{...}{...}{...}{...}{...}{...} +\stoptyping + +Two possible settings for the arguments are: + +\starttyping +\cventry{year--year}{Degree}{Institution}{City}{\it Grade}{Description} +\cventry{year--year}{Job title}{Employer}{City}{}{Description} +\stoptyping + +This results in the time period in the left margin and the information in the text. + +\start + +\useresumestyle[modern] + +\startelement +\cventry{year--year}{Degree}{Institution}{City}{\it Grade}{Description} +\cventry{year--year}{Job title}{Employer}{City}{}{Description} +\stopelement + +\stop + +\subsubject{\tex{cvlanguage}} + +The \type{\cvlanguage} behaves also line the \type{\cvline} command but take +a third argument which can be used for additional information in the right margin. + +\startnointerference +\setup[cvlanguage] +\stopnointerference + +\starttyping +\cvlanguage{...}{...}{...} +\stoptyping + +The following example + +\starttyping +\cvlanguage{language 1}{Skill level}{Comment} +\cvlanguage{language 2}{Skill level}{Comment} +\stoptyping + +results in: + +\start + +\useresumestyle[modern] + +\startelement +\cvlanguage{language 1}{Skill level}{Comment} +\cvlanguage{language 2}{Skill level}{Comment} +\stopelement + +\stop + +\subsubject{\tex{cvcomputer}} + +The \type{\cvcomputer} command is a enhanced version of the \type{\cvlistdoubleitem} +with two explicit argument for the label text which is written on the left of each entry. + +\startnointerference +\setup[cvcomputer] +\stopnointerference + +\starttyping +\cvcomputer{...}{...}{...}{...} +\stoptyping + +As you can see in the first and third argument a label is written to describe text +category of each entry. + +\starttyping +\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 3}{XXX, YYY, ZZZ} +\cvcomputer{category 2}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ} +\stoptyping + +This produce the following output. + +\start + +\useresumestyle[modern] + +\startelement +\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 3}{XXX, YYY, ZZZ} +\cvcomputer{category 2}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ} +\stopelement + +\stop + +\stopcomponent 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 new file mode 100644 index 00000000000..4dbe8bfd540 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-revision.tex @@ -0,0 +1,31 @@ +\startcomponent correspondence-revision + +\environment correspondence-environment + +\chapter{File versions} + +The letter module comes as a package with many different files +and each of them has their own version tag, you could read this +version tag at the bottom of each file in the field date. + +\setuptabulate[header=repeat] + +\starttabulatehead +\NC \bf File \NC \bf Revision \NC \bf Description \NC\NR +\stoptabulatehead + +\startluacode +tex.sprint(tex.ctxcatcodes,"\\starttabulate[|l|l|l|]") +for k,v in pairs(thirddata.correspondence.files) do + tex.sprint(tex.ctxcatcodes,"\\NC") + tex.sprint(tex.ctxcatcodes,thirddata.correspondence.files[k]["name"]) + tex.sprint(tex.ctxcatcodes,"\\NC") + tex.sprint(tex.ctxcatcodes,thirddata.correspondence.files[k]["version"]) + tex.sprint(tex.ctxcatcodes,"\\NC") + tex.sprint(tex.ctxcatcodes,thirddata.correspondence.files[k]["description"]) + tex.sprint(tex.ctxcatcodes,"\\NC\\NR") +end +tex.sprint(tex.ctxcatcodes,"\\stoptabulate") +\stopluacode + +\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 new file mode 100644 index 00000000000..6800b3ce568 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex @@ -0,0 +1,50 @@ +\startproduct correspondence + +\environment correspondence-environment + +\startfrontmatter + +\TitlePage + +\completecontent + +\component correspondence-introduction + +\stopfrontmatter + +\startbodymatter + +\part{Letters} + +\component correspondence-letter-beginner +\component correspondence-letter-interface +\component correspondence-letter-layout +\component correspondence-letter-extension +\component correspondence-letter-reference +\component correspondence-letter-header +\component correspondence-letter-examples + +\part{Résumés} + +\component correspondence-resume-interface +\component correspondence-resume-examples + +\stopbodymatter + +\startappendices + +\CommandList + +\component correspondence-revision + +\completeindex + +\stopappendices + +\startbackmatter + +\LastPage + +\stopbackmatter + +\stopproduct 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]}, |