From 410cc7e8f060e82bbcdd0749551c4f159329b0cf Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 31 Jul 2008 00:27:42 +0000 Subject: new latex package chletter (29jul08) git-svn-id: svn://tug.org/texlive/trunk@9913 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/chletter/chletter.dtx | 703 +++++++++++++++++++++ .../texmf-dist/source/latex/chletter/chletter.ins | 17 + 2 files changed, 720 insertions(+) create mode 100644 Master/texmf-dist/source/latex/chletter/chletter.dtx create mode 100644 Master/texmf-dist/source/latex/chletter/chletter.ins (limited to 'Master/texmf-dist/source/latex/chletter') diff --git a/Master/texmf-dist/source/latex/chletter/chletter.dtx b/Master/texmf-dist/source/latex/chletter/chletter.dtx new file mode 100644 index 00000000000..aabf5cd9b8d --- /dev/null +++ b/Master/texmf-dist/source/latex/chletter/chletter.dtx @@ -0,0 +1,703 @@ +% \iffalse meta-comment +% +% Copyright 2008 Boris Oriet +% The licence is LPPL. +% +% \fi +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1996/06/01] +%\ProvidesClass{chletter}[2008/07/29 v1.0 Swiss Letter document class] +%<*driver> +\ProvidesFile{chletter.dtx} +\documentclass[a4paper]{ltxdoc} +\usepackage[colorlinks]{hyperref} +\CodelineNumbered +\CodelineIndex +\EnableCrossrefs +\RecordChanges +\frenchspacing +\begin{document} +\DocInput{chletter.dtx} +\end{document} +% +% \fi +% \changes{v1.0}{2008/07/29}{Initial version} +% \GetFileInfo{chletter.dtx} +% \DoNotIndex{\newcommand,\newenvironment} +% \author{Boris \textsc{Oriet}} +% \title{Swiss Letter Document Class for \LaTeXe{}} +% \maketitle +% +% \section{Introduction} +% The \textsf{chletter} class is intended for typesetting letters with addresses fields +% corresponding to C5 \& C6/5 envelopes (according to the swiss norm SN~010130)\footnote +% {This version of the class only generates +% envelopes with righthanded recipient addresses, perhaps a future version +% will add an option to support lefthanded windows.}. +% +% This class is mostly compatible with the standard \LaTeXe{} classes, +% especially the \textsf{letter} class. Unlike the \textsf{lettre} class\footnote +% {From the Observatoire de Gen\`eve, see at \texttt{http://www.ctan.org}}, +% this one doesn't provide much additional commands and declarations. +% +% \section{Examples sources} +% The following examples describe the normal usage of the \textsf{chletter} class. +% +% \subsection{Standard Letter: \texttt{standardletter.ltx}} +% \begin{verbatim} +% \documentclass{chletter} +% \author{fromname} +% \address{fromaddress} +% \begin{document} +% \begin{letter}{toname\\toaddress} +% \opening{salutation} +% text +% \closing{valediction} +% \end{letter} +% \end{document} +% \end{verbatim} +% +% \subsection{Minimal Letter: \texttt{minimalletter.ltx}} +% \begin{verbatim} +% \documentclass{chletter} +% \begin{document} +% \end{document} +% \end{verbatim} +% +% \subsection{Commented example: \texttt{sampleletter.ltx}} +% \begin{verbatim} +% \documentclass{chletter} % defaults: 11pt,a4paper,oneside +% \title{sampleletter} % +% \author{author} % if no signature specified +% \name{fromname} % to appear in the footer +% \signature{fromsig} % to appear after valediction +% \location{office} % to appear in the sender address zone +% \address{fromaddress} % to appear at the upper left +% \return{returnaddress} % to appear in the window +% \telephone{telephone} % to appear under the address +% \date{place, \today} % to alter the date string +% \makelabels % will generate an envelope page +% \begin{document} % +% \begin{letter}{toname % gets the recipient name and address +% \\toaddress} % and creates the addresses zones +% \conc[l]{subject} % the letter's subject, left aligned +% \opening[i]{salutation} % the salutation, text will be indented +% text % the letter's main text +% \closing{valediction} % adds the signature +% \ps{\emph{ps}}post % creates a post scriptum +% \cc{copies} % creates a copies field +% \encl{enclosures} % creates an enclosures field +% \end{letter} % +% \end{document} % +% \end{verbatim} +% +% \section{Compatibility} +% The \textsf{chletter} class is based upon the standard classes of the \LaTeXe{} +% distribution. It is mostly compatible with any type of document founded on these classes. +% +%\subsection{Compatibility with the \LaTeXe{} \textsf{letter} class} +% +%\subsubsection{Ascending Compatiblity} +% \textsf{chletter} is ``source compatible'' with the standard \textsf{letter} class. +% Usually a file which compiles with \textsf{letter} will recompile straight forward +% with this one. There are however some functional differencies: +%\begin{itemize} +%\item the addresses zones, at the top of the first page, is inserted at the opening +% of the |letter| envrionment rather than at the |\opening| command; +% \item there are important differences in the page layout; the addresses zones are +% redefined and the vertical centering mecanisme is absent; +% \item some macros, for example |\makelabels|, behave somewhat differently; the labels +% generation mechanism via the \textsf{.aux} file is inactive. +%\end{itemize} +% +%\subsubsection{Descending Compatibility} +% A document using the new options and macros of the \textsf{chletter} class won't +% compile directly with the \textsf{letter} class\footnote{These differences are marked +% with an asterisk in the following sections}. +% +%\subsection{Compatibility With Other \LaTeXe{} Standard Classes} +% The \textsf{chletter} class is largely ``source compatible'' with the standard \LaTeXe{} +% classes. It doesn't implement the sectioning mecanism, but accepts the related commands +% (|\section| for example). The |\maketitle| command is defined but behaves in a special way. +% +%\subsection{Compatibility with \LaTeX\,2.09} +% No compatibility mecanism with \LaTeX\,2.09 has been implemented. The sources should +% be adapted to the standards defined by \LaTeXe, particularly those concerning the font +% selection scheme\footnote{\texttt{\textbackslash textbf} or \texttt{\textbackslash mathbf} in +% place of \texttt{\textbackslash bf}.}. +%\subsection{Compatibility With Other Packages} +% +% There is no reported incompatibility with usual packages. +% \StopEventually{\PrintChanges\PrintIndex} +% +% \section{Implementation} +% +% \subsection{Options} +% The initial code is taken from the \LaTeXe{} standard document +% classes. See classes.dtx and letter.dtx for more information. +% This class is largely compatible with the standard letter class. +% We have mainly the same options with the same behaviour. +% \begin{macrocode} +%<*chletter> +\newcommand\@ptsize{} +% \end{macrocode} +% +% \subsubsection{Declaring Options} +% \begin{macrocode} +\DeclareOption{a4paper}{\paperheight297mm\paperwidth210mm} +\DeclareOption{a5paper}{\paperheight210mm\paperwidth148mm} +\DeclareOption{b5paper}{\paperheight250mm\paperwidth176mm} +\DeclareOption{letterpaper}{\paperheight11in\paperwidth8.5in} +\DeclareOption{legalpaper}{\paperheight14in\paperwidth8.5in} +\DeclareOption{executivepaper}{\paperheight10.5in\paperwidth7.25in} +\DeclareOption{landscape} + {\@tempdima\paperheight + \paperheight\paperwidth + \paperwidth\@tempdima} +\DeclareOption{10pt}{\renewcommand\@ptsize{0}} +\DeclareOption{11pt}{\renewcommand\@ptsize{1}} +\DeclareOption{12pt}{\renewcommand\@ptsize{2}} +\DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse} +\DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue} +\DeclareOption{draft}{\setlength\overfullrule{5\p@}} +\DeclareOption{final}{\setlength\overfullrule{0\p@}} +\DeclareOption{leqno}{\input{leqno.clo}} +\DeclareOption{fleqn}{\input{fleqn.clo}} +% \end{macrocode} +% +% \subsubsection{Executing Options} +% The default options are set according to swiss paper format (A4). +% We also set a standard type size of 11pt. +% \begin{macrocode} +\ExecuteOptions{a4paper,11pt,oneside,onecolumn,final} +\ProcessOptions +\input{size1\@ptsize.clo} +% \end{macrocode} +% +% \subsubsection{Loading Packages} +% This class dos not load additional packages. +% +% \subsection{Document Layout} +% This class tries to provide a quite universal layout, not only suitable +% for letters, but also for other types of short documents. +% +% \subsubsection{Paragraphing} +% We prefer some paragraph spacing and some indentation at the document level. +% This may be altered in the letter environment. +% \begin{macrocode} +\parskip9\p@\parindent18\p@ +% \end{macrocode} +% \begin{macro}{letterskip} +% \begin{macro}{letterindent} +% These values are used to store the current paragraph skip and indentation parameters. They are +% computed at the beginning of the \textsf{letter} environment from |\parskip| and |\parindent| values. +% \begin{macrocode} +\newdimen\letterskip\newdimen\letterindent +% \end{macrocode} +% \end{macro} +% \end{macro} +% We don't allow the breaking of a page in an hyphenated line. +% \begin{macrocode} +\brokenpenalty10000 +% \end{macrocode} +% +% \subsubsection{Standard Page Layout} +% All margin dimensions are measured from a point one inch from the +% top and lefthand side of the page (the \LaTeXe{} origin). We add 0.5 inch for the header. +% This gives a 1.5 inch total margin from the top of the page +% to the begining of the text. Note that the standard classes do not +% set the |\topskip| value, which is set to 10 pt by the \LaTeX{} kernel. +% \begin{macrocode} +\topmargin\z@\topskip12\p@\headheight12\p@\headsep24\p@ +% \end{macrocode} +% Same as above, we add 0.5 inch for the footer. We also set the footnotes vertical spaces here. +% \begin{macrocode} +\footskip36\p@\footnotesep12\p@\skip\footins18\p@ +% \end{macrocode} +% We substract 2.5 inches to the width of the paper. +% \begin{macrocode} +\textwidth\paperwidth\addtolength\textwidth{-180\p@} +% \end{macrocode} +% We substract 3 inches from the height of the paper. +% \begin{macrocode} +\textheight\paperheight\addtolength\textheight{-216\p@} +% \end{macrocode} +% We set standard values here. We will have a 1.5 inch +% lefthand margin and a 1~inch righthand margin (given +% the text width is 2.5~inches shorter than the paper width. +% \begin{macrocode} +\oddsidemargin36\p@\evensidemargin0\p@ +\marginparwidth48\p@\marginparsep12\p@\marginparpush6\p@ +% \end{macrocode} +% +% \subsubsection{New Horizontal Dimensions} +% \begin{macro}{\addressmargin} +% This is the space between the origin (1 inch from the left border of the page) +% and the recipient address field. +% \begin{macrocode} +\newdimen\addressmargin\addressmargin246\p@ +% \end{macrocode} +% \end{macro} +% \begin{macro}{\longindentation} +% \begin{macro}{\indentedwidth} +% |\longindentation| + |\indentedwidth| = |\textwidth|. +% These values will be computed at the begining of the \textsf{letter} environment. +% They are useful to align text width the recipient address field, which may be +% modified by author between two letters. +% \begin{macrocode} +\newdimen\longindentation\newdimen\indentedwidth +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{New Vertical Dimensions} +% \begin{macro}{\fromtop} +% We need to position precisely the addresses fields, substracting some values until +% we reach the origin at 1 inch from the top of the paper. +% \begin{macrocode} +\newdimen\fromtop\fromtop\z@\addtolength\fromtop{-\headheight} +\addtolength\fromtop{-\headsep}\addtolength\fromtop{-\baselineskip} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\fromheight} +% \begin{macro}{\toheight} +% |\fromheight| is the height of the field containing the sender address. +% |\toheight| is the height of the field containing the recipient address. +% Theses values are set accordingly to swiss standard windowed envelopes. +% \begin{macrocode} +\newdimen\fromheight\fromheight60\p@\newdimen\toheight\toheight96\p@ +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\sigspace} +% is the total space in which the signature is centered. +% \begin{macrocode} +\newdimen\sigspace\sigspace6\bigskipamount +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Page Styles} +% The pagestyles \textsl{empty} and \textsl{plain} are defined in +% the \LaTeX{} kernel ({ltpage.dtx}). In this class we change +% a bit the \textsl{plain} style. Note that we don't set different +% headings for one-sided and two-sided documents. +% \begin{macrocode} +\def\ps@plain + {\let\@oddhead\@empty + \def\@oddfoot + {\footnotesize{\hfil\pagename~\thepage}} + \let\@evenhead\@oddhead\let\@evenfoot\@oddfoot} +\def\ps@headings + {\def\@oddhead + {\footnotesize{\hspace*{-\oddsidemargin}\headtoname~\toname\hfil\pagename~\thepage}} + \def\@oddfoot + {\footnotesize{\hspace*{-\oddsidemargin}\leftmark\hfil\rightmark}} + \let\@evenhead\@oddhead\let\@evenfoot\@oddfoot} +\def\ps@myheadings + {\def\@oddhead + {\footnotesize{\hspace*{-\oddsidemargin}\leftmark\hfil\rightmark}} + \def\@oddfoot + {\footnotesize{\hfil\pagename~\thepage}} + \let\@evenhead\@oddhead\let\@evenfoot\@oddfoot} +\def\ps@firstpage + {\let\@oddhead\@empty + \def\@oddfoot + {\footnotesize{\hspace*{-\oddsidemargin}\leftmark\hfil\rightmark}} + \let\@evenhead\@oddhead\let\@evenfoot\@oddfoot} +% \end{macrocode} +% +% \subsection{Declarations} +% +% \subsubsection{Commands} +% \begin{macro}{\name\fromname} +% \begin{macro}{\signature\fromsig} +% \begin{macro}{\address\fromaddress} +% \begin{macro}{\location\fromlocation} +% \begin{macro}{\telephone\telephonenum} +% \begin{macro}{\return\returnaddress} +% The standard \textsf{letter} class doesn't provide a |\return| command, but +% knows of the |\returnaddress| value. One should note that some of these values +% are functionally different from the standard class, and that |\@author| +% (set by the |\author| command) may be used to replace |\fromname| and |\fromsig| +% in most cases (see ...). Usually the user will use these commands in the preamble +% of his letter. But they can be altered anywhere to obtain some special effects +% (different addresses for the envelope page for example). +% \begin{macrocode} +\newcommand*{\name}[1]{\def\fromname{#1}}\name{} +\newcommand*{\signature}[1]{\def\fromsig{#1}}\signature{} +\newcommand*{\address}[1]{\def\fromaddress{#1}}\address{} +\newcommand*{\location}[1]{\def\fromlocation{#1}}\location{} +\newcommand*{\telephone}[1]{\def\telephonenum{#1}}\telephone{} +\newcommand*{\return}[1]{\def\returnaddress{#1}}\return{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\fromstreet} +% \begin{macro}{\fromplace} +% \begin{macro}{\toname} +% \begin{macro}{\toaddress} +% We additionaly declare some default values. These are computed at the begining of +% the letter environment (see xxx), but may be altered manually by the user. +% Here we ensure they are defined even if the letter environment is not invoked, to +% prevent runtime errors. +% \begin{macrocode} +\def\toname{}\def\toaddress{}\def\fromstreet{}\def\fromplace{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Words} +% \begin{macro}{\ccname} +% \begin{macro}{\enclname} +% \begin{macro}{\pagename} +% \begin{macro}{\headtoname} +% These names are defined the same way as in the standard letter class. They +% will be altered by the linguistic packages (babel) at the begining of the document. +% If the user wants to alter them manually, he should do it after |\begin{document}| +% to obtain the expected result. +% \begin{macrocode} +\newcommand*{\ccname}{cc}\newcommand*{\enclname}{encl} +\newcommand*{\pagename}{Page}\newcommand*{\headtoname}{To} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Date} +% \begin{macro}{\today} +% This macro is identical to the one defined in the standard class. +% \begin{macrocode} +\newcommand*{\today} + {\ifcase\month\or January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} +% \end{macrocode} +% \end{macro} +% +% \subsection{Insertion commands} +% \begin{macro}{\maketitle} +% This macro will generate the addresses fields from given values. It is invocated by +% the letter environment, but can be used anywhere in the document (not in the preamble). +% The recipient address is defined as an argument to the letter environment, +% but one may use |\def\toname{}| and |\def\toaddress{}| to set it manually. +% +% This macro takes the same optional argument as the letter environment:\\ +% |[p]| (plain, default) will put the expeditor field, the date and the recipient field.\\ +% |[e]| (everything) will add the return address to the recipient field.\\ +% |[n]| (nofrom) will put only the recipient field.\\ +% |[r]| (return) will add the return address to the recipient field. +% \begin{macrocode} +\newcommand*{\maketitle}[1][p] + {\vspace*{-\parskip}\ifx n#1\vspace*{\fromheight}\else\ifx r#1\vspace*{\fromheight}% + \else\noindent\hspace{-\oddsidemargin}\parbox[t][\fromheight]{\addressmargin} + {\ifx\ch@aut\@author + \else\leavevmode\@author\\\fi + \ifx\@empty\fromlocation + \else\fromlocation\\\fi + \ifx\@empty\fromaddress + \else\fromaddress\par\medskip\fi + \ifx\@empty\telephonenum + \else{\footnotesize\telephonenum\par\medskip}\fi}% + \parbox[t]{\indentedwidth}{~\\\@date}\par\vspace*{-\parskip}\fi\fi + \noindent\hspace{\longindentation}\parbox[t][\toheight]{\indentedwidth} + {\ifx p#1\else\ifx n#1\else{\footnotesize\returnaddress\par\medskip}\fi\fi + \leavevmode\toname\\\toaddress\\}\vspace*{-\parskip}\par} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\opening} +% Unlike the standard letter |\opening| command, this one is very simplistic. It only creates +% the opening formula given in its mandatory argument. +% +% There is an optional argument:\\ +% |[n]| (noindent, default) turns indentation off for the following text.\\ +% |[i]| (indent) turns indentation on for the following text. +% +% Note that the optional argument modifies the following text, not the opening itself! The +% indentation value is taken from |\letterindent|. +% \begin{macrocode} +\newcommand{\opening}[2][n] + {\ifx i#1\parindent\letterindent\else\parindent\z@\fi\par\noindent#2\par\medskip} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\closing} +% This command generates the valediction line and the signature. +% The signature is horizontaly aligned width the recipient address field and +% verticaly spaced by |\sigspace|. The signature is one of the following: +% |\fromsig|, |\fromname|, |\@author|, depending on whether they are defined or not. +% +% It takes the same optional argument as the |\opening| command, default is |[n]|. +% \begin{macrocode} +\newcommand{\closing}[2][n] + {\ifx i#1\parindent\letterindent\else\parindent\z@\fi\par\medskip + #2\par\vspace*{.5\sigspace} + \noindent\hspace\longindentation + \ifx\@empty\fromsig + \ifx\@empty\fromname\@author\else\fromname\fi + \else\fromsig\fi + \par\vspace*{.5\sigspace}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\longindentation} +% This macro will align the text contained in its argument with the recipient address. +% \begin{macrocode} +\newcommand*{\longindent}[1] + {\par\noindent\hspace{\longindentation}\parbox[t]{\indentedwidth}{#1}\par\smallskip} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\conc} +% This command is intended to be used before the |\opening| command, to add a subject +% line. It accepts one mandatory argument (the actual text to be inserted) and one +% optional argument:\\ +% |[r]| (right, default) aligns against the text margin.\\ +% |[l]| (left) aligns with the expeditor address. +% +% \begin{macrocode} +\newcommand*{\conc}[2][r]{\ch@pul[#1]{\textbf{#2}}\par\bigskip} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ps} +% This command is useful to achieve certain effects. It aligns its text argument following +% the optional argument and dosen't close the current paragraph. The following text will +% continue on the same line. +% \begin{macrocode} +\newcommand*{\ps}[2][r]{\ch@put[#1]{#2}{\ignorespaces}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\cc} +% \begin{macro}{\encl} +% These two commands are intended to be used at the end of the letter, but they can +% be placed anywhere in the document to obtain special effects. Their usage is quite similar +% to what is described in the standard letter class. They all take a mandatory +% argument (some text) and an optional argument:\\ +% |[r]| (right, default) aligns against the text margin.\\ +% |[l]| (left) aligns with the expeditor address. +% \begin{macrocode} +\newcommand*{\cc}[2][r]{\ch@put[#1]{\emph{\ccname}}{#2}\par\medskip} +\newcommand*{\encl}[2][r]{\ch@put[#1]{\emph{\enclname}}{#2}\par\medskip} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\section} +% \begin{macro}{\subsection} +% \begin{macro}{\subsubsection} +% These commands are not defined in the standard letter class. functionally, they do nothing +% but emphasize the text given as their argument. They cannot be used to generate +% a table of contents, because the necessary provisions are not implemented in this class. +% They take an optional argument:\\ +% |[r]| (right, default) aligns against the text margin.\\ +% |[l]| (left) aligns with the expeditor address. +% \begin{macrocode} +\newcommand*{\subsubsection}[2][r]{\par\ch@pul[#1]{\textbf{#2}}\par} +\newcommand*{\subsection}[2][r]{\smallskip\subsubsection[#1]{#2}} +\newcommand*{\section}[2][r]{\medskip\subsubsection[#1]{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\paragraph} +% \begin{macro}{\subparagraph} +% Contrary to the commands above, these do not accept an optional argument. +% \begin{macrocode} +\newcommand*{\subparagraph}[1]{\par\textbf{#1}~} +\newcommand*{\paragraph}[1]{\par\noindent\textbf{#1}~} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsection{The \texttt{\textbackslash makelabels} Command} +% \begin{macro}{\makelabels} +% This acts as a flag for the letter environment. If true (i.e. |\makelabels| have +% been invoked with a given option before the |letter| environement), then a page will be +% added to the letter, containing only the addresses fields. This is intended to generate envelopes. +% +% This command passes its argument to the |letter| environment and then to |\maketitle|. An |[f]| argument will be +% interpreted at the end of the letter environment as a request to deactivate the labels +% generation mecanism. +% \begin{macrocode} +\newcommand*{\makelabels}[1][r]{\let\ch@lab#1} +% \end{macrocode} +% \end{macro} +% +% \subsection{The Letter Environment} +% The aforementioned commands are arguably specific to letters. But they may be used as well outside +% the letter environment to achieve some special effects. It is not mandatory to use a letter +% environment with this class. +% \begin{environment}{letter} +% The letter environment creates a new page, resets numberings, computes some values, +% invokes the |\maketitle| macro, optionaly twice (following the flag set +% by |\makelabels|) to generate an additional envelope page. +% This is an important functional difference with the standard letter class. +% As a side effect, local declarations (|\name| for example) will alter only the additional +% envelope page if they are made inside the letter environement. +% +% It has the same mandatory argument as the standard class, nevertheless it accepts one optional argument +% which will be passed to |\maketitle|:\\ +% |[p]| (plain, default) will put the expeditor field, the date and the recipient field.\\ +% |[e]| (everything) will add the return address to the recipient field.\\ +% |[n]| (nofrom) will put only the recipient field.\\ +% |[r]| (return) will add the return address to the recipient field. +% \begin{macrocode} +\newenvironment*{letter}[2][p] + {\ch@pfr{\fromaddress}\ch@pto{#2} + \letterindent\parindent\parindent\z@\letterskip\parskip + \longindentation\addressmargin\addtolength\longindentation{-\oddsidemargin} + \indentedwidth\textwidth\addtolength\indentedwidth{-\longindentation} + \newpage\c@page\@ne\c@footnote\z@\pagestyle{plain}\thispagestyle{empty} + \vspace*{\fromtop}\maketitle[#1]} + {\vfil\pagebreak + \if f\ch@lab + \else\newpage\thispagestyle{empty}\vspace*{\fromtop}\maketitle[\ch@lab]\fi} +% \end{macrocode} +% \end{environment} +% +% \subsection{Standard Definitions} +% +% \subsubsection{Lists Parameters} +% \begin{macrocode} +\leftmargini\parindent\leftmargin\leftmargini +\leftmarginii\leftmargini\leftmarginiii\leftmargini\leftmarginiv\leftmargini +\labelsep.25\parindent\labelwidth.75\parindent +\renewcommand\theenumi{\@arabic\c@enumi} +\renewcommand\theenumii{\@alph\c@enumii} +\renewcommand\theenumiii{\@roman\c@enumiii} +\renewcommand\theenumiv{\@Alph\c@enumiv} +\newcommand\labelenumi{\theenumi.} +\newcommand\labelenumii{(\theenumii)} +\newcommand\labelenumiii{\theenumiii.} +\newcommand\labelenumiv{\theenumiv.} +\renewcommand\p@enumii{\theenumi} +\renewcommand\p@enumiii{\theenumi(\theenumii)} +\renewcommand\p@enumiv{\p@enumiii\theenumiii} +\newcommand\labelitemi{\textbullet} +\newcommand\labelitemii{\textendash} +\newcommand\labelitemiii{\textasteriskcentered} +\newcommand\labelitemiv{\textperiodcentered} +% \end{macrocode} +% +% \subsubsection{New Environments} +% \begin{macrocode} +\newenvironment{description} + {\list{}{\labelwidth\z@\itemindent-\leftmargin + \let\makelabel\descriptionlabel}}{\endlist} +\newcommand*{\descriptionlabel}[1] + {\hspace\labelsep\textbf{#1}} +\newenvironment{verse} + {\let\\=\@centercr + \list{}{\itemsep\z@\itemindent-\parindent + \listparindent\itemindent\rightmargin\leftmargin + \addtolength\leftmargin\parindent} + \item[]}{\endlist} +\newenvironment{quotation} + {\list{}{\listparindent\parindent + \itemindent\listparindent\rightmargin\leftmargin} + \item[]}{\endlist} +\newenvironment{quote} + {\list{}{\rightmargin\leftmargin} + \item[]}{\endlist} +% \end{macrocode} +% +% \subsubsection{Existing Environments Parameters} +% \begin{macrocode} +\arraycolsep5\p@\tabcolsep6\p@ +\arrayrulewidth.4\p@\doublerulesep2\p@ +\tabbingsep\labelsep +\skip\@mpfootins=\skip\footins +\fboxsep3\p@\fboxrule.4\p@ +\renewcommand\theequation{\@arabic\c@equation} +% \end{macrocode} +% +% \subsubsection{Footnotes Parameters} +% \begin{macrocode} +\renewcommand\footnoterule + {\kern-3\p@\hrule\@width.4\columnwidth\kern2.6\p@} +\newcommand\@makefntext[1] + {\noindent\hb@xt@\z@{\hss\@makefnmark}#1} +% \end{macrocode} +% +% \subsubsection{Column Mode} +% \begin{macrocode} +\columnsep10\p@\columnseprule0\p@ +\pagenumbering{arabic} +\raggedbottom\onecolumn +% \end{macrocode} +% +% \subsection{Internal Declarations} +% The following macros are internal to the chletter class. +% +% \subsubsection{Tokenizers} +% \begin{macro}{\ch@pfr} +% \begin{macro}{\ch@pto} +% \begin{macro}{\ch@cut} +% These macros are tokenizers which split their argument +% depending on what is defined or not by the user. +% They build |\fromstreet|, |\fromplace|, |\toname|, +% |\toaddress| and |\returnaddress|. Note that if +% |\returnaddress| is not empty, it will be left in place. +% \begin{macrocode} +\newcommand\ch@pfr[1] + {\expandafter\ch@cut#1\\\@empty + \ifx\ch@sec\@empty\else\expandafter\ch@cut#1\@empty\fi + \let\fromstreet\ch@fir\let\fromplace\ch@sec + \ifx\@empty\returnaddress + \ifx\@empty\fromname + \ifx\@author\ch@aut\def\returnaddress{\fromstreet, \fromplace} + \else\def\returnaddress{\@author, \fromstreet, \fromplace}\fi + \else\def\returnaddress{\fromname, \fromstreet, \fromplace}\fi\fi} +\newcommand\ch@pto[1] + {\expandafter\ch@cut#1\\\@empty + \ifx\ch@sec\@empty\else\expandafter\ch@cut#1\@empty\fi + \let\toname\ch@fir\let\toaddress\ch@sec} +\def\ch@cut#1\\#2\@empty{\def\ch@fir{#1}\def\ch@sec{#2}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Extractors} +% \begin{macro}{\ch@put} +% \begin{macro}{\ch@pul} +% These two macros are used by some commands (|\ps|, |\cc|, etc.) to position some text +% outside of the margin, following their optional argument. +% \begin{macrocode} +\newcommand{\ch@put}[3][r] + {\par\noindent\hspace{-\oddsidemargin}\makebox[\oddsidemargin][#1]{#2~}#3} +\newcommand{\ch@pul}[2][r] + {\noindent\ifx l#1\hspace{-\oddsidemargin}\fi#2} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{Flags} +% \begin{macro}{\ch@lab} +% \begin{macro}{\ch@aut} +% These are flags used by the letter environment and the titling commands. |\ch@lab| defines +% whether or not a label page should be generated, and |\ch@aut| knows if |\@author| has been +% altered by the user. +% \begin{macrocode} +\let\ch@lab=f\let\ch@aut=\@author +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \subsubsection{Dummies} +% These commands are here only for compatibility with the standard letter class. +% \begin{macrocode} +\def\@startlabels{}\let\@mlabel=\@gobbletwo +% \end{macrocode} +% +% \subsection{End Of Class} +% \begin{macrocode} +% +% \end{macrocode} +%\newpage +%\tableofcontents +% \Finale +% +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/chletter/chletter.ins b/Master/texmf-dist/source/latex/chletter/chletter.ins new file mode 100644 index 00000000000..44b089c8898 --- /dev/null +++ b/Master/texmf-dist/source/latex/chletter/chletter.ins @@ -0,0 +1,17 @@ +%% +%% Copyright 2008 Boris Oriet +%% The licence is LPPL. +%% +\input docstrip +\keepsilent +\preamble + +Copyright 2008 Boris Oriet +The licence is LPPL. + +\endpreamble +\generateFile{chletter.cls}{t}{\from{chletter.dtx}{chletter}} +\endbatchfile + + + -- cgit v1.2.3