Debian Codegraph @

texmf-dist/doc/latex/jlabels/jlabels.tex

raw
1 \documentclass[12pt]{amsart}
2
3 %%%%% MARGINS %%%%%
4
5 \setlength{\columnsep}{50pt}
6 \setlength{\voffset}{-50pt}
7 \setlength{\textheight}{650pt}
8 \setlength{\hoffset}{-50pt}
9 \setlength{\textwidth}{465pt}
10 \newlength{\oldparindent}
11 \setlength{\oldparindent}{\parindent}
12 \setlength{\parindent}{0pt}
13 \setlength{\parskip}{\baselineskip}
14
15 %%%%% COUNTERS %%%%%
16
17 \newcounter{Object}
18 \newcounter{SubObject}
19
20 %%%%% DEFINITIONS %%%%%
21
22 \def\ex{\addtocounter{Object}{1}%
23 {\bf Example \theObject:}
24 \setcounter{SubObject}{0}}
25
26 \def\exlabeljane{%
27 { }
28 \parbox{87pt}{\text{ }\\
29 Jane Smith\\
30 321 Main Street\\
31 City, State 54321}
32 { }}
33
34 \def\exlabeljohn{%
35 { }
36 \parbox{87pt}{\text{ }\\
37 John Smith\\
38 123 Main Street\\
39 City, State 12345}
40 { }}
41
42 \def\janecode{%
43 Jane Smith\(\backslash\)\(\backslash\)%
44 321 Main Street\(\backslash\)\(\backslash\)%
45 City, State 54321}
46
47 \def\johncode{%
48 John Smith\(\backslash\)\(\backslash\)%
49 123 Main Street\(\backslash\)\(\backslash\)%
50 City, State 12345}
51
52 \def\note{\addtocounter{Object}{1}%
53 {\bf Note \theObject:}
54 \setcounter{SubObject}{0}}
55
56 \def\subobject{\addtocounter{SubObject}{1}%
57 $\boldsymbol{(\roman{SubObject})}$ }
58
59 \def\tip{\addtocounter{Object}{1}%
60 {\bf Tip \theObject:}
61 \setcounter{SubObject}{0}}
62
63 \def\trick{\addtocounter{Object}{1}%
64 {\bf Trick \theObject:}
65 \setcounter{SubObject}{0}}
66
67 \begin{document}
68
69 \begin{center}
70
71 {\bf Latex Package jlabels}
72
73 Jamal K. Tartir
74
75 [email protected]
76
77 \end{center}
78
79 \vspace{15pt}
80
81 \begin{center}
82
83 A latex package designed to make letter-sized pages of labels.
84
85 \end{center}
86
87 \vspace{15pt}
88
89 \begin{center}
90
91 {\bf Section I: Getting Started}
92
93 \end{center}
94
95 \note
96 This package has been tested with only the amsart documentclass.
97
98 The following six commands have been defined.
99
100 \(\backslash\)beginjlabels[opfs]
101
102 \(\backslash\)endjlabels
103
104 \(\backslash\)jlabelt[opint]\{address\}
105
106 \(\backslash\)myjlabel\{alias\}\{address\}
107
108 \(\backslash\)jlabel[opint]\{alias\}
109
110 \(\backslash\)jlabelLengths[oplu]%
111 \{leftm\}%
112 \{topm\}%
113 \{width\}%
114 \{height\}%
115 \{rows\}%
116 \{cols\}%
117 \{hgap\}%
118 \{vgap\}
119
120 \note
121 The following command
122 must be placed in the preamble.
123
124 \(\backslash\)jlabelLengths[oplu]%
125 \{leftm\}%
126 \{topm\}%
127 \{width\}%
128 \{height\}%
129 \{rows\}%
130 \{cols\}%
131 \{hgap\}%
132 \{vgap\}
133
134 Definitions and explanations of the arguments are given below.
135
136 oplu: optional length unit (e.g., 1in, 2cm, 3pt, etc.)
137
138 The default value for oplu is 1in.
139
140 The required arguments leftm, \(\ldots,\) vgap
141 must be numbers only
142 (no units are entered).
143 Negative numbers are permitted.
144
145 leftm: left margin
146
147 topm: top margin
148
149 width: label width
150
151 height: label height
152
153 rows: number of rows
154
155 cols: number of columns
156
157 hgap: horizontal gap (space between columns)
158
159 vgap: vertical gap (space between rows)
160
161 \ex
162 The following commands are equivalent.
163
164 \(\backslash\)jlabelLengths[1in]%
165 \{.1875\}\{.5\}\{2.625\}\{1\}\{10\}\{3\}\{.125\}\{0\}
166
167 \(\backslash\)jlabelLengths%
168 \{.1875\}\{.5\}\{2.625\}\{1\}\{10\}\{3\}\{.125\}\{0\}
169
170 \(\backslash\)jlabelLengths[72.27pt]%
171 \{.1875\}\{.5\}\{2.625\}\{1\}\{10\}\{3\}\{.125\}\{0\}
172
173 \note
174 The
175 \(\backslash\)jlabelLengths
176 command
177 sets the page layout as necessary.
178 Length commands
179 such as
180 \(\backslash\)hoffset,
181 \(\backslash\)voffset,
182 \(\backslash\)textwidth,
183 \(\backslash\)textheight,
184 etc.
185 should not be used.
186
187 \tip
188 As a way of keeping notes,
189 several \(\backslash\)jlabelLengths
190 commands can be put in the preamble with
191 the unused ones commented out.
192
193 \note
194 Labels are created by placing
195 \(\backslash\)jlabelt[opint]\{Address\}
196 commands
197 between\linebreak
198 \(\backslash\)beginjlabels[opfs]
199 and
200 \(\backslash\)endjlabels
201 within the body of the document.
202
203 The optional argument of the
204 \(\backslash\)beginjlabels
205 command determines whether the page is filled by
206 columns (opfs = c) or rows (opfs = r).
207 The default value is c.
208
209 The optional argument
210 of the \(\backslash\)jlabelt command
211 is the number of times the label is printed
212 and its default value is 1.
213
214 \ex
215 The following sequence of commands placed in the body
216 of the document
217 produces the label
218 \exlabeljohn
219 three times and the label
220 \exlabeljane
221 once.
222
223 \enlargethispage{\baselineskip}
224
225 \(\backslash\)beginjlabels
226
227 \(\backslash\)jlabelt[3]\{\johncode\}
228
229 \(\backslash\)jlabelt\{\janecode\}
230
231 \(\backslash\)endjlabels
232
233 \note
234 The command
235 \(\backslash\)jlabelt\{\} creates a blank label.
236
237 \ex
238 The command
239 \(\backslash\)jlabelt[4]\{\} creates 4 blank labels.
240
241 \note
242 The \(\backslash\)jlabelt command will create new pages as necessary.
243
244 \note
245 The command
246 \(\backslash\)myjlabel\{alias\}\{address\}
247 allows
248 \(\backslash\)jlabel[opint]\{alias\}
249 to be used in place of
250 \(\backslash\)jlabelt[opint]\{address\}.
251
252 \note
253 The \(\backslash\)myjlabel command
254 should be placed in the preamble (or personal sty file),
255 not within the document environment.
256
257 \ex
258 The command shown below
259 allows
260 \(\backslash\)jlabel[3]\{home\}
261 to be used in place of
262 \(\backslash\)jlabelt[3]\{\johncode\}.
263
264 \(\backslash\)myjlabel\{home\}\{\johncode\}
265
266 \begin{center}
267
268 {\bf Section II: Adjusting Labels}
269
270 \end{center}
271
272 \note
273 By default, the labels are left justified. This can
274 be changed by changing the definition of
275 \(\backslash\)jlabeljustify from l to r or c.
276
277 \ex
278 To right justify [center] the labels,
279 place the command
280 \(\backslash\)def\(\backslash\)jlabeljustify\{r\}
281 [\(\backslash\)def\(\backslash\)jlabeljustify\{c\}]
282 at the appropriate place in the document.
283
284 \note
285 By default, the text of the label is placed in the
286 center of the label.
287 Changing the values of
288 leftm and topm (negative values are allowed)
289 in the \(\backslash\)jlabelLengths command will shift
290 all labels in the document.
291
292 \note
293 The text of an individual label can be shifted by
294 placing the text in the tabular environment and then
295 using the
296 \(\backslash\)hspace* and
297 \(\backslash\)raisebox commands.
298
299 \ex
300 The command shown below will
301 move the label
302 \exlabeljohn
303 right 2 inches and down 1 inch.
304
305 \(\backslash\)jlabelt\{\%\\
306 \(\backslash\)hspace*\{4in\}\%\\
307 \(\backslash\)raisebox\{-2in\}\{\%\\
308 \(\backslash\)begin\{tabular\}\{\(\backslash\)jlabeljustify\}\\
309 \johncode\\
310 \(\backslash\)end\{tabular\}\}\}
311
312 \note
313 The lengths used in the
314 \(\backslash\)hspace* and
315 \(\backslash\)raisebox commands are twice the
316 amount that the text will actually move. This is
317 because the jlabels package centers the text in the
318 middle of the label.
319
320 \trick
321 An easy way to shift the text of a label left is to put an
322 \(\backslash\)hspace* command at the end of the longest line.
323
324 \ex
325 The command shown below will move the label \exlabeljohn left 1 inch.
326
327 \(\backslash\)jlabelt\{\johncode\(\backslash\)hspace*\{2in\}\}
328
329 \tip
330 Adjust individual labels as little as possible. The
331 tediousness of this task is one of the reasons that this
332 package was written.
333
334 \end{document}