summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/jlabels/jlabels.tex
blob: d9ea78acbb62470da59bf146ccc15269770ce649 (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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
\documentclass[12pt]{amsart}

%%%%%     MARGINS     %%%%%

\setlength{\columnsep}{50pt}
\setlength{\voffset}{-50pt}
\setlength{\textheight}{650pt}
\setlength{\hoffset}{-50pt}
\setlength{\textwidth}{465pt}
\newlength{\oldparindent}
\setlength{\oldparindent}{\parindent}
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}

%%%%%     COUNTERS     %%%%%

\newcounter{Object}
\newcounter{SubObject}

%%%%%     DEFINITIONS     %%%%%

\def\ex{\addtocounter{Object}{1}%
         {\bf Example \theObject:}
         \setcounter{SubObject}{0}}

\def\exlabeljane{%
{ }
\parbox{87pt}{\text{ }\\
Jane Smith\\
321 Main Street\\
City, State  54321}
{ }}

\def\exlabeljohn{%
{ }
\parbox{87pt}{\text{ }\\
John Smith\\
123 Main Street\\
City, State 12345}
{ }}

\def\janecode{%
Jane Smith\(\backslash\)\(\backslash\)%
321 Main Street\(\backslash\)\(\backslash\)%
City, State 54321}

\def\johncode{%
John Smith\(\backslash\)\(\backslash\)%
123 Main Street\(\backslash\)\(\backslash\)%
City, State 12345}

\def\note{\addtocounter{Object}{1}%
         {\bf Note \theObject:}
         \setcounter{SubObject}{0}}

\def\subobject{\addtocounter{SubObject}{1}%
               $\boldsymbol{(\roman{SubObject})}$ }

\def\tip{\addtocounter{Object}{1}%
         {\bf Tip \theObject:}
         \setcounter{SubObject}{0}}

\def\trick{\addtocounter{Object}{1}%
         {\bf Trick \theObject:}
         \setcounter{SubObject}{0}}

\begin{document}

\begin{center}

{\bf Latex Package jlabels}

Jamal K. Tartir

jktartir@hotmail.com

\end{center}

\vspace{15pt}

\begin{center}

A latex package designed to make letter-sized pages of labels.

\end{center}

\vspace{15pt}

\begin{center}

{\bf Section I: Getting Started}

\end{center}

\note
This package has been tested with only the amsart documentclass.

The following six commands have been defined.

\(\backslash\)beginjlabels[opfs]

\(\backslash\)endjlabels

\(\backslash\)jlabelt[opint]\{address\}

\(\backslash\)myjlabel\{alias\}\{address\}

\(\backslash\)jlabel[opint]\{alias\}

\(\backslash\)jlabelLengths[oplu]%
\{leftm\}%
\{topm\}%
\{width\}%
\{height\}%
\{rows\}%
\{cols\}%
\{hgap\}%
\{vgap\}

\note
The following command
must be placed in the preamble.

\(\backslash\)jlabelLengths[oplu]%
\{leftm\}%
\{topm\}%
\{width\}%
\{height\}%
\{rows\}%
\{cols\}%
\{hgap\}%
\{vgap\}

Definitions and explanations of the arguments are given below.

oplu: optional length unit (e.g., 1in, 2cm, 3pt, etc.)

The default value for oplu is 1in.

The required arguments leftm, \(\ldots,\) vgap
must be numbers only
(no units are entered).
Negative numbers are permitted.

leftm: left margin

topm: top margin

width: label width

height: label height

rows: number of rows

cols: number of columns

hgap: horizontal gap (space between columns)

vgap: vertical gap (space between rows)

\ex
The following commands are equivalent.

\(\backslash\)jlabelLengths[1in]%
\{.1875\}\{.5\}\{2.625\}\{1\}\{10\}\{3\}\{.125\}\{0\}

\(\backslash\)jlabelLengths%
\{.1875\}\{.5\}\{2.625\}\{1\}\{10\}\{3\}\{.125\}\{0\}

\(\backslash\)jlabelLengths[72.27pt]%
\{.1875\}\{.5\}\{2.625\}\{1\}\{10\}\{3\}\{.125\}\{0\}

\note
The
\(\backslash\)jlabelLengths
command
sets the page layout as necessary.
Length commands
such as
\(\backslash\)hoffset,
\(\backslash\)voffset,
\(\backslash\)textwidth,
\(\backslash\)textheight,
etc.
should not be used.

\tip
As a way of keeping notes,
several \(\backslash\)jlabelLengths
commands can be put in the preamble with
the unused ones commented out.

\note
Labels are created by placing
\(\backslash\)jlabelt[opint]\{Address\}
commands
between\linebreak
\(\backslash\)beginjlabels[opfs]
and
\(\backslash\)endjlabels
within the body of the document.

The optional argument of the
\(\backslash\)beginjlabels
command determines whether the page is filled by
columns (opfs = c) or rows (opfs = r).
The default value is c.

The optional argument
of the \(\backslash\)jlabelt command
is the number of times the label is printed
and its default value is 1.

\ex
The following sequence of commands placed in the body
of the document
produces the label
\exlabeljohn
three times and the label
\exlabeljane
once. 

\enlargethispage{\baselineskip}

\(\backslash\)beginjlabels

\(\backslash\)jlabelt[3]\{\johncode\}

\(\backslash\)jlabelt\{\janecode\}

\(\backslash\)endjlabels

\note
The command
\(\backslash\)jlabelt\{\} creates a blank label.

\ex
The command
\(\backslash\)jlabelt[4]\{\} creates 4 blank labels.

\note
The \(\backslash\)jlabelt command will create new pages as necessary.

\note
The command
\(\backslash\)myjlabel\{alias\}\{address\}
allows
\(\backslash\)jlabel[opint]\{alias\}
to be used in place of
\(\backslash\)jlabelt[opint]\{address\}.

\note
The \(\backslash\)myjlabel command
should be placed in the preamble (or personal sty file),
not within the document environment.

\ex
The command shown below
allows
\(\backslash\)jlabel[3]\{home\}
to be used in place of
\(\backslash\)jlabelt[3]\{\johncode\}.

\(\backslash\)myjlabel\{home\}\{\johncode\}

\begin{center}

{\bf Section II: Adjusting Labels}

\end{center}

\note
By default, the labels are left justified.  This can
be changed by changing the definition of
\(\backslash\)jlabeljustify from l to r or c.

\ex
To right justify [center] the labels,
place the command
\(\backslash\)def\(\backslash\)jlabeljustify\{r\}
[\(\backslash\)def\(\backslash\)jlabeljustify\{c\}]
at the appropriate place in the document.

\note
By default, the text of the label is placed in the
center of the label.
Changing the values of
leftm and topm (negative values are allowed)
in the \(\backslash\)jlabelLengths command will shift
all labels in the document.

\note
The text of an individual label can be shifted by
placing the text in the tabular environment and then
using the 
\(\backslash\)hspace* and
\(\backslash\)raisebox commands.

\ex
The command shown below will
move the label
\exlabeljohn
right 2 inches and down 1 inch.

\(\backslash\)jlabelt\{\%\\
\(\backslash\)hspace*\{4in\}\%\\
\(\backslash\)raisebox\{-2in\}\{\%\\
\(\backslash\)begin\{tabular\}\{\(\backslash\)jlabeljustify\}\\
\johncode\\
\(\backslash\)end\{tabular\}\}\}

\note
The lengths used in the
\(\backslash\)hspace* and
\(\backslash\)raisebox commands are twice the
amount that the text will actually move.  This is
because the jlabels package centers the text in the
middle of the label.

\trick
An easy way to shift the text of a label left is to put an
\(\backslash\)hspace* command at the end of the longest line.

\ex
The command shown below will move the label \exlabeljohn left 1 inch.

\(\backslash\)jlabelt\{\johncode\(\backslash\)hspace*\{2in\}\}

\tip
Adjust individual labels as little as possible.  The
tediousness of this task is one of the reasons that this
package was written.

\end{document}