Changes

Jump to navigation Jump to search
220 bytes removed ,  07:35, 13 January 2014
adaptions to current letter module
< [[Sample documents]] | [[Letter]]
This is my invoice setup, it works with MkIV as of 20112014-1201.
It’s an application of Wolfgang’s letter module with a lot of tweaks that I could never think of on my own.
\setuplanguage [de] [date={year, –, mm, –, dd}] % ISO 8601 date
\usemodule[simplefonts]\setmainfont[Gentium Basic][expansion=quality,protrusion=quality]\setsansfont[Delicious][scale=0.9]\setupbodyfont[rm,9.5pt10pt]
\setupinterlinespace[3.0ex] % default: 2.8ex
\setbreakpoints[compound] % break at / and -
 
\setupletteroptions
[language=german, % de
bodyfont={rm,10pt},
whitespace=1.5ex, %3ex
]
\setuptabulate[distance=0pt]
% Sender address in envelope window
backaddress={\MyCompany\ · My Name · Samplestr.\,11 · CH-1234 Village}
]
 
% Use the sender address line, but not the default subject line
\setupletterstyle[backaddress=yes,reference=no]
 
% We put our logo in the head
\setupletterstyle[head,nexthead][
hoffset=128mm,
voffset=0pt,
alternative=fiee,
]
% Define logo for the first page
\defineletterelement[layer][head][fiee]{%{\framed[background=logo,height=35mm,frame=off,align=right]%{\vbox{\par\blank[15mm]\par\externalfigure[schriftzug]}} }
% Other logo for subsequent (right) pages
\defineletterelement[layer][nexthead][fiee]{%{\externalfigure[logo][height=2cm, width=6cm]}
% We put our logo in the head\setupletterstylesetupletterlayer[head,nexthead][ statex=128mm, y=15mm, alternative=rightfiee,
]
% We don't really use this\copyletterelementsetupletterlayer[locationnexthead][fiee][reference][d] \setupletterstyle[location][ hoffset=128mm, voffset=3cm, alternative=fiee, liststate={name,street,city,phone,email,web,skype}right]
\setupletter[
% center around the :
\startsetups letter:defineletterelement[layer][location][fiee]% {\tfx\itsetuptabulate[bodyfont=small] \starttabulate[|rwIrw(39mm5em)|pIp|] \NC name person \NC\lettervaluecorrespondenceparameter{name} \NC\NR \NC location address \NC\lettervaluecorrespondenceparameter{street}\\\lettervaluecorrespondenceparameter{city}\NC\NR \NC phone \NC\lettervaluecorrespondenceparameter{phone}\\\lettervaluecorrespondenceparameter{mobile} \NC\NR \NC internet \NC\lettervaluecorrespondenceparameter{email}\\\lettervaluecorrespondenceparameter{web} \NC\NR \NC skype \NC\lettervaluecorrespondenceparameter{skype} \NC\NR\stoptabulate\stopsetups}
\setupletterlayer[location]
[alternative=fiee,
x=152mm,
y=30mm
]
\setupletterstyle[address][alternative=fiee]
% Our own recipient setup without too much space before the address
\defineletterelement[layer][address][fiee]% {\setupinterlinespace\blank\lettervaluecorrespondenceparameter{toname}\\ \lettervaluecorrespondenceparameter{toaddress} \par} \setupletterlayer[address][alternative=fiee]
% Subject and date on the same line, date below logo
\startsetups [letter:section:subject] \bTABLE[frame=off] \bTR \bTD[width=\dimexpr169mm-\backspace\relax]\lettervaluecorrespondenceparameter{subject}\eTD \bTD{\tf\lettervaluecorrespondenceparameter{date}}\eTD % auto date %\bTD{\tf 2011-11-14}\eTD % manual date \eTR \eTABLE
\stopsetups
 
\setuplettersection[subject][alternative=setups]
% account information at the foot, below the logo
\defineletterelement[layer][foot][fiee]% {\tfx\it% \starttabulatesetuptabulate[|rw(5em)a{{\tf~:}}|p|bodyfont=small] \starttabulate[|rwIrw(39mm)|pIp|] \NC account accounts \NC \NC\NR \NC Swiss \NC 12-34567-89 account \NC123\NR \NC IBAN \NC CH12,456\,1234789\,5678\Postbank,0000BLZ 360\,1234100\,X 00 \NC\NR \NC German IBAN \NC Kto. 111DE00\,2223601\,333\0000\Fraudbank, BLZ 1100123\,1104567\,10 89 \NC\NR \NC IBAN BIC \NC DE11\,1234\,0000\,1234\,9999\,12 PBNKDEFF \NC\NR \stoptabulate \crlf}
\setupletterstylesetupletterlayer[foot][
preset=leftbottom,
hoffsetx=130mm127mm, voffsety=3.4cm34mm, alternative=fiee,]
% switch off reference line
\setupletterstylesetupletterlayer[reference][alternativestate=nonestop]
% Move the text a bit up
\setupletterstylesetupletterlayout[firstpage][ topspace=10cm]
% Adjust text start on subsequent pages
\setupletterstylesetupletterlayout[secondpage][ topspace=3cm,]
% Move marks to the paper rim (won't print on most printers)
\setupletterstylesetupletterlayer[topmark,botmark,cutmark][ hoffsetx=-2mm]
</texcode>
\setupletter[
% Recipient
%toname={Pragma ADE\\Mr.\\,Hans Hagen},toaddress={Ridderstraat 27\\8061GH Hasselt NL},
% here I keep commented all of my few customers
subject={Invoice No.\,99/2014}
%subject={Reminder on invoice No.\,1/2014}
]
\starttext
\startletter[subject={Invoice No.\,99/2011}]%\startletter[subject={Reminder on invoice No.\,1/2011}]
Special services in December 20112013:
{
}
Due on 1.\,1.\20122014. Earlier is nicer.
\blank[2*big]
\MyCompany\ bedankt sich für den Auftragthanks for your order.
\blank[2*big]
Mit freundlichen GrüßenBest regards,
\externalfigure[signature]
\stopletter
 
\stoptext
</texcode>
gardener
1,096

edits

Navigation menu