summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/isodoc/isodoc.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-20 23:28:03 +0000
committerKarl Berry <karl@freefriends.org>2012-02-20 23:28:03 +0000
commit015a7d6d2e968aea69870190cceb5309ee0766ca (patch)
treef61305797652a1642df2696ad5380a205d9cf73f /Master/texmf-dist/source/latex/isodoc/isodoc.dtx
parent61939b07fb6a935b4a98fd0dbc4b543b7ac0f1f8 (diff)
isodoc (20feb12)
git-svn-id: svn://tug.org/texlive/trunk@25445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/isodoc/isodoc.dtx')
-rw-r--r--Master/texmf-dist/source/latex/isodoc/isodoc.dtx106
1 files changed, 75 insertions, 31 deletions
diff --git a/Master/texmf-dist/source/latex/isodoc/isodoc.dtx b/Master/texmf-dist/source/latex/isodoc/isodoc.dtx
index f59c2396af1..e19b0f56905 100644
--- a/Master/texmf-dist/source/latex/isodoc/isodoc.dtx
+++ b/Master/texmf-dist/source/latex/isodoc/isodoc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2006 by Wybo Dekker <wybo@servalys.nl>
+% Copyright (C) 2006 by Wybo Dekker <wybo@dekkerdocumenten.nl>
% -------------------------------------------------------
%
% This file may be distributed and/or modified under the
@@ -22,7 +22,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{isodoc}%
%<*class>
- [2010/08/25 v0.8 isodoc class for letters and invoices]
+ [2012/02/19 v0.9 isodoc class for letters and invoices]
%</class>
%<class>\ifx\pdfoutput\undefined\else%
%<class>\ifnum\pdfoutput=1\else\ClassError{isodoc}{Compile me with pdflatex or xelatex!}{}
@@ -30,7 +30,8 @@
%<*driver>
\documentclass{ltxdoc}
\usepackage[l2tabu,orthodox]{nag}
-\usepackage{ctable,pdfpages,paralist,eurosym,sverb,ltablex}
+\usepackage{isodocsymbols,charter}
+\usepackage{ctable,pdfpages,paralist,sverb,ltablex}
\parindent0pt\parskip1ex
\PageIndex
\IndexPrologue{\section*{Index}}
@@ -56,7 +57,7 @@
%</driver>
% \fi
%
-% \CheckSum{2301}
+% \CheckSum{0}
%
% \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
@@ -125,7 +126,7 @@
%
% \DoNotIndex{%
% \ , \", \', \@auxout, \AtBeginDocument, \AtEndDocument, \Cbox, \CurrentOption,
-% \DeclareOption, \DescribeMacro, \EUR, \LARGE, \Large, \LoadClass, \ML, \NN,
+% \DeclareOption, \DescribeMacro, \LARGE, \Large, \LoadClass, \ML, \NN,
% \PassOptionsToClass, \ProcessOptions, \RequirePackage, \TPGrid, \Tbox, \\, \^,
% \`, \aa, \addtocounter, \advance, \barsep, \baselineskip, \begin, \bfseries,
% \bgroup, \clearpage, \cmidrule, \colorbox, \csname, \def, \define@key,
@@ -148,7 +149,7 @@
% \title{The \textsf{isodoc} class\thanks{This document
% corresponds to \textsf{isodoc}~\fileversion, dated \filedate.}\\for
% letters, invoices, and more}
-% \author{Wybo Dekker \\ \texttt{wybo@servalys.nl}}
+% \author{Wybo Dekker \\ \texttt{wybo@dekkerdocumenten.nl}}
%
% \maketitle
%
@@ -364,16 +365,20 @@
% \T{forcedate = ...} & The restrictions of the |date| option can be overridden by
% using the |forcedate| option instead; you can thus enter
% anything you like for the date.\NN
-% \T{subject = ...} & subject of this document; is placed under the other fields,
-% over the width of the first, second and half of the
-% third fields.\NN
+% \T{subject = ...} & subject of this document; is placed raggedright under the other
+% fields, over the full textwidth. Use newlines if you want to
+% restrict the width of the text.\NN
% }
%
% \OPTS{Opening and Closing}{A letter is started with an opening -- something
% like `Dear John', and ended with a closing -- something like
% `Regards,\T{<newline>}Betty', perhaps with an autograph (or white space) in between.}{
% \T{opening = ...} & Dear John\NN
+% \T{openingcomma = ...}& by default, the opening phrase is followed by a comma, but you
+% can change that here.\NN
% \T{closing = ...} & Regards\NN
+% \T{closingcomma = ...}& by default, the closing phrase is followed by a comma, but you
+% can change that here.\NN
% \T{signature = ...} & Betty\NN
% \T{autograph = ...} & \begin{minipage}[t]{\hsize}
% This keyword can have one of the 10 values 0--9:\\[-\baselineskip]
@@ -398,7 +403,7 @@
% those are found, the starting text will be
% \textbf{Enclosures:}.\NN
% \T{closingskip = ...} & white space between signature and closing. The
-% default is \T{2}\C{baselineskip}.
+% default is \T{2}\C{baselineskip}.\NN
% }
%
% \OPTS{Footer fields}{Footer fields are shown in the order in which
@@ -435,7 +440,7 @@
% tolerance of 1.5 mm at both sides.\NN
% \T{fold = ...} & For non-standard envelopes and paper formats the position
% of the folding mark can be set at any position (in mm)
-% from the top of the paper.
+% from the top of the paper.\NN
% }
%
% \OPTS{Payment data}{In invoices you probably want to make clear where you want
@@ -551,7 +556,7 @@
% The |\itable| command uses |tabularx| to create a two-column table. The
% first column of the table will have the header `Description' (or its
% equivalent in the language selected), the header of the second column says
-% `Amount (\EUR)'. The single argument of |\itable| should contain the
+% `Amount (EUR)'. The single argument of |\itable| should contain the
% contents of the table and is of the form:
% \begin{verbatim}
% item 1 & amount 1\NN
@@ -622,6 +627,30 @@
% redefine it with |\renewcommand{\logo}{...}|. An example of logo redefinition
% can be found on page~\pageref{logoredef}.
%
+% \DescribeMacro{\EUROSymbol}
+% \DescribeMacro{\EuroSymbol}
+% \DescribeMacro{\EUR}
+% \DescribeMacro{\EmailSymbol}
+% \DescribeMacro{\LetterSymbol}
+% \DescribeMacro{\MobileSymbol}
+% \DescribeMacro{\PhoneSymbol}
+% Several symbols are frequently used in letters and invoices. These are
+% usually taken from marvosym.sty; however, marvosym collides frequently
+% with command names used in isodoc. So they have gotten their own names here:
+% \bigskip\\
+% \begin{tabular}{rrr}\FL
+% command & ascii& result \ML
+% |\LetterSymbol| & 66 & \LetterSymbol\NN
+% |\EuroSymbol| & 164 & \EuroSymbol\NN
+% |\EuroSymbol| & 164 & \EuroSymbol\NN
+% |\EUR| & 99 & \EUROSymbol\NN
+% |\EmailSymbol| & 107 & \EmailSymbol\NN
+% |\PhoneSymbol| & 84 & \PhoneSymbol\NN
+% |\MobileSymbol| & 72 & \MobileSymbol\LL
+% \end{tabular}
+% \bigskip\\
+% If you need other symbols, then please email me.
+%
% \section{Usage: letters}
%
% Usage of the class is best explained by example.
@@ -750,6 +779,7 @@
% |color|, and |xkeyval|. |eurosym| is used for the euro symbol.
% \begin{macrocode}
\RequirePackage{ctable,eurosym,graphicx,stringstrings,calc}
+\RequirePackage{forarray}
% \end{macrocode}
%
% Since the name of the package contains 'iso', make the page A4.
@@ -983,6 +1013,7 @@
\newif\iffooter\footerfalse
\define@key{isodoc}{nofooter}[]{\footerfalse}
% \end{macrocode}
+% If there \textsl{is} a page footer, only those fields will be displayed which are not empty.
% \DescribeMacro{areacode}
% \DescribeMacro{phone}
% \DescribeMacro{phoneprefix}
@@ -990,7 +1021,6 @@
% \DescribeMacro{fax}
% \DescribeMacro{website}
% \DescribeMacro{email}
-% If there \textsl{is} a page footer, only those fields will be displayed which are not empty.
% Currently the |phone|, |cellphone|, |fax|, |email| and |website| are
% recognised as possible footer fields. Phone and fax number will be prefixed
% with a 0, unless the |foreign| option was used: then the prefix will be
@@ -1084,7 +1114,7 @@
\define@key{isodoc}{forcedate}{\def\forcedate{#1}}\def\forcedate{}
% \end{macrocode}
% \DescribeMacro{subject}
-% The subject is empty by default and will be typeset.
+% The subject is empty by default and will be typeset only if you give it a value.
% \begin{macrocode}
\define@key{isodoc}{subject}{\def\subject{#1}}
\def\subject{}
@@ -1109,8 +1139,9 @@
% which can be set by the |closingskip| option, which is |2\baselineskip| by
% default:
% \begin{macrocode}
-\define@key{isodoc}{closing} {\def\closing{#1,}}
- \def\closing{\Undefined{closing}} % Best regards,
+\define@key{isodoc}{closing} {\def\closing{#1}}
+ \def\closingcomma{,}
+ \def\closing{\Undefined{closing}}
\define@key{isodoc}{closingskip}{\closingskip=#1}
\newdimen\closingskip\closingskip=2\baselineskip
% \end{macrocode}
@@ -1161,7 +1192,7 @@
\define@key{isodoc}{chamber} {\def\chamber{#1}}
\def\chamber{Undefined{chamber}}
\define@key{isodoc}{currency} {\def\currency{#1}}
- \def\currency{\EUR}
+ \def\currency{\EuroSymbol}
% \end{macrocode}
% \DescribeMacro{accept}
% \DescribeMacro{acceptaccount}
@@ -1196,7 +1227,7 @@
% other forms become available, the content of |\accepttype| will have to be
% checked. Here is a rough layout of the E05 accept form -- the last character
% tells if the items are tyepset in a Tbox (T) or in a Cbox (C):
-% \pagebreak%%%
+%
% \begin{verbatim}
% description T
% ref description T
@@ -1225,6 +1256,10 @@
\newdimen\acceptreferenceskip\acceptreferenceskip=5.15mm
% \end{macrocode}
% \subsection{User Macros}
+% Some symbols taken from marvosym.sty:
+% \begin{macrocode}
+\RequirePackage{isodocsymbols}
+% \end{macrocode}
% The autograph is either just a newline, or a vertical spacing where you can
% put your autograph manually, or a graphic. In the latter case, is must have
% been defined with the macro |\autograph|, which defines an autograph from an
@@ -1427,6 +1462,7 @@
chamber & \chamber\NN
city & \city\NN
closing & \closing\NN
+ closingcomma & \closingcomma\NN
company & \company\NN
country & \country\NN
countrycode & \countrycode\NN
@@ -1504,7 +1540,7 @@
% addressees.
%
% The second argument creates a two-column table with headings
-% ``Description'' and ``Amount (\EUR)''. The two columns are separated
+% ``Description'' and ``Amount (EuroSymbol)''. The two columns are separated
% 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.
@@ -1518,7 +1554,7 @@
opening={\bfseries\scshape\Large\invoicetext},
openingcomma={},
closing={},
- signature={}]{\Tbox{35}{127}{140}{#2}}
+ signature={}]{\Tbox{35}{127}{140}{\ignorespaces#2}}
}
% \end{macrocode}
% \DescribeMacro{\letter}
@@ -1595,7 +1631,7 @@
\else\forcedate\fi
}
\ifx\subject\empty\else%
- \Tbox{35}{\subjectpos}{105}{\noindent
+ \Tbox{35}{\subjectpos}{140}{\noindent
\begin{tabularx}{\hsize}{@{}l>{\raggedright}X@{}}
\@hft\subjecttext&\subject
\end{tabularx}
@@ -1604,13 +1640,22 @@
\else
\advance\textskip-12
\fi
+% \end{macrocode}
+% Create any non-empty footfields, starting at left;
+% (===>must have to be made variable with an option footfieldorder):
+% \begin{macrocode}
\footcount=35
\iffooter
- \footfield{\websitetext}{}{\website}
- \footfield{\phonetext}{\lead}{\phone}
- \footfield{\cellphonetext}{\lead}{\cellphone}
- \footfield{\faxtext}{\lead}{\fax}
- \footfield{\emailtext}{}{\email}
+ \ForEachX{;}{%
+ \setbox0=\hbox{\csname\thislevelitem\endcsname}
+ \ifdim\wd0=0pt\else
+ \Tbox{\footcount}{\footerpos}{35}{\noindent
+ {\@hft\csname\thislevelitem text\endcsname}\\
+ \csname\thislevelitem\endcsname
+ }
+ \advance\footcount35
+ \fi
+ }{website;phone;cellphone;fax;email} % variabele/optie van maken
\fi
{ \parskip=0pt\parindent=0pt
\begin{textblock*}{3mm}(\xfold,\yfold)%
@@ -1621,13 +1666,12 @@
\noindent\Tbox{35}{\openingpos}{140}{\opening\openingcomma}
\vspace{\textskip mm}
\thispagestyle{empty}
- \noindent
- #2
+ \noindent\ignorespaces#2
{\parindent=0pt\parskip=\baselineskip
\ifclosing
\ifcase\autographversion
- \par\closing\\\signature % 0: closing on the next line
- \or\par\closing\\[\closingskip]\signature % 1: whiteskip
+ \par\closing\closingcomma\\\signature % 0: closing on the next line
+ \or\par\closing\closingcomma\\[\closingskip]\signature % 1: whiteskip
\or\autographA
\or\autographB
\or\autographC
@@ -2132,4 +2176,4 @@
% \end{macrocode}
% \Finale
\endinput
-$Id: isodoc.dtx,v 1.31 2010-08-24 19:50:48 wybo Exp $
+$Id: isodoc.dtx,v 1.35 2012/02/19 20:14:36 wybo Exp $