aboutsummaryrefslogtreecommitdiff
path: root/doc/ref/text/markup.texi
blob: bec335572628e892f010d009540d491d012f8d1a (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
@node Markup
@section Markup

@defun sxml->ansi-text tree
Takes an HTML-like document in SXML format, and produces a formatted
string with embedded ANSI-escapes suitable to print to a terminal.

Supported tags are:

@table @samp
@item group
@item block
Groups elements, concatenating their format. Mainly here for helper
procedres and the like. Also used for the root node.

@item header
Centers and bolds its content. Attributes will be sent along to the
inner @code{<center/>} tag.

@item center
Center its contents on the line. The output is undefined if the body
serializes to a multiline string.

@item p
A text paragraph. Justifies the content inside.

Ends with a double newline, unless the parameter @code{inline} is set.

@item b
Make content bold.

@item i
@item em
Make content italics.

@item code
Format content as code.

(currently does nothing since we only support output to terminal)

@item blockquote
Justifies content, and sets it slightly indented.

@item ws
Forces horizontal whitespace. Use the parameter @code{minwidth} to
specify how many spaces should be inserted.

@item br
Forces a linebreak.

@item hr
Generates a horrizontal line.

@item dl
Declares a description list.

@item dt
A key in a description list, only valid inside @code{dl}.

@item dd
A value of a description list, only valid inside @code{dl}.

@item scheme
Set content as Scheme code. The content will be passed through Guile's
pretty-print.
@end table


Almost all of the block environments accept the attribute @var{width},
which specifies the desired output width.
@end defun