summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/context/third/account/account-doc.pdfbin0 -> 115510 bytes
-rw-r--r--Master/texmf-dist/tex/context/interface/third/account.xml147
-rw-r--r--Master/texmf-dist/tex/context/third/account/t-account.tex451
-rw-r--r--Master/texmf-dist/tpm/t-account.tpm27
-rw-r--r--Master/tlpkg/tlpsrc/collection-context.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/context-account.tlpsrc5
6 files changed, 631 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/context/third/account/account-doc.pdf b/Master/texmf-dist/doc/context/third/account/account-doc.pdf
new file mode 100644
index 00000000000..a40c0262f80
--- /dev/null
+++ b/Master/texmf-dist/doc/context/third/account/account-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/context/interface/third/account.xml b/Master/texmf-dist/tex/context/interface/third/account.xml
new file mode 100644
index 00000000000..e07da8d1efb
--- /dev/null
+++ b/Master/texmf-dist/tex/context/interface/third/account.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2006.07.14">
+
+<cd:command name="debits" type="environment" file="wolf-mis">
+ <cd:sequence>
+ <cd:string value="DEBITS"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:assignments list="yes">
+ <cd:parameter name="color">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+</cd:command>
+
+<cd:command name="debit" file="wolf-mis.tex">
+ <cd:sequence>
+ <cd:string value="debit"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:text"/>
+ </cd:keywords>
+ <cd:content/>
+ </cd:arguments>
+</cd:command>
+
+<cd:command name="credits" type="environment" file="wolf-mis">
+ <cd:sequence>
+ <cd:string value="CREDITS"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:assignments list="yes">
+ <cd:parameter name="color">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+</cd:command>
+
+<cd:command name="credit" file="wolf-mis.tex">
+ <cd:sequence>
+ <cd:string value="credit"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:keywords optional="yes">
+ <cd:constant type="cd:text"/>
+ </cd:keywords>
+ <cd:content/>
+ </cd:arguments>
+</cd:command>
+
+<cd:command name="account" type="environment" file="wolf-mis">
+ <cd:sequence>
+ <cd:string value="ACCOUNT"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments optional="yes" list="yes">
+ <cd:inherit name="setupACCOUNT"/>
+ </cd:assignments>
+ </cd:arguments>
+</cd:command>
+
+<cd:command name="setupaccount" file="wolf-mis.tex">
+ <cd:sequence>
+ <cd:string value="setupACCOUNT" />
+ </cd:sequence>
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments list="yes">
+ <cd:parameter name="frame">
+ <cd:constant type="on"/>
+ <cd:constant type="off" default="yes"/>
+ <cd:constant type="none"/>
+ <cd:constant type="overlay"/>
+ </cd:parameter>
+ <cd:parameter name="background">
+ <cd:constant type="screen"/>
+ <cd:constant type="color"/>
+ <cd:constant type="none"/>
+ <cd:constant type="foreground"/>
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="backgroundscreen">
+ <cd:constant type="cd:number"/>
+ </cd:parameter>
+ <cd:parameter name="backgroundcolor">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="backgroundoffset">
+ <cd:constant type="frame"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="rulethickness">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="framecolor">
+ <cd:constant type="cd:name"/>
+ </cd:parameter>
+ <cd:parameter name="offset">
+ <cd:constant type="none"/>
+ <cd:constant type="overlay"/>
+ <cd:constant type="default"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="width">
+ <cd:constant type="fit" default="yes"/>
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ <cd:parameter name="left">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="middle">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="right">
+ <cd:constant type="cd:text"/>
+ </cd:parameter>
+ <cd:parameter name="distance">
+ <cd:constant type="cd:dimension"/>
+ </cd:parameter>
+ </cd:assignments>
+ </cd:arguments>
+</cd:command>
+
+<cd:command name="defineaccount" file="wolf-mis.tex">
+ <cd:sequence>
+ <cd:string value="defineACCOUNT"/>
+ </cd:sequence>
+ <cd:arguments>
+ <cd:keywords>
+ <cd:constant type="cd:name"/>
+ </cd:keywords>
+ <cd:assignments optional="yes" list="yes">
+ <cd:inherit name="setupACCOUNT"/>
+ </cd:assignments>
+ </cd:arguments>
+</cd:command>
+
+</cd:interface>
diff --git a/Master/texmf-dist/tex/context/third/account/t-account.tex b/Master/texmf-dist/tex/context/third/account/t-account.tex
new file mode 100644
index 00000000000..fd5904dc819
--- /dev/null
+++ b/Master/texmf-dist/tex/context/third/account/t-account.tex
@@ -0,0 +1,451 @@
+%D \module
+%D [ file=t-account,
+%D version=2007.01.15,
+%D title=\CONTEXT\ User Module,
+%D subtitle=Miscelaneous,
+%D author=Wolfgang Schuster,
+%D date=\currentdate,
+%D copyright=Public Domain]
+
+%M \usemodule [account]
+%M \loadsetups[account.xml]
+
+\writestatus{loading}{Context User Module / Miscelaneous}
+
+\unprotect
+
+\def\????ac{@@@@ac} % ACcount
+
+%D This is the second version of my T-Account module. If I want
+%D to be true I wrote this module the n-th time but the current
+%D version is my second version that has all things implemented
+%D that I wanted and is written as a real \CONTEXT\ module and
+%D in a simple plain \TEX\ style, although it is sometimes better
+%D to try writing things for plain \TEX\ and creating an extended
+%D for \CONTEXT\ later, after everything works.
+
+%D The next two count registers save the values for the values
+%D from the \tex{debit} and \tex{credit} macros. You can output
+%D the values at the end of the account.
+
+\newcount\!!creditsum
+\newcount\!!debitsum
+
+%D The following dimens are needed to save the textwidth in the
+%D first run with my account parser and feed these values into
+%D the account boxes, most of them only needed for the
+%D \mono{width=fit} option.
+
+\newdimen\!!debitwidth
+\newdimen\!!debitheight
+\newdimen\!!creditwidth
+\newdimen\!!creditheight
+\newdimen\!!accountwidth
+\newdimen\!!accountheight
+\newdimen\!!debittextwidth
+\newdimen\!!debitnumberwidth
+\newdimen\!!credittextwidth
+\newdimen\!!creditnumberwidth
+
+%D I collect the content from the debit environment in an box and
+%D put the content into the main box, after all values are collected.
+%D The same happens for the credit environment and his content.
+
+\newbox\debitbox
+\newbox\creditbox
+
+%D And the last thing is a private token register to save the account
+%D content and use it for both parsing the content and using it afterwards
+%D to fill the box with the processed content.
+
+\newtoks\accounttoks
+
+%D This nice thing was taken from \mono{core-rul.tex}.
+
+\def\accountparameter#1%
+ {\csname\@@account#1\endcsname}
+
+%D \macros{startACCOUNT,stopACCOUNT}
+%D
+%D \showsetup{startaccount}
+
+%D My first version used a buffers to store the content between the
+%D \tex{startACCOUNT} \unknown\ \tex{stopACCOUNT} pair. This has
+%D worked untill I tried to put the environment into a float or to
+%D put a few of them side by side in an \mono{combination} environment.
+%D A solution for this problems could have been to call the output
+%D from my \mono{ACCOUNT} environment by a command like \tex{useACCOUNT}
+%D like the \mono{MPgraphics}, but is was not what I wanted and the
+%D only solution for this was to use an delimited environment on the
+%D one side or collext the text into braces like \tex{ACCOUNT{}} on
+%D the other side. The second way would have made it easier to define
+%D new macros to for the account with presets with the sideeffect to
+%D enclose the content with braces. The first way avoids braces and
+%D uses delimitercommands instead, more to write and harder to define
+%D wrapper macros (in the way I like) but I prefered this solution
+%D as shown below.
+
+\def\startACCOUNT
+ {\dodoubleempty\dostartACCOUNT}
+
+\long\def\dostartACCOUNT[#1][#2]#3\stopACCOUNT
+ {\bgroup
+ \edef\@@account{\????ac#1}%
+ \ifsecondargument
+ \setupACCOUNT[#1][#2]%
+ \fi
+ \edef\accountwidth {\accountparameter\c!width}%
+ \edef\accountdistance {\accountparameter\c!distance}%
+ \!!creditsum\zeropoint
+ \!!debitsum\zeropoint
+ \def\creditsum{\the\!!creditsum}%
+ \def\debitsum {\the\!!debitsum}%
+ \doifvaluesomething{\accountparameter\c!bodyfont}
+ {\expanded{\switchtobodyfont
+ [\accountparameter\c!bodyfont]}}%
+ \parseACCOUNT{#3}
+ \doifnot\accountwidth\v!fit
+ {\global\!!accountwidth\the\dimexpr\accountwidth\relax
+ \global\advance\!!accountwidth-\accountdistance
+ \global\!!accountwidth0.5\!!accountwidth}%
+ #3\removeunwantedspaces
+ \checkACCOUNT
+ \presetlocalframed[\????ac]%
+ \localframed
+ [\????ac]
+ [\c!background=\accountparameter\c!background,
+ \c!backgroundcolor=\accountparameter\c!backgroundcolor,
+ \c!backgroundoffset=\accountparameter\c!backgroundoffset,
+ \c!backgroundscreen=\accountparameter\c!backgroundscreen,
+ \c!frame=\accountparameter\c!frame,
+ \c!framecolor=\accountparameter\c!framecolor,
+ \c!offset=\accountparameter\c!offset]
+ \bgroup
+ \setbox\scratchbox\vbox
+ {\offinterlineskip
+ \doifelsenothing
+ {\accountparameter\c!left%
+ \accountparameter\c!middle%
+ \accountparameter\c!right}
+ {\xdef\MPaccountheaderheight{\the\zeropoint}}
+ {\setbox\scratchbox\hbox\!!to\dimexpr2\!!accountwidth+\accountdistance\relax
+ {\doif{\accountparameter\c!strut}\v!yes\strut
+ \rlap{\accountparameter\c!left}\hfil
+ \accountparameter\c!middle\hfil
+ \llap{\accountparameter\c!right}}%
+ \xdef\MPaccountheaderheight{\the\dimexpr\ht\scratchbox+\dp\scratchbox\relax}%
+ \box\scratchbox}
+ \doifelse{\accountparameter\c!rule}\v!on
+ {\doifsomething{\accountparameter\c!framecolor}
+ {\color[\accountparameter\c!framecolor]}
+ {\hrule\!!height\accountparameter\c!rulethickness\relax}}
+ {\vskip\accountparameter\c!rulethickness\relax}%
+ \hbox{\box\debitbox\betweenaccount\box\creditbox}%
+ \doifelse{\accountparameter\c!calculate}\v!yes
+ {\setbox\scratchbox\vbox
+ {\doifelse{\accountparameter\c!rule}\v!on
+ {\doifsomething{\accountparameter\c!framecolor}
+ {\color[\accountparameter\c!framecolor]}
+ {\hrule\!!height\accountparameter\c!rulethickness\relax}}
+ {\vskip\accountparameter\c!rulethickness\relax}
+ \hbox
+ {\hbox\!!to\!!accountwidth
+ {\doif{\accountparameter\c!strut}\v!yes\strut%
+ \hfil\debitsum}%
+ \spacebetweenaccount
+ \hbox\!!to\!!accountwidth
+ {\doif{\accountparameter\c!strut}\v!yes\strut%
+ \hfil\creditsum}}}%
+ \xdef\MPaccountfooterheight{\the\dimexpr\ht\scratchbox+\dp\scratchbox\relax}%
+ \box\scratchbox}
+ {\xdef\MPaccountfooterheight{\the\zeropoint}}}%
+ \xdef\MPaccountmaxheight{\the\dimexpr\ht\scratchbox+\dp\scratchbox\relax}%
+ \xdef\MPaccountmaxwidth {\the\wd\scratchbox}%
+ \box\scratchbox
+ \egroup
+ \egroup}
+
+%D To draw background for the account environment with commands in
+%D \METAPOST\ style and the the \TEX\ style with backslashes you can
+%D you se following synonyms in your graphics. The way ti define
+%D these commands were taken from \mono{meta-ini.tex}.
+
+\startMPextensions
+ color AccountRuleColor;
+\stopMPextensions
+
+\startMPinitializations
+ AccountRuleColor:=\MPcolor{\accountparameter\c!framecolor};
+ %
+ AccountMaxWidth:=\MPaccountmaxwidth;
+ AccountMaxHeight:=\MPaccountmaxheight;
+ %
+ AccountTextWidth:=\MPaccounttextwidth;
+ AccountNumberWidth:=\MPaccountnumberwidth;
+ %
+ AccountWidth:=\MPaccountwidth;
+ AccountHeight:=\MPaccountheight;
+ %
+ AccountHeaderHeight:=\MPaccountheaderheight;
+ AccountFooterHeight:=\MPaccountfooterheight;
+ %
+ AccountDebitHeight:=\MPaccountdebitheight;
+ AccountCreditHeight:=\MPaccountcreditheight;
+ %
+ AccountRuleWidth:=\the\dimexpr\accountparameter\c!rulethickness\relax;
+\stopMPinitializations
+
+
+\defineoverlay
+ [account]
+ [\useMPgraphic{account}]
+
+%D We are not limited to simple rules with \TEX\ primitives.
+%D The following \METAPOST\ example graphic shows one way to
+%D draw more complicated rules behind the T-Account, you can
+%D use thus as an example for your own backgrounds.
+
+\startuseMPgraphic{account}
+ AccountNumberGap=0.5*AccountMaxWidth-AccountWidth;
+
+ z11 = (0,AccountMaxHeight-AccountHeaderHeight) ;
+ z12 = (AccountMaxWidth,AccountMaxHeight-AccountHeaderHeight) ;
+
+ z21 = (AccountWidth-AccountNumberWidth-AccountNumberGap,AccountMaxHeight-AccountHeaderHeight-AccountDebitHeight) ;
+ z22 = (0.5*AccountMaxWidth,AccountMaxHeight-AccountHeaderHeight-AccountDebitHeight) ;
+ z23 = (AccountMaxWidth-AccountNumberWidth-AccountNumberGap,AccountMaxHeight-AccountHeaderHeight-AccountCreditHeight) ;
+ z24 = (AccountMaxWidth,AccountMaxHeight-AccountHeaderHeight-AccountCreditHeight) ;
+
+ z31 = (AccountWidth-AccountNumberWidth-AccountNumberGap,AccountFooterHeight) ;
+ z32 = (0.5*AccountMaxWidth-AccountNumberGap,AccountFooterHeight) ;
+ z33 = (AccountMaxWidth-AccountNumberWidth-AccountNumberGap,AccountFooterHeight) ;
+ z34 = (AccountMaxWidth,AccountFooterHeight) ;
+
+ z41 = (0.5*AccountMaxWidth,AccountMaxHeight-AccountHeaderHeight) ;
+ z42 = (0.5*AccountMaxWidth,0) ;
+ z43 = whatever[z41,z42]=whatever[z22,z23] ;
+ z44 = (0.5*AccountMaxWidth,AccountFooterHeight) ;
+
+ z51 = (0,AccountFooterHeight) ;
+ z52 = (AccountNumberWidth,AccountFooterHeight) ;
+ z53 = (0.5*AccountMaxWidth-AccountNumberWidth-AccountNumberGap,AccountMaxHeight-AccountHeaderHeight-AccountDebitHeight) ;
+ z54 = (0.5*AccountMaxWidth-AccountNumberGap,AccountMaxHeight-AccountHeaderHeight-AccountDebitHeight) ;
+
+ z61 = (AccountWidth-AccountNumberWidth-AccountNumberGap,0) ;
+ z62 = (0.5*AccountMaxWidth-AccountNumberGap,0) ;
+ z63 = (AccountMaxWidth-AccountNumberWidth-AccountNumberGap,0) ;
+ z64 = (AccountMaxWidth,0) ;
+
+ drawoptions (withpen pencircle scaled AccountRuleWidth withcolor AccountRuleColor) ;
+ linecap := butt ; % no round end of the lines
+
+ draw z11--z12 ;
+ draw z33--z34 ;
+
+ if AccountFooterHeight>0pt:
+ draw z61--z62 ;
+ draw z63--z64 ;
+ fi
+
+ if AccountCreditHeight>AccountDebitHeight:
+ draw z31--z32 ;
+ draw z41--z44 ;
+ draw z51--z52--z53--z54 ;
+ else:
+ draw z21--z22--z23--z24 ;
+ draw z41--z43 ;
+ fi
+
+ setbounds currentpicture to unitsquare xyscaled (AccountMaxWidth,AccountMaxHeight) ;
+\stopuseMPgraphic
+
+%D \showsetup{startdebits}
+%D \showsetup{debit}
+
+\long\def\startDEBITS#1\stopDEBITS
+ {\bgroup
+ \def\debit{\dosingleempty\dodebit}%
+ \def\dodebit[##1]%
+ {\def\dododebit####1{\dodododebit[##1]{####1}}%
+ \permitspacesbetweengroups
+ \dosinglegroupempty\dododebit}%
+ \def\dodododebit[##1]##2%
+ {\setbox\scratchbox\hbox{\doifsomething{##2}{\global\advance\!!debitsum##2}}%
+ \hbox\!!to\hsize{\strut##1\hfill##2}}%
+ \global\setbox\debitbox\vtop{\hsize\!!accountwidth#1}%
+ \!!debitheight\ht\debitbox
+ \advance\!!debitheight\dp\debitbox
+ \xdef\MPaccountdebitheight{\the\!!debitheight}%
+ %\xdef\MPaccountdebitwidth {\the\wd\debitbox}%
+ \egroup}
+
+%D \showsetup{startcredits}
+%D \showsetup{credit}
+
+\long\def\startCREDITS#1\stopCREDITS
+ {\bgroup
+ \def\credit{\dosingleempty\docredit}%
+ \def\docredit[##1]%
+ {\def\dodocredit####1{\dododocredit[##1]{####1}}%
+ \permitspacesbetweengroups
+ \dosinglegroupempty\dodocredit}%
+ \def\dododocredit[##1]##2%
+ {\setbox\scratchbox\hbox{\doifsomething{##2}{\global\advance\!!creditsum##2\relax}}%
+ \hbox\!!to\hsize{\strut##1\hfill##2}}%
+ \global\setbox\creditbox\vtop{\hsize\!!accountwidth#1}%
+ \!!creditheight\ht\creditbox
+ \advance\!!creditheight\dp\creditbox
+ \xdef\MPaccountcreditheight{\the\!!creditheight}%
+ %\xdef\MPaccountcreditwidth {\the\wd\creditbox}%
+ \egroup}
+
+\long\def\parseACCOUNT#1%
+ {\bgroup
+ \def\startCREDITS##1\stopCREDITS
+ {\def\credit{\dosingleempty\docredit}%
+ \def\docredit[####1]%
+ {\def\dodocredit########1{\dododocredit[####1]{########1}}%
+ \permitspacesbetweengroups
+ \dosinglegroupempty\dodocredit}%
+ \def\dododocredit[####1]####2%
+ {\setbox\scratchbox\hbox{####1}\!!dimena\wd\scratchbox
+ \setbox\scratchbox\hbox{####2}\!!dimenb\wd\scratchbox
+ \compareaccountdimen\!!credittextwidth\!!dimena
+ \compareaccountdimen\!!creditnumberwidth\!!dimenb}%
+ ##1\removeunwantedspaces}
+ \def\startDEBITS##1\stopDEBITS
+ {\def\debit{\dosingleempty\dodebit}%
+ \def\dodebit[####1]%
+ {\def\dododebit########1{\dodododebit[####1]{########1}}%
+ \permitspacesbetweengroups
+ \dosinglegroupempty\dododebit}%
+ \def\dodododebit[####1]####2%
+ {\setbox\scratchbox\hbox{####1}\!!dimena\wd\scratchbox
+ \setbox\scratchbox\hbox{####2}\!!dimenb\wd\scratchbox
+ \compareaccountdimen\!!debittextwidth\!!dimena
+ \compareaccountdimen\!!debitnumberwidth\!!dimenb}%
+ ##1\removeunwantedspaces}
+ #1\removeunwantedspaces
+ \compareaccountdimen\!!debittextwidth\!!credittextwidth
+ \compareaccountdimen\!!debitnumberwidth\!!creditnumberwidth
+ \global\!!accountwidth\!!debittextwidth
+ \global\advance\!!accountwidth\!!debitnumberwidth
+ \global\advance\!!accountwidth\accountparameter\c!columndistance
+ \xdef\MPaccounttextwidth {\the\!!debittextwidth}%
+ \xdef\MPaccountnumberwidth{\the\!!debitnumberwidth}%
+ \xdef\MPaccountwidth {\the\!!accountwidth}%
+ \egroup}
+
+\def\compareaccountdimen#1#2%
+ {\ifdim#2>#1\relax
+ #1#2
+ \fi}
+
+\def\checkACCOUNT
+ {\bgroup
+ \compareaccountdimen\!!debitheight\!!creditheight
+ %\ifdim\!!debitheight>\!!creditheight\relax
+ % \global\!!accountheight\!!debitheight
+ %\else
+ % \global\!!accountheight\!!creditheight
+ %\fi
+ \xdef\MPaccountheight{\the\!!debitheight}%
+ \egroup}
+
+\def\linebetweenaccount
+ {\bgroup
+ \xdef\MPaccountdistance{\the\dimexpr\accountdistance\relax}%
+ \ifdim\accountdistance>\zeropoint\relax
+ \!!dimena\accountdistance
+ \else
+ \!!dimena\linewidth
+ \fi
+ \advance\!!dimena-\linewidth
+ \hskip.5\!!dimena
+ \doifsomething{\accountparameter\c!framecolor}
+ {\color[\accountparameter\c!framecolor]}%
+ {\vrule\!!width\accountparameter\c!rulethickness}%
+ \hskip.5\!!dimena\relax
+ \egroup}
+
+\def\spacebetweenaccount
+ {\xdef\MPaccountdistance{\zeropoint}%
+ \hskip\accountdistance}
+
+%D \macros{setupACCOUNT}
+%D
+%D \showsetup{setupaccount}
+
+\def\setupACCOUNT
+ {\dodoubleempty\dosetupACCOUNT}
+
+\def\dosetupACCOUNT[#1][#2]%
+ {\getparameters[\????ac#1][#2]%
+ \processaction
+ [\getvalue{\????ac#1\c!rule}]
+ [ \v!on=>\let\betweenaccount\linebetweenaccount,
+ \v!off=>\let\betweenaccount\spacebetweenaccount,
+ \s!default=>\let\betweenaccount\spacebetweenaccount,
+ \s!unknown=>\let\betweenaccount\spacebetweenaccount]}
+
+\def\defineACCOUNT
+ {\dodoubleempty\dodefineACCOUNT}
+
+\def\dodefineACCOUNT[#1][#2]%
+ {\setupACCOUNT
+ [#1]
+ [\c!background=,
+ \c!backgroundoffset=0pt,
+ \c!backgroundscreen=,
+ \c!backgroundcolor=,
+ \c!bodyfont=,
+ \c!calculate=\v!no,
+ \c!columndistance=\bodyfontsize,
+ \c!distance=\bodyfontsize,
+ \c!frame=\v!off,
+ \c!framecolor=,
+ \c!left=,
+ \c!middle=,
+ \c!offset=0.25ex,
+ \c!right=,
+ \c!rule=\v!on,
+ \c!rulethickness=\linewidth,
+ \c!width=\v!fit,
+ \c!strut=\v!yes,
+ #2]
+ \processbetween{#1}{\ACCOUNT[#1]}}
+
+\def\ACCOUNT[#1]#2%
+ {\startACCOUNT[#1]#2\stopACCOUNT}
+
+\defineACCOUNT[TACCOUNT]
+
+\defineACCOUNT[TKONTO]
+
+%D \subject{Example}
+%D
+%D \startbuffer
+%D \startTACCOUNT[left=S,middle=Bilanz,right=H]
+%D \startDEBITS
+%D \debit [Auto] {2000}
+%D \debit [Bus] {5000}
+%D \stopDEBITS
+%D \startCREDITS
+%D \credit [Bank] {1000}
+%D \credit [Kasse] {200}
+%D \credit [Kasse] {200}
+%D \stopCREDITS
+%D \stopTACCOUNT
+%D \stopbuffer
+%D
+%D A simple example:
+%D
+%D \typebuffer
+%D
+%D This results in the following output:
+%D
+%D \startlinecorrection
+%D \getbuffer
+%D \stoplinecorrection
+
+\protect \endinput
diff --git a/Master/texmf-dist/tpm/t-account.tpm b/Master/texmf-dist/tpm/t-account.tpm
new file mode 100644
index 00000000000..6acc2b20a89
--- /dev/null
+++ b/Master/texmf-dist/tpm/t-account.tpm
@@ -0,0 +1,27 @@
+<!DOCTYPE rdf:RDF SYSTEM "tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://dl.contextgarden.net/modules/t-letter.zip">
+ <TPM:Name>t-account</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2006/09/12 00:00:00</TPM:Date>
+ <TPM:Version>2006.09.12</TPM:Version>
+ <TPM:Creator>Wolfgang Schuster</TPM:Creator>
+ <TPM:Title>T-Account module</TPM:Title>
+ <TPM:Description>
+ Module to draw T-Account's.
+ </TPM:Description>
+ <TPM:Author>Wolfgang Schuster</TPM:Author>
+ <TPM:RunFiles size="21203">
+ tex/context/third/account/t-account.tex
+ tex/context/interface/third/account.xml
+ tpm/t-account.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="115510">
+ doc/context/third/account/account-doc.pdf
+ </TPM:DocFiles>
+ <TPM:Requires>
+ <TPM:Package name="context"/>
+ </TPM:Requires>
+ </rdf:Description>
+</rdf:RDF>
+
diff --git a/Master/tlpkg/tlpsrc/collection-context.tlpsrc b/Master/tlpkg/tlpsrc/collection-context.tlpsrc
index 6cee2ba9228..a8bc8b18382 100644
--- a/Master/tlpkg/tlpsrc/collection-context.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-context.tlpsrc
@@ -6,6 +6,7 @@ depend context
depend jmn
depend lmextra
depend bin-context
+depend context-account
depend context-french
depend collection-metapost
depend collection-basic
diff --git a/Master/tlpkg/tlpsrc/context-account.tlpsrc b/Master/tlpkg/tlpsrc/context-account.tlpsrc
new file mode 100644
index 00000000000..95c663d6353
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/context-account.tlpsrc
@@ -0,0 +1,5 @@
+name context-account
+category Package
+runpattern d texmf-dist/tex/context/third/account
+runpattern f texmf-dist/tex/context/interface/third/t-account.xml
+docpattern d texmf-dist/doc/context/third/account