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
|
.include stdflags
.include stdmacs
.set abcd "ABCD"
.docbook
.book
.revision changed
.chapter "First chapter" "" "abbrev"
This is text before the first section.
.revision off
.section "First section"
.index primary secondary
.index-from "ID" "range"
This is the text of the first section.
We are going to have an index in the middle of a paragraph.
.index "primary two" "secondary two"
This is the rest of the paragraph.
.section "Second section"
This is the text of the second section. Here's a reference to
chapter &<<CHAPsecond>>&. Here are some entities, both local and default:
&&abcd; is &abcd;; && is &.
.chapter "Second chapter" "CHAPsecond"
This is the second chapter. Test a block quote:
.index-see "sights" "visions"
.index-seealso "sounds" "noises" "off"
.revision "changed"
.blockquote
All the world's a stage, and all the men and women merely players. They have
their exits and their entrances, and one man in his time plays many parts.
.endblockquote
.ilist
This is the first item in an itemized list.
There is more than one paragraph.
.next
This is the second item in an itemized list.
.endlist
.olist
Now we have an ordered list.
Again more than one paragraph.
.next
The second item.
.next
The third item
.endlist
.index-to "ID"
.revision off
.olist "lowerroman"
Try lower case roman numerals.
.ilist
Try a nested list.
.next
next
.endlist
back in the first of the ordered.
.next
the next
.endlist
This is a normal text paragraph.
.revision changed
.display
This is a display where the font
should be normal
even recognizing &'italic'& and stuff
but the
layout is literal
.endd
.revision off
.code
This, however is a code paragraph
where &'italic'& everything except
<angle> brackets is totally literal,
and & is no longer a flag.
.endd
And now we are back to a &*normal*& paragraph again.
.itable
.row 1 2
.row 3 4
.endtable
.itable all 1 1 3 1* left 2* center 3* right
.row 1 2 3
.row 4 5 6
.endtable
.vlist
.vitem &*First*&
This is a paragraph about the first item.
In fact, here is a second paragraph.
.vitem &*Second*&
And now we have the second item.
.endlist
The quick brown fox
jumps over the lazy dog.
.literal xml
<!--this should be--> &&&
<para>
completely untouched
.not even dot lines
.endxmliphant
are touched
</para>
.literal off
whereas this should &&&
note concats
<and stuff>
Test © and Ӓ and ䷄ for size.
Check `quote' marks. And ``doublequote'' marks.
This is a paragraph
where things happen over multiple
lines.
Test some of the standard flags &'italic'& and &*bold*& text and
&`literal`& text and &_filename_& in text and &"quoted"& text and
we have && and &-- as single replacements.
.push abcd
.pop
.push X the X line 1
.pop
.push X the X line 2
.pop X
.push X the X line 3
.push B the B line
.pop X
.pop Z
.macro abcd
This is the first line of the macro abcd.
This is the second line. Contains a dollar ($$) character.
.endmacro
This is text after the macro definition.
.abcd
.macro xyz "default 1" default-2
First line.
Insert args: 1="$1" 2="$2" 3="$3"
.endmacro
.xyz
.xyz "set 1"
.xyz set1 set2
.xyz "set1" set2 "set 3"
.macro pqr
Always.
.arg 1
If arg1: $1
.endarg
.arg 2
If arg2: $2
.endarg
.arg -2
There is no second argument.
.endmacro
.pqr
.pqr setarg1
.pqr setarg1 setarg2
.code
Inside literal text, unknown directives
.like this one
should be passed as data
.endd
.macro m1 one two
$1 $2
.endmacro
.macro m2 three
$1
.eacharg 2
$+1
.endeach
.endmacro
.display
&`&&m1(1,2) `& |&m1(1,2)|
&`&&m1(1) `& |&m1(1)|
&`&&m1() `& |&m1()|
&`&&m1("a(,b)") `& |&m1("a(,b)")|
&`&&m1("a(,b)", c) `& |&m1("a(,b)", c)|
&`&&m2() `& |&m2()|
&`&&m2(a) `& |&m2(a)|
&`&&m2(a,b) `& |&m2(a,b)|
&`&&m2("&&m1(x,y)") `& |&m2("&m1(x,y)")|
&`&&m2("&&m1(x,y)", 3, 4) `& |&m2("&m1(x,y)", 3, 4)|
.endd
URL &url(http://etc) and another &url(http://etc, text) and so on.
.new
This is a paragraph marked new with .new/.wen.
.wen
.display
The first line in a display.
.new
This line is between .new/.wen.
.wen
Another line.
.endd
.code
The first line in a code section.
.new
This line is between .new/.wen.
.wen
Another line.
.endd
.include stdflags
.include stdmacs
.display
A
.new
B
.wen
C
.endd
.display
A
.new "ZZZ"
C
.endd
.code
A
.new
B
.wen
C
.endd
.code
A
.new "ZZZ"
C
.endd
.display
A
B &new(BB) BBB
C
.endd
.code
A
B &new(BB) BBB
C
.endd
.macro nesttest
.arg 4
FOUR "$1" "$2" "$3" "$4"
.endarg
.arg -4
NOT FOUR
.arg 3
THREE "$1" "$2" "$3"
.endarg
.arg -3
NOT THREE "$1" "$2"
.endarg
END NOT FOUR
.endarg
.endmacro
.display
.nesttest 1 2 3 4
------------
.nesttest 1 2 3
------------
.nesttest 1 2
------------
.nesttest 1
------------
.nesttest
.endd
Test footnotes. The quick brown fox
.footnote
Note?
.endnote
jumps
.footnote
.display
Display in footnote.
.endd
.endnote
over the lazy
.footnote
.itable all 1 1 3 1* left 2* center 3* right
.row 1 2
.row 3 4
.endtable
.endnote
dog.
Another paragraph
.footnote
First para in footnote.
Second para in footnote.
.endnote
with some footnotes
.
.footnote
This foot note will have text
.code
and a display
.endd
.endnote
.
in various forms.
.display
How about a footnote in a display?
.footnote
This is the note.
.endnote
Back in the display.
.endd
.include stdflags
.include stdmacs
.literal xml
<?sdop toc_sections="no" ?>
.literal off
.macro image
.literal layout
&<mediaobject>&&<imageobject>&
&<imagedata fileref="$1" $=2+ scale="$2"+$=3+ align="$3"+&&&
$=4+ depth="$4"+$=5+ width="$5"+>&
&</imagedata>&&</imageobject>&&</mediaobject>&
.literal off
.endmacro
.macro figure
.literal layout
&<figure$=2+ id="$2"+&xfpt.rev;>&
.arg 1
&<title>&$1&</title>&
.endarg
.literal off
.endmacro
.macro endfigure
.literal layout
&</figure>&
.literal off
.endmacro
Here is a reference to figure &<<FIGfirst>>&.
.figure "This is the first figure" "FIGfirst"
.image "eps1.eps"
.endfigure
Here is another reference to figure &<<FIGfirst>>&. We also have
figure &<<FIGsecond>>& below.
.figure "The second figure" "FIGsecond"
.image eps1.eps 80 centre
.endfigure
.table "this is title" "TAB123" "" "" "" 2 1* left 1* left
.row AAA BBB
.row CCC DDD
.endtable
A ref to table &<<TAB123>>&. Now check quotes: `normal' should be changed
to typographic ones. In &`literal text, `they' shouldn't be`& changed.
.code
Check `quoted' in literal monospaced block.
.endd
.display
But in a literal block that is `not monospaced' ...
&`Check it's ok`& when `in the same line'.
.endd
Extra checks on the use of .nonl.
.nonl ABCD
EFGH should be joined on
.nonl NONL
At the end of a paragraph? It just puts </para> on the same line.
.nonl "At the start of a para"
graph should work too.
.display
What about in a display?
.nonl "Use NONL"
WITH more stuff
.endd
.makeindex
|