aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/HTXFormatPage5.ht
blob: 689c7a33331470132982bf8b2bb9ceb7049f3f4c (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
\begin{page}{HTXFormatPage5}{Creating Lists and Tables}
\centerline{\fbox{{\tt \thispage}}}\newline
\begin{scroll}

The {\tt \\begin\{items\} {\rm -}  \\end\{items\}} group command constructs itemized lists.
The {\tt \\item} command separates the items in the list.
The indentation rules for the list group are different from those
of a paragraph. The first line of an item will
normally extend further to the left than the rest of the lines.
Both commands accept {\em optional} arguments.
Optional arguments are enclosed in square brackets ({\tt \[ \]}) rather
than braces.

The indentation of subsequent lines in an item is determined by the
optional argument {\it some text} in the {\tt \\begin\{items\}\[{\it some text}\]}
command. The optional argument is {\em not} displayed. Its width is calculated
and used to indent all subsequent lines in the group except from the
first line of each new item. This indentation rule applies to all text
{\em before} the first {\tt \\item} command as well.

The {\tt \\item\[{\it some text}\]} command specifies the start of a new item.
The {\it some text} optional argument will be displayed in {\em bold}
font at the current left-page-margin. Then, the text following the command
will be displayed in normal fashion with the above indentation rule.
\beginImportant
\begin{paste}{HTXFormatPage5xPaste1}{HTXFormatPage5xPatch1}
\pastebutton{HTXFormatPage5xPaste1}{Interpret}
\newline
{\tt \\indent\{5\}}\newline
{\tt \\begin\{items\}\[how wide am I\]}\newline
{\tt Here we carry on but a \\newline} \newline
{\tt new line will be indented } \newline
{\tt \\item\[how wide am I\] fits nicely. Here is a \\newline new line in an item.}\newline
{\tt \\item\[again\] to show another item}\newline
{\tt \\item\[\\\\tab\]\\tab\{0\} can be used \\tab\{15\} effectively}\newline
{\tt \\end\{items\}}\newline
{\tt \\indent\{0\}}\newline
\end{paste}
\endImportant


Note that the {\tt \\begin\{items\}} command immediately sets the left-
page-margin to a new value. Subsequent {\tt \\tab} or {\tt \\centerline} commands
refer to this new margin.
Any explicit margin setting commands included
in the group {\em will} have the normal effect.
The {\tt \\par} command does not produce
the standard paragraph indentation within a list group --- it behaves
instead like {\tt \\newline}.


You can nest list groups like the following example suggests.
\beginImportant
\begin{paste}{HTXFormatPage5xPaste2}{HTXFormatPage5xPatch2}
\pastebutton{HTXFormatPage5xPaste2}{Interpret}
\newline
{\tt \\begin\{items\}\[quitealot\]}\newline
{\tt A nested list:}\newline
{\tt \\item\[The first\] item of an itemized list is on this line.}\newline
{\tt \\item\[The second\] item of the list starts here.  It contains another}\newline
{\tt list nested inside it.}\newline
{\tt \\begin\{items\}\[somuchmore\]}\newline
{\tt \\item \[First\]\\tab\{0\}This is the first item of an enumerated}\newline
{\tt list that is nested within the itemized list.}\newline
{\tt \\item \[Second\]\\tab\{0\}This is the second item of the inner list.}\newline
{\tt \\end\{items\}}\newline
{\tt This is the rest of the second item of the outer list.  It}\newline
{\tt is no more interesting than any other part of the item.}\newline
{\tt \\item\[The third\] item of the list.}\newline
{\tt \\end\{items\}}\newline
\end{paste}
\endImportant

Another facility for presenting lists is the {\tt \\table} command.
The correct syntax for it is : {\tt \\table\{\{{\it item a}\} \{{\it item b}\} {\it ..}\}}.
The items in the braces will be placed in as many aligned columns
as is possible for the current window dimensions or page width.
If one item is particularly long there will probably be only one column
in the table. Here is a table of color names.
\beginImportant
\begin{paste}{HTXFormatPage5xPaste3}{HTXFormatPage5xPatch3}
\pastebutton{HTXFormatPage5xPaste3}{Interpret}
\newline
{\tt
\\table\{
\{Dark Orchid\} \{Dark Salmon\} \{Dark Sea Green\} \{Dark Slate Blue\}
\{Dark Slate Gray\} \{Dark Turquoise\} \{Dark Violet\} \{Deep Pink\}
\{Deep Sky Blue\} \{Dodger Blue\} \{Floral White\} \{Forest Green\}
\{Ghost White\} \{Hot Pink\} \{Indian Red\} \{Lavender Blush\}
\}
}
\end{paste}
\endImportant




\end{scroll}
\beginmenu
\menulink{Next -- Boxes and Lines}{HTXFormatPage6}
\endmenu

\end{page}

\begin{patch}{HTXFormatPage5xPatch1}
\begin{paste}{HTXFormatPage5xPaste1A}{HTXFormatPage5xPatch1A}
\pastebutton{HTXFormatPage5xPaste1A}{Source}
\newline
\indent{5}
\begin{items}[how wide am I]
Here we carry on but a \newline
new line will be indented
\item[how wide am I] fits nicely. Here is a \newline new line in an item.
\item[again] to show another item
\item[\\tab]\tab{0} can be used \tab{15} effectively
\end{items}
\indent{0}
\end{paste}
\end{patch}
\begin{patch}{HTXFormatPage5xPatch1A}
\begin{paste}{HTXFormatPage5xPaste1B}{HTXFormatPage5xPatch1}
\pastebutton{HTXFormatPage5xPaste1B}{Interpret}
\newline
{\tt \\indent\{5\}}\newline
{\tt \\begin\{items\}\[how wide am I\]}\newline
{\tt Here we carry on but a \\newline} \newline
{\tt new line will be indented } \newline
{\tt \\item\[how wide am I\] fits nicely. Here is a \\newline new line in an item.}\newline
{\tt \\item\[again\] to show another item}\newline
{\tt \\item\[\\\\tab\]\\tab\{0\} can be used \\tab\{15\} effectively}\newline
{\tt \\end\{items\}}\newline
{\tt \\indent\{0\}}\newline
\end{paste}
\end{patch}

\begin{patch}{HTXFormatPage5xPatch2}
\begin{paste}{HTXFormatPage5xPaste2A}{HTXFormatPage5xPatch2A}
\pastebutton{HTXFormatPage5xPaste2A}{Source}
\newline
\begin{items}[quitealot]
A nested list:
\item[The first] item of an itemized list is on this line.
\item[The second] item of the list starts here.  It contains another
list nested inside it.
\begin{items}[somuchmore]
\item [First]\tab{0}This is the first item of the
list that is nested within the itemized list.
\item [Second]\tab{0}This is the second item of the inner list.
\end{items}
This is the rest of the second item of the outer list.  It
is no more interesting than any other part of the item.
\item [The third] item of the list.
\end{items}
\end{paste}
\end{patch}
\begin{patch}{HTXFormatPage5xPatch2A}
\begin{paste}{HTXFormatPage5xPaste2B}{HTXFormatPage5xPatch2}
\pastebutton{HTXFormatPage5xPaste2B}{Interpret}
\newline
{\tt \\begin\{items\}\[quitealot\]}\newline
{\tt A nested list:}\newline
{\tt \\item\[The first\] item of an itemized list is on this line.}\newline
{\tt \\item\[The second\] item of the list starts here.  It contains another}\newline
{\tt list nested inside it.}\newline
{\tt \\begin\{items\}\[somuchmore\]}\newline
{\tt \\item \[First\]\\tab\{0\}This is the first item of an enumerated}\newline
{\tt list that is nested within the itemized list.}\newline
{\tt \\item \[Second\]\\tab\{0\}This is the second item of the inner list.}\newline
{\tt \\end\{items\}}\newline
{\tt This is the rest of the second item of the outer list.  It}\newline
{\tt is no more interesting than any other part of the item.}\newline
{\tt \\item\[The third\] item of the list.}\newline
{\tt \\end\{items\}}\newline
\end{paste}
\end{patch}

\begin{patch}{HTXFormatPage5xPatch3}
\begin{paste}{HTXFormatPage5xPaste3A}{HTXFormatPage5xPatch3A}
\pastebutton{HTXFormatPage5xPaste3A}{Source}
\newline
\table{
{Dark Orchid} {Dark Salmon} {Dark Sea Green} {Dark Slate Blue} {Dark Slate Gray}
{Dark Turquoise} {Dark Violet} {Deep Pink} {Deep Sky Blue} {Dodger Blue}
{Floral White} {Forest Green} {Ghost White} {Hot Pink} {Indian Red}
{Lavender Blush}
}
\end{paste}
\end{patch}
\begin{patch}{HTXFormatPage5xPatch3A}
\begin{paste}{HTXFormatPage5xPaste3B}{HTXFormatPage5xPatch3}
\pastebutton{HTXFormatPage5xPaste3B}{Interpret}
\newline
{\tt
\\table\{
\{Dark Orchid\} \{Dark Salmon\} \{Dark Sea Green\} \{Dark Slate Blue\}
\{Dark Slate Gray\} \{Dark Turquoise\} \{Dark Violet\} \{Deep Pink\}
\{Deep Sky Blue\} \{Dodger Blue\} \{Floral White\} \{Forest Green\}
\{Ghost White\} \{Hot Pink\} \{Indian Red\} \{Lavender Blush\}
\}
}
\end{paste}
\end{patch}