author | rptlab |
Tue, 30 Apr 2013 14:20:22 +0100 | |
branch | py33 |
changeset 3721 | 0c93dd8ff567 |
parent 3617 | ae5744e97c42 |
child 3723 | 99aa837b6703 |
permissions | -rw-r--r-- |
3617 | 1 |
#Copyright ReportLab Europe Ltd. 2000-2012 |
2963 | 2 |
#see license.txt for license details |
3 |
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/docs/userguide/ch5_paragraphs.py |
|
2966 | 4 |
from tools.docco.rl_doc_utils import * |
2963 | 5 |
|
6 |
#begin chapter oon paragraphs |
|
7 |
heading1("Paragraphs") |
|
8 |
disc(""" |
|
9 |
The $reportlab.platypus.Paragraph$ class is one of the most useful of the Platypus $Flowables$; |
|
10 |
it can format fairly arbitrary text and provides for inline font style and colour changes using |
|
11 |
an XML style markup. The overall shape of the formatted text can be justified, right or left ragged |
|
12 |
or centered. The XML markup can even be used to insert greek characters or to do subscripts. |
|
13 |
""") |
|
14 |
disc("""The following text creates an instance of the $Paragraph$ class:""") |
|
15 |
eg("""Paragraph(text, style, bulletText=None)""") |
|
16 |
disc("""The $text$ argument contains the text of the |
|
17 |
paragraph; excess white space is removed from the text at the ends and internally after |
|
18 |
linefeeds. This allows easy use of indented triple quoted text in <b>Python</b> scripts. |
|
19 |
The $bulletText$ argument provides the text of a default bullet for the paragraph. |
|
20 |
The font and other properties for the paragraph text and bullet are set using the style argument. |
|
21 |
""") |
|
22 |
disc(""" |
|
23 |
The $style$ argument should be an instance of class $ParagraphStyle$ obtained typically |
|
24 |
using""") |
|
25 |
eg(""" |
|
26 |
from reportlab.lib.styles import ParagraphStyle |
|
27 |
""") |
|
28 |
disc(""" |
|
29 |
this container class provides for the setting of multiple default paragraph attributes |
|
30 |
in a structured way. The styles are arranged in a dictionary style object called a $stylesheet$ |
|
31 |
which allows for the styles to be accessed as $stylesheet['BodyText']$. A sample style |
|
32 |
sheet is provided. |
|
33 |
""") |
|
34 |
eg(""" |
|
35 |
from reportlab.lib.styles import getSampleStyleSheet |
|
36 |
stylesheet=getSampleStyleSheet() |
|
37 |
normalStyle = stylesheet['Normal'] |
|
38 |
""") |
|
39 |
disc(""" |
|
40 |
The options which can be set for a $Paragraph$ can be seen from the $ParagraphStyle$ defaults. |
|
41 |
""") |
|
42 |
heading4("$class ParagraphStyle$") |
|
43 |
eg(""" |
|
44 |
class ParagraphStyle(PropertySet): |
|
45 |
defaults = { |
|
46 |
'fontName':'Times-Roman', |
|
47 |
'fontSize':10, |
|
48 |
'leading':12, |
|
49 |
'leftIndent':0, |
|
50 |
'rightIndent':0, |
|
51 |
'firstLineIndent':0, |
|
52 |
'alignment':TA_LEFT, |
|
53 |
'spaceBefore':0, |
|
54 |
'spaceAfter':0, |
|
55 |
'bulletFontName':'Times-Roman', |
|
56 |
'bulletFontSize':10, |
|
57 |
'bulletIndent':0, |
|
58 |
'textColor': black, |
|
59 |
'backColor':None, |
|
60 |
'wordWrap':None, |
|
61 |
'borderWidth': 0, |
|
62 |
'borderPadding': 0, |
|
63 |
'borderColor': None, |
|
64 |
'borderRadius': None, |
|
65 |
'allowWidows': 1, |
|
66 |
'allowOrphans': 0, |
|
67 |
} |
|
68 |
""") |
|
69 |
||
70 |
heading2("Using Paragraph Styles") |
|
71 |
||
72 |
#this will be used in the ParaBox demos. |
|
73 |
sample = """You are hereby charged that on the 28th day of May, 1970, you did |
|
74 |
willfully, unlawfully, and with malice of forethought, publish an |
|
75 |
alleged English-Hungarian phrase book with intent to cause a breach |
|
76 |
of the peace. How do you plead?""" |
|
77 |
||
78 |
||
79 |
disc("""The $Paragraph$ and $ParagraphStyle$ classes together |
|
80 |
handle most common formatting needs. The following examples |
|
81 |
draw paragraphs in various styles, and add a bounding box |
|
82 |
so that you can see exactly what space is taken up.""") |
|
83 |
||
84 |
s1 = ParagraphStyle('Normal') |
|
85 |
parabox(sample, s1, 'The default $ParagraphStyle$') |
|
86 |
||
87 |
disc("""The two attributes $spaceBefore$ and $spaceAfter$ do what they |
|
88 |
say, except at the top or bottom of a frame. At the top of a frame, |
|
89 |
$spaceBefore$ is ignored, and at the bottom, $spaceAfter$ is ignored. |
|
90 |
This means that you could specify that a 'Heading2' style had two |
|
91 |
inches of space before when it occurs in mid-page, but will not |
|
92 |
get acres of whitespace at the top of a page. These two attributes |
|
93 |
should be thought of as 'requests' to the Frame and are not part |
|
94 |
of the space occupied by the Paragraph itself.""") |
|
95 |
||
96 |
disc("""The $fontSize$ and $fontName$ tags are obvious, but it is |
|
97 |
important to set the $leading$. This is the spacing between |
|
98 |
adjacent lines of text; a good rule of thumb is to make this |
|
99 |
20% larger than the point size. To get double-spaced text, |
|
100 |
use a high $leading$. If you set $autoLeading$(default $"off"$) to $"min"$(use observed leading even if smaller than specified) or $"max"$(use the larger of observed and specified) then an attempt is made to determine the leading |
|
101 |
on a line by line basis. This may be useful if the lines contain different font sizes etc.""") |
|
102 |
||
103 |
disc("""The figure below shows space before and after and an |
|
104 |
increased leading:""") |
|
105 |
||
106 |
parabox(sample, |
|
107 |
ParagraphStyle('Spaced', |
|
108 |
spaceBefore=6, |
|
109 |
spaceAfter=6, |
|
110 |
leading=16), |
|
111 |
'Space before and after and increased leading' |
|
112 |
) |
|
113 |
||
3089
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
114 |
disc("""The attribute $borderPadding$ adjusts the padding between the paragraph and the border of its background. |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
115 |
This can either be a single value or a tuple containing 2 to 4 values. |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
116 |
These values are applied the same way as in Cascading Style Sheets (CSS). |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
117 |
If a single value is given, that value is applied to all four sides. |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
118 |
If more than one value is given, they are applied in clockwise order to the sides starting at the top. |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
119 |
If two or three values are given, the missing values are taken from the opposite side(s). |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
120 |
Note that in the following example the yellow box is drawn by the paragraph itself.""") |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
121 |
|
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
122 |
parabox(sample, |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
123 |
ParagraphStyle('padded', |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
124 |
borderPadding=(7, 2, 20), |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
125 |
borderColor='#000000', |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
126 |
borderWidth=1, |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
127 |
backColor='#FFFF00'), |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
128 |
'Variable padding' |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
129 |
) |
725016820c37
Documentation in userguide for variable border padding on platypus paragraphs.
jonas
parents:
3004
diff
changeset
|
130 |
|
2963 | 131 |
disc("""The $leftIndent$ and $rightIndent$ attributes do exactly |
132 |
what you would expect; $firstLineIndent$ is added to the $leftIndent$ of the |
|
133 |
first line. If you want a straight left edge, remember |
|
134 |
to set $firstLineIndent$ equal to 0.""") |
|
135 |
||
136 |
parabox(sample, |
|
137 |
ParagraphStyle('indented', |
|
138 |
firstLineIndent=+24, |
|
139 |
leftIndent=24, |
|
140 |
rightIndent=24), |
|
141 |
'one third inch indents at left and right, two thirds on first line' |
|
142 |
) |
|
143 |
||
144 |
disc("""Setting $firstLineIndent$ equal to a negative number, $leftIndent$ |
|
145 |
much higher, and using a |
|
146 |
different font (we'll show you how later!) can give you a |
|
147 |
definition list:.""") |
|
148 |
||
149 |
parabox('<b><i>Judge Pickles: </i></b>' + sample, |
|
150 |
ParagraphStyle('dl', |
|
151 |
leftIndent=36), |
|
152 |
'Definition Lists' |
|
153 |
) |
|
154 |
||
155 |
disc("""There are four possible values of $alignment$, defined as |
|
156 |
constants in the module <i>reportlab.lib.enums</i>. These are |
|
157 |
TA_LEFT, TA_CENTER or TA_CENTRE, TA_RIGHT and |
|
158 |
TA_JUSTIFY, with values of 0, 1, 2 and 4 respectively. These |
|
159 |
do exactly what you would expect.""") |
|
160 |
||
161 |
disc("""Set $wordWrap$ to $'CJK'$ to get Asian language linewrapping. For normal western text you can change the way |
|
162 |
the line breaking algorithm handles <i>widows</i> and <i>orphans</i> with the $allowWidows$ and $allowOrphans$ values. |
|
163 |
Both should normally be set to $0$, but for historical reasons we have allowed <i>widows</i>. |
|
164 |
The default color of the text can be set with $textColor$ and the paragraph background |
|
165 |
colour can be set with $backColor$. The paragraph's border properties may be changed using |
|
166 |
$borderWidth$, $borderPadding$, $borderColor$ and $borderRadius$.""") |
|
167 |
||
168 |
||
169 |
heading2("Paragraph XML Markup Tags") |
|
170 |
disc("""XML markup can be used to modify or specify the |
|
171 |
overall paragraph style, and also to specify intra- |
|
172 |
paragraph markup.""") |
|
173 |
||
174 |
heading3("The outermost < para > tag") |
|
175 |
||
176 |
||
177 |
disc(""" |
|
178 |
The paragraph text may optionally be surrounded by |
|
179 |
<para attributes....> |
|
180 |
</para> |
|
181 |
tags. The attributes if any of the opening <para> tag affect the style that is used |
|
182 |
with the $Paragraph$ $text$ and/or $bulletText$. |
|
183 |
""") |
|
184 |
disc(" ") |
|
185 |
||
186 |
from reportlab.platypus.paraparser import _addAttributeNames, _paraAttrMap, _bulletAttrMap |
|
187 |
||
188 |
def getAttrs(A): |
|
189 |
_addAttributeNames(A) |
|
190 |
S={} |
|
3721 | 191 |
for k, v in list(A.items()): |
2963 | 192 |
a = v[0] |
3326 | 193 |
if a not in S: |
2963 | 194 |
S[a] = k |
195 |
else: |
|
196 |
S[a] = "%s, %s" %(S[a],k) |
|
197 |
||
3721 | 198 |
K = list(S.keys()) |
2963 | 199 |
K.sort() |
200 |
D=[('Attribute','Synonyms')] |
|
201 |
for k in K: |
|
202 |
D.append((k,S[k])) |
|
203 |
cols=2*[None] |
|
204 |
rows=len(D)*[None] |
|
205 |
return D,cols,rows |
|
206 |
||
3326 | 207 |
t=Table(*getAttrs(_paraAttrMap)) |
2963 | 208 |
t.setStyle(TableStyle([ |
209 |
('FONT',(0,0),(-1,1),'Times-Bold',10,12), |
|
210 |
('FONT',(0,1),(-1,-1),'Courier',8,8), |
|
211 |
('VALIGN',(0,0),(-1,-1),'MIDDLE'), |
|
212 |
('INNERGRID', (0,0), (-1,-1), 0.25, colors.black), |
|
213 |
('BOX', (0,0), (-1,-1), 0.25, colors.black), |
|
214 |
])) |
|
215 |
getStory().append(t) |
|
216 |
caption("""Table <seq template="%(Chapter)s-%(Table+)s"/> - Synonyms for style attributes""") |
|
217 |
||
218 |
disc("""Some useful synonyms have been provided for our Python attribute |
|
219 |
names, including lowercase versions, and the equivalent properties |
|
220 |
from the HTML standard where they exist. These additions make |
|
221 |
it much easier to build XML-printing applications, since |
|
222 |
much intra-paragraph markup may not need translating. The |
|
223 |
table below shows the allowed attributes and synonyms in the |
|
224 |
outermost paragraph tag.""") |
|
225 |
||
226 |
||
227 |
heading2("Intra-paragraph markup") |
|
228 |
disc("""'<![CDATA[Within each paragraph, we use a basic set of XML tags |
|
229 |
to provide markup. The most basic of these are bold (<b>...</b>), |
|
230 |
italic (<i>...</i>) and underline (<u>...</u>). |
|
231 |
Other tags which are allowed are strong (<strong>...</strong>), and strike through (<strike>...</strike>). The <link> and <a> tags |
|
232 |
may be used to refer to URIs, documents or bookmarks in the current document. The a variant of the <a> tag can be used to |
|
233 |
mark a position in a document. |
|
234 |
A break (<br/>) tag is also allowed.]]> |
|
235 |
""") |
|
236 |
||
237 |
parabox2("""<b>You are hereby charged</b> that on the 28th day of May, 1970, you did |
|
238 |
willfully, unlawfully, and <i>with malice of forethought</i>, publish an |
|
239 |
alleged English-Hungarian phrase book with intent to cause a breach |
|
240 |
of the peace. <u>How do you plead</u>?""", "Simple bold and italic tags") |
|
241 |
parabox2("""This <a href="#MYANCHOR" color="blue">is a link to</a> an anchor tag ie <a name="MYANCHOR"/><font color="green">here</font>. |
|
242 |
This <link href="#MYANCHOR" color="blue" fontName="Helvetica">is another link to</link> the same anchor tag.""", |
|
243 |
"anchors and links") |
|
244 |
disc("""The <b>link</b> tag can be used as a reference, but |
|
245 |
not as an anchor. The a and link hyperlink tags have additional attributes <i>fontName</i>, |
|
246 |
<i>fontSize</i>, <i>color</i> & <i>backColor</i> attributes. |
|
247 |
The hyperlink reference can have a scheme of <b>http:</b><i>(external webpage)</i>, <b>pdf:</b><i>(different pdf document)</i> or |
|
248 |
<b>document:</b><i>(same pdf document)</i>; a missing scheme is treated as <b>document</b> as is the case when the reference starts with # (in which case the anchor should omit it). Any other scheme is treated as some kind of URI. |
|
249 |
""") |
|
250 |
||
251 |
parabox2("""<strong>You are hereby charged</strong> that on the 28th day of May, 1970, you did |
|
252 |
willfully, unlawfully, <strike>and with malice of forethought</strike>, <br/>publish an |
|
253 |
alleged English-Hungarian phrase book with intent to cause a breach |
|
254 |
of the peace. How do you plead?""", "Strong, strike, and break tags") |
|
255 |
||
256 |
heading3("The $<font>$ tag") |
|
257 |
disc("""The $<font>$ tag can be used to change the font name, |
|
258 |
size and text color for any substring within the paragraph. |
|
259 |
Legal attributes are $size$, $face$, $name$ (which is the same as $face$), |
|
260 |
$color$, and $fg$ (which is the same as $color$). The $name$ is |
|
261 |
the font family name, without any 'bold' or 'italic' suffixes. |
|
262 |
Colors may be |
|
263 |
HTML color names or a hex string encoded in a variety of ways; |
|
264 |
see ^reportlab.lib.colors^ for the formats allowed.""") |
|
265 |
||
266 |
parabox2("""<font face="times" color="red">You are hereby charged</font> that on the 28th day of May, 1970, you did |
|
267 |
willfully, unlawfully, and <font size=14>with malice of forethought</font>, |
|
268 |
publish an |
|
269 |
alleged English-Hungarian phrase book with intent to cause a breach |
|
270 |
of the peace. How do you plead?""", "The $font$ tag") |
|
271 |
||
272 |
heading3("Superscripts and Subscripts") |
|
273 |
disc("""Superscripts and subscripts are supported with the |
|
274 |
<![CDATA[<super> and <sub> tags, which work exactly |
|
275 |
as you might expect. In addition, most greek letters |
|
276 |
can be accessed by using the <greek></greek> |
|
277 |
tag, or with mathML entity names.]]>""") |
|
278 |
||
279 |
##parabox2("""<greek>epsilon</greek><super><greek>iota</greek> |
|
280 |
##<greek>pi</greek></super> = -1""", "Greek letters and subscripts") |
|
281 |
||
282 |
parabox2("""Equation (α): <greek>e</greek> <super><greek>ip</greek></super> = -1""", |
|
283 |
"Greek letters and superscripts") |
|
284 |
||
285 |
heading3("Inline Images") |
|
286 |
disc("""We can embed images in a paragraph with the |
|
287 |
<img/> tag which has attributes $src$, $width$, $height$ whose meanings are obvious. The $valign$ attribute may be set to a css like value from |
|
288 |
"baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"; the value may also be a numeric percentage or an absolute value. |
|
289 |
""") |
|
290 |
parabox2("""<para autoLeading="off" fontSize=12>This <img/> <img src="../images/testimg.gif" valign="top"/> is aligned <b>top</b>.<br/><br/> |
|
291 |
This <img/> <img src="../images/testimg.gif" valign="bottom"/> is aligned <b>bottom</b>.<br/><br/> |
|
292 |
This <img/> <img src="../images/testimg.gif" valign="middle"/> is aligned <b>middle</b>.<br/><br/> |
|
293 |
This <img/> <img src="../images/testimg.gif" valign="-4"/> is aligned <b>-4</b>.<br/><br/> |
|
294 |
This <img/> <img src="../images/testimg.gif" valign="+4"/> is aligned <b>+4</b>.<br/><br/> |
|
295 |
This <img/> <img src="../images/testimg.gif" width="10"/> has width <b>10</b>.<br/><br/> |
|
296 |
</para>""","Inline images") |
|
297 |
||
298 |
heading3("Numbering Paragraphs and Lists") |
|
299 |
disc("""The $<seq>$ tag provides comprehensive support |
|
300 |
for numbering lists, chapter headings and so on. It acts as |
|
301 |
an interface to the $Sequencer$ class in ^reportlab.lib.sequencer^. |
|
302 |
These are used to number headings and figures throughout this |
|
303 |
document. |
|
304 |
You may create as many separate 'counters' as you wish, accessed |
|
305 |
with the $id$ attribute; these will be incremented by one each |
|
306 |
time they are accessed. The $seqreset$ tag resets a counter. |
|
307 |
If you want it to resume from a number other than 1, use |
|
308 |
the syntax <seqreset id="mycounter" base="42">. |
|
309 |
Let's have a go:""") |
|
310 |
||
311 |
parabox2("""<seq id="spam"/>, <seq id="spam"/>, <seq id="spam"/>. |
|
312 |
Reset<seqreset id="spam"/>. <seq id="spam"/>, <seq id="spam"/>, |
|
313 |
<seq id="spam"/>.""", "Basic sequences") |
|
314 |
||
315 |
disc("""You can save specifying an ID by designating a counter ID |
|
316 |
as the <i>default</i> using the <seqdefault id="Counter"> |
|
317 |
tag; it will then be used whenever a counter ID |
|
318 |
is not specified. This saves some typing, especially when |
|
319 |
doing multi-level lists; you just change counter ID when |
|
320 |
stepping in or out a level.""") |
|
321 |
||
322 |
parabox2("""<seqdefault id="spam"/>Continued... <seq/>, |
|
323 |
<seq/>, <seq/>, <seq/>, <seq/>, <seq/>, <seq/>.""", |
|
324 |
"The default sequence") |
|
325 |
||
326 |
disc("""Finally, one can access multi-level sequences using |
|
327 |
a variation of Python string formatting and the $template$ |
|
328 |
attribute in a <seq> tags. This is used to do the |
|
329 |
captions in all of the figures, as well as the level two |
|
330 |
headings. The substring $%(counter)s$ extracts the current |
|
331 |
value of a counter without incrementing it; appending a |
|
332 |
plus sign as in $%(counter)s$ increments the counter. |
|
333 |
The figure captions use a pattern like the one below:""") |
|
334 |
||
335 |
parabox2("""Figure <seq template="%(Chapter)s-%(FigureNo+)s"/> - Multi-level templates""", |
|
336 |
"Multi-level templates") |
|
337 |
||
338 |
disc("""We cheated a little - the real document used 'Figure', |
|
339 |
but the text above uses 'FigureNo' - otherwise we would have |
|
340 |
messed up our numbering!""") |
|
341 |
||
342 |
heading2("Bullets and Paragraph Numbering") |
|
343 |
disc("""In addition to the three indent properties, some other |
|
344 |
parameters are needed to correctly handle bulleted and numbered |
|
345 |
lists. We discuss this here because you have now seen how |
|
346 |
to handle numbering. A paragraph may have an optional |
|
347 |
^bulletText^ argument passed to its constructor; alternatively, |
|
348 |
bullet text may be placed in a $<![CDATA[<bullet>..</bullet>]]>$ |
|
3004 | 349 |
tag at its head. This text will be drawn on the first line of |
2963 | 350 |
the paragraph, with its x origin determined by the $bulletIndent$ |
351 |
attribute of the style, and in the font given in the |
|
3004 | 352 |
$bulletFontName$ attribute. The "bullet" may be a single character |
353 |
such as (doh!) a bullet, or a fragment of text such as a number in |
|
354 |
some numbering sequence, or even a short title as used in a definition |
|
355 |
list. Fonts may offer various bullet |
|
356 |
characters but we suggest first trying the Unicode bullet ($•$), which may |
|
357 |
be written as $&bull;$, $&#x2022;$ or (in utf8) $\\xe2\\x80\\xa2$):""") |
|
2963 | 358 |
|
3326 | 359 |
t=Table(*getAttrs(_bulletAttrMap)) |
2963 | 360 |
t.setStyle([ |
361 |
('FONT',(0,0),(-1,1),'Times-Bold',10,12), |
|
362 |
('FONT',(0,1),(-1,-1),'Courier',8,8), |
|
363 |
('VALIGN',(0,0),(-1,-1),'MIDDLE'), |
|
364 |
('INNERGRID', (0,0), (-1,-1), 0.25, colors.black), |
|
365 |
('BOX', (0,0), (-1,-1), 0.25, colors.black), |
|
366 |
]) |
|
367 |
getStory().append(t) |
|
368 |
||
369 |
caption("""Table <seq template="%(Chapter)s-%(Table+)s"/> - <bullet> attributes & synonyms""") |
|
370 |
disc("""The <bullet> tag is only allowed once in a given paragraph and its use |
|
371 |
overrides the implied bullet style and ^bulletText^ specified in the ^Paragraph^ |
|
372 |
creation. |
|
373 |
""") |
|
374 |
parabox("""<bullet>\xe2\x80\xa2</bullet>this is a bullet point. Spam |
|
375 |
spam spam spam spam spam spam spam spam spam spam spam |
|
376 |
spam spam spam spam spam spam spam spam spam spam """, |
|
377 |
styleSheet['Bullet'], |
|
378 |
'Basic use of bullet points') |
|
379 |
||
380 |
disc("""Exactly the same technique is used for numbers, |
|
381 |
except that a sequence tag is used. It is also possible |
|
382 |
to put a multi-character string in the bullet; with a deep |
|
383 |
indent and bold bullet font, you can make a compact |
|
384 |
definition list.""") |