diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/isodoc/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/isodoc/inst | 55 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/isodoc/isodoc.pdf | bin | 1347188 -> 1348777 bytes | |||
-rwxr-xr-x | Master/texmf-dist/doc/latex/isodoc/listkeys | 50 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/isodoc/logoletter/logoletter.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/isodoc/isodoc.dtx | 199 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/isodoc/isodoc.cls | 161 |
7 files changed, 260 insertions, 213 deletions
diff --git a/Master/texmf-dist/doc/latex/isodoc/README b/Master/texmf-dist/doc/latex/isodoc/README index 07af3840e25..f420fe10a06 100644 --- a/Master/texmf-dist/doc/latex/isodoc/README +++ b/Master/texmf-dist/doc/latex/isodoc/README @@ -20,3 +20,7 @@ experiment with. Installation: Execute the inst script with the --help option for more information. +Changes in version 1.03: + - added logo and nologo options + - changed definitions for fancy headings and footings to allow for easy + adaptation in style files. diff --git a/Master/texmf-dist/doc/latex/isodoc/inst b/Master/texmf-dist/doc/latex/isodoc/inst index d605163b9c4..56c1cf04d82 100644 --- a/Master/texmf-dist/doc/latex/isodoc/inst +++ b/Master/texmf-dist/doc/latex/isodoc/inst @@ -11,20 +11,6 @@ function die { exit 1 } -function help { - cat <<-EOD - This is inst - install the $NAME LaTeX $DOCTYPE - Options: - -h, --help print this help - -c, --clean remove all files created by the installation, except the zip file - -z, --zip Create zip for CTAN (no install, developer only) - - Without any options, inst installs $NAME in the first writable - TEXMFMAIN, TEXMFLOCAL or TEXMFHOME tree. - EOD - exit -} - function setdir { # create installation directory for i in MAIN LOCAL HOME; do TREE=$(kpsewhich --expand-var \$TEXMF$i) @@ -58,16 +44,12 @@ sed 's/^%//;s/\\\\$// s/\\text\(sl\|it\){\([^}]\+\)}/\/\2\//g # \textsl{...} -> /.../ s/{\([^}]*\)}/\1/g # keep last, removes all {...} ' >README + grep "Changes in version" README >/dev/null || die changes not detected } function clean { # clean but keep what goes in the zip - rm -f $NAME.{aux,fls,glo,gls,idx,ilg,ind,log,out,toc,$EXT} - rm -f examples/*/{$NAME*,*.{pdf,aux,log,out}} -} - -function Clean { - clean - rm -f $NAME.pdf README + rm -f $NAME.{aux,fls,glo,gls,idx,ilg,ind,log,out,toc} + rm -f examples/*/{$NAME*,*.{pdf,aux,log,fls,out}} } function makeall { @@ -103,45 +85,24 @@ function makeall { } function installall { - # install and cleanup + # cleanup and install + clean echo installing in $TREE - rm -rf $INSTTEX/* $INSTSRC/* $INSTDOC/* cp -f $NAME.$EXT languages/iso* $INSTTEX cp -a $NAME.{ins,dtx} $INSTSRC cp -a README inst languages/template.ldf $NAME.pdf examples/* $INSTDOC mktexlsr $TREE 2>/dev/null - clean -} - -function mkzip { - clean + rm $NAME.cls cd .. zipfile=$NAME/$NAME-$VERSION.zip rm -f $zipfile - zip -Drq $zipfile $NAME/* -x $NAME/test/* + zip -Drq $zipfile $NAME/* -x $NAME/test/* -x $NAME.$EXT cd $NAME - Clean + rm README $NAME.pdf } testexecs setdir - -if ! options=$(getopt -o hcz \ - -l help,clean,zip -- "$@"); then exit 1; fi -eval set -- "$options" - -while [ $# -gt 0 ]; do - case $1 in - -c|--clean) Clean; exit;; - -z|--zip) makeall; mkzip; exit;; - -h|--help) help;; - (--) shift; break;; - (*) break;; - esac - shift -done -test "$1" = "" || die No arguments expected - makeall installall diff --git a/Master/texmf-dist/doc/latex/isodoc/isodoc.pdf b/Master/texmf-dist/doc/latex/isodoc/isodoc.pdf Binary files differindex 79241374cc1..0d1b552c5b8 100644 --- a/Master/texmf-dist/doc/latex/isodoc/isodoc.pdf +++ b/Master/texmf-dist/doc/latex/isodoc/isodoc.pdf diff --git a/Master/texmf-dist/doc/latex/isodoc/listkeys b/Master/texmf-dist/doc/latex/isodoc/listkeys new file mode 100755 index 00000000000..ab77a2f607d --- /dev/null +++ b/Master/texmf-dist/doc/latex/isodoc/listkeys @@ -0,0 +1,50 @@ +#!/bin/bash +#shopt -s extglob + +# after the addition of new options, two regions of the documentation in +# isodoc.dtx need to be updated: +# 1. the body of the definition of \showkeys +# listkeys will print that body with the argument `show' +# 2. The body of the tabular (in the section `Commands'), which shows +# the options having a corresponding command. +# listkeys will print that body with the argument `defs' +# +# An easy way to replace the data in isodoc.dtx is, using the vim editor: +# 1. select the lines (the contents of \def\showkeys, say) with V and then +# 2. type :!listkeys show + + +usage() { echo "Usage: listkeys defs|show"; } +[[ -z $1 ]] && usage + +type=$1 +[[ $type =~ ^(defs|show)$ ]] || usage + +minipage='^(acceptdesc|copyto|enclosures|logoaddres|signature|returnaddress)$' +undef='^(accountname|accountno|bic|iban|routingno|vatno)$' +# find keys which have a corresponding command: +a=($( + while read -r x; do + [[ $x =~ define@key ]] || continue + # \define@key{isodoc}{closing} {\def\closing{#1}} + re='\\define@key\{isodoc\}\{([[:alpha:]]+)\}.*\\def\\\1\{' + # ----word---- ^^-same word + [[ $x =~ $re ]] || continue + echo ${BASH_REMATCH[1]} + done<isodoc.dtx |sort +)) + +if [[ $type == defs ]]; then + for i in ${a[@]}; do + if [[ $i =~ $minipage ]]; then + printf "%20s & \\%s\\NN\n" $i "@isodocmp{$i}" + elif [[ $i =~ $undef ]]; then + printf "%20s & \\%s\\NN\n" $i "@isodocun{$i}" + else + printf "%20s & \\%s\\NN\n" $i $i + fi + done +else + for i in ${a[@]}; do echo $i; done | + cols -5 --squeeze --sep=' & ' --suf='\NN' --pre='% ' +fi diff --git a/Master/texmf-dist/doc/latex/isodoc/logoletter/logoletter.sty b/Master/texmf-dist/doc/latex/isodoc/logoletter/logoletter.sty index 332fca3d6ea..55271dfdb78 100644 --- a/Master/texmf-dist/doc/latex/isodoc/logoletter/logoletter.sty +++ b/Master/texmf-dist/doc/latex/isodoc/logoletter/logoletter.sty @@ -30,7 +30,7 @@ \definecolor{shivablue}{rgb}{.14,.33,.43} \definecolor{shivaback}{rgb}{.97,.87,.71} -\renewcommand{\logo}{ +\renewcommand{\logo}{\if@isodoclogo \pagecolor{shivaback} \begin{textblock}{2}(10,13) \includegraphics[scale=.3]{shiva-shakti.png} @@ -44,7 +44,7 @@ Room 123\quad Bangkok \end{center} - \end{textblock} + \end{textblock}\fi } \setmainfont[Mapping=tex-text]{MinionPro-Regular} \setdefaultlanguage{english} diff --git a/Master/texmf-dist/source/latex/isodoc/isodoc.dtx b/Master/texmf-dist/source/latex/isodoc/isodoc.dtx index 5bf62b5c6ff..4049de35da6 100644 --- a/Master/texmf-dist/source/latex/isodoc/isodoc.dtx +++ b/Master/texmf-dist/source/latex/isodoc/isodoc.dtx @@ -35,7 +35,7 @@ Execute the inst script with the --help option for more information. %<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<class>\ProvidesClass{isodoc}% %<*class> - [2013/11/26 v1.02 isodoc class for letters and invoices] + [2014/02/01 v1.03 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!}{} @@ -237,7 +237,7 @@ Execute the inst script with the --help option for more information. % - added pdfauthor and pdfcreator (isodoc) to pdf-comment\\ % - reorganized documentation directory and install script % } -% \changes{v1.01}{2013/11/22}{ +% \changes{v1.01}{2013/11/26}{ % - vattext was missing in all language files\\ % - aus $\Rightarrow$ von; subjecttext $\Rightarrow$ empty for de-DE\\ % - closing parts in minipages for better page break\\ @@ -248,6 +248,15 @@ Execute the inst script with the --help option for more information. % - more instructions for first line of address\\ % - phone number prefix +nn\textbackslash, instead of +nn{-}- % } +% \changes{v1.02}{2013/11/22}{ +% - installing in correct dirs, so texdoc finds the doc\\ +% - more comment +% } +% \changes{v1.03}{2014/02/01}{ +% - added logo and nologo options\\ +% - changed definitions for fancy headings and footings to allow for easy +% adaptation in style files. +% } % \DoNotIndex{% % \ , \", \', \@auxout, \AtBeginDocument, \AtEndDocument, \Cbox, \CurrentOption, % \DeclareOption, \DescribeMacro, \LARGE, \Large, \LoadClass, \ML, \NN, @@ -407,8 +416,13 @@ Execute the inst script with the --help option for more information. % 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.}{ +% Definition in parts can be useful if you need them elsewhere in your document.}{ +% \T{logo} & Switches the logo on; this is the default, but still useful if +% you have used the |nologo| option in your style file.\NN +% \T{nologo} & Switches the logo off. This is useful if you have defined your +% own logo and have letter paper preprinted with that logo. You can +% then use |nologo| for the paper version and |logo| for a \textsc{pdf} +% to be sent by email.\NN % \T{company = ...} & Your company name as it should appear in the logo (if % you use the default logo) and in the return address % (where it may get overridden by the \T{returnaddress} @@ -970,7 +984,7 @@ Execute the inst script with the --help option for more information. % |color|, and |xkeyval|. |eurosym| is used for the euro symbol. % \begin{macrocode} \RequirePackage{ctable,color,tabularx,graphicx,xstring,calc} -\RequirePackage{forarray} +\RequirePackage{forarray,longtable} % \end{macrocode} % % Since the name of the package contains 'iso', make the page A4. @@ -1010,7 +1024,7 @@ Execute the inst script with the --help option for more information. % weren't: % \begin{macrocode} \definecolor{isodocpink}{rgb}{1,.7,.7} -\def\Undefined#1{\colorbox{isodocpink}{Undefined #1}} +\def\Undefined#1{\fboxsep1pt\colorbox{isodocpink}{Undefined #1}} % \end{macrocode} % A small sans serif font is used for header and footer field names and the % sender's address information. The idea is that this is used for all @@ -1093,9 +1107,13 @@ Execute the inst script with the --help option for more information. % hanging under the rule. % Its contents are defined by the following options: % \begin{macrocode} +\define@key{isodoc}{logo}[\@isodoclogotrue]{\@isodoclogotrue} +\define@key{isodoc}{nologo}[\@isodoclogofalse]{\@isodoclogofalse} + \newif\if@isodoclogo\@isodoclogotrue \define@key{isodoc}{company} {\def\company{#1}} \def\company{\Undefined{company}} \define@key{isodoc}{logoaddress}{\def\logoaddress{#1}} + \def\logoaddress{} \define@key{isodoc}{who} {\def\who{#1}} \def\who{\Undefined{who}} \define@key{isodoc}{street} {\def\street{#1}} @@ -1126,10 +1144,10 @@ Execute the inst script with the --help option for more information. \define@key{isodoc}{leftaddress} []{\def\xaddress{35}} \def\xaddress{35} \define@key{isodoc}{rightaddress}[]{\def\xaddress{105}} -\define@key{isodoc}{addresscenter} {\def\addresscenter{#1}} - \def\addresscenter{63.5} -\define@key{isodoc}{addresswidth} {\def\addresswidth{#1}} - \def\addresswidth{70} +\define@key{isodoc}{addresscenter} {\def\@addresscenter{#1}} + \def\@addresscenter{63.5} +\define@key{isodoc}{addresswidth} {\def\@addresswidth{#1}} + \def\@addresswidth{70} % \end{macrocode} % \DescribeMacro{to} % The |to| option takes the addressee's address lines. Use |\\| to @@ -1195,8 +1213,8 @@ Execute the inst script with the --help option for more information. % A footer is switched on or off with the |footer| and |nofooter| options. % The default is the have no footer. % \begin{macrocode} -\define@key{isodoc}{footorder} {\def\footorder{#1}} - \def\footorder{website;phone;cellphone;email} +\define@key{isodoc}{footorder} {\def\@footorder{#1}} + \def\@footorder{website;@phone;@cellphone;email} \define@key{isodoc}{footer} []{\footertrue} \newif\iffooter\footerfalse \define@key{isodoc}{nofooter}[]{\footerfalse} @@ -1217,17 +1235,17 @@ Execute the inst script with the --help option for more information. % \begin{macrocode} \define@key{isodoc}{areacode} {\def\areacode{#1}} \def\areacode{\Undefined{areacode}} -\define@key{isodoc}{phone} {\def\isodoc@phone{#1}} - \def\isodoc@phone{} - \def\phone{\Undefined{phone}} \define@key{isodoc}{phoneprefix}{\def\phoneprefix{#1}} \def\phoneprefix{0} -\define@key{isodoc}{cellphone} {\def\isodoc@cellphone{#1}} - \def\isodoc@cellphone{} - \def\cellphone{\Undefined{cellphone}} -\define@key{isodoc}{fax} {\def\isodoc@fax{#1}} - \def\isodoc@fax{} - \def\fax{\Undefined{fax}} +\define@key{isodoc}{phone} {\def\phone{#1}} + \def\phone{} + \def\@phone{\Undefined{@phone}} +\define@key{isodoc}{cellphone} {\def\cellphone{#1}} + \def\cellphone{} + \def\@cellphone{\Undefined{@cellphone}} +\define@key{isodoc}{fax} {\def\fax{#1}} + \def\fax{} + \def\@fax{\Undefined{@fax}} \define@key{isodoc}{website} {\def\website{#1}} \def\website{\Undefined{website}} \define@key{isodoc}{email} {\def\email{#1}} @@ -1300,7 +1318,7 @@ Execute the inst script with the --help option for more information. % If you know what you do you can substitute anything you like for the date by % using the |forcedate| option instead of |date|: % \begin{macrocode} -\define@key{isodoc}{forcedate}{\def\forcedate{#1}}\def\forcedate{} +\define@key{isodoc}{forcedate}{\def\@forcedate{#1}}\def\@forcedate{} % \end{macrocode} % \DescribeMacro{subject} % The subject is empty by default and will be typeset only if you give it a value. @@ -1317,8 +1335,8 @@ Execute the inst script with the --help option for more information. % \begin{macrocode} \define@key{isodoc}{opening} {\def\opening{#1}} \def\opening{\Undefined{opening}} -\define@key{isodoc}{openingcomma}{\def\openingcomma{#1}} - \def\openingcomma{,} +\define@key{isodoc}{openingcomma}{\def\@openingcomma{#1}} + \def\@openingcomma{,} % \end{macrocode} % \subsubsection{Closing, autograph, signature} % \DescribeMacro{closing} @@ -1330,8 +1348,8 @@ Execute the inst script with the --help option for more information. % \begin{macrocode} \define@key{isodoc}{closing} {\def\closing{#1}} \def\closing{\Undefined{closing}} -\define@key{isodoc}{closingcomma}{\def\closingcomma{#1}} - \def\closingcomma{,} +\define@key{isodoc}{closingcomma}{\def\@closingcomma{#1}} + \def\@closingcomma{,} \define@key{isodoc}{closingskip}{\closingskip=#1} \newdimen\closingskip\closingskip=2\baselineskip % \end{macrocode} @@ -1379,6 +1397,7 @@ Execute the inst script with the --help option for more information. % payment: % \begin{macrocode} \define@key{isodoc}{term} [30]{\def\term{#1}} + \def\term{} \define@key{isodoc}{accountno} {\def\accountno{#1}} \define@key{isodoc}{routingno} {\def\routingno{#1}} \define@key{isodoc}{accountname}{\def\accountname{#1}} @@ -1522,7 +1541,7 @@ Execute the inst script with the --help option for more information. \setlength{\iso@signpos}{#2*(#4-#3)/100} \hspace*{\iso@outdent}\raisebox{\iso@down}[0pt][0pt]{\includegraphics[height=#2]{#6}}% \\[\baselineskip]% - \closing\closingcomma\\[\iso@signpos]\\[-2\baselineskip]% + \closing\@closingcomma\\[\iso@signpos]\\[-2\baselineskip]% \signature% } } @@ -1535,7 +1554,7 @@ Execute the inst script with the --help option for more information. % \DescribeMacro{\logo} % \begin{macrocode} \newcommand{\zippedcity}{\ifcityzip\city\ \prezip\ \zip\else\prezip\ \zip\ \city\fi} -\newcommand{\logo}{% +\newcommand{\logo}{\if@isodoclogo% { \parskip=0pt\parindent=0pt \begin{textblock}{140}[0,1](35,20)% \textsf{\LARGE\company}\\[-1.7ex] % large company name @@ -1544,14 +1563,14 @@ Execute the inst script with the --help option for more information. } \Tbox{140}{22}{35}{\noindent \footnotesize\sffamily - \ifx\undefined\logoaddress% + \ifx\empty\logoaddress% \ifx\undefined\tbfigures\else\tbfigures\fi \ifx\who\empty\else\who\\\fi \ifx\street\empty\else\street\\\fi \zippedcity \ifforeign\\\country\fi \else\logoaddress\fi - } + }\fi } % \end{macrocode} % \DescribeMacro{\returnaddress} @@ -1616,9 +1635,9 @@ Execute the inst script with the --help option for more information. % was used. % \begin{macrocode} \def\date{% - \ifx\forcedate\empty% + \ifx\@forcedate\empty% \ifnum\year=0\Undefined{date}\else\@isodate\fi - \else\forcedate\fi + \else\@forcedate\fi } % \end{macrocode} % \DescribeMacro{\accountdata} @@ -1627,7 +1646,7 @@ Execute the inst script with the --help option for more information. \def\accountdata{ \textbf{\accountdatatext:}\\ \begin{tabular}{@{}rl@{}} - \ifx\term\undefined\else + \ifx\term\empty\else \termtext: & \term\ \daystext\\ \fi \ifx\accounto\undefined\else @@ -1658,68 +1677,77 @@ Execute the inst script with the --help option for more information. % current values of most keys. % \DescribeMacro{\showkeys} % \begin{macrocode} +\def\@isodocmp#1{\begin{minipage}[t]{\hsize}\mbox{}#1\\[-1.8ex]\mbox{}\end{minipage}} +\def\@isodocun#1{\ifx#1\undefined (undefined, so not shown)\else#1\fi} \def\showkeys{% - \begin{tabular}{rl} + \begin{longtable}{rl} acceptaccount & \acceptaccount\NN acceptaddress & \acceptaddress\NN acceptcents & \acceptcents\NN - acceptdesc & \acceptdesc\NN + acceptdesc & \@isodocmp{\acceptdesc}\NN acceptdescription & \acceptdescription\NN accepteuros & \accepteuros\NN acceptreference & \acceptreference\NN - accountname & \ifx\accountname\undefined (undefined, so not shown)% - \else\accountname\fi\NN - accountno & \ifx\accountno\undefined (undefined, so not shown)% - \else\accountno\fi\NN + accountname & \@isodocun{\accountname}\NN + accountno & \@isodocun{\accountno}\NN areacode & \areacode\NN - bic & \ifx\bic\undefined (undefined, so not shown)% - \else\bic\fi\NN + bic & \@isodocun{\bic}\NN cellphone & \cellphone\NN chamber & \chamber\NN city & \city\NN closing & \closing\NN company & \company\NN + copyto & \@isodocmp{\copyto}\NN country & \country\NN countrycode & \countrycode\NN currency & \currency\NN date & \date\NN email & \email\NN - enclosures & \begin{minipage}[t]{\hsize} - \mbox{}\enclosures\\[-1.5ex] - \end{minipage}\NN - copyto & \begin{minipage}[t]{\hsize} - \mbox{}\copyto \\[-1.5ex] - \end{minipage}\NN + enclosures & \@isodocmp{\enclosures}\NN fax & \fax\NN - iban & \ifx\iban\undefined (undefined, so not shown) - \else\iban\fi\NN + iban & \@isodocun{\iban}\NN + logoaddress & \@isodocmp{\logoaddress}\NN opening & \opening\NN ourref & \ourref\NN phone & \phone\NN - returnaddress & \begin{minipage}[t]{\hsize} - \mbox{}\returnaddress\\[-1.5ex] - \end{minipage}\NN - routingno & \ifx\routingno\undefined (undefined, so not shown) - \else\routingno\fi\NN - signature & \signature\NN + phoneprefix & \phoneprefix\NN + returnaddress & \@isodocmp{\returnaddress}\NN + routingno & \@isodocun{\routingno}\NN + signature & \@isodocmp{\signature}\NN street & \street\NN subject & \subject\NN - toaddress & \begin{minipage}[t]{\hsize} - \mbox{}\toaddress\\[-1.5ex] - \end{minipage}\NN - toname & \toname\NN - vatno & \ifx\vatno\undefined (undefined, so not shown) - \else\vatno\fi\NN + term & \term\NN + vatno & \@isodocun{\vatno}\NN website & \website\NN who & \who\NN yourletter & \yourletter\NN yourref & \yourref\NN zip & \zip\NN - \end{tabular} + \end{longtable} } \AtEndOfClass{% \usepackage{hyperref} } +% \end{macrocode} +% \DescribeMacro{@isodocheadXX} +% We define the heading parts here in order to allow for easy adaptations in style files. +% \begin{macrocode} +\def\@isodocheadL{\totext:{} \toname{} (\date)} +\def\@isodocheadC{} +\def\@isodocheadR{\pagetext\ \thepage\ \oftext{} + \begin{NoHyper}\pageref{LastPageOf\thelettercount}\end{NoHyper} +} +\def\@isodocheadbox#1{\mbox{\color{headingcolor}#1}} +% \end{macrocode} +% \DescribeMacro{@isodocfootXX} +% We define the footing parts here in order to allow for easy adaptations in style files. +% Note that, if you redefine any of these, you will probably have to create some footer +% space with |\geometry{foot}|. +% \begin{macrocode} +\def\@isodocfootL{} +\def\@isodocfootC{} +\def\@isodocfootR{} +% \end{macrocode} % \DescribeMacro{\itable} % |\itable| inserts an invoice table; arg1 should be the rows of the table. % \begin{macrocode} @@ -1730,24 +1758,25 @@ Execute the inst script with the --help option for more information. \ifvertical \begin{tabularx}{\hsize}{@{}X|r@{}}% \sffamily\descriptiontext & - \sffamily \amounttext (\currency)\isodoc@bara\\\hline\\[-5.6ex] + \sffamily \amounttext\,(\currency)\isodoc@bara\\\hline\\[-5.4ex] \isodoc@barb #1% \end{tabularx} \else \begin{tabularx}{\hsize}{@{}Xr@{}}% \sffamily\descriptiontext & - \sffamily \amounttext (\currency)\isodoc@bara\\\hline\\[-5.6ex] + \sffamily \amounttext\,(\currency)\isodoc@bara\\\hline\\[-5.6ex] \isodoc@barb #1% \end{tabularx} \fi } +% \end{macrocode} % \DescribeMacro{\iitem} % |\iitem| inserts an invoice item in the |\itable|. % It inserts |\\arg1 & % arg2|: % \begin{macrocode} \def\iitem#1#2{\\#1\ignorespaces} -% \DescribeMacro{\itotal} % \end{macrocode} +% \DescribeMacro{\itotal} % |\itotal| inserts an invoice total in the |\itable|.\\ % The optional argument replaces |\totaltext|. % \begin{macrocode} @@ -1795,9 +1824,9 @@ Execute the inst script with the --help option for more information. \setcounter{section}{0} \setkeys{isodoc}{#1} \def\isodoc@lead{\ifforeign+\areacode\,\else\phoneprefix\fi} - \ifx\isodoc@phone\empty\else\def\phone{\isodoc@lead\isodoc@phone}\fi - \ifx\isodoc@cellphone\empty\else\def\cellphone{\isodoc@lead\isodoc@cellphone}\fi - \ifx\isodoc@fax\empty\else\def\fax{\isodoc@lead\isodoc@fax}\fi + \ifx\phone \empty\else\def\@phone {\isodoc@lead\phone} \fi + \ifx\cellphone\empty\else\def\@cellphone{\isodoc@lead\cellphone}\fi + \ifx\fax \empty\else\def\@fax {\isodoc@lead\fax} \fi % \end{macrocode} % By now, a language should have been chosen; if not, issue a warning % and set the language to the default: -n-GB @@ -1818,25 +1847,25 @@ Execute the inst script with the --help option for more information. \setcounter{footnote}{0} \fancyhf{} \if@twoside - \fancyhead[LE,RO]{\color{headingcolor}% - \pagetext\ \thepage\ \oftext{} - \begin{NoHyper}\pageref{LastPageOf\thelettercount}\end{NoHyper}} - \fancyhead[RE,LO]{\color{headingcolor}% - \totext: \toname\ (\date)} + \fancyhead[LE,RO]{\@isodocheadbox{\@isodocheadR}} + \fancyhead[RE,LO]{\@isodocheadbox{\@isodocheadL}} + \fancyfoot[LE,RO]{\@isodocheadbox{\@isodocfootR}} + \fancyfoot[RE,LO]{\@isodocheadbox{\@isodocfootL}} \else - \fancyhead[L]{\color{headingcolor}% - \mbox{\totext: \toname\ (\date)}} - \fancyhead[R]{\color{headingcolor}% - \pagetext\ \thepage\ \oftext{} - \begin{NoHyper}\pageref{LastPageOf\thelettercount}\end{NoHyper}} + \fancyhead[L]{\@isodocheadbox{\@isodocheadL}} + \fancyhead[R]{\@isodocheadbox{\@isodocheadR}} + \fancyfoot[L]{\@isodocheadbox{\@isodocfootL}} + \fancyfoot[R]{\@isodocheadbox{\@isodocfootR}} \fi + \fancyhead[C]{\@isodocheadbox{\@isodocheadC}} + \fancyfoot[C]{\@isodocheadbox{\@isodocfootC}} \logo % \end{macrocode} -% addresscenter is the center, vertically, of the to-address block: +% @addresscenter is the center, vertically, of the to-address block: % xaddress should be 1 or 3 for left- and right address windows % \begin{macrocode} { \parskip=0pt\parindent=0pt - \begin{textblock}{\addresswidth}[0,.5](\xaddress,\addresscenter)% + \begin{textblock}{\@addresswidth}[0,.5](\xaddress,\@addresscenter)% \ifreturn {\def\\{\unskip\enspace\textbullet\enspace\ignorespaces}% \sffamily\bfseries\scriptsize\returnaddress @@ -1881,7 +1910,7 @@ Execute the inst script with the --help option for more information. \advance\textskip-12 \fi % \end{macrocode} -% Create the footfields that occur in |\footorder|, starting at the left; +% Create the footfields that occur in |\@footorder|, starting at the left; % \begin{macrocode} \footcount=35 \iffooter @@ -1894,7 +1923,7 @@ Execute the inst script with the --help option for more information. } \fi \advance\footcount35 - }{\footorder} + }{\@footorder} \fi { \parskip=0pt\parindent=0pt \begin{textblock*}{3mm}(\xfold,\yfold)% @@ -1902,7 +1931,7 @@ Execute the inst script with the --help option for more information. \end{textblock*} } \ifx\undefined\accepttype\else\accept\fi - \noindent\Tbox{35}{\openingpos}{140}{\opening\openingcomma} + \noindent\Tbox{35}{\openingpos}{140}{\opening\@openingcomma} \vspace{\textskip mm} \thispagestyle{empty} \noindent\ignorespaces#2 @@ -1910,8 +1939,8 @@ Execute the inst script with the --help option for more information. \par\noindent\begin{minipage}[t]{\hsize} \parindent=0pt\parskip=\baselineskip \ifcase\autographversion - \par\closing\closingcomma\\\signature % 0: closing on the next line - \or\par\closing\closingcomma\\[\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 diff --git a/Master/texmf-dist/tex/latex/isodoc/isodoc.cls b/Master/texmf-dist/tex/latex/isodoc/isodoc.cls index d9689397b54..870e1def5fd 100644 --- a/Master/texmf-dist/tex/latex/isodoc/isodoc.cls +++ b/Master/texmf-dist/tex/latex/isodoc/isodoc.cls @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{isodoc}% - [2013/11/26 v1.02 isodoc class for letters and invoices] + [2014/02/01 v1.03 isodoc class for letters and invoices] \ifx\pdfoutput\undefined\else% \ifnum\pdfoutput=1\else\ClassError{isodoc}{Compile me with pdflatex or xelatex!}{} \fi\fi @@ -37,7 +37,7 @@ \ProcessOptions \LoadClass{article} \RequirePackage{ctable,color,tabularx,graphicx,xstring,calc} -\RequirePackage{forarray} +\RequirePackage{forarray,longtable} \RequirePackage[nofoot,head=\baselineskip]{geometry} \RequirePackage[absolute,overlay]{textpos} \geometry{papersize={210mm,297mm},margin=35mm} @@ -49,7 +49,7 @@ \pagestyle{fancy} \AtBeginDocument{\addtolength{\headheight}{\baselineskip}} \definecolor{isodocpink}{rgb}{1,.7,.7} -\def\Undefined#1{\colorbox{isodocpink}{Undefined #1}} +\def\Undefined#1{\fboxsep1pt\colorbox{isodocpink}{Undefined #1}} \def\@hft{\footnotesize\sffamily\color{headcolor}} \def\@xyshift#1,#2@@@{\def\@xshift{#1}\def\@yshift{#2}} \define@key{isodoc}{shift}{% @@ -73,9 +73,13 @@ \define@key{isodoc}{fill} []{\rightskip=1\rightskip} \define@key{isodoc}{nofill}[]{\rightskip=0mm plus 35mm} \rightskip=0mm plus 35mm +\define@key{isodoc}{logo}[\@isodoclogotrue]{\@isodoclogotrue} +\define@key{isodoc}{nologo}[\@isodoclogofalse]{\@isodoclogofalse} + \newif\if@isodoclogo\@isodoclogotrue \define@key{isodoc}{company} {\def\company{#1}} \def\company{\Undefined{company}} \define@key{isodoc}{logoaddress}{\def\logoaddress{#1}} + \def\logoaddress{} \define@key{isodoc}{who} {\def\who{#1}} \def\who{\Undefined{who}} \define@key{isodoc}{street} {\def\street{#1}} @@ -92,10 +96,10 @@ \define@key{isodoc}{leftaddress} []{\def\xaddress{35}} \def\xaddress{35} \define@key{isodoc}{rightaddress}[]{\def\xaddress{105}} -\define@key{isodoc}{addresscenter} {\def\addresscenter{#1}} - \def\addresscenter{63.5} -\define@key{isodoc}{addresswidth} {\def\addresswidth{#1}} - \def\addresswidth{70} +\define@key{isodoc}{addresscenter} {\def\@addresscenter{#1}} + \def\@addresscenter{63.5} +\define@key{isodoc}{addresswidth} {\def\@addresswidth{#1}} + \def\@addresswidth{70} \define@key{isodoc}{to}{\processto{#1}}\def\toname{Various people} \def\toaddress{\Undefined{to}} \long\def\processto#1{\xproc #1\\@@@\ifx\toaddress\empty @@ -115,24 +119,24 @@ \newcount\subjectpos \newcount\openingpos \newcount\textskip -\define@key{isodoc}{footorder} {\def\footorder{#1}} - \def\footorder{website;phone;cellphone;email} +\define@key{isodoc}{footorder} {\def\@footorder{#1}} + \def\@footorder{website;@phone;@cellphone;email} \define@key{isodoc}{footer} []{\footertrue} \newif\iffooter\footerfalse \define@key{isodoc}{nofooter}[]{\footerfalse} \define@key{isodoc}{areacode} {\def\areacode{#1}} \def\areacode{\Undefined{areacode}} -\define@key{isodoc}{phone} {\def\isodoc@phone{#1}} - \def\isodoc@phone{} - \def\phone{\Undefined{phone}} \define@key{isodoc}{phoneprefix}{\def\phoneprefix{#1}} \def\phoneprefix{0} -\define@key{isodoc}{cellphone} {\def\isodoc@cellphone{#1}} - \def\isodoc@cellphone{} - \def\cellphone{\Undefined{cellphone}} -\define@key{isodoc}{fax} {\def\isodoc@fax{#1}} - \def\isodoc@fax{} - \def\fax{\Undefined{fax}} +\define@key{isodoc}{phone} {\def\phone{#1}} + \def\phone{} + \def\@phone{\Undefined{@phone}} +\define@key{isodoc}{cellphone} {\def\cellphone{#1}} + \def\cellphone{} + \def\@cellphone{\Undefined{@cellphone}} +\define@key{isodoc}{fax} {\def\fax{#1}} + \def\fax{} + \def\@fax{\Undefined{@fax}} \define@key{isodoc}{website} {\def\website{#1}} \def\website{\Undefined{website}} \define@key{isodoc}{email} {\def\email{#1}} @@ -152,17 +156,17 @@ \define@key{isodoc}{yourletter}{\def\yourletter{#1}} \def\yourletter{} \define@key{isodoc}{date}{\@isomakedate{#1}} -\define@key{isodoc}{forcedate}{\def\forcedate{#1}}\def\forcedate{} +\define@key{isodoc}{forcedate}{\def\@forcedate{#1}}\def\@forcedate{} \define@key{isodoc}{subject}{\def\subject{#1}} \def\subject{} \define@key{isodoc}{opening} {\def\opening{#1}} \def\opening{\Undefined{opening}} -\define@key{isodoc}{openingcomma}{\def\openingcomma{#1}} - \def\openingcomma{,} +\define@key{isodoc}{openingcomma}{\def\@openingcomma{#1}} + \def\@openingcomma{,} \define@key{isodoc}{closing} {\def\closing{#1}} \def\closing{\Undefined{closing}} -\define@key{isodoc}{closingcomma}{\def\closingcomma{#1}} - \def\closingcomma{,} +\define@key{isodoc}{closingcomma}{\def\@closingcomma{#1}} + \def\@closingcomma{,} \define@key{isodoc}{closingskip}{\closingskip=#1} \newdimen\closingskip\closingskip=2\baselineskip \define@key{isodoc}{autograph}[2]{\def\autographversion{#1}} @@ -174,6 +178,7 @@ \define@key{isodoc}{copyto} {\def\copyto{#1}} \def\copyto{} \define@key{isodoc}{term} [30]{\def\term{#1}} + \def\term{} \define@key{isodoc}{accountno} {\def\accountno{#1}} \define@key{isodoc}{routingno} {\def\routingno{#1}} \define@key{isodoc}{accountname}{\def\accountname{#1}} @@ -254,12 +259,12 @@ \setlength{\iso@signpos}{#2*(#4-#3)/100} \hspace*{\iso@outdent}\raisebox{\iso@down}[0pt][0pt]{\includegraphics[height=#2]{#6}}% \\[\baselineskip]% - \closing\closingcomma\\[\iso@signpos]\\[-2\baselineskip]% + \closing\@closingcomma\\[\iso@signpos]\\[-2\baselineskip]% \signature% } } \newcommand{\zippedcity}{\ifcityzip\city\ \prezip\ \zip\else\prezip\ \zip\ \city\fi} -\newcommand{\logo}{% +\newcommand{\logo}{\if@isodoclogo% { \parskip=0pt\parindent=0pt \begin{textblock}{140}[0,1](35,20)% \textsf{\LARGE\company}\\[-1.7ex] % large company name @@ -268,14 +273,14 @@ } \Tbox{140}{22}{35}{\noindent \footnotesize\sffamily - \ifx\undefined\logoaddress% + \ifx\empty\logoaddress% \ifx\undefined\tbfigures\else\tbfigures\fi \ifx\who\empty\else\who\\\fi \ifx\street\empty\else\street\\\fi \zippedcity \ifforeign\\\country\fi \else\logoaddress\fi - } + }\fi } \def\returnaddress{% \ifx\undefined\tbfigures\else\tbfigures\fi % when using osf-txfonts... just for me @@ -307,14 +312,14 @@ \ifnum\day > 31 \ClassError{isodoc}{Illegal date: day>31}{}\fi } \def\date{% - \ifx\forcedate\empty% + \ifx\@forcedate\empty% \ifnum\year=0\Undefined{date}\else\@isodate\fi - \else\forcedate\fi + \else\@forcedate\fi } \def\accountdata{ \textbf{\accountdatatext:}\\ \begin{tabular}{@{}rl@{}} - \ifx\term\undefined\else + \ifx\term\empty\else \termtext: & \term\ \daystext\\ \fi \ifx\accounto\undefined\else @@ -340,68 +345,66 @@ \fi \end{tabular} } +\def\@isodocmp#1{\begin{minipage}[t]{\hsize}\mbox{}#1\\[-1.8ex]\mbox{}\end{minipage}} +\def\@isodocun#1{\ifx#1\undefined (undefined, so not shown)\else#1\fi} \def\showkeys{% - \begin{tabular}{rl} + \begin{longtable}{rl} acceptaccount & \acceptaccount\NN acceptaddress & \acceptaddress\NN acceptcents & \acceptcents\NN - acceptdesc & \acceptdesc\NN + acceptdesc & \@isodocmp{\acceptdesc}\NN acceptdescription & \acceptdescription\NN accepteuros & \accepteuros\NN acceptreference & \acceptreference\NN - accountname & \ifx\accountname\undefined (undefined, so not shown)% - \else\accountname\fi\NN - accountno & \ifx\accountno\undefined (undefined, so not shown)% - \else\accountno\fi\NN + accountname & \@isodocun{\accountname}\NN + accountno & \@isodocun{\accountno}\NN areacode & \areacode\NN - bic & \ifx\bic\undefined (undefined, so not shown)% - \else\bic\fi\NN + bic & \@isodocun{\bic}\NN cellphone & \cellphone\NN chamber & \chamber\NN city & \city\NN closing & \closing\NN company & \company\NN + copyto & \@isodocmp{\copyto}\NN country & \country\NN countrycode & \countrycode\NN currency & \currency\NN date & \date\NN email & \email\NN - enclosures & \begin{minipage}[t]{\hsize} - \mbox{}\enclosures\\[-1.5ex] - \end{minipage}\NN - copyto & \begin{minipage}[t]{\hsize} - \mbox{}\copyto \\[-1.5ex] - \end{minipage}\NN + enclosures & \@isodocmp{\enclosures}\NN fax & \fax\NN - iban & \ifx\iban\undefined (undefined, so not shown) - \else\iban\fi\NN + iban & \@isodocun{\iban}\NN + logoaddress & \@isodocmp{\logoaddress}\NN opening & \opening\NN ourref & \ourref\NN phone & \phone\NN - returnaddress & \begin{minipage}[t]{\hsize} - \mbox{}\returnaddress\\[-1.5ex] - \end{minipage}\NN - routingno & \ifx\routingno\undefined (undefined, so not shown) - \else\routingno\fi\NN - signature & \signature\NN + phoneprefix & \phoneprefix\NN + returnaddress & \@isodocmp{\returnaddress}\NN + routingno & \@isodocun{\routingno}\NN + signature & \@isodocmp{\signature}\NN street & \street\NN subject & \subject\NN - toaddress & \begin{minipage}[t]{\hsize} - \mbox{}\toaddress\\[-1.5ex] - \end{minipage}\NN - toname & \toname\NN - vatno & \ifx\vatno\undefined (undefined, so not shown) - \else\vatno\fi\NN + term & \term\NN + vatno & \@isodocun{\vatno}\NN website & \website\NN who & \who\NN yourletter & \yourletter\NN yourref & \yourref\NN zip & \zip\NN - \end{tabular} + \end{longtable} } \AtEndOfClass{% \usepackage{hyperref} } +\def\@isodocheadL{\totext:{} \toname{} (\date)} +\def\@isodocheadC{} +\def\@isodocheadR{\pagetext\ \thepage\ \oftext{} + \begin{NoHyper}\pageref{LastPageOf\thelettercount}\end{NoHyper} +} +\def\@isodocheadbox#1{\mbox{\color{headingcolor}#1}} +\def\@isodocfootL{} +\def\@isodocfootC{} +\def\@isodocfootR{} \def\isodoc@bara{\raisebox{-1ex}{\rule{0pt}{3ex}}} \def\isodoc@barb{\rule{0pt}{2.7ex}} \def\isodoc@barc{\rule{0pt}{1ex}} @@ -409,13 +412,13 @@ \ifvertical \begin{tabularx}{\hsize}{@{}X|r@{}}% \sffamily\descriptiontext & - \sffamily \amounttext (\currency)\isodoc@bara\\\hline\\[-5.6ex] + \sffamily \amounttext\,(\currency)\isodoc@bara\\\hline\\[-5.4ex] \isodoc@barb #1% \end{tabularx} \else \begin{tabularx}{\hsize}{@{}Xr@{}}% \sffamily\descriptiontext & - \sffamily \amounttext (\currency)\isodoc@bara\\\hline\\[-5.6ex] + \sffamily \amounttext\,(\currency)\isodoc@bara\\\hline\\[-5.6ex] \isodoc@barb #1% \end{tabularx} \fi @@ -440,9 +443,9 @@ \setcounter{section}{0} \setkeys{isodoc}{#1} \def\isodoc@lead{\ifforeign+\areacode\,\else\phoneprefix\fi} - \ifx\isodoc@phone\empty\else\def\phone{\isodoc@lead\isodoc@phone}\fi - \ifx\isodoc@cellphone\empty\else\def\cellphone{\isodoc@lead\isodoc@cellphone}\fi - \ifx\isodoc@fax\empty\else\def\fax{\isodoc@lead\isodoc@fax}\fi + \ifx\phone \empty\else\def\@phone {\isodoc@lead\phone} \fi + \ifx\cellphone\empty\else\def\@cellphone{\isodoc@lead\cellphone}\fi + \ifx\fax \empty\else\def\@fax {\isodoc@lead\fax} \fi \ifx\yourlettertext\undefined% \ClassWarning{isodoc}{You did not use the language option; using the default: en-GB} \isodoc@enGB% @@ -459,21 +462,21 @@ \setcounter{footnote}{0} \fancyhf{} \if@twoside - \fancyhead[LE,RO]{\color{headingcolor}% - \pagetext\ \thepage\ \oftext{} - \begin{NoHyper}\pageref{LastPageOf\thelettercount}\end{NoHyper}} - \fancyhead[RE,LO]{\color{headingcolor}% - \totext: \toname\ (\date)} + \fancyhead[LE,RO]{\@isodocheadbox{\@isodocheadR}} + \fancyhead[RE,LO]{\@isodocheadbox{\@isodocheadL}} + \fancyfoot[LE,RO]{\@isodocheadbox{\@isodocfootR}} + \fancyfoot[RE,LO]{\@isodocheadbox{\@isodocfootL}} \else - \fancyhead[L]{\color{headingcolor}% - \mbox{\totext: \toname\ (\date)}} - \fancyhead[R]{\color{headingcolor}% - \pagetext\ \thepage\ \oftext{} - \begin{NoHyper}\pageref{LastPageOf\thelettercount}\end{NoHyper}} + \fancyhead[L]{\@isodocheadbox{\@isodocheadL}} + \fancyhead[R]{\@isodocheadbox{\@isodocheadR}} + \fancyfoot[L]{\@isodocheadbox{\@isodocfootL}} + \fancyfoot[R]{\@isodocheadbox{\@isodocfootR}} \fi + \fancyhead[C]{\@isodocheadbox{\@isodocheadC}} + \fancyfoot[C]{\@isodocheadbox{\@isodocfootC}} \logo { \parskip=0pt\parindent=0pt - \begin{textblock}{\addresswidth}[0,.5](\xaddress,\addresscenter)% + \begin{textblock}{\@addresswidth}[0,.5](\xaddress,\@addresscenter)% \ifreturn {\def\\{\unskip\enspace\textbullet\enspace\ignorespaces}% \sffamily\bfseries\scriptsize\returnaddress @@ -528,7 +531,7 @@ } \fi \advance\footcount35 - }{\footorder} + }{\@footorder} \fi { \parskip=0pt\parindent=0pt \begin{textblock*}{3mm}(\xfold,\yfold)% @@ -536,7 +539,7 @@ \end{textblock*} } \ifx\undefined\accepttype\else\accept\fi - \noindent\Tbox{35}{\openingpos}{140}{\opening\openingcomma} + \noindent\Tbox{35}{\openingpos}{140}{\opening\@openingcomma} \vspace{\textskip mm} \thispagestyle{empty} \noindent\ignorespaces#2 @@ -544,8 +547,8 @@ \par\noindent\begin{minipage}[t]{\hsize} \parindent=0pt\parskip=\baselineskip \ifcase\autographversion - \par\closing\closingcomma\\\signature % 0: closing on the next line - \or\par\closing\closingcomma\\[\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 |