File: generic_zmm.html

package info (click to toggle)
zoem 04-173-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,316 kB
  • ctags: 1,716
  • sloc: ansic: 14,114; sh: 798; makefile: 206; perl: 14
file content (1283 lines) | stat: -rw-r--r-- 26,500 bytes parent folder | download
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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!-- Copyright (c) 2004 Stijn van Dongen -->
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
body
{ text-align: justify;
color: #001111;
background: white;
margin-left: 8%;
margin-right: 8%;
}
h3 { margin-top:1em; }
h2 { margin-top:2em; }
a:link { text-decoration: none; }
a:active { text-decoration: none; }
a:visited { text-decoration: none; }
a:link { color: #1111aa; }
a:active { color: #1111aa; }
a:visited { color: #111166; }
a.local:link { color: #11aa11; }
a.local:active { color: #11aa11; }
a.local:visited { color: #116611; }
a.intern:link { color: #1111aa; }
a.intern:active { color: #1111aa; }
a.intern:visited { color: #111166; }
a.extern:link { color: #aa1111; }
a.extern:active { color: #aa1111; }
a.extern:visited { color: #661111; }
a.quiet:link { color: black; }
a.quiet:active { color: black; }
a.quiet:visited { color: black; }
div.copy
{ font-size: 12pt;
font-family: monospace;
text-align: left;
white-space: pre;
margin-left: 2em;
margin-top: 1em;
margin-bottom: 1em;
}
div.indent
{margin-left: 8%;
margin-right: 0%;
}
</style>
<title>
The zoem generic macro package
</title>
</head>
<body>

<p style="text-align:right">
21 Jun 2004&nbsp;&nbsp;&nbsp;
<a class="local" href="generic_zmm.ps"><b>generic_zmm</b></a>
1.001, 04-173
</p>

<div style="margin-top:$margintopem">
<table
cellspacing="0" border=0
cellpadding="0" summary="itemize">
<tr>
<td width=48 valign="top" align="left">
1.
</td>
<td width=8>&nbsp;</td>
<td><div style="text-align:justify">
<a class="intern" href="#name">NAME</a>
</div></td>
</tr>
<tr>
<td width=48 valign="top" align="left">
2.
</td>
<td width=8>&nbsp;</td>
<td><div style="text-align:justify">
<a class="intern" href="#description">DESCRIPTION</a>
</div></td>
</tr>
<tr>
<td width=48 valign="top" align="left">
3.
</td>
<td width=8>&nbsp;</td>
<td><div style="text-align:justify">
<a class="intern" href="#itemintro">INTRODUCTION TO THE ITEMIZE ENVIRONMENT</a>
</div></td>
</tr>
<tr>
<td width=48 valign="top" align="left">
4.
</td>
<td width=8>&nbsp;</td>
<td><div style="text-align:justify">
<a class="intern" href="#itemuse">USING THE ITEMIZE ENVIRONMENT</a>
</div></td>
</tr>
<tr>
<td width=48 valign="top" align="left">
5.
</td>
<td width=8>&nbsp;</td>
<td><div style="text-align:justify">
<a class="intern" href="#spacing">THE SPACING ENVIRONMENT</a>
</div></td>
</tr>
<tr>
<td width=48 valign="top" align="left">
6.
</td>
<td width=8>&nbsp;</td>
<td><div style="text-align:justify">
<a class="intern" href="#macros">MACROS</a>
</div></td>
</tr>
<tr>
<td width=48 valign="top" align="left">
7.
</td>
<td width=8>&nbsp;</td>
<td><div style="text-align:justify">
<a class="intern" href="#issues">ISSUES</a>
</div></td>
</tr>
</table>

</div>

<a name="name"></a>
<h2>NAME</h2>

<p style="text-align:justify">
generic_zmm - a description of the zoem generic macro package.

<p style="text-align:justify">
The macros in this package have been ported to both HTML and
troff.

<a name="description"></a>
<h2>DESCRIPTION</h2>

<p style="text-align:justify">
<i>generic_zmm</i> - A description of the zoem generic macro package.
The macros in this package have been ported to both HTML and
troff.

<p style="text-align:justify">
There is a small list of known issues in the <a class="intern" href="#issues">ISSUES</a> section,
mostly concerning the troff device. These should generally be of no concern
at all, but if you run into trouble look there first.
A quick glance through the list <i>before</i> you run into trouble
may be the wisest thing to do.

<a name="itemintro"></a>
<h2>INTRODUCTION TO THE ITEMIZE ENVIRONMENT</h2>

<p style="text-align:justify">
The <i>itemize</i> environemnt is Zoem's workhorse for lists, enumerations,
itemizations, and other tailed creatures. A simple and valid use is for
example
<pre>  \begin{itemize}
      \item{\bf{foo}}
         For I am foo.
      \items{
         {\bf{barra}}
         {\bf{zuttelezut}}
      }
         For we are bar and zut.
   \end{itemize}</pre>

<p style="text-align:justify; margin-top:0em">
This zoem source result in the following output:
<div style="margin-top:$margintopem">
<table
cellspacing="0" border=0
cellpadding="0" summary="itemize">
<tr>
<td colspan=3>
<b>foo</b>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
For I am foo.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<b>barra</b>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<b>zuttelezut</b>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
For we are bar and zut.
</div></td>
</tr>
</table>

</div>

<p style="text-align:justify">
This is not impressive at all, but it gives an idea of how itemize works.
The following example is a single itemize environment providing a
rollercoasterride through most of the features of the itemize environment.
As shown below, it is possible to change all the itemize settings and styles
at will even within a single itemize instance. Of course this is not useful
at all except for demonstrating the <i>itemize</i> capabilities, but it goes
to show that the itemize macros are quite robust (by virtue of modularity).

<p style="text-align:justify">
<b>NOTE</b>
<br>
The entire listing below was put in zoem's <i>spacing</i> environment,
described further below. The environment was used to create
extra margins on the two sides.
The listing was furthermore output in <i>debug</i> mode, which
shows the underlying table structure in the rendered HTML output.
<div style="
margin-left:5mm;
margin-right:10mm;
">
<div style="margin-top:$margintopem">
<table
cellspacing="0" border=1
cellpadding="0" summary="itemize">
<tr>
<td width=80 valign="top" align="right">
1
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
Several spacing modes (contiguous, compact, indent). The mode in the
current list is both compact and contiguous. Compact means that the itemize
token and the ensuing text are on the same line. Contiguous means that there
is no paragraph skip between different item-description pairs. Below,
compact mode is switched off (approximately) halfway.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
2
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
Several item modes (custom, mark, enumeration).
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
3
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
Several enumeration modes (roman, arabic, alphabetic).
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
iv)
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
The style of a list can be changed while in the middle of it.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
v)
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
Nuther item.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
vi)
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
The list can be 'interupted' and resumed (by means of
the <tt>\intermezzo#1</tt> macro).
</div></td>
</tr>
<tr>
<td colspan=3>
Perhaps you wonder what good is THAT for, and justly so.
The <tt>\intermezzo#1</tt> macro should only be used inbetween different
items, i.e. it should <i>not</i> split content belonging to a single item.
</td>
</tr>
<tr>
<td width=80 valign="top" align="right">
[7]
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
Items can be optionally and automatically
right and/or left delimited. The current
item is delimited with square brackets.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="left">
[8]
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
Items can be left or right aligned.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="left">
[9]
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
Items can be stacked, which is supported only when compact is off.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="left">
[10]
</td>
<td width=24>&nbsp;</td><tr>
<td width=80>
&nbsp;
</td><td width=24>
&nbsp;
</td>
<td><div style="text-align:justify">
Beginning with this item, compact is off.
</div></td>
</tr>
<tr>
<td colspan=3 align="left">
Implying
</td>
</tr>
<tr>
<td colspan=3 align="left">
That
</td>
</tr>
<tr>
<td colspan=3 align="left">
Stacking
</td>
</tr>
<tr>
<td width=80>
&nbsp;
</td><td width=24>
&nbsp;
</td>
<td><div style="text-align:justify">
is now possible.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
[12]
</td>
<td width=24>&nbsp;</td><tr>
<td width=80>
&nbsp;
</td><td width=24>
&nbsp;
</td>
<td><div style="text-align:justify">
(back to right-align) The itemcounter just keeps running by the way.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
[18]
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
(back to compact) But the counter can be manipulated at will.
</div></td>
</tr>
<tr>
<td width=80 valign="top" align="right">
*
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
A bullet item, with an ugly bullet in HTML. Unfortunately the <tt>&amp;bull;</tt>
entity is not widely supported yet. I decided to stick with a plain asterisk
until that time arrives.
</div></td>
</tr>
<tr>
<td width=80>&nbsp;
</td>
<td width=24>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td width=80 valign="top" align="right">
*
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
We now switch to contiguous=0 mode (affecting the current list),
and start a new list that is contiguous to the present text
(by setting margintop to 0).
<div style="margin-top:$margintopem">
<table
cellspacing="0" border=1
cellpadding="0" summary="itemize">
<tr>
<td width=64 valign="top" align="right">
a.
</td>
<td width=16>&nbsp;</td><td><div style="text-align:justify">
Hubris
</div></td>
</tr>
<tr>
<td width=64 valign="top" align="right">
b.
</td>
<td width=16>&nbsp;</td><td><div style="text-align:justify">
Laziness
</div></td>
</tr>
<tr>
<td width=64 valign="top" align="right">
c.
</td>
<td width=16>&nbsp;</td><td><div style="text-align:justify">
Impatience
</div></td>
</tr>
</table>

</div>

<p style="text-align:justify; margin-top:0em">
Are the three virtues of programming.
</div></td>
</tr>
<tr>
<td width=80>&nbsp;
</td>
<td width=24>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td width=80 valign="top" align="right">
*
</td>
<td width=24>&nbsp;</td><td><div style="text-align:justify">
This concludes a listing showing most of the itemize capabilities.
</div></td>
</tr>
</table>

</div>
</div>

<a name="itemuse"></a>
<h2>USING THE ITEMIZE ENVIRONMENT</h2>

<p style="text-align:justify">
You steer the itemize environment by providing it with tag-value pairs like
so:
<pre>   \begin{itemize}{
      {compact}{1}
      {contiguous}{1}
      {align}{right}
      {type}{abc}
      {rp}{.}
   }</pre>

<p style="text-align:justify; margin-top:0em">
This is the list of tags that you may use.
<div style="margin-top:$margintopem">
<table
cellspacing="0" border=0
cellpadding="0" summary="itemize">
<tr>
<td colspan=3>
<i>margintop</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Top of table, anomalous unit (ems), default 0.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>contiguous</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Don't put paragraph skips inbetween items, default 0 (do it).
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>compact</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Put item and description on same line, default 0 (don't do it).
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>w1</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Width of item column in ems.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>w2</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Width of separating column in ems.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>mark</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
E.g. * (if type=mark), affects <tt>\item</tt>.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>align</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
One of left or right (item alignment), default left.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>debug</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Shows underlying table structure in html.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>lp</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
What's printed immediately to the left of an item.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>rp</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
What's printed immediately to the right of an item.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>type</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
One of mark, roman, abc, arabic, affects <tt>\item</tt>.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<i>itemcount</i>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
The count of items seen so far, e.g. 0 right now.
</div></td>
</tr>
</table>

</div>

<p style="text-align:justify">
You need to know that the itemize environment internally maps these tags
to dollar keys simply by prepending a dollar.
Thus, if you want to reset one of the values associated with such a tag,
you need to do e.g.
<pre>\set{$align}{right}
\set{$itemcount}{30}</pre>

<a name="spacing"></a>
<h2>THE SPACING ENVIRONMENT</h2>

<p style="text-align:justify">
Its syntax is identical to that of the <i>itemize</i> environment.
It accepts tags <i>left</i>, <i>right</i>, <i>top</i>, and <i>bottom</i>.
These should receive numeric values. The associated
unit is millimeter.

<p style="text-align:justify">
The troff device does not yet support the <i>top</i> and <i>bottom</i>
tags.

<a name="macros"></a>
<h2>MACROS</h2>
<div style="margin-top:$margintopem">
<table
cellspacing="0" border=0
cellpadding="0" summary="itemize">
<tr>
<td colspan=3 align="left">
<a name="optenref2">\<tt>enref#2</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optiref2">\<tt>iref#2</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optlref2">\<tt>lref#2</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optaref2">\<tt>aref#2</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optsibref2">\<tt>sibref#2</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="opthttpref1">\<tt>httpref#1</tt></a>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
<tt>\enref#2</tt> <i>creates</i> a link for which the first argument is the anchor
and for which the second argument is the content (which can be left empty).
<tt>\iref#2</tt> takes such an anchor as the first argument and it takes content
that carries the link as the second argument. <tt>\lref#2</tt> takes a file name
(possibly including a relative or absolute path) as the first argument and
content as the second argument. <tt>\aref#2</tt> takes a URL (later possibly a
URI) as the first argument and content as the second argument. <tt>\sibref#2</tt>
takes a label as argument which presumably is the name of some application.
It may append an extension depending on the current device, and it assumes
that <tt>label + extension</tt> is the name of a file in the current directory.
<tt>\httpref#1</tt> simply prints a URL which will be active when html is output.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optpar1">\<tt>par#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optcpar2">\<tt>cpar#2</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optcar1">\<tt>car#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optccar2">\<tt>ccar#2</tt></a>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
These are all paragraph macros that carry the paragraph content as
the last argument. The first argument of <tt>\cpar#2</tt> and <tt>\ccar#2</tt>
is the caption. These macros will ensure wellformedness for devices
that support it, such as HTML. For more information on the differences
between these macros consult the entries below.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optpar">\<tt>par</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optcpar1">\<tt>cpar#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optcar">\<tt>car</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optccar1">\<tt>ccar#1</tt></a>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
use <tt>\car</tt> where you don't need a paragraph skip, but just need to
indicate that you are in text mode again. You can simply always use
<tt>\par</tt> and never use <tt>\car</tt>. If you care about the details of spacing
though, or if you have particular trouble for example in creating an itemize
environment where you do not want top and bottom margins, then it could be
worthwile to turn to <tt>\car</tt> under very specific circumstances. Examples
for using <tt>\car</tt> are:
<div style="margin-top:$margintopem">
<table
cellspacing="0" border=0
cellpadding="0" summary="itemize">
<tr>
<td width=32 valign="top" align="right">
-
</td>
<td width=8>&nbsp;</td><td><div style="text-align:justify">
After an environment that always carries a bottom margin.
</div></td>
</tr>
<tr>
<td width=32 valign="top" align="right">
-
</td>
<td width=8>&nbsp;</td><td><div style="text-align:justify">
After a caption that always carries a bottom margin, such
as most sectioning commands (e.g. <tt>\sec</tt> in the manual macros).
</div></td>
</tr>
<tr>
<td width=32 valign="top" align="right">
-
</td>
<td width=8>&nbsp;</td><td><div style="text-align:justify">
After an environment that does <i>not</i> carry a bottom margin,
and where you specifically want the environment to be contiguous to the
enclosing text. The listing you are currently reading is an
example of this.
</div></td>
</tr>
</table>

</div>

<p style="text-align:justify; margin-top:0em">
As promised. The <tt>\car</tt> macro may feel a little unusual. If you don't mind
standing the chance of a little spurious vertical white-space just use
<tt>\par</tt> all the time. If you really need it, such as in an 'inline' listing
as above, the <tt>\car</tt> macro is ready to do the job.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optbf1">\<tt>bf#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optit1">\<tt>it#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="opttt1">\<tt>tt#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optv1">\<tt>v#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optftinc2">\<tt>ftinc#2</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optftdec2">\<tt>ftdec#2</tt></a>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
The first four items set their argument in the <b>font</b> <i>specified</i>.
<tt>\tt#1</tt> and <tt>\v#1</tt> both denote a typewriter font. <i>These macros should
not be nested if troff is to be among the output devices</i>. Support for the
last two items is not yet very robust. They temporarily increment
respectively decrement the font by the amount of the first argument and
apply the resulting setting to the second argument.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optpublanch1">\<tt>publanch#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optpublref1">\<tt>publref#1</tt></a>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
The first associates a number with the label that is in the first argument,
and prints it inbeween square brackets. The label is anchored to this
location. The second outputs the associated number inbetween brackets, and
makes it carry a link to the anchor. For example, I am about
to create a link&nbsp;<a class="intern" href="#pub1">[1]</a> and another link&nbsp;<a class="intern" href="#pub2">[2]</a>
to the items appearing below.

<p style="text-align:justify">
<a name="pub1">[1]</a> The first reference.

<p style="text-align:justify">
<a name="pub2">[2]</a> The second reference.

<p style="text-align:justify">
If you prefer another bibliography style, look up the macros
and adapt them according to your needs.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optverbatim1">\<tt>verbatim#1</tt></a>
</td>
</tr>
<tr>
<td colspan=3 align="left">
<a name="optverbatix1">\<tt>verbatix#1</tt></a>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Make the device output the contents verbatim in a mono-spaced font, obeying
spaces and newlines. This does not prohibit expansion of zoem macros, use
<tt>\protect#1</tt> for that. The macro <tt>\verbatim#1</tt> will create a non-breaking
environment.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<tt>\"html::charset"</tt>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Set this e.g. to ISO-8859-5 or some other acceptable charset label.
Do this <i>before</i> you use the <tt>preamble</tt> key from the base package
that you are using (e.g. the <tt>man.zmm</tt> or <tt>faq.zmm</tt> macros).
</div></td>
</tr>
</table>

</div>

<a name="issues"></a>
<h2>ISSUES</h2>
<div style="margin-top:$margintopem">
<table
cellspacing="0" border=0
cellpadding="0" summary="itemize">
<tr>
<td colspan=3>
<b>Nesting</b>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
Do not nest <tt>\bf#1</tt>, <tt>\it#1</tt>, <tt>\tt#1</tt>, or <tt>\v#1</tt> macros if troff is
among the output devices. It will yield unexpected results.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
The rest of this list pertains to the <i>itemize</i> environment.
</td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<b>Boldness</b>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
There is currently not a way to get bold (Roman) numerals using
the automatic enumeration mode within <i>itemize</i>, or to change
the appearance of any of the other enumeration types.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<b>Margins</b>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
If you use fractional values for <tt>w1</tt> and <tt>w2</tt> in the itemize
environment, you may well run into a problem with troff (c.q. nroff)
Suppose you use <tt>w1=1.6</tt> and <tt>w2=0.8</tt>. Nroff will round both these
values as well as the sum of the two, thus incrementing by <tt>2</tt> and <tt>1</tt>,
followed by a decrement of <tt>2</tt>.
</div></td>
</tr>
<tr>
<td width=32>&nbsp;
</td>
<td width=8>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td colspan=3>
<b>Misc</b>
</td>
</tr>
<tr>
<td width=32>
&nbsp;
</td><td width=8>
&nbsp;
</td>
<td><div style="text-align:justify">
You should be careful with exercising <tt>\push{dollar}</tt> and
<tt>\pop{dollar}</tt> within <tt>begin/end</tt> scopes, as it may lead to keys being
wrongly set or deleted. Taking the <i>itemize</i> environment as example, you
are safe as long as the push and pop that go together do not enclose an
<tt>\item#1</tt> call or one of its variants.

<p style="text-align:justify">
On the same level, you should certainly not do this:
<pre>   \begin{itemize}
   \begin{spacing}
   \item{foo}
   FOO
   \item{bar}
   BAR
   \end{spacing}
   \end{itemize}</pre>

<p style="text-align:justify; margin-top:0em">
Because the <tt>\item#1</tt> invocations will update keys in the dictionary
pushed by the <i>spacing</i> environment rather than the dictionary beneath
it that was pushed by the <i>itemize</i> environment.
On the other hand, you <i>can</i> do this:
<pre>   \begin{spacing}
   \begin{itemize}
   \item{foo}
   FOO
   \item{bar}
   BAR
   \end{itemize}
   \end{spacing}</pre>

<p style="text-align:justify; margin-top:0em">
The reason being that the <i>spacing</i> environment does not facilitate
associated keys within the dictionary scope it creates.
Compare with this with the <i>itemize</i> environment, that facilitates
the use of <tt>\item#1</tt>, <tt>\item</tt>, and <tt>\items#1</tt>.
</div></td>
</tr>
</table>

</div>

</body>
</html>