summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fullblck/fullblck.dtx
blob: 67fb54ea7c9549a80653ae10df6aeb55d43e4e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
%	\iffalse
%% File: fullblck.dtx	Copyright 1998,1999 James H. Cloos, Jr. <cloos@jhcloos.com>
%
%<*preamble>
%
%	(1)  If you do not already have 'fullblck.ins'
%	     run 'fullblck.dtx' through LaTeX to create it.
%
%	     Now run 'fullblck.ins' through (La)TeX to get the package.
%
%	     [Or use 'docstrip' and extract 'fullblck.sty' from 'fullblck.dtx'
%	     using option 'package']
%
%	(2)  Then run 'fullblck.dtx' three times thought LaTeX
%	     to get the documentation 'fullblck.dvi'.
%
%
%
%%% ====================================================================
%%%  @LaTeX-package-file{
%%%     author          = "James H. Cloos, Jr.",
%%%     version         = "1.03",
%%%     date            = "1999/May/25",
%%%     time            = "22:30:00 UTC",
%%%     filename        = "fullblck.dtx",
%%%     address         = "James H. Cloos, Jr.
%%%                        6607 Brodie Ln #414
%%%                        Austin, TX 78745-4650
%%%                        US",
%%%     telephone       = "+1 888.612.7791",
%%%     FAX             = "+1 888.612.7791",
%%%     email           = "cloos@jhcloos.com",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "letter, fullblock",
%%%     supported       = "yes",
%%%     abstract        = "This package defines commands for using
%%%                        standard SI units in all your texts. The
%%%                        package provides different options for the
%%%                        spacing of the units.",
%%%     docstring       = "This is based heavily on LaTeX2e's letter.dtx, which is:
%%%                           Copyright 1993 1994 1995 1996 1997 The LaTeX3 Project
%%%                           and any individual authors listed in letter.dtx. 
%%%                        My modifications are Copyright 1998,1999 James H. Cloos, Jr.
%%%                        All rights reserved.",
%%%  }
%%% ====================================================================
%
%
% IMPORTANT COPYRIGHT NOTICE:
%
% This package is based on letter.dtx from LaTeX2e and may be used and 
% distributed under the same terms as LaTeX2e.
%
%</preamble>
%
%
%<*batchfile>
\begin{filecontents}{fullblck.ins}
\def\batchfile{fullblck.ins}
\input docstrip.tex
\keepsilent
\generate{\file{fullblck.sty}{\from{fullblck.dtx}{package}}}
\endbatchfile
\end{filecontents}
%</batchfile>
%
%<*driver>
\def\fileversion{1.03}
\def\filedate{1999/May/25}
\documentclass{ltxdoc}
%
\begin{document}
\DocInput{fullblck.dtx}
\end{document}
%</driver>
% \fi
%
%
% \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
%   Lower-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
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
%
% \title{The \texttt{fullblck} package\thanks{This file
%        has version number \fileversion, last revised \filedate.}}
%
% \author{James H. Cloos, Jr.}
% \date{1998/November/24}
% \maketitle
%
%
% \changes{v1.1}{1998/11/17}{Initial version.}%
% \changes{v1.2}{1998/11/24}{Coverted to \textsc{dtx} file.}%
%
% \begin{abstract}
% This article describes the \texttt{fullblck} package which modifies
% the \texttt{letter} class to use a full block layout.
% Specifically, this means that the return address,
% date and closing will be set at the left margin.
% \end{abstract}
%
% \section{Introduction}
% In the US, there are three common layouts used for business letters.
% \LaTeX2e's \texttt{letter} class implements the indented layout.
% This package modifies
% \LaTeX2e's \texttt{letter} class to set the letter in the fullblock
% layout.  No attempt is made to support the semi-block layout.
%
%
% \section{How to use the package}
%
% Add \texttt{\char92usepackage\{fullblck\}} to the preamble of your letter.
% No options are required or supported, and no new commands are defined.
%
% \section{The implementation}
%
% First, the basic boilerplate for a \textsc{sty} file:
%
%    \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\ProvidesPackage{fullblck}
  [1998/11/17 v1.1 JHCloos FullBlock Style for Letters]
%    \end{macrocode}
%
% Now we set the \texttt{\char92longindentation} to zero;
% this puts the closing at the left margin.
%
%    \begin{macrocode}
\longindentation=0pt%
%    \end{macrocode}
%
% Finally we redefine \texttt{\char92opening} to just dump the return
% address and date at the left margin in \texttt{\char92raggedright}
% mode.
%
%    \begin{macrocode}
\renewcommand*{\opening}[1]{\ifx\@empty\fromaddress
  \thispagestyle{firstpage}%
    {\raggedright\@date\par}%
  \else  % home address
    \thispagestyle{empty}%
    {\raggedright\ignorespaces
      \fromaddress \\*[2\parskip]%
      \@date \par}%
  \fi
  \vspace{2\parskip}%
  {\raggedright \toname \\ \toaddress \par}%
  \vspace{2\parskip}%
  #1\par\nobreak}
%</package>
%    \end{macrocode}
%
%
% \Finale