Debian Codegraph @

texmf-dist/doc/latex/shipunov/sltables-doc-en.tex

raw
1 \documentclass{article}
2 \usepackage{sltables}
3
4 \author{A.\,Shipunov\footnote{e-mail: \texttt{dactylorhiza at gmail.com}}}
5
6 \title{\texttt{sltables},\\
7 the \LaTeX\ modification of R.\,Nilson\footnote{Robert Nilsson, Academic Computing Service, Texas A\&M University, [email protected], ranhelp@tamvenus}\\ \texttt{S-Tables} macros}
8
9 \date{}
10
11 \tolerance=10000
12
13 \begin{document}
14 \maketitle
15
16 \textbf{Note}: Original documentation was reformatted and changed in accordance with the current situation.
17
18 \section{Documentation}
19
20 \bigskip
21
22 \begin{stable}
23 \multicolumn2\bf\hfil Types of Commands\hfil\eltt
24
25 Start/End|\stpar{2.5in}{\noindent These are the commands for starting and ending
26 the table}\elt
27
28 Columns Separators|\stpar{2.5in}{\noindent These are used to separate the columns
29 in the tables}\elt
30
31 Row Separators|\stpar{2.5in}{\noindent These are used to separate the rows}\elt
32
33 Configuration|\stpar{2.5in}{\noindent These are used to set up the functioning
34 of the tables such as the width of a thick rule, whether the internal rules are
35 thin or thick, etc.}\elt
36
37 Specials|\stpar{2.5in}{\noindent These include any commands that do not fit into
38 the above categories}
39 \end{stable}
40
41 \bigskip
42
43 \begin{stable}
44 \multicolumn3\bf\hfil Start/End\hfil\eltt
45
46 Command|Arguments|Description\eltt
47
48 \verb|\begin{stable}|\hfill|none|Start a table\hfill\el
49
50 \verb|\begin{stableto}|\hfill|width|\stpar{2.5in}{\noindent Start a table with the
51 specified width. The table will be stretched until it is `width' wide}\el
52
53 \verb|\begin{stablesp}|\hfill|stretch amount|\stpar{2.5in}{\noindent Start a table and stretch
54 it `stretch amount' wider than it would normally be}\elt
55
56 \stpar{1in}{\noindent\verb|\end{stable}|, \verb|\end{stablesp}|, \verb|\end{stableto}|}\hfill|none|End the table\hfill
57 \end{stable}
58
59 \bigskip
60
61 \begin{stable}
62 \multicolumn3\bf\hfil Column Separators\hfil\eltt
63
64 Command|Arguments|Description\eltt
65
66 \tt\char'174
67 \hfill|none|\stpar{2.5in}{\noindent End a column and place a vertical rule
68 of the default width between the columns (do not use this at the end of a
69 line)}\el
70
71 \verb!\!\tt\char'174
72 \hfill|none|\stpar{2.5in}{\noindent Same as above but the vertical rule
73 will be suppressed}\el
74
75 \verb|\vt|\hfill|none|\stpar{2.5in}{\noindent Same as above but the vertical rule
76 will be thin}\el
77
78 \verb|\vtt|\hfill|none|\stpar{2.5in}{\noindent Same as above but the vertical rule
79 will be thick}\el
80
81 \verb|\vttt|\hfill|thickness|\stpar{2.5in}{\noindent Same as above but the vertical
82 rule will be `thickness' wide}
83 \end{stable}
84
85 \bigskip
86
87 \begin{stable}
88 \multicolumn3\bf\hfil Row Separators\hfil\eltt
89
90 Command|Arguments|Description\eltt
91
92 \verb|\el|\hfill|none|\stpar{2.5in}{\noindent End a line and don't put a rule under it. (Do
93 not use this after the last line of the table, use \verb|\endtable|)}\el
94
95 \verb|\elt|\hfill|none|\stpar{2.5in}{\noindent Same as above except put a thin rule under
96 the line}\el
97
98 \verb|\eltt|\hfill|none|\stpar{2.5in}{\noindent Same as above except put a thick rule under
99 the line}\el
100
101 \verb|\elttt|\hfill|thickness|\stpar{2.5in}{\noindent Same as above except put a rule of
102 width `thickness' under the line}\el
103
104 \verb|\elspec|\hfill|none|\stpar{2.5in}{\noindent This command is used to set up
105 rules under rows that DO NOT span the entire row. It in effect indicates that
106 the next row will specify the rule to be used under the current row. This is
107 especially useful when using with the row spanning commands. This introduces
108 a subclass, the horizontal rule commands}\elt
109 \multicolumn3\hfil Horizonal Rule Command Subset\hfil\elt
110
111 \verb|\trule|\hfill|none|\stpar{2.5in}{\noindent Places a thin horizontal rule
112 under a column. This command is only for use in conjunction with the \verb|\elspec|
113 command (To leave a column blank, i.e. no rule, just leave it blank)}\el
114
115 \verb|\ttrule|\hfill|none|\stpar{2.5in}{\noindent Same as above but the rule will be
116 thick}\el
117
118 \verb|\tttrule|\hfill|thickness|\stpar{2.5in}{\noindent Same as above but the rule
119 will be `thickness' thick}
120
121 \end{stable}
122
123 \bigskip
124
125 You may be wondering what the difference between the \verb|\elt| and the \verb|\trule|
126 command is. The \verb|\elt| will end the line and draw a thin rule under it. The
127 \verb|\trule| works in conjunction with the \verb|\elspec| to generate a special rule.
128 The special rule line is entered the same way a regular row will be entered.
129 For example, a normal row would look like:
130
131 \begin{verbatim}
132 This|is|a|Test\elt
133 \end{verbatim}
134
135 This will produce a row with a thin rule under it. To produce the
136 same effect without a rule under the column `is' the following would be used:
137
138 \begin{verbatim}
139 This|is|a|Test\elspec
140 \trule||\trule|\trule\el
141 \end{verbatim}
142
143 Notice that the vertical bars are used. The macro is starting a new
144 row and the vertical bars need to be included if you want them to continue
145 through the line. (There is no need to only use the \verb!|!, any other column
146 separator is also valid).
147
148 \begin{stable}
149 \multicolumn3\bf\hfill Configuration\hfill\eltt
150
151 Variable|Value|Description\eltt
152 \multicolumn3\hfill Dimensions\hfill\elt
153
154 \verb|\stablesthinline|\hfill|dimension|\stpar{2.5in}{\noindent This variable
155 contains the width of a thin rule in the table. The default value is
156 0.4pt and it may be changed with the command:
157
158 \verb|\stablesthinline=<dimen>|
159
160 \noindent where \verb|<dimen>| is the new width.}\el
161
162 \verb|\stablesthickline|\hfill|dimension|\stpar{2.5in}{\noindent This
163 variable contains the width of a thick rule in the table. The default
164 value is 1pt and it may be changed as above.}\elt
165 \multicolumn3\hfill Counters\hfill\elt
166
167 \verb|\stablestyle|\hfill|0|\stpar{2.5in}{\noindent Center the table using
168 the current \verb|\hsize|. This is the default setting and it may be
169 changed by the following command:
170
171 \verb|\stablestyle=|$n$
172
173 \noindent where $n$ is the new value (0, 1, 2, or 3)}\el
174
175 |1|Left justify the table\hfill\el
176
177 |2|Right justify the table\hfill\el
178
179 |3|No justification\hfill
180
181 \elt\multicolumn3\hfill If Statements\hfill\elt
182
183 \verb|\ifstablesinternalthin|\hfill|true|\stpar{2.5in}{\noindent Make the
184 internal rules of the table thin. This sets the vertical rule
185 generated by the \textbar. To set the value of this variable the following
186 command must be used:
187
188 \verb|\stablesinternalthintrue|
189
190 \noindent Please note the word `if' is removed and the word `true' has
191 been appended to the end. The value after this command will be true.
192 To set it to false append the word `false' instead of `true'.}\el
193 |false|\stpar{2.5in}{\noindent Use thick internal rules (where the \textbar
194 is used)}\elspec
195
196 |\trule|\trule\el
197
198 \verb|\ifstablesborderthin|\hfill|true|\stpar{2.5in}{\noindent Use thin rules
199 for the border of the table}\el
200
201 |false|\stpar{2.5in}{\noindent Use thick rules for the border of the
202 table. This is the default.}
203 \end{stable}
204
205 \bigskip
206
207 All settings in the configuration section should be used {\bf OUTSIDE}
208 the table. The results of changing a setting inside the table will be
209 unpredictable, and undesirable.
210
211 There are two more settings that need to be discussed. First is the
212 element buffering. There are two definitions that are used for this:
213 \verb|\stablesleft| and \verb|\stablesright|. The default settings are as
214 follows:
215
216 \begin{verbatim}
217 \def\stablesleft{\quad\hfil}
218 \def\stablesright{\hfil\quad}
219 \end{verbatim}
220
221 To change these, simply redefine them.
222
223 The other setting is the strut. If you are interested in resetting
224 this, the \TeX book should provide sufficient information (The strut
225 is used to hold up the box).
226
227 \section{Specials}
228
229 This section will be broken into three parts: the spanning commands, the
230 paragraph commands, and miscellaneous information.
231
232 First of all we have two (actually three, but I'll discuss the third later)
233 spanning commands. They are \verb|\multicolumn| and \verb|\multirow|. To use
234 \verb|\multicolumn| to span several columns the command will be:
235
236 \verb|\multicolumn|$n$ and your data here.\footnote{\textbf{Note}: \texttt{multicolumn} cannon start a new paragraph!}
237
238 The $n$ specifies the number of columns to span across. For
239 example, if a table has 3 columns and you want a title across the top,
240 $n$ would be 3. Omit each column separator that is spanned across (in
241 this case none would be used). When this command is used the buffering is
242 suspended on the spanning column, so it is necessary to put \verb|\hfil|'s around
243 the data in the spanning column to center it.
244
245 \verb|\multirow| works slightly differently. The number of rows to span is
246 specified in the same way as the number of columns in the \verb|\multicolumn| macro,
247 but the text to be spanned must be placed in curly braces directly after:
248
249 \verb|\multirow|$n$\verb|{<horizontal material>}|
250
251 The \verb|<horizontal material>| will be vertically centered in the number
252 of spanned rows. The horizontal rules are not automatically omitted under the
253 columns of the rows being spanned. The \verb|\elspec| command must be used to omit
254 these rules. There will be an example at the end of the documentation of this.
255
256 The paragraph commands are \verb|\stpar| and \verb|\stparrow|. The format for \verb|\stpar|
257 is:
258
259 \verb|\stpar{<dimen>}{<vertical material>}|
260
261 The \verb|<dimen>| is the width of the paragraph (the \verb|\hsize|) and the
262 \verb|<vertical material>| is the paragraph.
263
264 \verb|\stparrow| will do the same thing as \verb|\stpar| but it will also perform the
265 function of \verb|\multirow|. It is a composite command and the only way to span a
266 paragraph across multiple rows. The format is:
267
268 \verb|\stparrow|$n$\verb|{<dimen>}{<vertical material>}|
269
270 In this command the $n$ is the number of rows to be spanned and the
271 other material is the same as in the \verb|\stpar| macro. Please note that the
272 rules for spanning multiple rows apply to this macro also (the use of the
273 \verb|\elspec| command).
274
275 To use both multiple rows and multiple columns, specify the \verb|\multicolumn|
276 command first, then the \verb|\multirow| or \verb|\stparrow|.
277
278 The last point I would like to make concerns the use of varying width vertical
279 rules. If a thin vertical rule runs into a thick vertical rule there will
280 be an offset. The default for this offset is to the left. There are two ways
281 to change the setting. The first is by using an `r' after any of the \verb|\vt|
282 commands. For example \verb|\vttr| will produce a thick vertical rule right
283 justified on any wider rules. The other method is by using the
284 \verb|\ifstablesright| setting. A true setting will line up all vertical rules
285 generated by the \verb||| on the right. A false setting will make the vertical
286 rules generated by the \verb||| left justified (the default).
287
288 In all of the specials using a $n$ parameter, if the number to be used is
289 greater than 9, it must be placed in curly braces (\verb|{}|).
290
291 \newpage
292 \section{Examples}
293
294 This section will give some example tables and the code to generate them
295 organized from simple to complex.
296
297 \subsection{Example 1}
298
299 \begin{verbatim}
300 \begin{stable}
301 Ck\#\vt Date\vt Memo\vt Debit\vt Credit\vt Balance\eltt
302 245|8--2|Rent|\$ \hfill 250.00||\$ \hfill 436.29\el
303 246|8--2|Danson Electric|\$ \hfill 49.28||\$ \hfill 387.01\el
304 247|8--5|Jeff's Grocery|\$ \hfill 35.88||\$ \hfill 351.13\el
305 248||Void|||\el
306 249|8--10|Danson Times|\$ \hfill 19.00||\$ \hfill 332.13\el
307 250|8--14|Pizza Palace|\$ \hfill 9.95||\$ \hfill 322.18\el
308 251|8--15|Jones Hardware|\$ \hfill 45.20||\$ \hfill 276.98\el
309 252|8--15|Deposit||\$ \hfill 255.81|\$ \hfill 532.79\el
310 253|8--21|Account Fee|\$ \hfill .85||\$ \hfill 531.94\el
311 254|8--29|Telephone Co.|\$ \hfill 21.19||\$ \hfill 510.75
312 \end{stable}
313 \end{verbatim}
314
315 \begin{stable}
316 Ck\#\vt Date\vt Memo\vt Debit\vt Credit\vt Balance\eltt
317 245|8--2|Rent|\$ \hfill 250.00||\$ \hfill 436.29\el
318 246|8--2|Danson Electric|\$ \hfill 49.28||\$ \hfill 387.01\el
319 247|8--5|Jeff's Grocery|\$ \hfill 35.88||\$ \hfill 351.13\el
320 248||Void|||\el
321 249|8--10|Danson Times|\$ \hfill 19.00||\$ \hfill 332.13\el
322 250|8--14|Pizza Palace|\$ \hfill 9.95||\$ \hfill 322.18\el
323 251|8--15|Jones Hardware|\$ \hfill 45.20||\$ \hfill 276.98\el
324 252|8--15|Deposit||\$ \hfill 255.81|\$ \hfill 532.79\el
325 253|8--21|Account Fee|\$ \hfill .85||\$ \hfill 531.94\el
326 254|8--29|Telephone Co.|\$ \hfill 21.19||\$ \hfill 510.75
327 \end{stable}
328
329 \subsection{Example 2}
330
331 \begin{verbatim}
332 \begin{stableto}{5truein}
333 \multicolumn6 \hfill Account Activity for August\hfill\eltt
334 Ck\#\vt Date\vt Memo\vtt Debit\vt Credit\vtt Balance\eltt
335 245|8--2|Rent\vtt\$ \hfill 250.00|\vtt\$ \hfill 436.29\el
336 246|8--2|Danson Electric\vtt\$ \hfill 49.28|\vtt\$ \hfill 387.01\el
337 247|8--5|Jeff's Grocery\vtt\$ \hfill 35.88|\vtt\$ \hfill 351.13\el
338 248||Void\vtt|\vtt\el
339 249|8--10|Danson Times\vtt\$ \hfill 19.00|\vtt\$ \hfill 332.13\el
340 250|8--14|Pizza Palace\vtt\$ \hfill 9.95|\vtt\$ \hfill 322.18\el
341 251|8--15|Jones Hardware\vtt\$ \hfill 45.20|\vtt\$ \hfill 276.98\el
342 252|8--15|Deposit\vtt|\$ \hfill 255.81\vtt\$ \hfill 532.79\el
343 253|8--21|Account Fee\vtt\$ \hfill .85|\vtt\$ \hfill 531.94\el
344 254|8--29|Telephone Co.\vtt\$ \hfill 21.19|\vtt\$ \hfill 510.75
345 \end{stableto}
346 \end{verbatim}
347
348 \begin{stableto}{5truein}
349 \multicolumn6 \hfill Account Activity for August\hfill\eltt
350 Ck\#\vt Date\vt Memo\vtt Debit\vt Credit\vtt Balance\eltt
351 245|8--2|Rent\vtt\$ \hfill 250.00|\vtt\$ \hfill 436.29\el
352 246|8--2|Danson Electric\vtt\$ \hfill 49.28|\vtt\$ \hfill 387.01\el
353 247|8--5|Jeff's Grocery\vtt\$ \hfill 35.88|\vtt\$ \hfill 351.13\el
354 248||Void\vtt|\vtt\el
355 249|8--10|Danson Times\vtt\$ \hfill 19.00|\vtt\$ \hfill 332.13\el
356 250|8--14|Pizza Palace\vtt\$ \hfill 9.95|\vtt\$ \hfill 322.18\el
357 251|8--15|Jones Hardware\vtt\$ \hfill 45.20|\vtt\$ \hfill 276.98\el
358 252|8--15|Deposit\vtt|\$ \hfill 255.81\vtt\$ \hfill 532.79\el
359 253|8--21|Account Fee\vtt\$ \hfill .85|\vtt\$ \hfill 531.94\el
360 254|8--29|Telephone Co.\vtt\$ \hfill 21.19|\vtt\$ \hfill 510.75
361 \end{stableto}
362
363 \subsection{Example 3}
364
365 \begin{verbatim}
366 \begin{stable}
367 \multirow2{\#}\vt\multirow2{Date}\vt\multirow2{Memo}\vt
368 Debit/Credit\elspec
369 |||\trule\el
370 |||Balance\eltt
371 \multirow2{245}|\multirow2{8--2}|\multirow2{Rent}|
372 \$ \hfill 250.00\elspec
373 |||\trule\el
374 |||\$ \hfill 436.29\elttt{.7pt}
375 \multirow2{246}|\multirow2{8--2}|\multirow2{Danson Electric}|
376 \$ \hfill 49.28\elspec
377 |||\trule\el
378 |||\$ \hfill 387.01\elttt{.7pt}
379 \multirow2{247}|\multirow2{8--5}|\multirow2{Jeff's Grocery}|
380 \$ \hfill 35.88\elspec
381 |||\trule\el
382 |||\$ \hfill 351.13\elttt{.7pt}
383 \multirow2{248}||\multirow2{Void}|\elspec
384 |||\el
385 |||\elttt{.7pt}
386 \multirow2{249}|\multirow2{8--10}|\multirow2{Danson Times}|\$
387 \hfill 19.00\elspec
388 |||\trule\el
389 |||\$ \hfill 332.13
390 \end{stable}
391 \end{verbatim}
392
393 \begin{stable}
394 \multirow2{\#}\vt\multirow2{Date}\vt\multirow2{Memo}\vt
395 Debit/Credit\elspec
396 |||\trule\el
397 |||Balance\eltt
398 \multirow2{245}|\multirow2{8--2}|\multirow2{Rent}|
399 \$ \hfill 250.00\elspec
400 |||\trule\el
401 |||\$ \hfill 436.29\elttt{.7pt}
402 \multirow2{246}|\multirow2{8--2}|\multirow2{Danson Electric}|
403 \$ \hfill 49.28\elspec
404 |||\trule\el
405 |||\$ \hfill 387.01\elttt{.7pt}
406 \multirow2{247}|\multirow2{8--5}|\multirow2{Jeff's Grocery}|
407 \$ \hfill 35.88\elspec
408 |||\trule\el
409 |||\$ \hfill 351.13\elttt{.7pt}
410 \multirow2{248}||\multirow2{Void}|\elspec
411 |||\el
412 |||\elttt{.7pt}
413 \multirow2{249}|\multirow2{8--10}|\multirow2{Danson Times}|\$
414 \hfill 19.00\elspec
415 |||\trule\el
416 |||\$ \hfill 332.13
417 \end{stable}
418
419 \subsection{Example 4}
420
421 \begin{verbatim}
422 \begin{stable}
423 Account|Ck\#|Debit|Credit|Balance\eltt
424 \stparrow3{2in}{\noindent\strut The Lyons Investment Memorial
425 Student Fund following specifications 11.2.3 of the
426 U.S. Governmental Code CCA1}
427 |123|\$\hfill 1,000.00||\$\hfill 20,000\elspec
428 |\trule|\trule|\trule|\trule\el
429 |124|\$\hfill 200.00||\$\hfill 19,800\elspec
430 |\trule|\trule|\trule|\trule\el
431 |||\$\hfill 4,000.00|\$\hfill 23,800\elttt{.7pt}
432 \multicolumn4\hfil\stpar{4.25in}{At the end of the physical
433 year 1990 the balance in the account for Lyons Investment
434 Memorial Student Fund will be tallied and the results
435 will be published as per Governmental Code 3.4.2 of the
436 last payable week in the session. The value presented here
437 is a projection of the actual that will be available.}\hfil|
438 \$\hfill 25,000
439 \end{stable}
440 \end{verbatim}
441
442 \begin{stable}
443 Account|Ck\#|Debit|Credit|Balance\eltt
444 \stparrow3{2in}{\noindent\strut The Lyons Investment Memorial
445 Student Fund following specifications 11.2.3 of the
446 U.S. Governmental Code CCA1}
447 |123|\$\hfill 1,000.00||\$\hfill 20,000\elspec
448 |\trule|\trule|\trule|\trule\el
449 |124|\$\hfill 200.00||\$\hfill 19,800\elspec
450 |\trule|\trule|\trule|\trule\el
451 |||\$\hfill 4,000.00|\$\hfill 23,800\elttt{.7pt}
452 \multicolumn4\hfil\stpar{4.25in}{At the end of the physical
453 year 1990 the balance in the account for Lyons Investment
454 Memorial Student Fund will be tallied and the results
455 will be published as per Governmental Code 3.4.2 of the
456 last payable week in the session. The value presented here
457 is a projection of the actual that will be available.}\hfil|
458 \$\hfill 25,000
459 \end{stable}
460
461 \subsection{Example 5, ``table acid test''}
462
463 \begin{verbatim}
464 \begin{stable}
465 \multirow3{A}|\multicolumn2 \hfill B\hfill\elspec
466 |\trule|\trule\el
467 |\multirow2{C}|D\elspec
468 ||\trule\el
469 ||E
470 \end{stable}
471 \end{verbatim}
472
473 \begin{stable}
474 \multirow3{A}|\multicolumn2 \hfill B\hfill\elspec
475 |\trule|\trule\el
476 |\multirow2{C}|D\elspec
477 ||\trule\el
478 ||E
479 \end{stable}
480
481 \end{document}