summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/isodoc
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-04-30 21:02:54 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-04-30 21:02:54 +0000
commit0d3960d88898b0af67c4c022ee49601dd5f84968 (patch)
treeebf80e88a4adb9d2d641a170e667e5a271ec6d00 /Master/texmf-dist/source/latex/isodoc
parent1bbe1e023af3abf0bce342ecfd49b09053ca7b28 (diff)
isodoc v0.4 (2008/08/22??)
git-svn-id: svn://tug.org/texlive/trunk@7753 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/isodoc')
-rw-r--r--Master/texmf-dist/source/latex/isodoc/isodoc.dtx220
1 files changed, 151 insertions, 69 deletions
diff --git a/Master/texmf-dist/source/latex/isodoc/isodoc.dtx b/Master/texmf-dist/source/latex/isodoc/isodoc.dtx
index c8e10f0f1e7..5e364d51e9d 100644
--- a/Master/texmf-dist/source/latex/isodoc/isodoc.dtx
+++ b/Master/texmf-dist/source/latex/isodoc/isodoc.dtx
@@ -22,7 +22,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{isodoc}%
%<*class>
- [2008/08/22 v0.3 isodoc class for letters and invoices]
+ [2008/08/22 v0.4 isodoc class for letters and invoices]
%</class>
%<class>\ifnum\pdfoutput=1\else\ClassError{isodoc}{Compile me with pdflatex!}{}
%<class>\fi
@@ -44,7 +44,6 @@
\EnableCrossrefs
\PageIndex
\RecordChanges
-
\newcommand{\FIG}[3]{ % pdfname label caption
\begin{figure}
\begin{center}
@@ -68,7 +67,6 @@
\def\T#1{\texttt{#1}}
\def\C#1{\texttt{$\mathtt{\backslash}$#1}}
\def\CMP#1{\C{#1}\marginpar{\C{#1}}}
-
\begin{document}
\DocInput{isodoc.dtx}
\PrintChanges
@@ -77,7 +75,7 @@
%</driver>
% \fi
%
-% \CheckSum{1676}
+% \CheckSum{1717}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -111,6 +109,16 @@
% }
% \changes{v0.3}{2007/08/21}{several errors in documentation corrected
% }
+% \changes{v0.3b}{2007/08/21}{non-zero parskip generated whitespace in standard textblocks;
+% several accept positions fixed,
+% added option shift,
+% whitespace problems solved,
+% added option currency,
+% added option cityzip - without documentation
+% }
+% \changes{v0.4}{2008/05/01}{options shift, currency, cityzip added
+% norwegian translations added (thanks Sveinung Heggen)
+% }
%
% \DoNotIndex{%
% \", \baselineskip,\ifdim, \quad,
@@ -250,9 +258,9 @@
% \OPTS{Logo}{Information about the sender is defined here. The logo, by
% default, consists of a large company name on top a rule with, hanging under the rule,
% a contact person's data.
-% You can define the latter either explicitly with the |logoaddress| option,
-% or let it automatically be created from the contents of the options |who|, |street|,
-% |prezip|, |zip|, |city|, |country|, and |foreign|, as far as you have defined those.
+% You can define the latter either explicitly with the \T{logoaddress} option,
+% or let it automatically be created from the contents of the options \T{who}, \T{street},
+% \T{prezip}, \T{zip}, \T{city}, \T{country}, and \T{foreign}, as far as you have defined those.
% Definition in parts can be useful if you need
% them elsewhere in your document.}{
% \T{company = ...} & Your company name as it should appear in the logo (if
@@ -260,13 +268,14 @@
% (where it may get overridden by the \T{returnaddress}
% keyword.) For private documents, use your name or
% nickname here.\NN
-% \T{logoaddress = ...}& Contact person's data; use |\\| commands for line breaks.
+% \T{logoaddress = ...}& Contact person's data; use \C{}\C{} commands for line breaks.
% If you don't define this option, the data will be constructed
% from the following options.\NN
% \T{who = ...} & Contact person's name; probably your own name.\NN
% \T{street = ...} & Street in the sender's address.\NN
% \T{city = ...} & City in the sender's address.\NN
% \T{zip = ...} & Zip in the sender's address.\NN
+% \T{cityzip} & Place zip \textsl{after} city, instead of before it (the default).\NN
% \T{country = ...} & Country in the sender's address. Only used if \T{foreign}
% key was used.\NN
% \T{countrycode = ...}& Sender's country code. For The Netherlands: NL\NN
@@ -324,9 +333,9 @@
% This keyword can have one of the 10 values 0--9:\\[-\baselineskip]
% \begin{compactitem}
% \item [0:] no autograph; the \T{signature} appears right under
-% the \T{closing}. This is the default if the |autograph| option
+% the \T{closing}. This is the default if the \T{autograph} option
% is not used (using it without a value is equivalent to
-% |autograph=2|).
+% \T{autograph=2}).
% \item [1:] generates extra whitespace between
% \T{signature} and \T{closing} for a hand-written
% autograph. Change with the \T{closingskip} key.
@@ -411,6 +420,8 @@
% your debtor to transfer his money to. You can do so by calling
% the \C{accountdata} command, which generates a little table containing these data.
% The contents of this table can be defined with the following keywords:}{
+% \T{term = ...} & Payment term in days; default is 30.\NN
+% \T{currency = ...} & Currency; default is euro.\NN
% \T{accountno = ...} & Your bank account number.\NN
% \T{routingno = ...} & Your bank's routing number. Will not be cited if undefined.\NN
% \T{accountname = ...} & Your bank account's ascription.
@@ -442,7 +453,12 @@
% only.\NN
% \T{fontpackage = ...} & The default font is Latin Modern (\T{fontpackage = lmodern}),
% but with the \T{fontpackage} keyword you can select another
-% package, like \T{txfonts} or \T{osf-txfonts}.
+% package, like \T{txfonts} or \T{osf-txfonts}.\NN
+% \T{shift = ...} & The many textpositions in isodoc are defined in millimeters,
+% but sometime printers show an aberration in their horizontal
+% or vertical printing position. You can correct for this with the
+% \T{shift = x,y} option, where x and y (both 0 by default) shift
+% the output to the right and down, respectively, in millimeters.\NN
% }
%
% \section{Commands}
@@ -469,16 +485,17 @@
% |listkeys isodoc.dtx show|}
%
% \noindent\begin{tabular}{@{}lllll@{}}
-% acceptaccount &areacode &enclosures &returnaddress &zip \NN
-% acceptaddress &bic &fax &routingno & \NN
-% acceptcents &cellphone &fontpackage &signature & \NN
-% acceptdesc &chamber &iban &street & \NN
-% acceptdescription &city &logoaddress &subject & \NN
-% accepteuros &closing &opening &vatno & \NN
-% acceptreference &company &openingcomma &website & \NN
-% accountname &country &ourref &who & \NN
-% accountno &countrycode &phone &yourletter & \NN
-% addresscenter &email &phoneprefix &yourref & \NN
+% accept &areacode &email &phoneprefix &yourletter \NN
+% acceptaccount &autograph &enclosures &returnaddress &yourref \NN
+% acceptaddress &bic &fax &rightaddress &zip \NN
+% acceptcents &cellphone &fontpackage &routingno & \NN
+% acceptdesc &chamber &iban &signature & \NN
+% acceptdescription &city &leftaddress &street & \NN
+% accepteuros &closing &logoaddress &subject & \NN
+% acceptreference &company &opening &term & \NN
+% accountname &country &openingcomma &vatno & \NN
+% accountno &countrycode &ourref &website & \NN
+% addresscenter &currency &phone &who & \NN
% \end{tabular}
%
% \noindent So you could write in your letter: ``please send me the money on my bank
@@ -772,10 +789,22 @@
\define@key{isodoc}{fontpackage}{\def\fontpackage{#1}}
\def\fontpackage{lmodern}
% \end{macrocode}
+% The default shift is 0mm,0mm
+% The |shift| option moves the output to the right and down:
+% \DescribeMacro{shift}
+% \begin{macrocode}
+\def\@xyshift#1,#2@@@{\def\@xshift{#1}\def\@yshift{#2}}
+\define@key{isodoc}{shift}{%
+ \@xyshift#1@@@
+ \AtBeginDocument{\textblockorigin{\@xshift mm}{\@yshift mm}}
+}
+% \end{macrocode}
% Several items in the letter/invoice will be different in documents that are to
% be sent abroad; this is set with the |foreign| option, false by default:
% \DescribeMacro{foreign}
% \begin{macrocode}
+\define@key{isodoc}{cityzip}[\cityziptrue]{\cityziptrue}
+ \newif\ifcityzip\cityzipfalse
\define@key{isodoc}{foreign}[\foreigntrue]{\foreigntrue}
\newif\ifforeign\foreignfalse
\define@key{isodoc}{localbank}[\localbanktrue]{\localbanktrue}
@@ -851,14 +880,13 @@
\define@key{isodoc}{leftaddress} []{\def\xaddress{35}}
\def\xaddress{35}
\define@key{isodoc}{rightaddress}[]{\def\xaddress{105}}
-\define@key{isodoc}{addresscenter} {\def\addresscenter{#1}}
+\define@key{isodoc}{addresscenter} {\def\addresscenter{#1}}
\def\addresscenter{63.5}
% \end{macrocode}
% The |to| option takes the addressee's address lines. Use |\\| to
% separate lines. The info will be split by |\processto| on the first
% |\\| separator into the addressee's name (|\toname|) and his address
% (|\toaddress|)
-
% The |\toname| will be reported in the pdf's document properties.
% However, this works only if the |to| key is set, with |\setupdocument|, in the
% preamble. If several letters are composed, |to| is normally set in the
@@ -921,7 +949,6 @@
\define@key{isodoc}{email} {\def\email{#1}}
\def\email{}
\def\lead{\ifforeign+\areacode-\else\phoneprefix\fi}
-
% \end{macrocode}
% \subsubsection{Folding mark}
% The default is to have no folding mark. So start with the folding mark
@@ -1056,6 +1083,8 @@
\define@key{isodoc}{vatno} {\def\vatno{#1}}
\define@key{isodoc}{chamber} {\def\chamber{#1}}
\def\chamber{Undefined{chamber}}
+\define@key{isodoc}{currency} {\def\currency{#1}}
+ \def\currency{\EUR}
% \end{macrocode}
% If an accept form is to be printed, here are the options to fill in all the
% fields:
@@ -1093,7 +1122,7 @@
% desc address
% \end{verbatim}
% \begin{macrocode}
-\def\xacceptdescription{105}\def\yacceptdescription{200}\def\wacceptdescription{100}
+\def\xacceptdescription{105}\def\yacceptdescription{202}\def\wacceptdescription{100}
\def\xacceptref{7} \def\yacceptref{212} \def\wacceptref{30}
\def\xaccepteuros{60} \def\yaccepteuros{218} \def\waccepteuros{32}
\def\xacceptcents{89} \def\yacceptcents{218} \def\wacceptcents{13}
@@ -1101,8 +1130,8 @@
\def\xaccepteur{14.4} \def\yaccepteur{231} \def\waccepteur{21}
\def\xacceptct{32} \def\yacceptct{231} \def\wacceptct{9}
\def\xacceptaccount{75} \def\yacceptaccount{231} \def\wacceptaccount{65}
-\def\xacceptdesc{7} \def\yacceptdesc{240} \def\wacceptdesc{26}
-\def\xacceptaddress{58} \def\yacceptaddress{243} \def\wacceptaddress{90}
+\def\xacceptdesc{7} \def\yacceptdesc{242} \def\wacceptdesc{26}
+\def\xacceptaddress{58} \def\yacceptaddress{242} \def\wacceptaddress{90}
% \end{macrocode}
% This is the |\baselineskip| for the two-line reference of the detachable strip:
% \begin{macrocode}
@@ -1161,18 +1190,21 @@
% If the osf-txfonts package is used, oldstyle figures are disabled here.
% \DescribeMacro{\logo}
% \begin{macrocode}
+\newcommand{\zippedcity}{\ifcityzip\city\ \prezip\ \zip\else\prezip\ \zip\ \city\fi}
\newcommand{\logo}{%
- \begin{textblock}{140}[0,1](35,20)\noindent
- \textsf{\LARGE\company}\\[-1.7ex] % large company name
- \rule{\hsize}{.3pt} % on top a rule
- \end{textblock}
+ { \parskip=0pt\parindent=0pt
+ \begin{textblock}{140}[0,1](35,20)%
+ \textsf{\LARGE\company}\\[-1.7ex] % large company name
+ \rule{\hsize}{.3pt} % on top a rule
+ \end{textblock}
+ }
\Tbox{140}{22}{35}{\noindent
\@hft
\ifx\undefined\logoaddress%
\ifx\undefined\tbfigures\else\tbfigures\fi
\ifx\who\empty\else\who\\\fi
\ifx\street\empty\else\street\\\fi
- \prezip\ \zip\ \city
+ \zippedcity
\ifforeign\\\country\fi
\else\logoaddress\fi
}
@@ -1181,9 +1213,10 @@
% \DescribeMacro{\returnaddress}
% \begin{macrocode}
\def\returnaddress{%
+ \ifx\undefined\tbfigures\else\tbfigures\fi % when using osf-txfonts... just for me
\company\\
\street\\
- \prezip{} \zip{} \city
+ \zippedcity
\ifforeign\\\country\fi
}
% \end{macrocode}
@@ -1245,7 +1278,7 @@
\end{tabular}
}
% \end{macrocode}
-% The showkeys command is useful for debugging. It prints a table showing the
+% The |\showkeys| command is useful for debugging. It prints a table showing the
% values of most keys.\footnote{Note for developers: the table lines below can
% be generated with a ruby script listkeys (included at the end of isodoc.dtx):
% |listkeys isodoc.dtx show|}
@@ -1253,6 +1286,7 @@
% \begin{macrocode}
\def\showkeys{%
\begin{tabular}{ll}
+ accept & \accept\NN
acceptaccount & \acceptaccount\NN
acceptaddress & \acceptaddress\NN
acceptcents & \acceptcents\NN
@@ -1264,6 +1298,7 @@
accountno & \accountno\NN
addresscenter & \addresscenter\NN
areacode & \areacode\NN
+ autograph & \autograph\NN
bic & \bic\NN
cellphone & \cellphone\NN
chamber & \chamber\NN
@@ -1272,11 +1307,13 @@
company & \company\NN
country & \country\NN
countrycode & \countrycode\NN
+ currency & \currency\NN
email & \email\NN
enclosures & \enclosures\NN
fax & \fax\NN
fontpackage & \fontpackage\NN
iban & \iban\NN
+ leftaddress & \leftaddress\NN
logoaddress & \logoaddress\NN
opening & \opening\NN
openingcomma & \openingcomma\NN
@@ -1284,10 +1321,12 @@
phone & \phone\NN
phoneprefix & \phoneprefix\NN
returnaddress & \returnaddress\NN
+ rightaddress & \rightaddress\NN
routingno & \routingno\NN
signature & \signature\NN
street & \street\NN
subject & \subject\NN
+ term & \term\NN
vatno & \vatno\NN
website & \website\NN
who & \who\NN
@@ -1296,25 +1335,22 @@
zip & \zip\NN
\end{tabular}
}
-
\AtEndOfClass{%
\usepackage{hyperref}
\year=0
}
-
\AtBeginDocument{%
\hypersetup{pdfauthor={\who},
pdfsubject={\subject},
pdfproducer={isodoc v\fileversion},
}
}
-
% \DescribeMacro{\itable}
% |\itable| inserts an invoice table; arg1 should be the rows of the table.
% \begin{macrocode}
\def\itable#1{
\begin{tabularx}{\hsize}{@{}X@{\barsep\quad\qquad}r@{}}
- \multicolumn{2}{@{}c@{}}{\sffamily\descriptiontext\hfill \amounttext (\EUR)}\ML
+ \multicolumn{2}{@{}c@{}}{\sffamily\descriptiontext\hfill \amounttext (\currency)}\ML
#1
\end{tabularx}
}
@@ -1354,7 +1390,6 @@
% with a vertical rule; its construction is somewhat complicated, as the
% booktabs/ctable packages are in use that don't provide decent vertical
% separators. The |\barsep| macro extends these separators vertically.
-
% \begin{macrocode}
\newif\ifclosing\closingtrue
\newcount\footcount
@@ -1363,8 +1398,7 @@
\hypersetup{pdftitle={invoice to \toname\ dated \today}}
\def\barsep{\raisebox{-1.5ex}[0pt][0pt]{\rule{.05em}{4ex}}}%
\letter[#1,opening=\invoicetext,openingcomma={},closing={},signature={}]{%
- \noindent
- #2
+ \Tbox{35}{127}{140}{#2}
}
}
% \end{macrocode}
@@ -1383,15 +1417,17 @@
% addresscenter is the center, vertically, of the to-address block:
% xaddress should be 1 or 3 for left- and right address windows
% \begin{macrocode}
- \begin{textblock}{70}[0,.5](\xaddress,\addresscenter)\noindent
- \ifreturn
- {\def\\{\unskip\enspace\textbullet\enspace\ignorespaces}%
- \sffamily\scriptsize\bfseries\returnaddress
- }\\[-.8\baselineskip]
- \rule{\hsize}{.2pt}\\
- \fi
- \toname\\\toaddress
- \end{textblock}
+ { \parskip=0pt\parindent=0pt
+ \begin{textblock}{70}[0,.5](\xaddress,\addresscenter)%
+ \ifreturn
+ {\def\\{\unskip\enspace\textbullet\enspace\ignorespaces}%
+ \sffamily\scriptsize\bfseries\returnaddress
+ }\\[-.8\baselineskip]
+ \rule{\hsize}{.2pt}\\
+ \fi
+ \toname\\\toaddress
+ \end{textblock}
+ }
\ifx\subject\empty\else%
\Tbox{35}{108}{105}{\noindent
\begin{tabularx}{\hsize}{@{}l>{\raggedright}X@{}}
@@ -1415,7 +1451,6 @@
{\@hft\datetext}\\
\ifnum\year=0\Undefined{date}\else\date\fi
}
-
\footcount=35
\iffooter
\footfield{\websitetext}{}{\website}
@@ -1424,13 +1459,16 @@
\footfield{\faxtext}{\lead}{\fax}
\footfield{\emailtext}{}{\email}
\fi
- \begin{textblock*}{3mm}(201mm,\yfold)\noindent % rule from 201-204mm
- \rule{\hsize}{.2pt}
- \end{textblock*}
+ { \parskip=0pt\parindent=0pt
+ \begin{textblock*}{3mm}(201mm,\yfold)%
+ \rule{\hsize}{.2pt}
+ \end{textblock*}
+ }
\ifx\undefined\accepttype\else\accept\fi
-
\ifx\subject\empty\vspace*{80mm}\else\vspace*{90mm}\fi
- \noindent\opening\openingcomma\\[\baselineskip]
+ \noindent\Tbox{35}{120}{140}{\opening\openingcomma}
+ \thispagestyle{empty}
+
\thispagestyle{empty}
\noindent
#2
@@ -1466,22 +1504,27 @@
% \DescribeMacro{\Cbox}
% |\Cbox{x}{y}{width}{text}| places |text| in a box of |\testsl{width}| mm, centered around (|x|,|y|) in mm:
% \begin{macrocode}
-\def\Cbox#1#2#3#4{
- \begin{textblock}{#3}[.5,.5](#1,#2)
- \begin{center}
- #4
- \end{center}
-\end{textblock}}
+\def\Cbox#1#2#3#4{%
+ { \parskip=0pt\parindent=0pt
+ \begin{textblock}{#3}[.5,.5](#1,#2)%
+ \begin{center}
+ #4
+ \end{center}
+ \end{textblock}
+ }
+}
% \end{macrocode}
% \DescribeMacro{\Tbox}
% |\Tbox{x}{y}{width}{text}| places |text| in a box of |\testsl{width}| mm, with the upper left corner at (|x|,|y|) in mm:
% \begin{macrocode}
-\long\def\Tbox#1#2#3#4{
- \begin{textblock}{#3}(#1,#2)\noindent
- \begin{minipage}[t]{\hsize}
- \noindent#4
- \end{minipage}
- \end{textblock}
+\long\def\Tbox#1#2#3#4{%
+ { \parskip0pt\parindent=0pt
+ \begin{textblock}{#3}(#1,#2)%
+ \begin{minipage}[t]{\hsize}
+ \noindent#4
+ \end{minipage}
+ \end{textblock}
+ }
}
% \end{macrocode}
% \DescribeMacro{\accept}
@@ -1739,6 +1782,45 @@
\def\Totaltext{Total}
}
% \end{macrocode}
+% \DescribeMacro{\norskdoc}
+% \begin{macrocode}
+\def\norskdoc{%
+ \set@lang{norsk}
+ \def\yourlettertext{Deres brev av}
+ \def\yourreftext{Deres ref:}
+ \def\ourreftext{Vår ref:}
+ \def\datetext{Dato}
+ \def\totext{Til}
+ \def\pagetext{Side}
+ \def\oftext{av}
+ \def\date{\number\day.~\ifcase\month\or
+ januar\or februar\or mars\or april\or mai\or juni\or
+ july\or august\or september\or oktober\or november\or desember\fi
+ \space \number\year}
+ \def\subjecttext{Vedr:}
+ \def\ccname{kopi til:}
+ \def\enclosuretext{Vedlegg:}
+ \def\enclosurestext{Vedlegg:}
+ \def\faxtext{telefaks}
+ \def\websitetext{hjemmeside}
+ \def\emailtext{e-post}
+ \def\phonetext{telefon}
+ \def\cellphonetext{mobil}
+ \def\invoicetext{{\bfseries\Large\scshape faktura}}
+ \def\descriptiontext{Beskrivelse}
+ \def\amounttext{Beløp}
+ \def\accountdatatext{betales til}
+ \def\termtext{betalingsfrist}
+ \def\daystext{dager}
+ \def\accountnotext{faktura nr}
+ \def\accountnametext{til}
+ \def\referencetext{referanse}
+ \def\chambertext{BIC}
+ \def\vatnotext{Org. nr.}
+ \def\Vattext{Mva}
+ \def\Totaltext{Total}
+}
+% \end{macrocode}
% \Finale
\endinput
-$Id: isodoc.dtx,v 1.14 2007/08/21 22:16:38 wybo Exp $
+$Id: isodoc.dtx,v 1.19 2008/04/30 13:45:40 wybo Exp $