diff options
author | Karl Berry <karl@freefriends.org> | 2009-09-22 23:11:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-09-22 23:11:54 +0000 |
commit | bf4ad04d2d2b2a023941978351308eeec0b042c5 (patch) | |
tree | 823bac03737b23c9de32af527c727d9116f6094e /Master/texmf-dist/source/context | |
parent | c1792da9fa440897dcd52010203fd995e6c338cd (diff) |
context-letter update (22sep09)
git-svn-id: svn://tug.org/texlive/trunk@15426 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/context')
9 files changed, 221 insertions, 41 deletions
diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex index fee67158a03..bc7faf1087f 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-environment.tex @@ -21,9 +21,7 @@ \setupcolors[state=start] -\definecolor[lettercolor][green] -\definecolor[lettercolor][h=BBD0B4] -%\definecolor[lettercolor][h=E7DDAF] +\definecolor[lettercolor] [h=BBD0B4] \definecolor[fakerulecolor][darkgray] \definecolor[twhite][r=1,g=1,b=1,t=.75,a=1] @@ -36,8 +34,6 @@ %%%% Hyperlinks etc. -\appendtoks\def\\{ }\to\simplifiedcommands - \setupinteraction [state=start, title={Correspondence with ConTeXt}, @@ -65,11 +61,9 @@ %%%% Schriften -\definefontfeature[default][default][mode=node,expansion=quality,protrusion=quality] - \startmode[wolf] -\setupsimplefonts[size=11pt] +\setupsimplefonts[size=11pt,expansion=quality,protrusion=quality] \setmainfont[Lucida Bright] \setsansfont[Lucida Sans] @@ -77,21 +71,19 @@ \setupbodyfontenvironment[default][em=italic] -\definefontfamily[examplefont][Delicious] +\definesimplefonttypeface[examplefont][Delicious] \stopmode \startnotmode[wolf] -\definefontfeature[default][default][mode=node,expansion=quality,protrusion=quality] - -\setupsimplefonts[size=12pt] +\setupsimplefonts[size=11pt,expansion=quality,protrusion=quality] \setmainfont[TeX Gyre Pagella] \setsansfont[Latin Modern Sans] \setmonofont[Latin Modern Mono] -\definefontfamily[examplefont][Latin Modern Sans] +\definesimplefonttypeface[examplefont][Latin Modern Sans] \stopnotmode @@ -172,6 +164,10 @@ %% Seitennummerierung +\definestructureconversionset [pagenumber] [] [numbers] + +\setupuserpagenumber[numberconversionset=pagenumber] + \setuppagenumbering [alternative=doublesided, location=footer] diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-background.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-background.tex new file mode 100644 index 00000000000..d0b0613f555 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-background.tex @@ -0,0 +1,128 @@ +\startcomponent correspondence-letter-background + +\environment correspondence-environment + +\chapter{Background} + +There are different ways to customize the look of a letter, they are namely the +\startitemize[text,a][lefttext=,righttext=,stopper={)}] +\item layout of the page, +\item the font for the main text and the styles for each element and +\item the header and the other information blocks. +\stopitemize +Another option is the stationary which you use for the printed result, you could +use either already preprinted paper or what will be described in the following chapter +create your own with ConTeXt. Three different methods are available to do this: + +\startitemize[a,packed][stopper={)}] +\item color, +\item images, +\item user created backgrounds. +\stopitemize + +% backgroundcolor + +\start + +\setupletterstyle[backgroundcolor=gray] + +\startletter +\input knuth +\stopletter + +\stop + +\section{Backgroundcolor} + +Setting a color for the background is the first method to customize the layout of the letter background, +you can see result of the following code in the example on the left page and all other full page letters +in this document. + +\starttyping +\setupcolors[state=start] + +\setupletterstyle[backgroundcolor=gray] + +\startletter +Thus, I came to the conclusion ... +\stopletter +\stoptyping + +When you use {\em backgroundcolor} in combination with the other methods it's important to know the backgroundcolor +is always behind the other elements. + +% backgroundimage + +\start + +\setupletterstyle[backgroundimage=954380_42830609] + +\startletter +\input knuth +\stopletter + +\stop + +\section{Backgroundimages} + +The second mathod is to use a graphic as background for the letter, the example on the left page is created +with the following code, take care the argument is existing figure or you will get \ConTeXt’s usual placeholder +for missing figures. + +\starttyping +\setupletterstyle[backgroundimage=example] + +\startletter +Thus, I came to the conclusion ... +\stopletter +\stoptyping + +When you take a look in the source you will see the module use \type{\overlayfigure} to stretch the graphic +to the size of the paper, it’s up to the user to provide a graphic with the correct width|/|height ration and +a resultion which is high enough to aviud artefacts. + +% background + +\start + +\startuseMPgraphic{dactylus} +draw unitsquare xyscaled (OverlayWidth-2cm,OverlayHeight-2cm) smoothed 1cm withpen pencircle scaled 2 ; +fill fullcircle scaled 1.5cm shifted (1cm,1cm) withcolor \MPcolor{orange} ; +\stopuseMPgraphic + +\setupletterstyle + [backgroundcolor=, + background=\useMPgraphic{dactylus}] + +\startletter +\input knuth +\stopletter + +\stop + +\section{Backgrounds} + +As third and last method you can use the {\em background} parameter which is nothing more than a overlay +which is placed in the background. A example where a graphic is drawn with \MetaPost\ is shown below with +the result on the left page. + +\starttyping +\startuseMPgraphic{dactylus} +draw unitsquare xyscaled (OverlayWidth-2cm,OverlayHeight-2cm) + smoothed 1cm withpen pencircle scaled 2 ; +fill fullcircle scaled 1.5cm shifted (1cm,1cm) + withcolor \MPcolor{orange} ; +\stopuseMPgraphic + +\setupletterstyle[background=\useMPgraphic{dactylus}] + +\startletter +Thus, I came to the conclusion ... +\stopletter +\stoptyping + +You could use this method also to place normal graphic from a external file \type{\externalfigure} +where you have nore detailed control over the figure size etc. It's also possible to define different +background for the first and the second page but the user has to take care of this himself. + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex index 03c3a467e7a..d4f8f27a9d1 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-beginner.tex @@ -340,7 +340,7 @@ How to adjust the space between the closing line and the signature for this way \input knuth\par -\ps{Posctscript} +\ps{Postscript} \stopletter diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex index 7929972cf5a..39cf98d07c0 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-examples.tex @@ -80,7 +80,7 @@ This section will give you a overview of all included styles you could use with \stopexamplecontent -\section{DIN 676 B}\index{DIN 676 B} +\section[letter:example:dinb]{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. @@ -112,7 +112,7 @@ The letter style \filename{dinb} is the defualt style for the module and is used \stopexamplecontent -\section{DIN 676 A}\index{DIN 676 A} +\section[letter:example:dina]{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. @@ -144,7 +144,7 @@ The second style \filename{dina} follows the same rules as the style \filename{d \stopexamplecontent -\section{NEN 1026}\index{NEN 1026} +\section[letter:example:dutch]{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. @@ -178,7 +178,7 @@ The third style supported by the letter module is for dutch letters, the name of \stopexamplecontent -\section{French} +\section[letter:example:french]{French} The french style is based on values given to me by Olivier Guéry. @@ -210,7 +210,7 @@ The french style is based on values given to me by Olivier Guéry. \stopexamplecontent -\section{Full-block Style}\index{Full-block} +\section[letter:example:fullblock]{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 @@ -247,7 +247,7 @@ subject line, body, complimentary close, signature and additional information. \stopexamplecontent -\section{Modified Block Style}\index{Modified} +\section[letter:example:modified]{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. @@ -280,7 +280,7 @@ signature and closing moved to the right, which allows them to stand. \stopexamplecontent -\section{Semiblock Style}\index{Semiblock} +\section[letter:example:semiblock]{Semiblock Style}\index{Semiblock} The semiblock style is the format most people recognize as business letter. @@ -316,7 +316,7 @@ value for \type{\setupindenting} to indent the paragraphs.}. \stopexamplecontent -\section{Simplified Style}\index{Simplified} +\section[letter:example:simplified]{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. @@ -352,7 +352,7 @@ is the body of the letter. \stopexamplecontent -\section{Hanging indented Style}\index{Hanging} +\section[letter:example:hanging]{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. @@ -385,7 +385,7 @@ is that it calls attention to the body and each paragraph. \stopexamplecontent -\section{Memo Style}\index{Memo} +\section[letter:example:memo]{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 @@ -426,7 +426,7 @@ near the center with the additional information at the left margin. \stopexamplecontent -\section{English Style} +\section[letter:example:english]{English Style} \placefigure [force,none] @@ -458,7 +458,7 @@ near the center with the additional information at the left margin. \stopexamplecontent -\section{Swiss Style A} +\section[letter:example:swiss]{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 @@ -493,7 +493,7 @@ me information about the correct margins and position of the elements. \stopexamplecontent -\section{Swiss Style B} +\section[letter:example:swissleft]{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 diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex index a714b3b975e..bda80c6012b 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-interface.tex @@ -1,21 +1,10 @@ \startcomponent correspondence-letter-interface -%\environment correspondence-environment - -\usemodule[letter] - -\ifx\startexamplecontent\undefined - - \def\startexamplecontent {\gobbleuntil\stopexamplecontent} - \def\examplecontent {\dodoubleempty\doexamplecontent} - \def\doexamplecontent[#1][#2]{\framed[width=6cm,height=8cm]{}} - -\fi +\environment correspondence-environment \chapter{Interface} - % Default interface \startexamplecontent[interface:default] @@ -119,7 +108,7 @@ 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 +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.) @@ -158,7 +147,7 @@ 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 +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.) diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-pagenumber.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-pagenumber.tex new file mode 100644 index 00000000000..15a979da3ee --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-pagenumber.tex @@ -0,0 +1,30 @@ +\startcomponent correspondence-letter-pagenumer + +\environment correspondence-environment + +\start + +\startsetups letter:foot +\midaligned{Page \correspagenumber\ of \numberofcorrespages} +\stopsetups + +\startletter +\input knuth +\stopletter + +\stop + +\chapter{Pagenumbering} + +\starttyping +\correspagenumber +\numberofcorrespages +\stoptyping + +\starttyping +\startsetups letter:head +\rightaligned{Page \correspagenumber\ of \numberofcorrespages} +\stopsetups +\stoptyping + +\stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-styles.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-styles.tex new file mode 100644 index 00000000000..db2abe25426 --- /dev/null +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-letter-styles.tex @@ -0,0 +1,30 @@ +\startcomponent correspondence-letter-styles + +\environment correspondence-environment + +\chapter{Styles} + +The already comes with a few predefined styles, to use them write the name in the second +column either as argument to {\em style} when you load the module or later in your document +with \type{\useletterstyle}. + +\starttabulate[|l|l|l|] +\NC \bf Description \NC \bf Name \NC \bf Page \NC\NR +\NC German style DIN 676 A \NC dina \NC \at[letter:example:dina] \NC\NR +\NC German style DIN 676 B \NC dinb \NC \at[letter:example:dinb] \NC\NR +\NC Dutch letter style \NC dutch \NC \at[letter:example:dutch] \NC\NR +\NC French letter style \NC french \NC \at[letter:example:french] \NC\NR +%\NC English letter style \NC english \NC \at[letter:example:english] \NC\NR +\NC Full-block \NC fullblock \NC \at[letter:example:fullblock] \NC\NR +\NC Semiblock \NC semiblock \NC \at[letter:example:semiblock] \NC\NR +\NC Modified block \NC modified \NC \at[letter:example:modified] \NC\NR +\NC Hanging intended \NC hanging \NC \at[letter:example:hanging] \NC\NR +\NC Memo style \NC memo \NC \at[letter:example:memo] \NC\NR +\NC Simplified style \NC simplified \NC \at[letter:example:simplified] \NC\NR +\NC Swiss style \NC swiss \NC \at[letter:example:swiss] \NC\NR +\NC Swiss left style \NC swissleft \NC \at[letter:example:swissleft] \NC\NR +\stoptabulate + +The result of each page can be found on the pages shown in the third column. + +\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 index c174ff8fe37..5420e02f79e 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence-revision.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence-revision.tex @@ -8,6 +8,8 @@ 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. +\start + \setuptabulate[header=repeat] \starttabulatehead @@ -29,4 +31,6 @@ end global.context.stoptabulate() \stopmodulecode +\stop + \stopcomponent diff --git a/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex b/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex index 1a61c8b3764..5a91ce3cb7c 100644 --- a/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex +++ b/Master/texmf-dist/source/context/third/letter/doc/correspondence.tex @@ -21,6 +21,9 @@ \component correspondence-letter-layout \component correspondence-letter-extension \component correspondence-letter-values +\component correspondence-letter-background +\component correspondence-letter-pagenumber +\component correspondence-letter-styles \component correspondence-letter-reference \component correspondence-letter-header \component correspondence-letter-examples |