erbook 5.0.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/Rakefile +6 -79
- data/bin/erbook +25 -319
- data/doc/HelloWorld.spec +23 -21
- data/doc/README +4 -3
- data/doc/api/ERBook.html +35 -0
- data/doc/api/ERBook/Document.html +673 -0
- data/doc/api/ERBook/Document/Node.html +102 -0
- data/doc/api/ERBook/Template.html +670 -0
- data/doc/api/RDoc.html +23 -0
- data/doc/api/RDoc/AnyMethod.html +302 -0
- data/doc/api/RDoc/DummyMarkup.html +73 -0
- data/doc/api/RDoc/DummyMixin.html +23 -0
- data/doc/api/RDoc/DummyOptions.html +140 -0
- data/doc/api/RDoc/TopLevel.html +465 -0
- data/doc/api/String.html +372 -0
- data/doc/api/all-methods.html +253 -0
- data/doc/api/all-namespaces.html +42 -0
- data/doc/api/app.js +18 -0
- data/doc/api/index.html +16 -22
- data/doc/api/jquery.js +11 -0
- data/doc/api/readme.html +35 -0
- data/doc/api/style.css +68 -0
- data/doc/api/syntax_highlight.css +21 -0
- data/doc/erbook.png +0 -0
- data/doc/erbook.svg +150 -88
- data/doc/formats.erb +387 -0
- data/doc/history.erb +62 -0
- data/doc/index.erb +8 -0
- data/doc/index.xhtml +846 -654
- data/doc/intro.erb +97 -0
- data/doc/setup.erb +62 -0
- data/doc/theory.erb +187 -0
- data/doc/usage.erb +39 -0
- data/fmt/xhtml.yaml +497 -372
- data/lib/erbook.rb +18 -10
- data/lib/erbook/document.rb +233 -0
- data/lib/erbook/template.rb +210 -0
- data/lib/erbook/to_xhtml.rb +25 -17
- metadata +39 -45
- data/README +0 -14
- data/doc/api/classes/ERBook.html +0 -164
- data/doc/api/classes/RDoc.html +0 -112
- data/doc/api/classes/RDoc/AnyMethod.html +0 -195
- data/doc/api/classes/RDoc/AnyMethod.src/M000003.html +0 -18
- data/doc/api/classes/RDoc/AnyMethod.src/M000004.html +0 -23
- data/doc/api/classes/RDoc/AnyMethod.src/M000005.html +0 -18
- data/doc/api/classes/RDoc/AnyMethod.src/M000006.html +0 -22
- data/doc/api/classes/RDoc/TopLevel.html +0 -250
- data/doc/api/classes/RDoc/TopLevel.src/M000007.html +0 -18
- data/doc/api/classes/RDoc/TopLevel.src/M000008.html +0 -18
- data/doc/api/classes/RDoc/TopLevel.src/M000009.html +0 -18
- data/doc/api/classes/RDoc/TopLevel.src/M000010.html +0 -29
- data/doc/api/classes/RDoc/TopLevel.src/M000011.html +0 -25
- data/doc/api/classes/RDoc/TopLevel.src/M000012.html +0 -18
- data/doc/api/classes/String.html +0 -196
- data/doc/api/classes/String.src/M000001.html +0 -18
- data/doc/api/classes/String.src/M000002.html +0 -31
- data/doc/api/created.rid +0 -1
- data/doc/api/files/lib/erbook/rdoc_rb.html +0 -116
- data/doc/api/files/lib/erbook/to_xhtml_rb.html +0 -125
- data/doc/api/files/lib/erbook_rb.html +0 -107
- data/doc/api/fr_class_index.html +0 -31
- data/doc/api/fr_file_index.html +0 -29
- data/doc/api/fr_method_index.html +0 -38
- data/doc/api/rdoc-style.css +0 -208
- data/doc/feed-icon-28x28.png +0 -0
- data/doc/manual.erb +0 -812
data/doc/index.xhtml
CHANGED
@@ -12,101 +12,27 @@
|
|
12
12
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
13
13
|
<head>
|
14
14
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
15
|
-
<meta name="
|
16
|
-
<meta name="author" content="Suraj N. Kurapati"/>
|
17
|
-
<meta name="generator" content="erbook 5.0.0"/>
|
18
|
-
<title>erbook 5.0.0 user manual</title>
|
15
|
+
<meta name="generator" content="ERBook 6.0.0"/>
|
19
16
|
|
20
|
-
|
17
|
+
<title>ERBook 6.0.0</title>
|
21
18
|
|
22
|
-
<
|
23
|
-
<![CDATA[body
|
24
|
-
{
|
25
|
-
margin : auto;
|
26
|
-
max-width : 36em;
|
27
|
-
padding : 0.5em;
|
28
|
-
}
|
29
|
-
|
30
|
-
/* source code */
|
31
|
-
|
32
|
-
tt
|
33
|
-
{
|
34
|
-
background-color : #F0F8FF;
|
35
|
-
}
|
36
|
-
|
37
|
-
pre
|
38
|
-
{
|
39
|
-
cursor : text;
|
40
|
-
line-height : normal;
|
41
|
-
border : 1px solid #b1d827;
|
42
|
-
background-color : #F5FFDF;
|
43
|
-
padding : 1em;
|
44
|
-
overflow : auto;
|
45
|
-
}
|
46
|
-
|
47
|
-
/* output of the syntax coloring library */
|
48
|
-
pre.code
|
49
|
-
{
|
50
|
-
background-color : #FFFFE8;
|
51
|
-
border-color : #EEDD88;
|
52
|
-
}
|
19
|
+
<meta name="author" content="Suraj N. Kurapati"/>
|
53
20
|
|
54
|
-
|
55
|
-
|
56
|
-
a
|
57
|
-
{
|
58
|
-
text-decoration : none;
|
59
|
-
}
|
60
|
-
|
61
|
-
a:hover
|
62
|
-
{
|
63
|
-
text-decoration : underline;
|
64
|
-
}
|
65
|
-
|
66
|
-
a:link
|
67
|
-
{
|
68
|
-
color : #002BB8;
|
69
|
-
}
|
21
|
+
<meta name="date" content="19 January 2009"/>
|
70
22
|
|
71
|
-
|
72
|
-
{
|
73
|
-
color : #5A3696;
|
74
|
-
}
|
23
|
+
<link rel="alternate" type="application/rss+xml" href="http://snk.tuxfamily.org/lib/erbook/ann.xml"/>
|
75
24
|
|
76
|
-
|
77
|
-
|
25
|
+
<style type="text/css" media="all">
|
26
|
+
<![CDATA[/* general */
|
27
|
+
body
|
78
28
|
{
|
79
29
|
color : #000000;
|
30
|
+
background-color : #FFFFFF;
|
31
|
+
line-height : 1.5em;
|
32
|
+
font-family : Calibri, Verdana, sans-serif;
|
80
33
|
}
|
81
34
|
|
82
|
-
a:target,
|
83
|
-
a:target *,
|
84
|
-
*:target a.list
|
85
|
-
{
|
86
|
-
background-color : #FF4500 !important;
|
87
|
-
color : #FFFFFF !important;
|
88
|
-
}
|
89
|
-
|
90
|
-
a:target,
|
91
|
-
*:target a.list
|
92
|
-
{
|
93
|
-
padding : 0.1em;
|
94
|
-
font-weight : bolder;
|
95
|
-
text-decoration : none;
|
96
|
-
}
|
97
|
-
]]>
|
98
|
-
</style>
|
99
|
-
<style type="text/css" media="all">
|
100
|
-
<![CDATA[body
|
101
|
-
{
|
102
|
-
color : #000000;
|
103
|
-
background-color : #FFFFFF;
|
104
|
-
line-height : 1.5em;
|
105
|
-
font-family : Calibri, Verdana, sans-serif;
|
106
|
-
}
|
107
|
-
|
108
35
|
/* emphasis */
|
109
|
-
|
110
36
|
blockquote
|
111
37
|
{
|
112
38
|
color : #333;
|
@@ -115,6 +41,8 @@
|
|
115
41
|
|
116
42
|
em
|
117
43
|
{
|
44
|
+
font-family : Constantia, "Book Antiqua", "URW Bookman L", serif;
|
45
|
+
font-size : 105%;
|
118
46
|
}
|
119
47
|
|
120
48
|
hr
|
@@ -125,7 +53,6 @@
|
|
125
53
|
}
|
126
54
|
|
127
55
|
/* source code */
|
128
|
-
|
129
56
|
tt,
|
130
57
|
code,
|
131
58
|
pre
|
@@ -135,7 +62,6 @@
|
|
135
62
|
}
|
136
63
|
|
137
64
|
/* hyperlinks */
|
138
|
-
|
139
65
|
a > img
|
140
66
|
{
|
141
67
|
border : none;
|
@@ -146,20 +72,7 @@
|
|
146
72
|
_border : none; /* for IE6 */
|
147
73
|
}
|
148
74
|
|
149
|
-
/* lists */
|
150
|
-
|
151
|
-
#content li:first-child
|
152
|
-
{
|
153
|
-
margin-top : 1em;
|
154
|
-
}
|
155
|
-
|
156
|
-
#content li
|
157
|
-
{
|
158
|
-
margin-bottom : 1em;
|
159
|
-
}
|
160
|
-
|
161
75
|
/* headings */
|
162
|
-
|
163
76
|
h1,
|
164
77
|
h2,
|
165
78
|
h3,
|
@@ -224,7 +137,6 @@
|
|
224
137
|
}
|
225
138
|
|
226
139
|
/* tables */
|
227
|
-
|
228
140
|
table
|
229
141
|
{
|
230
142
|
border-collapse : collapse; /* no spacing between cell borders */
|
@@ -238,7 +150,7 @@
|
|
238
150
|
padding : 1em;
|
239
151
|
border : 1px solid #bbb;
|
240
152
|
vertical-align : top;
|
241
|
-
background-color :
|
153
|
+
background-color : #FFFFFF;
|
242
154
|
_background-color : #FFFFFF; /* for IE6 */
|
243
155
|
}
|
244
156
|
|
@@ -248,18 +160,12 @@
|
|
248
160
|
}
|
249
161
|
|
250
162
|
/* document structure */
|
251
|
-
|
252
|
-
#nav
|
253
|
-
{
|
254
|
-
text-align : center;
|
255
|
-
margin-bottom : 4em;
|
256
|
-
}
|
257
|
-
|
258
163
|
#header
|
259
164
|
{
|
260
165
|
text-align : center;
|
261
166
|
}
|
262
167
|
|
168
|
+
.logo,
|
263
169
|
.header_outside_above,
|
264
170
|
#header,
|
265
171
|
.header_outside_below
|
@@ -332,7 +238,6 @@
|
|
332
238
|
}
|
333
239
|
|
334
240
|
/* document nodes */
|
335
|
-
|
336
241
|
.part > .title,
|
337
242
|
.chapter > .title
|
338
243
|
{
|
@@ -401,6 +306,20 @@
|
|
401
306
|
margin : 3em;
|
402
307
|
}
|
403
308
|
|
309
|
+
.tip .nav,
|
310
|
+
.note .nav,
|
311
|
+
.caution .nav,
|
312
|
+
.warning .nav,
|
313
|
+
.important .nav,
|
314
|
+
.figure .nav,
|
315
|
+
.table .nav,
|
316
|
+
.example .nav,
|
317
|
+
.equation .nav,
|
318
|
+
.procedure .nav
|
319
|
+
{
|
320
|
+
margin-left : -7.65em;
|
321
|
+
}
|
322
|
+
|
404
323
|
.tip > .content,
|
405
324
|
.note > .content,
|
406
325
|
.caution > .content,
|
@@ -456,10 +375,142 @@
|
|
456
375
|
_margin : auto; /* for IE6 */
|
457
376
|
}
|
458
377
|
]]>
|
459
|
-
|
460
|
-
|
461
|
-
|
378
|
+
</style>
|
379
|
+
<style type="text/css" media="screen">
|
380
|
+
<![CDATA[/* general */
|
381
|
+
body
|
382
|
+
{
|
383
|
+
margin : 0;
|
384
|
+
padding : 0;
|
385
|
+
padding-left : 10em; /* room for local navigation menus */
|
386
|
+
padding-right : 10em; /* keep #body visually centered */
|
387
|
+
background-color : #808080;
|
388
|
+
}
|
389
|
+
|
390
|
+
/* the actual content of the <body> element */
|
391
|
+
#body
|
392
|
+
{
|
393
|
+
margin : auto;
|
394
|
+
max-width : 38em;
|
395
|
+
|
396
|
+
background-color : #FFFFFF;
|
397
|
+
border-left : 0.35em solid #696969;
|
398
|
+
border-right : 0.35em solid #696969;
|
399
|
+
padding : 2em;
|
400
|
+
}
|
401
|
+
|
402
|
+
/* source code */
|
403
|
+
tt
|
404
|
+
{
|
405
|
+
background-color : #F0F8FF;
|
406
|
+
}
|
407
|
+
|
408
|
+
pre
|
409
|
+
{
|
410
|
+
cursor : text;
|
411
|
+
line-height : normal;
|
412
|
+
border : 1px solid #b1d827;
|
413
|
+
background-color : #F5FFDF;
|
414
|
+
padding : 1em;
|
415
|
+
|
416
|
+
/* fit container to content; no overflow! */
|
417
|
+
display : inline-block;
|
418
|
+
margin : 0;
|
419
|
+
min-width : 92.5%;
|
420
|
+
}
|
421
|
+
|
422
|
+
/* output of the syntax coloring library */
|
423
|
+
pre.code
|
424
|
+
{
|
425
|
+
background-color : #FFFFE8;
|
426
|
+
border-color : #EEDD88;
|
427
|
+
}
|
428
|
+
|
429
|
+
/* hyperlinks */
|
430
|
+
a
|
431
|
+
{
|
432
|
+
text-decoration : none;
|
433
|
+
}
|
434
|
+
|
435
|
+
a:hover
|
436
|
+
{
|
437
|
+
text-decoration : underline;
|
438
|
+
}
|
439
|
+
|
440
|
+
a:link
|
441
|
+
{
|
442
|
+
color : #0038E1; /* maximum saturation of RoyalBlue */
|
443
|
+
}
|
444
|
+
|
445
|
+
a:visited
|
446
|
+
{
|
447
|
+
color : #800080;
|
448
|
+
}
|
449
|
+
|
450
|
+
#toc a:target:after,
|
451
|
+
#lof a:target:after,
|
452
|
+
#nav a:target:after
|
453
|
+
{
|
454
|
+
content : "★"; /* ★ */
|
455
|
+
color : #FF0000;
|
456
|
+
font-size : x-large;
|
457
|
+
padding-left : 0.125em;
|
458
|
+
}
|
459
|
+
|
460
|
+
/* document structure */
|
461
|
+
/* mini navigation menu beside every block node */
|
462
|
+
.nav
|
463
|
+
{
|
464
|
+
width : 4em;
|
465
|
+
float : left; /* detach from main content */
|
466
|
+
margin-left : -6.075em;
|
467
|
+
|
468
|
+
font-size : 1.9em;
|
469
|
+
letter-spacing : 0.25em;
|
470
|
+
text-align : center;
|
471
|
+
|
472
|
+
color : #696969; /* same colors to hide non-links */
|
473
|
+
background-color : #696969;
|
474
|
+
padding : 0.5em;
|
475
|
+
margin-top : -0.5em;
|
476
|
+
}
|
477
|
+
|
478
|
+
.nav:target,
|
479
|
+
.nav:hover
|
480
|
+
{
|
481
|
+
color : #333; /* same colors to hide non-links */
|
482
|
+
background-color : #333;
|
483
|
+
}
|
484
|
+
|
485
|
+
.nav a:link,
|
486
|
+
.nav a:visited
|
487
|
+
{
|
488
|
+
color : #D3D3D3;
|
489
|
+
}
|
462
490
|
|
491
|
+
.nav a:hover,
|
492
|
+
#nav a:target:after {
|
493
|
+
color : #9ACD32;
|
494
|
+
text-decoration : none;
|
495
|
+
}
|
496
|
+
|
497
|
+
/* global navigation menu at the top of the page */
|
498
|
+
#nav
|
499
|
+
{
|
500
|
+
font-size : 1em;
|
501
|
+
letter-spacing : 0;
|
502
|
+
width : 8.5em;
|
503
|
+
margin-left : -11.5em;
|
504
|
+
}
|
505
|
+
|
506
|
+
#nav li
|
507
|
+
{
|
508
|
+
list-style-type : none;
|
509
|
+
}
|
510
|
+
]]>
|
511
|
+
</style>
|
512
|
+
<style type="text/css" media="print">
|
513
|
+
<![CDATA[/* source code */
|
463
514
|
tt
|
464
515
|
{
|
465
516
|
font-weight : normal;
|
@@ -471,7 +522,6 @@
|
|
471
522
|
}
|
472
523
|
|
473
524
|
/* headings */
|
474
|
-
|
475
525
|
h1,
|
476
526
|
h2,
|
477
527
|
h3,
|
@@ -484,7 +534,6 @@
|
|
484
534
|
}
|
485
535
|
|
486
536
|
/* hyperlinks */
|
487
|
-
|
488
537
|
/* blend all hyperlinks with normal text */
|
489
538
|
a:link,
|
490
539
|
a:visited
|
@@ -494,8 +543,8 @@
|
|
494
543
|
}
|
495
544
|
|
496
545
|
/* emphasize external and cross-reference hyperlinks */
|
497
|
-
a:not([href^="#"]):link,
|
498
|
-
a:not([href^="#"]):visited,
|
546
|
+
a[href]:not([href^="#"]):link,
|
547
|
+
a[href]:not([href^="#"]):visited,
|
499
548
|
a.xref[title]:link,
|
500
549
|
a.xref[title]:visited
|
501
550
|
{
|
@@ -505,7 +554,7 @@
|
|
505
554
|
}
|
506
555
|
|
507
556
|
/* show URL of destination for external hyperlinks */
|
508
|
-
a:not([href^="#"]):after
|
557
|
+
a[href]:not([href^="#"]):after
|
509
558
|
{
|
510
559
|
content : " " attr(href);
|
511
560
|
font-family : Monaco, Consolas, "Lucida Console", monospace;
|
@@ -524,8 +573,8 @@
|
|
524
573
|
}
|
525
574
|
|
526
575
|
/* document structure */
|
527
|
-
|
528
576
|
#nav,
|
577
|
+
.nav,
|
529
578
|
#lof
|
530
579
|
{
|
531
580
|
display : none;
|
@@ -540,7 +589,6 @@
|
|
540
589
|
}
|
541
590
|
|
542
591
|
/* document nodes */
|
543
|
-
|
544
592
|
.part > .title > big,
|
545
593
|
.chapter > .title > big
|
546
594
|
{
|
@@ -553,14 +601,13 @@
|
|
553
601
|
_padding-bottom : 0.5em; /* for IE6 */
|
554
602
|
}
|
555
603
|
]]>
|
556
|
-
|
604
|
+
</style>
|
557
605
|
|
558
606
|
<style type="text/css" media="screen">
|
559
607
|
<![CDATA[
|
560
608
|
/* decorate external hyperlinks with a visual indicator */
|
561
|
-
a:not([href^="#"])
|
609
|
+
a[href]:not([href^="#"])
|
562
610
|
{
|
563
|
-
color : #3366BB;
|
564
611
|
background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAFVBMVEVmmcwzmcyZzP8AZswAZv////////9E6giVAAAAB3RSTlP///////8AGksDRgAAADhJREFUGFcly0ESAEAEA0Ei6/9P3sEcVB8kmrwFyni0bOeyyDpy9JTLEaOhQq7Ongf5FeMhHS/4AVnsAZubxDVmAAAAAElFTkSuQmCC");
|
565
612
|
background-position : center right;
|
566
613
|
background-repeat : no-repeat;
|
@@ -580,9 +627,21 @@
|
|
580
627
|
</style>
|
581
628
|
</head>
|
582
629
|
<body>
|
583
|
-
|
584
|
-
|
585
|
-
|
630
|
+
<div id="body">
|
631
|
+
<ul id="nav" class="nav">
|
632
|
+
<li><a id="rev:Contents" href="#Contents">Contents</a></li>
|
633
|
+
<li><a id="rev:Cautions" href="#Cautions">Cautions</a></li>
|
634
|
+
<li><a id="rev:Equations" href="#Equations">Equations</a></li>
|
635
|
+
<li><a id="rev:Examples" href="#Examples">Examples</a></li>
|
636
|
+
<li><a id="rev:Figures" href="#Figures">Figures</a></li>
|
637
|
+
<li><a id="rev:Importants" href="#Importants">Importants</a></li>
|
638
|
+
<li><a id="rev:Notes" href="#Notes">Notes</a></li>
|
639
|
+
<li><a id="rev:Procedures" href="#Procedures">Procedures</a></li>
|
640
|
+
<li><a id="rev:Tables" href="#Tables">Tables</a></li>
|
641
|
+
<li><a id="rev:Tips" href="#Tips">Tips</a></li>
|
642
|
+
<li><a id="rev:Warnings" href="#Warnings">Warnings</a></li>
|
643
|
+
<li><a id="rev:References" href="#References">References</a></li>
|
644
|
+
</ul>
|
586
645
|
|
587
646
|
<br style="display: none"/>
|
588
647
|
<hr style="display: none"/>
|
@@ -591,137 +650,106 @@
|
|
591
650
|
|
592
651
|
<div id="header">
|
593
652
|
|
594
|
-
|
595
|
-
<h1 class="title">erbook 5.0.0 user manual</h1>
|
596
|
-
<h2 class="authors"><a href="http://snk.tuxfamily.org">Suraj N. Kurapati</a></h2>
|
597
|
-
<h3 class="date">22 November 2008</h3>
|
598
|
-
|
599
|
-
</div>
|
600
|
-
|
601
|
-
|
602
|
-
<div id="Abstract">
|
603
|
-
<h1 class="title"><a class="here" title="Permanent link to this section" href="#Abstract">Abstract</a></h1>
|
604
|
-
<div class="content"><p>erbook is an extensible document processor that emits <a class="xref" href="#xhtml" title="Chapter 5.1. XHTML (web page)">XHTML (web page)</a>, <a class="xref" href="#latex" title="Chapter 5.3. LaTeX (PDF)">LaTeX (PDF)</a>, <a class="xref" href="#man" title="Chapter 5.4. man (UNIX manual page)">man (UNIX manual page)</a>, <a class="xref" href="#text" title="Chapter 5.2. Plain text">plain text</a>, and <a class="xref" href="#HelloWorld" title="Section 3.2.3. Creating your own document format">any document format you can imagine</a> from <a href='http://en.wikipedia.org/wiki/ERuby'>eRuby templates</a> that allow scripting and dynamic content generation. <span style='float: right; font-size: larger'><a class="xref" href="#Introduction" title="Chapter 1. Introduction">Read more…</a></span></p>
|
653
|
+
<div class="logo"><img src='erbook.png' alt='ERBook logo' /></div>
|
605
654
|
|
606
|
-
<
|
607
|
-
<p class="title"><a class="here" title="Permanent link to this section" href="#Resources">Resources</a></p>
|
608
|
-
<div class="content"><ul>
|
609
|
-
<li><a href='http://snk.tuxfamily.org/lib/erbook/log'>Release notes</a> — news of project releases. <a href='http://snk.tuxfamily.org/lib/erbook/ann'><img src='feed-icon-28x28.png' alt='RSS feed' /></a></li>
|
655
|
+
<h1 class="title">ERBook 6.0.0</h1>
|
610
656
|
|
611
|
-
<
|
657
|
+
<h2 class="subtitle">Extensible document processor based on eRuby</h2>
|
612
658
|
|
613
|
-
<
|
659
|
+
<h3 class="authors"><a href="mailto:sunaku@gmail.com">Suraj N. Kurapati</a></h3>
|
614
660
|
|
615
|
-
<
|
616
|
-
|
661
|
+
<h3 class="date">19 January 2009</h3>
|
662
|
+
|
663
|
+
</div>
|
664
|
+
|
617
665
|
|
618
|
-
|
619
|
-
</div></p></div>
|
620
|
-
</div>
|
666
|
+
|
621
667
|
|
622
668
|
<br style="display: none"/>
|
623
669
|
<hr style="display: none"/>
|
624
670
|
<br style="display: none"/>
|
625
671
|
|
626
672
|
<div id="toc">
|
627
|
-
<
|
673
|
+
<a name="Contents"/><div class="nav" id="Contents"><a title="Reverse jump to listing" href="#rev:Contents">≡</a>△▽<a title="Jump to this segment" href="#Contents">◎</a></div>
|
674
|
+
<h1 class="title">Contents</h1>
|
628
675
|
<ul>
|
629
|
-
<li>1 <a id="rev:Introduction" href="#Introduction">Introduction</a><ul><li>1.1 <a id="rev:Relevance" href="#Relevance">Relevance</a><ul><li>1.1.1 <a id="rev:Reviews" href="#Reviews">Reviews</a></li></ul></li><li>1.2 <a id="rev:Logistics" href="#Logistics">Logistics</a><ul><li>1.2.1 <a id="rev:Credits" href="#Credits">Credits</a></li><li>1.2.2 <a id="rev:License" href="#License">License</a></li><li>1.2.3 <a id="rev:Version-numbers" href="#Version-numbers">Version numbers</a></li></ul></li></ul></li><li>2 <a id="rev:Setup" href="#Setup">Setup</a><ul><li>2.1 <a id="rev:Requirements" href="#Requirements">Requirements</a></li><li>2.2 <a id="rev:Installation" href="#Installation">Installation</a></li><li>2.3 <a id="rev:Manifest" href="#Manifest">Manifest</a></li></ul></li><li>3 <a id="rev:Theory-of-operation" href="#Theory-of-operation">Theory of operation</a><ul><li>3.1 <a id="rev:Nodes" href="#Nodes">Nodes</a><ul><li>3.1.1 <a id="rev:Node.class" href="#Node.class">The <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code> class</a></li></ul></li><li>3.2 <a id="rev:SpecFile" href="#SpecFile">Format specification file</a><ul><li>3.2.1 <a id="rev:SpecFile.nodes" href="#SpecFile.nodes">Node definition</a><ul><li>3.2.1.1 <a id="rev:SpecFile.nodes.output" href="#SpecFile.nodes.output">Node output template</a></li></ul></li><li>3.2.2 <a id="rev:SpecFile.output" href="#SpecFile.output">Document output template</a></li><li>3.2.3 <a id="rev:HelloWorld" href="#HelloWorld">Creating your own document format</a></li></ul></li></ul></li><li>4 <a id="rev:Usage" href="#Usage">Usage</a><ul><li>4.1 <a id="rev:Command-line-invocation" href="#Command-line-invocation">Command-line invocation</a></li><li>4.2 <a id="rev:include" href="#include">Including external documents</a></li><li>4.3 <a id="rev:Unindenting-nodes-hierarchically" href="#Unindenting-nodes-hierarchically">Unindenting nodes hierarchically</a></li></ul></li><li>5 <a id="rev:Formats" href="#Formats">Formats</a><ul><li>5.1 <a id="rev:xhtml" href="#xhtml">XHTML (web page)</a><ul><li>5.1.1 <a id="rev:Text-to-XHTML-conversion" href="#Text-to-XHTML-conversion">Text to XHTML conversion</a><ul><li>5.1.1.1 <a id="rev:Syntax-coloring-for-source-code" href="#Syntax-coloring-for-source-code">Syntax coloring for source code</a><ul><li>5.1.1.1.1 <a id="rev:Specifying-the-programming-language" href="#Specifying-the-programming-language">Specifying the programming language</a></li></ul></li><li>5.1.1.2 <a id="rev:Smart-sizing-of-source-code" href="#Smart-sizing-of-source-code">Smart sizing of source code</a></li><li>5.1.1.3 <a id="rev:Protecting-verbatim-text" href="#Protecting-verbatim-text">Protecting verbatim text</a></li></ul></li><li>5.1.2 <a id="rev:Parameters" href="#Parameters">Parameters</a></li><li>5.1.3 <a id="rev:Methods" href="#Methods">Methods</a><ul><li>5.1.3.1 <a id="rev:a-ERBook::Node-title" href="#a-ERBook::Node-title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title()</span></code></a></li><li>5.1.3.2 <a id="rev:a-ERBook::Node-id" href="#a-ERBook::Node-id"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#id()</span></code></a></li><li>5.1.3.3 <a id="rev:a-ERBook::Node-title_xhtml" href="#a-ERBook::Node-title_xhtml"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title_xhtml()</span></code></a></li><li>5.1.3.4 <a id="rev:a-ERBook::Node-content_xhtml" href="#a-ERBook::Node-content_xhtml"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#content_xhtml()</span></code></a></li><li>5.1.3.5 <a id="rev:a-ERBook::Node-title_link-aTitle-nil" href="#a-ERBook::Node-title_link-aTitle-nil"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title_link(aTitle = nil)</span></code></a></li><li>5.1.3.6 <a id="rev:a-ERBook::Node-index_link" href="#a-ERBook::Node-index_link"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#index_link()</span></code></a></li><li>5.1.3.7 <a id="rev:a-ERBook::Node-number_link" href="#a-ERBook::Node-number_link"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#number_link()</span></code></a></li><li>5.1.3.8 <a id="rev:a-Hash-to_xml_atts" href="#a-Hash-to_xml_atts"><code class="code"><span style="color:#036;font-weight:bold">Hash</span><span style="color:#666">#to_xml_atts()</span></code></a></li><li>5.1.3.9 <a id="rev:a-ERBook::Template-verbatim-aContent" href="#a-ERBook::Template-verbatim-aContent"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#verbatim(aContent)</span></code></a></li><li>5.1.3.10 <a id="rev:a-ERBook::Template-hyperlink-aUrl-aLabel-aUrl-aTitle-nil" href="#a-ERBook::Template-hyperlink-aUrl-aLabel-aUrl-aTitle-nil"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#hyperlink(aUrl, aLabel = aUrl, aTitle = nil)</span></code></a></li><li>5.1.3.11 <a id="rev:a-ERBook::Template-embed_image_file-aPath-aFormat-aPath-w-aAtts" href="#a-ERBook::Template-embed_image_file-aPath-aFormat-aPath-w-aAtts"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#embed_image_file(aPath, aFormat = aPath[/\w+/], aAtts = {})</span></code></a></li><li>5.1.3.12 <a id="rev:a-ERBook::Template-embed_image_data-aData-aFormat-aAtts" href="#a-ERBook::Template-embed_image_data-aData-aFormat-aAtts"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#embed_image_data(aData, aFormat, aAtts = {})</span></code></a></li><li>5.1.3.13 <a id="rev:a-String-to_xml_entities" href="#a-String-to_xml_entities"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_xml_entities()</span></code></a></li><li>5.1.3.14 <a id="rev:a-String-to_uri_fragment" href="#a-String-to_uri_fragment"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_uri_fragment()</span></code></a></li><li>5.1.3.15 <a id="rev:a-String-to_inline_xhtml" href="#a-String-to_inline_xhtml"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_inline_xhtml()</span></code></a></li><li>5.1.3.16 <a id="rev:a-String-to_xhtml-aInline-false" href="#a-String-to_xhtml-aInline-false"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_xhtml(aInline = false)</span></code></a></li></ul></li><li>5.1.4 <a id="rev:xhtml.nodes" href="#xhtml.nodes">Nodes</a><ul><li>5.1.4.1 <a id="rev:Structural-nodes" href="#Structural-nodes">Structural nodes</a><ul><li>5.1.4.1.1 <a id="rev:xhtml.nodes.header" href="#xhtml.nodes.header">header</a></li><li>5.1.4.1.2 <a id="rev:xhtml.nodes.footer" href="#xhtml.nodes.footer">footer</a></li><li>5.1.4.1.3 <a id="rev:xhtml.nodes.abstract" href="#xhtml.nodes.abstract">abstract</a></li><li>5.1.4.1.4 <a id="rev:xhtml.nodes.xref" href="#xhtml.nodes.xref">xref</a></li></ul></li><li>5.1.4.2 <a id="rev:Organizational-nodes" href="#Organizational-nodes">Organizational nodes</a><ul><li>5.1.4.2.1 <a id="rev:xhtml.nodes.part" href="#xhtml.nodes.part">part</a><ul><li>5.1.4.2.1.1 <a id="rev:An-example" href="#An-example">An example</a></li></ul></li><li>5.1.4.2.2 <a id="rev:xhtml.nodes.chapter" href="#xhtml.nodes.chapter">chapter</a><ul><li>5.1.4.2.2.1 <a id="rev:An-example-5.1.4.2.2.1" href="#An-example-5.1.4.2.2.1">An example</a></li></ul></li><li>5.1.4.2.3 <a id="rev:xhtml.nodes.section" href="#xhtml.nodes.section">section</a><ul><li>5.1.4.2.3.1 <a id="rev:An-example-5.1.4.2.3.1" href="#An-example-5.1.4.2.3.1">An example</a></li></ul></li><li>5.1.4.2.4 <a id="rev:xhtml.nodes.paragraph" href="#xhtml.nodes.paragraph">paragraph</a></li></ul></li><li>5.1.4.3 <a id="rev:Admonition-nodes" href="#Admonition-nodes">Admonition nodes</a><ul><li>5.1.4.3.1 <a id="rev:xhtml.nodes.warning" href="#xhtml.nodes.warning">warning</a></li><li>5.1.4.3.2 <a id="rev:xhtml.nodes.caution" href="#xhtml.nodes.caution">caution</a></li><li>5.1.4.3.3 <a id="rev:xhtml.nodes.important" href="#xhtml.nodes.important">important</a></li><li>5.1.4.3.4 <a id="rev:xhtml.nodes.note" href="#xhtml.nodes.note">note</a></li><li>5.1.4.3.5 <a id="rev:xhtml.nodes.tip" href="#xhtml.nodes.tip">tip</a></li></ul></li><li>5.1.4.4 <a id="rev:Auxilary-materials" href="#Auxilary-materials">Auxilary materials</a><ul><li>5.1.4.4.1 <a id="rev:xhtml.nodes.figure" href="#xhtml.nodes.figure">figure</a></li><li>5.1.4.4.2 <a id="rev:xhtml.nodes.table" href="#xhtml.nodes.table">table</a></li><li>5.1.4.4.3 <a id="rev:xhtml.nodes.example" href="#xhtml.nodes.example">example</a></li><li>5.1.4.4.4 <a id="rev:xhtml.nodes.equation" href="#xhtml.nodes.equation">equation</a></li><li>5.1.4.4.5 <a id="rev:xhtml.nodes.procedure" href="#xhtml.nodes.procedure">procedure</a></li></ul></li><li>5.1.4.5 <a id="rev:Bibliographical-nodes" href="#Bibliographical-nodes">Bibliographical nodes</a><ul><li>5.1.4.5.1 <a id="rev:xhtml.nodes.reference" href="#xhtml.nodes.reference">reference</a></li><li>5.1.4.5.2 <a id="rev:xhtml.nodes.cite" href="#xhtml.nodes.cite">cite</a></li></ul></li></ul></li></ul></li><li>5.2 <a id="rev:text" href="#text">Plain text</a></li><li>5.3 <a id="rev:latex" href="#latex">LaTeX (PDF)</a></li><li>5.4 <a id="rev:man" href="#man">man (UNIX manual page)</a></li></ul></li>
|
676
|
+
<li>1 <a id="rev:Introduction" href="#Introduction">Introduction</a><ul><li>1.1 <a id="rev:Logistics" href="#Logistics">Logistics</a><ul><li><a id="rev:Version-numbers" href="#Version-numbers">Version numbers</a></li></ul></li><li>1.2 <a id="rev:License" href="#License">License</a></li><li>1.3 <a id="rev:Credits" href="#Credits">Credits</a></li><li>1.4 <a id="rev:Reviews" href="#Reviews">Reviews</a></li></ul></li><li>2 <a id="rev:Setup" href="#Setup">Setup</a><ul><li>2.1 <a id="rev:Requirements" href="#Requirements">Requirements</a></li><li>2.2 <a id="rev:Installation" href="#Installation">Installation</a></li><li>2.3 <a id="rev:Manifest" href="#Manifest">Manifest</a></li></ul></li><li>3 <a id="rev:Theory-of-operation" href="#Theory-of-operation">Theory of operation</a><ul><li>3.1 <a id="rev:Nodes" href="#Nodes">Nodes</a><ul><li>3.1.1 <a id="rev:Node.class" href="#Node.class">The <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> class</a></li></ul></li><li>3.2 <a id="rev:SpecFile" href="#SpecFile">Format specification file</a><ul><li>3.2.1 <a id="rev:SpecFile.nodes" href="#SpecFile.nodes">Node definition</a><ul><li>3.2.1.1 <a id="rev:SpecFile.nodes.output" href="#SpecFile.nodes.output">Node output template</a></li></ul></li><li>3.2.2 <a id="rev:SpecFile.output" href="#SpecFile.output">Document output template</a></li><li>3.2.3 <a id="rev:HelloWorld" href="#HelloWorld">Creating your own document format</a></li></ul></li></ul></li><li>4 <a id="rev:Usage" href="#Usage">Usage</a><ul><li>4.1 <a id="rev:Command-line-interface" href="#Command-line-interface">Command-line interface</a><ul><li>4.1.1 <a id="rev:Saving-the-output-to-a-file" href="#Saving-the-output-to-a-file">Saving the output to a file</a></li></ul></li><li>4.2 <a id="rev:include" href="#include">Including external documents</a></li><li>4.3 <a id="rev:Unindenting-nodes-hierarchically" href="#Unindenting-nodes-hierarchically">Unindenting nodes hierarchically</a></li></ul></li><li>5 <a id="rev:Formats" href="#Formats">Formats</a><ul><li>5.1 <a id="rev:xhtml" href="#xhtml">XHTML (web page)</a><ul><li>5.1.1 <a id="rev:Text-to-XHTML-conversion" href="#Text-to-XHTML-conversion">Text to XHTML conversion</a><ul><li>5.1.1.1 <a id="rev:Syntax-coloring-for-source-code" href="#Syntax-coloring-for-source-code">Syntax coloring for source code</a><ul><li>5.1.1.1.1 <a id="rev:Specifying-the-programming-language" href="#Specifying-the-programming-language">Specifying the programming language</a></li></ul></li><li>5.1.1.2 <a id="rev:Smart-sizing-of-source-code" href="#Smart-sizing-of-source-code">Smart sizing of source code</a></li><li>5.1.1.3 <a id="rev:Protecting-verbatim-text" href="#Protecting-verbatim-text">Protecting verbatim text</a></li></ul></li><li>5.1.2 <a id="rev:Parameters" href="#Parameters">Parameters</a></li><li>5.1.3 <a id="rev:Methods" href="#Methods">Methods</a><ul><li><a id="rev:a-ERBook::Document::Node-title" href="#a-ERBook::Document::Node-title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title()</span></code></a></li><li><a id="rev:a-ERBook::Document::Node-id" href="#a-ERBook::Document::Node-id"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#id()</span></code></a></li><li><a id="rev:a-ERBook::Document::Node-title_xhtml" href="#a-ERBook::Document::Node-title_xhtml"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title_xhtml()</span></code></a></li><li><a id="rev:a-ERBook::Document::Node-content_xhtml" href="#a-ERBook::Document::Node-content_xhtml"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#content_xhtml()</span></code></a></li><li><a id="rev:a-ERBook::Document::Node-title_link-title-nil" href="#a-ERBook::Document::Node-title_link-title-nil"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title_link(title = nil)</span></code></a></li><li><a id="rev:a-ERBook::Document::Node-index_link" href="#a-ERBook::Document::Node-index_link"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#index_link()</span></code></a></li><li><a id="rev:a-ERBook::Document::Node-number_link" href="#a-ERBook::Document::Node-number_link"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#number_link()</span></code></a></li><li><a id="rev:a-ERBook::Document::Node-navigation" href="#a-ERBook::Document::Node-navigation"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#navigation()</span></code></a></li><li><a id="rev:a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag" href="#a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span>::navigation(here_frag, list_frag, prev_frag, next_frag)</code></a></li><li><a id="rev:a-ERBook::Document::Node-xref_link-label-nil" href="#a-ERBook::Document::Node-xref_link-label-nil"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#xref_link(label = nil)</span></code></a></li><li><a id="rev:a-Hash-to_xml_atts" href="#a-Hash-to_xml_atts"><code class="code"><span style="color:#036;font-weight:bold">Hash</span><span style="color:#666">#to_xml_atts()</span></code></a></li><li><a id="rev:a-ERBook::Template-verbatim-content" href="#a-ERBook::Template-verbatim-content"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#verbatim(content)</span></code></a></li><li><a id="rev:a-ERBook::Template-hyperlink-url-label-url-title-nil" href="#a-ERBook::Template-hyperlink-url-label-url-title-nil"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#hyperlink(url, label = url, title = nil)</span></code></a></li><li><a id="rev:a-ERBook::Template-embed_image_file-path-format-path-w-atts" href="#a-ERBook::Template-embed_image_file-path-format-path-w-atts"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#embed_image_file(path, format = path[/\w+/], atts = {})</span></code></a></li><li><a id="rev:a-ERBook::Template-embed_image_data-data-format-atts" href="#a-ERBook::Template-embed_image_data-data-format-atts"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#embed_image_data(data, format, atts = {})</span></code></a></li><li><a id="rev:a-String-to_xml_entities" href="#a-String-to_xml_entities"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_xml_entities()</span></code></a></li><li><a id="rev:a-String-to_uri_fragment" href="#a-String-to_uri_fragment"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_uri_fragment()</span></code></a></li><li><a id="rev:a-String-to_inline_xhtml" href="#a-String-to_inline_xhtml"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_inline_xhtml()</span></code></a></li><li><a id="rev:a-String-to_xhtml-inline-false" href="#a-String-to_xhtml-inline-false"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_xhtml(inline = false)</span></code></a></li></ul></li><li>5.1.4 <a id="rev:xhtml.nodes" href="#xhtml.nodes">Nodes</a><ul><li>5.1.4.1 <a id="rev:Structural-nodes" href="#Structural-nodes">Structural nodes</a><ul><li>5.1.4.1.1 <a id="rev:xhtml.nodes.header" href="#xhtml.nodes.header">header</a></li><li>5.1.4.1.2 <a id="rev:xhtml.nodes.footer" href="#xhtml.nodes.footer">footer</a></li><li>5.1.4.1.3 <a id="rev:xhtml.nodes.abstract" href="#xhtml.nodes.abstract">abstract</a></li><li>5.1.4.1.4 <a id="rev:xhtml.nodes.xref" href="#xhtml.nodes.xref">xref</a></li></ul></li><li>5.1.4.2 <a id="rev:Organizational-nodes" href="#Organizational-nodes">Organizational nodes</a><ul><li>5.1.4.2.1 <a id="rev:xhtml.nodes.node" href="#xhtml.nodes.node">node</a></li><li>5.1.4.2.2 <a id="rev:xhtml.nodes.part" href="#xhtml.nodes.part">part</a><ul><li>5.1.4.2.2.1 <a id="rev:An-example" href="#An-example">An example</a></li></ul></li><li>5.1.4.2.3 <a id="rev:xhtml.nodes.chapter" href="#xhtml.nodes.chapter">chapter</a><ul><li>5.1.4.2.3.1 <a id="rev:An-example-5.1.4.2.3.1" href="#An-example-5.1.4.2.3.1">An example</a></li></ul></li><li>5.1.4.2.4 <a id="rev:xhtml.nodes.section" href="#xhtml.nodes.section">section</a><ul><li>5.1.4.2.4.1 <a id="rev:An-example-5.1.4.2.4.1" href="#An-example-5.1.4.2.4.1">An example</a></li></ul></li><li>5.1.4.2.5 <a id="rev:xhtml.nodes.paragraph" href="#xhtml.nodes.paragraph">paragraph</a><ul><li><a id="rev:An-example-608866148" href="#An-example-608866148">An example</a></li></ul></li></ul></li><li>5.1.4.3 <a id="rev:Admonition-nodes" href="#Admonition-nodes">Admonition nodes</a><ul><li>5.1.4.3.1 <a id="rev:xhtml.nodes.warning" href="#xhtml.nodes.warning">warning</a></li><li>5.1.4.3.2 <a id="rev:xhtml.nodes.caution" href="#xhtml.nodes.caution">caution</a></li><li>5.1.4.3.3 <a id="rev:xhtml.nodes.important" href="#xhtml.nodes.important">important</a></li><li>5.1.4.3.4 <a id="rev:xhtml.nodes.note" href="#xhtml.nodes.note">note</a></li><li>5.1.4.3.5 <a id="rev:xhtml.nodes.tip" href="#xhtml.nodes.tip">tip</a></li></ul></li><li>5.1.4.4 <a id="rev:Auxilary-materials" href="#Auxilary-materials">Auxilary materials</a><ul><li>5.1.4.4.1 <a id="rev:xhtml.nodes.figure" href="#xhtml.nodes.figure">figure</a></li><li>5.1.4.4.2 <a id="rev:xhtml.nodes.table" href="#xhtml.nodes.table">table</a></li><li>5.1.4.4.3 <a id="rev:xhtml.nodes.example" href="#xhtml.nodes.example">example</a></li><li>5.1.4.4.4 <a id="rev:xhtml.nodes.equation" href="#xhtml.nodes.equation">equation</a></li><li>5.1.4.4.5 <a id="rev:xhtml.nodes.procedure" href="#xhtml.nodes.procedure">procedure</a></li></ul></li><li>5.1.4.5 <a id="rev:Bibliographical-nodes" href="#Bibliographical-nodes">Bibliographical nodes</a><ul><li>5.1.4.5.1 <a id="rev:xhtml.nodes.reference" href="#xhtml.nodes.reference">reference</a><ul><li><a id="rev:An-example-609181648" href="#An-example-609181648">An example</a></li></ul></li><li>5.1.4.5.2 <a id="rev:xhtml.nodes.cite" href="#xhtml.nodes.cite">cite</a></li></ul></li></ul></li></ul></li><li>5.2 <a id="rev:text" href="#text">Plain text</a></li><li>5.3 <a id="rev:latex" href="#latex">LaTeX (PDF)</a></li><li>5.4 <a id="rev:man" href="#man">UNIX manual page</a></li></ul></li><li>6 <a id="rev:history" href="#history">Project history</a><ul><li>6.1 <a id="rev:Version-6.0.0-2009-01-19" href="#Version-6.0.0-2009-01-19">Version 6.0.0 (2009-01-19)</a><ul><li><a id="rev:Incompatible-changes" href="#Incompatible-changes">Incompatible changes</a></li><li><a id="rev:New-features" href="#New-features">New features</a></li><li><a id="rev:Bug-fixes" href="#Bug-fixes">Bug fixes</a></li><li><a id="rev:Housekeeping" href="#Housekeeping">Housekeeping</a></li></ul></li></ul></li>
|
630
677
|
|
631
|
-
<li><a href="#References">References</a></li>
|
678
|
+
<li><a id="rev:References" href="#References">References</a></li>
|
632
679
|
</ul>
|
633
680
|
</div>
|
634
681
|
|
635
|
-
<div id="lof"><
|
682
|
+
<div id="lof"><a name="Cautions"/><div class="nav" id="Cautions"><a title="Reverse jump to listing" href="#rev:Cautions">≡</a>△▽<a title="Jump to this segment" href="#Cautions">◎</a></div><h2 class="title">Cautions</h2> <ol><li><a id="rev:An-example-1-1" href="#An-example-1-1">An example</a></li></ol><a name="Equations"/><div class="nav" id="Equations"><a title="Reverse jump to listing" href="#rev:Equations">≡</a>△▽<a title="Jump to this segment" href="#Equations">◎</a></div><h2 class="title">Equations</h2> <ol><li><a id="rev:An-example-1-1-1-1-1-1-1" href="#An-example-1-1-1-1-1-1-1">An example</a></li></ol><a name="Examples"/><div class="nav" id="Examples"><a title="Reverse jump to listing" href="#rev:Examples">≡</a>△▽<a title="Jump to this segment" href="#Examples">◎</a></div><h2 class="title">Examples</h2> <ol><li><a id="rev:HelloWorld.spec" href="#HelloWorld.spec">HelloWorld format specification file</a></li><li><a id="rev:HelloWorld.input" href="#HelloWorld.input">Input document for HelloWorld format</a></li><li><a id="rev:HelloWorld.output" href="#HelloWorld.output">Output of HelloWorld format</a></li><li><a id="rev:An-example-4" href="#An-example-4">An example</a></li></ol><a name="Figures"/><div class="nav" id="Figures"><a title="Reverse jump to listing" href="#rev:Figures">≡</a>△▽<a title="Jump to this segment" href="#Figures">◎</a></div><h2 class="title">Figures</h2> <ol><li><a id="rev:An-example-1-1-1-1-1" href="#An-example-1-1-1-1-1">An example</a></li></ol><a name="Importants"/><div class="nav" id="Importants"><a title="Reverse jump to listing" href="#rev:Importants">≡</a>△▽<a title="Jump to this segment" href="#Importants">◎</a></div><h2 class="title">Importants</h2> <ol><li><a id="rev:Save-XHTML-output-as-.xhtml" href="#Save-XHTML-output-as-.xhtml">Save XHTML output as <tt>.xhtml</tt></a></li><li><a id="rev:An-example-2" href="#An-example-2">An example</a></li></ol><a name="Notes"/><div class="nav" id="Notes"><a title="Reverse jump to listing" href="#rev:Notes">≡</a>△▽<a title="Jump to this segment" href="#Notes">◎</a></div><h2 class="title">Notes</h2> <ol><li><a id="rev:An-example-1-1-1" href="#An-example-1-1-1">An example</a></li></ol><a name="Procedures"/><div class="nav" id="Procedures"><a title="Reverse jump to listing" href="#rev:Procedures">≡</a>△▽<a title="Jump to this segment" href="#Procedures">◎</a></div><h2 class="title">Procedures</h2> <ol><li><a id="rev:An-example-1-1-1-1-1-1-1-1" href="#An-example-1-1-1-1-1-1-1-1">An example</a></li></ol><a name="Tables"/><div class="nav" id="Tables"><a title="Reverse jump to listing" href="#rev:Tables">≡</a>△▽<a title="Jump to this segment" href="#Tables">◎</a></div><h2 class="title">Tables</h2> <ol><li><a id="rev:An-example-1-1-1-1-1-1" href="#An-example-1-1-1-1-1-1">An example</a></li></ol><a name="Tips"/><div class="nav" id="Tips"><a title="Reverse jump to listing" href="#rev:Tips">≡</a>△▽<a title="Jump to this segment" href="#Tips">◎</a></div><h2 class="title">Tips</h2> <ol><li><a id="rev:An-example-1-1-1-1" href="#An-example-1-1-1-1">An example</a></li></ol><a name="Warnings"/><div class="nav" id="Warnings"><a title="Reverse jump to listing" href="#rev:Warnings">≡</a>△▽<a title="Jump to this segment" href="#Warnings">◎</a></div><h2 class="title">Warnings</h2> <ol><li><a id="rev:An-example-1" href="#An-example-1">An example</a></li></ol></div>
|
636
683
|
|
637
684
|
<br style="display: none"/>
|
638
685
|
<hr style="display: none"/>
|
639
686
|
<br style="display: none"/>
|
640
687
|
|
641
688
|
<div id="content">
|
642
|
-
|
643
689
|
<div class="chapter">
|
690
|
+
<a name="Introduction"/><div class="nav" id="Introduction"><a title="Reverse jump to listing" href="#rev:Introduction">≡</a>△<a title="Jump to next segment" href="#Logistics">▽</a><a title="Jump to this segment" href="#Introduction">◎</a></div>
|
644
691
|
<h1 class="title">
|
645
|
-
Chapter 
|
692
|
+
Chapter 1
|
646
693
|
<br/>
|
647
|
-
<big
|
694
|
+
<big>Introduction</big>
|
648
695
|
</h1>
|
649
|
-
<div class="content"><p>
|
696
|
+
<div class="content"><p><p><strong>ERBook</strong> is an extensible document processor that emits <a class="xref" href="#HelloWorld" title="Section 3.2.3. Creating your own document format">any document you can imagine</a> from <a href='http://en.wikipedia.org/wiki/ERuby'>eRuby templates</a> that allow scripting and dynamic content generation.</p>
|
650
697
|
|
651
|
-
<p
|
652
|
-
<p class="title"><a class="list" title="Return to table of contents" id="See-the-source-of-this-manual" href="#rev:See-the-source-of-this-manual">Note 1</a>. <a class="here" title="Permanent link to this section" href="#See-the-source-of-this-manual">See the source of this manual</a></p>
|
653
|
-
<div class="content"><img class="icon" src="&icon_note;" alt="note"/><p>Did you know that this manual was generated by erbook? Here is <a href='manual.erb'>the source document</a> to prove it!</p></div>
|
654
|
-
</div> <div class="section">
|
655
|
-
<h2 class="title">
|
656
|
-
<a class="list" title="Return to table of contents" id="Relevance" href="#rev:Relevance">1.1</a> <a class="here" title="Permanent link to this section" href="#Relevance">Relevance</a>
|
657
|
-
</h2>
|
658
|
-
<div class="content"><p>Unlike document processors such as <a href='http://www.docbook.org'>DocBook</a>, <a href='http://deplate.sourceforge.net'>Deplate</a>, and <a href='http://www.jus.uio.no/sisu/SiSU/'>SiSU</a>, erbook is:</p>
|
698
|
+
<p>A working <a class="xref" href="#xhtml" title="Chapter 5.1. XHTML (web page)">XHTML (web page)</a> format is provided, while <a class="xref" href="#latex" title="Chapter 5.3. LaTeX (PDF)">LaTeX (PDF)</a>, <a class="xref" href="#man" title="Chapter 5.4. UNIX manual page">UNIX manual page</a>, and <a class="xref" href="#text" title="Chapter 5.2. Plain text">plain text</a> formats are planned… <a class="xref" href="#License" title="Section 1.2. License">patches are welcome</a>!</p> <strong>ERBook</strong> is exciting because:</p>
|
659
699
|
|
660
700
|
<ul>
|
661
|
-
<li
|
701
|
+
<li>Its documents are scriptable <a href='http://en.wikipedia.org/wiki/ERuby'>eRuby templates</a>.</li>
|
702
|
+
|
703
|
+
<li>It lets you <a class="xref" href="#HelloWorld" title="Section 3.2.3. Creating your own document format">define your own document formats</a>.</li>
|
662
704
|
|
663
|
-
<li
|
705
|
+
<li>Its core contains less than 300 lines of code.</li>
|
664
706
|
</ul>
|
665
707
|
|
666
|
-
<p>
|
708
|
+
<p>These features distinguish <strong>ERBook</strong> from the competition, which offers neither scriptable documents nor definable document formats:</p>
|
667
709
|
|
668
|
-
<
|
669
|
-
|
670
|
-
<a class="list" title="Return to table of contents" id="Reviews" href="#rev:Reviews">1.1.1</a> <a class="here" title="Permanent link to this section" href="#Reviews">Reviews</a>
|
671
|
-
</h3>
|
672
|
-
<div class="content"><p>Vitor Peres in <a href='http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/283052'>ruby-talk</a>:</p>
|
710
|
+
<ul>
|
711
|
+
<li><a href='http://www.docbook.org'>DocBook</a></li>
|
673
712
|
|
674
|
-
<
|
675
|
-
<p>I actually felt like printing [this manual], because it’s just so well-thought typographically… Even if [erbook] weren’t great by itself, I’d feel good just looking at the manual.</p>
|
676
|
-
</blockquote>
|
713
|
+
<li><a href='http://deplate.sourceforge.net'>Deplate</a></li>
|
677
714
|
|
678
|
-
<
|
715
|
+
<li><a href='http://www.jus.uio.no/sisu/SiSU/'>SiSU</a></li>
|
679
716
|
|
680
|
-
<
|
681
|
-
<p>[this manual is] a insanely complete and nice looking bit of documentation [… erbook] looks like a great project</p>
|
682
|
-
</blockquote>
|
717
|
+
<li><a href='http://www.methods.co.nz/asciidoc/'>AsciiDoc</a></li>
|
683
718
|
|
684
|
-
<
|
719
|
+
<li><a href='http://txt2tags.sourceforge.net'>txt2tags</a></li>
|
685
720
|
|
686
|
-
<
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
721
|
+
<li><a href='http://www.triptico.com/software/grutatxt.html'>Grutatxt</a></li>
|
722
|
+
</ul>
|
723
|
+
|
724
|
+
<p><div class="section">
|
725
|
+
<a name="Logistics"/><div class="nav" id="Logistics"><a title="Reverse jump to listing" href="#rev:Logistics">≡</a><a title="Jump to previous segment" href="#Introduction">△</a><a title="Jump to next segment" href="#Version-numbers">▽</a><a title="Jump to this segment" href="#Logistics">◎</a></div>
|
691
726
|
<h2 class="title">
|
692
|
-
|
727
|
+
1.1 Logistics
|
693
728
|
</h2>
|
694
|
-
<div class="content"><
|
729
|
+
<div class="content"><ul>
|
730
|
+
<li><a class="xref" href="#history" title="Chapter 6. Project history">Release notes</a> — history of project releases.</li>
|
695
731
|
|
696
|
-
<
|
697
|
-
<h3 class="title">
|
698
|
-
<a class="list" title="Return to table of contents" id="Credits" href="#rev:Credits">1.2.1</a> <a class="here" title="Permanent link to this section" href="#Credits">Credits</a>
|
699
|
-
</h3>
|
700
|
-
<div class="content"><p>The erbook logo, its image file “erbook.png”, and its source file “erbook.svg” make use of the <a href='http://openclipart.org/media/files/lemmling/9065'>“cartoon owl sitting on a book”</a> graphic, which was created and released into the public domain by <a href='http://openclipart.org/media/people/lemmling'>Jens Vierbuchen</a> on July 7, 2008.</p></div>
|
701
|
-
</div> <div class="section">
|
702
|
-
<h3 class="title">
|
703
|
-
<a class="list" title="Return to table of contents" id="License" href="#rev:License">1.2.2</a> <a class="here" title="Permanent link to this section" href="#License">License</a>
|
704
|
-
</h3>
|
705
|
-
<div class="content"><p>Copyright 2006 Suraj N. Kurapati <a href='mailto:sunaku@gmail.com'>sunaku@gmail.com</a></p>
|
732
|
+
<li><a href='http://github.com/sunaku/erbook'>Source code</a> — obtain via <a href='http://git.or.cz'>Git</a> or browse online.</li>
|
706
733
|
|
707
|
-
<
|
734
|
+
<li><a href='api/index.html'>API reference</a> — documentation for source code.</li>
|
735
|
+
</ul>
|
708
736
|
|
709
|
-
<p>
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
</
|
714
|
-
<div class="content"><p>
|
737
|
+
<p>To get help or provide feedback, simply <a class="xref" href="#License" title="Section 1.2. License">contact the authors</a>.</p>
|
738
|
+
|
739
|
+
<p><div class="paragraph">
|
740
|
+
<a name="Version-numbers"/><div class="nav" id="Version-numbers"><a title="Reverse jump to listing" href="#rev:Version-numbers">≡</a><a title="Jump to previous segment" href="#Logistics">△</a><a title="Jump to next segment" href="#License">▽</a><a title="Jump to this segment" href="#Version-numbers">◎</a></div>
|
741
|
+
<p class="title">Version numbers</p>
|
742
|
+
<div class="content"><p><strong>ERBook</strong> releases are numbered in <em>major.minor.patch</em> form according to the <a href='http://www.rubygems.org/read/chapter/7'>RubyGems rational versioning policy</a>, which can be summarized thus:</p>
|
715
743
|
<table border="1">
|
716
744
|
<thead>
|
717
745
|
<tr>
|
718
746
|
<td rowspan='2'>What increased in the version number?</td>
|
719
|
-
<td colspan='3'>
|
747
|
+
<td colspan='3'>The increase indicates that the release:</td>
|
720
748
|
</tr>
|
721
749
|
<tr>
|
722
|
-
<th>
|
723
|
-
<th>
|
724
|
-
<th>
|
750
|
+
<th>Is backward compatible?</th>
|
751
|
+
<th>Has new features?</th>
|
752
|
+
<th>Has bug fixes?</th>
|
725
753
|
</tr>
|
726
754
|
</thead>
|
727
755
|
<tbody>
|
@@ -746,76 +774,100 @@
|
|
746
774
|
</tbody>
|
747
775
|
</table></div>
|
748
776
|
</div></p></div>
|
777
|
+
</div> <div class="section">
|
778
|
+
<a name="License"/><div class="nav" id="License"><a title="Reverse jump to listing" href="#rev:License">≡</a><a title="Jump to previous segment" href="#Version-numbers">△</a><a title="Jump to next segment" href="#Credits">▽</a><a title="Jump to this segment" href="#License">◎</a></div>
|
779
|
+
<h2 class="title">
|
780
|
+
1.2 License
|
781
|
+
</h2>
|
782
|
+
<div class="content"><p>Copyright 2006 Suraj N. Kurapati <a href='mailto:sunaku@gmail.com'>sunaku@gmail.com</a></p>
|
783
|
+
|
784
|
+
<p>Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.</p>
|
785
|
+
|
786
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</p></div>
|
787
|
+
</div> <div class="section">
|
788
|
+
<a name="Credits"/><div class="nav" id="Credits"><a title="Reverse jump to listing" href="#rev:Credits">≡</a><a title="Jump to previous segment" href="#License">△</a><a title="Jump to next segment" href="#Reviews">▽</a><a title="Jump to this segment" href="#Credits">◎</a></div>
|
789
|
+
<h2 class="title">
|
790
|
+
1.3 Credits
|
791
|
+
</h2>
|
792
|
+
<div class="content"><img src='erbook.png' alt='ERBook logo' />
|
793
|
+
<p>The “erbook.png” image and its “erbook.svg” source utilize the <a href='http://openclipart.org/media/files/lemmling/9065'>“cartoon owl sitting on a book”</a> graphic, which was created and released into the public domain by <a href='http://openclipart.org/media/people/lemmling'>Jens Vierbuchen</a> on July 7, 2008.</p></div>
|
794
|
+
</div> <div class="section">
|
795
|
+
<a name="Reviews"/><div class="nav" id="Reviews"><a title="Reverse jump to listing" href="#rev:Reviews">≡</a><a title="Jump to previous segment" href="#Credits">△</a><a title="Jump to next segment" href="#Setup">▽</a><a title="Jump to this segment" href="#Reviews">◎</a></div>
|
796
|
+
<h2 class="title">
|
797
|
+
1.4 Reviews
|
798
|
+
</h2>
|
799
|
+
<div class="content"><p>Vitor Peres in <a href='http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/283052'>ruby-talk</a>:</p>
|
800
|
+
|
801
|
+
<blockquote>
|
802
|
+
<p>I actually felt like printing [this manual], because it’s just so well-thought typographically… Even if [<strong>ERBook</strong>] weren’t great by itself, I’d feel good just looking at the manual.</p>
|
803
|
+
</blockquote>
|
804
|
+
|
805
|
+
<p>Ara T. Howard in <a href='http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/282949'>ruby-talk</a>:</p>
|
806
|
+
|
807
|
+
<blockquote>
|
808
|
+
<p>[this manual is] a insanely complete and nice looking bit of documentation [… <strong>ERBook</strong>] looks like a great project</p>
|
809
|
+
</blockquote>
|
810
|
+
|
811
|
+
<p>Martin DeMello in <a href='http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/283304'>ruby-talk</a>:</p>
|
812
|
+
|
813
|
+
<blockquote>
|
814
|
+
<p>Very nice work indeed!</p>
|
815
|
+
</blockquote></div>
|
749
816
|
</div></p></div>
|
750
817
|
</div>
|
751
818
|
<div class="chapter">
|
819
|
+
<a name="Setup"/><div class="nav" id="Setup"><a title="Reverse jump to listing" href="#rev:Setup">≡</a><a title="Jump to previous segment" href="#Reviews">△</a><a title="Jump to next segment" href="#Requirements">▽</a><a title="Jump to this segment" href="#Setup">◎</a></div>
|
752
820
|
<h1 class="title">
|
753
|
-
Chapter 
|
821
|
+
Chapter 2
|
754
822
|
<br/>
|
755
|
-
<big
|
823
|
+
<big>Setup</big>
|
756
824
|
</h1>
|
757
825
|
<div class="content"><p><div class="section">
|
826
|
+
<a name="Requirements"/><div class="nav" id="Requirements"><a title="Reverse jump to listing" href="#rev:Requirements">≡</a><a title="Jump to previous segment" href="#Setup">△</a><a title="Jump to next segment" href="#Installation">▽</a><a title="Jump to this segment" href="#Requirements">◎</a></div>
|
758
827
|
<h2 class="title">
|
759
|
-
|
828
|
+
2.1 Requirements
|
760
829
|
</h2>
|
761
|
-
<div class="content"><p>Your system needs the following software to run
|
762
|
-
<table border="1"><thead><tr><th>Software</th><th>Description</th><th>Notes</th></tr></thead><tbody><tr><td style='text-align: left;'><a href='http://ruby-lang.org'>Ruby</a></td><td style='text-align: left;'>Ruby language interpreter</td><td style='text-align: left;'>Version 1.8.
|
763
|
-
</tr><tr><td style='text-align: left;'><a href='http://
|
764
|
-
</tr
|
765
|
-
</tr><tr><td style='text-align: left;'><a href='http://trollop.rubyforge.org'>Trollop</a></td><td style='text-align: left;'>Command-line option parser</td><td style='text-align: left;'>Required by the <em>erbook</em> executable.</td>
|
766
|
-
</tr></tbody></table>
|
767
|
-
<p>If your system has <a href='http://rubygems.org'>RubyGems</a>, then you can install Maruku and CodeRay by running the following command:</p>
|
768
|
-
|
769
|
-
<pre>gem install trollop maruku coderay</pre></div>
|
830
|
+
<div class="content"><p>Your system needs the following software to run <strong>ERBook</strong>.</p>
|
831
|
+
<table border="1"><thead><tr><th>Software</th><th>Description</th><th>Notes</th></tr></thead><tbody><tr><td style='text-align: left;'><a href='http://ruby-lang.org'>Ruby</a></td><td style='text-align: left;'>Ruby language interpreter</td><td style='text-align: left;'>Version 1.8.7 or newer is required.</td>
|
832
|
+
</tr><tr><td style='text-align: left;'><a href='http://rubygems.org'>RubyGems</a></td><td style='text-align: left;'>Ruby packaging system</td><td style='text-align: left;'>Version 1.0.0 or newer is required.</td>
|
833
|
+
</tr></tbody></table></div>
|
770
834
|
</div> <div class="section">
|
835
|
+
<a name="Installation"/><div class="nav" id="Installation"><a title="Reverse jump to listing" href="#rev:Installation">≡</a><a title="Jump to previous segment" href="#Requirements">△</a><a title="Jump to next segment" href="#Manifest">▽</a><a title="Jump to this segment" href="#Installation">◎</a></div>
|
771
836
|
<h2 class="title">
|
772
|
-
|
837
|
+
2.2 Installation
|
773
838
|
</h2>
|
774
|
-
<div class="content"><p>
|
839
|
+
<div class="content"><p>You can install <strong>ERBook</strong> by running this command:</p>
|
775
840
|
|
776
|
-
<pre>gem install erbook
|
777
|
-
erbook -v</pre>
|
841
|
+
<pre>gem install erbook</pre>
|
778
842
|
|
779
|
-
<p>
|
843
|
+
<p>To check whether the installation was sucessful, run this command:</p>
|
780
844
|
|
781
|
-
<
|
782
|
-
<li>
|
783
|
-
<p>Download the newest release package from <a href='http://snk.tuxfamily.org/lib/erbook/pkg'>the download area</a>.</p>
|
784
|
-
</li>
|
785
|
-
|
786
|
-
<li>
|
787
|
-
<p>Extract the release package somewhere on your system.</p>
|
788
|
-
</li>
|
789
|
-
|
790
|
-
<li>
|
791
|
-
<p>Go inside the extracted directory and run the following command:</p>
|
845
|
+
<pre>erbook -v</pre>
|
792
846
|
|
793
|
-
<
|
794
|
-
</li>
|
795
|
-
</ol>
|
847
|
+
<p>If the installation was successful, you will see output like this:</p>
|
796
848
|
|
797
|
-
<p
|
798
|
-
version:
|
799
|
-
release:
|
800
|
-
website: http://snk.tuxfamily.org/lib/erbook
|
801
|
-
install: /home/sun/src/erbook
|
802
|
-
</pre></p>
|
849
|
+
<p><pre>project: ERBook
|
850
|
+
version: 6.0.0
|
851
|
+
release: 2009-01-19
|
852
|
+
website: http://snk.tuxfamily.org/lib/erbook/
|
853
|
+
install: /home/sun/src/erbook</pre></p>
|
803
854
|
|
804
|
-
<p>Otherwise, you can <a class="xref" href="#License" title="Section 1.2.
|
855
|
+
<p>Otherwise, you can <a class="xref" href="#License" title="Section 1.2. License">contact the author</a> for help.</p></div>
|
805
856
|
</div> <div class="section">
|
857
|
+
<a name="Manifest"/><div class="nav" id="Manifest"><a title="Reverse jump to listing" href="#rev:Manifest">≡</a><a title="Jump to previous segment" href="#Installation">△</a><a title="Jump to next segment" href="#Theory-of-operation">▽</a><a title="Jump to this segment" href="#Manifest">◎</a></div>
|
806
858
|
<h2 class="title">
|
807
|
-
|
859
|
+
2.3 Manifest
|
808
860
|
</h2>
|
809
|
-
<div class="content"><p>You will see the following items inside
|
861
|
+
<div class="content"><p>You will see the following items inside <strong>ERBook</strong>’s installation directory, whose path you can determine by running this command:</p>
|
810
862
|
|
811
863
|
<pre>erbook -v</pre>
|
812
864
|
|
813
865
|
<ul>
|
814
866
|
<li>
|
815
|
-
<p><tt>bin/</tt
|
867
|
+
<p><tt>bin/</tt></p>
|
816
868
|
|
817
869
|
<ul>
|
818
|
-
<li><tt>erbook</tt> —
|
870
|
+
<li><tt>erbook</tt> — the main <strong>ERBook</strong> executable.</li>
|
819
871
|
</ul>
|
820
872
|
</li>
|
821
873
|
|
@@ -840,11 +892,11 @@ install: /home/sun/src/erbook
|
|
840
892
|
</li>
|
841
893
|
|
842
894
|
<li>
|
843
|
-
<p><tt>lib/</tt
|
895
|
+
<p><tt>lib/</tt></p>
|
844
896
|
|
845
897
|
<ul>
|
846
898
|
<li>
|
847
|
-
<p><tt>erbook.rb</tt> —
|
899
|
+
<p><tt>erbook.rb</tt> — the main <strong>ERBook</strong> library.</p>
|
848
900
|
</li>
|
849
901
|
|
850
902
|
<li>
|
@@ -868,15 +920,15 @@ install: /home/sun/src/erbook
|
|
868
920
|
|
869
921
|
<ul>
|
870
922
|
<li>
|
871
|
-
<p><tt>erbook.svg</tt> — source file of the
|
923
|
+
<p><tt>erbook.svg</tt> — source file of the <strong>ERBook</strong> logo.</p>
|
872
924
|
</li>
|
873
925
|
|
874
926
|
<li>
|
875
|
-
<p><tt>
|
927
|
+
<p><tt>index.erb</tt> — source file of this manual.</p>
|
876
928
|
</li>
|
877
929
|
|
878
930
|
<li>
|
879
|
-
<p><tt>api/</tt> —
|
931
|
+
<p><tt>api/</tt> — API reference documentation.</p>
|
880
932
|
</li>
|
881
933
|
</ul>
|
882
934
|
</li>
|
@@ -888,12 +940,13 @@ install: /home/sun/src/erbook
|
|
888
940
|
</div></p></div>
|
889
941
|
</div>
|
890
942
|
<div class="chapter">
|
943
|
+
<a name="Theory-of-operation"/><div class="nav" id="Theory-of-operation"><a title="Reverse jump to listing" href="#rev:Theory-of-operation">≡</a><a title="Jump to previous segment" href="#Manifest">△</a><a title="Jump to next segment" href="#Nodes">▽</a><a title="Jump to this segment" href="#Theory-of-operation">◎</a></div>
|
891
944
|
<h1 class="title">
|
892
|
-
Chapter 
|
945
|
+
Chapter 3
|
893
946
|
<br/>
|
894
|
-
<big
|
947
|
+
<big>Theory of operation</big>
|
895
948
|
</h1>
|
896
|
-
<div class="content"><p>When you run
|
949
|
+
<div class="content"><p>When you run ERBook, it does the following:</p>
|
897
950
|
|
898
951
|
<ol>
|
899
952
|
<li>
|
@@ -940,8 +993,9 @@ install: /home/sun/src/erbook
|
|
940
993
|
<p>Although there is only one document being processed here, we refer to it using three distinct terms: <strong>input</strong>, <strong>processed</strong>, and <strong>output</strong>; because the content of the document changes radically with every transformation.</p>
|
941
994
|
|
942
995
|
<p><div class="section">
|
996
|
+
<a name="Nodes"/><div class="nav" id="Nodes"><a title="Reverse jump to listing" href="#rev:Nodes">≡</a><a title="Jump to previous segment" href="#Theory-of-operation">△</a><a title="Jump to next segment" href="#Node.class">▽</a><a title="Jump to this segment" href="#Nodes">◎</a></div>
|
943
997
|
<h2 class="title">
|
944
|
-
|
998
|
+
3.1 Nodes
|
945
999
|
</h2>
|
946
1000
|
<div class="content"><p>A node is a block of text that appears like this:</p>
|
947
1001
|
|
@@ -979,15 +1033,16 @@ install: /home/sun/src/erbook
|
|
979
1033
|
<table border="1"><thead><tr><th>Component</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code">node_type</code></td><td style='text-align: left;'>name of the method being invoked</td>
|
980
1034
|
</tr><tr><td style='text-align: left;'><code class="code">node_argument1, node_argument2, ...</code></td><td style='text-align: left;'>arguments for the method invocation</td>
|
981
1035
|
</tr><tr><td style='text-align: left;'><code class="code">node_content</code></td><td style='text-align: left;'>a block argument being passed to the method invocation</td>
|
982
|
-
</tr><tr><td style='text-align: left;'><code class="code">node_object</code></td><td style='text-align: left;'>a <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code> object (see <a class="xref" href="#Node.class">Section 3.1.1. The <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code> class</a>) representing this method invocation</td>
|
1036
|
+
</tr><tr><td style='text-align: left;'><code class="code">node_object</code></td><td style='text-align: left;'>a <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> object (see <a class="xref" href="#Node.class">Section 3.1.1. The <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> class</a>) representing this method invocation</td>
|
983
1037
|
</tr></tbody></table>
|
984
1038
|
<p>A <a class="xref" href="#SpecFile" title="Section 3.2. Format specification file">format specification file</a> defines what types of nodes an input document may use.</p>
|
985
1039
|
|
986
1040
|
<p><div class="section">
|
1041
|
+
<a name="Node.class"/><div class="nav" id="Node.class"><a title="Reverse jump to listing" href="#rev:Node.class">≡</a><a title="Jump to previous segment" href="#Nodes">△</a><a title="Jump to next segment" href="#SpecFile">▽</a><a title="Jump to this segment" href="#Node.class">◎</a></div>
|
987
1042
|
<h3 class="title">
|
988
|
-
|
1043
|
+
3.1.1 The <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> class
|
989
1044
|
</h3>
|
990
|
-
<div class="content"><p>When
|
1045
|
+
<div class="content"><p>When ERBook builds a document tree from the nodes in an input document, it stores information about these nodes into <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> objects. A <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> object has the following properties (methods):</p>
|
991
1046
|
<table border="1"><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'>type</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Name of the type of this node.</td>
|
992
1047
|
</tr><tr><td style='text-align: left;'>args</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code></td><td style='text-align: left;'>Arguments passed to this node.</td>
|
993
1048
|
</tr><tr><td style='text-align: left;'>content</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>The block of text passed to this node.</td>
|
@@ -997,71 +1052,77 @@ install: /home/sun/src/erbook
|
|
997
1052
|
</tr><tr><td style='text-align: left;'>index</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>A LaTeX-style section number for this node. This property is only present if the <strong>index</strong> parameter is enabled in the definition of this type of node.</td>
|
998
1053
|
</tr><tr><td style='text-align: left;'>number</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Integer</span></code></td><td style='text-align: left;'>An order-of-occurrence number for this node. This property is only present if the <strong>number</strong> parameter is enabled in the definition of this type of node.</td>
|
999
1054
|
</tr><tr><td style='text-align: left;'>depth</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Integer</span></code></td><td style='text-align: left;'>Distance from the root of the document tree to this node.</td>
|
1000
|
-
</tr><tr><td style='text-align: left;'>parent</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>The <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code> object which contains this node. The value of this property will be <code class="code"><span style="color:#038;font-weight:bold">nil</span></code> if this node is a root of the document tree.</td>
|
1001
|
-
</tr><tr><td style='text-align: left;'>children</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>List of child nodes from the document tree.</td>
|
1055
|
+
</tr><tr><td style='text-align: left;'>parent</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>The <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> object which contains this node. The value of this property will be <code class="code"><span style="color:#038;font-weight:bold">nil</span></code> if this node is a root of the document tree.</td>
|
1056
|
+
</tr><tr><td style='text-align: left;'>children</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>List of child nodes from the document tree.</td>
|
1002
1057
|
</tr></tbody></table>
|
1003
|
-
<p>Furthermore, the <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code> class is derived from <a href='http://www.ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html'>Ruby’s <code class="code"><span style="color:#036;font-weight:bold">OpenStruct</span></code> class</a>, so you can define new properties for <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code> objects dynamically.</p></div>
|
1058
|
+
<p>Furthermore, the <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> class is derived from <a href='http://www.ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html'>Ruby’s <code class="code"><span style="color:#036;font-weight:bold">OpenStruct</span></code> class</a>, so you can define new properties for <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> objects dynamically.</p></div>
|
1004
1059
|
</div></p></div>
|
1005
1060
|
</div> <div class="section">
|
1061
|
+
<a name="SpecFile"/><div class="nav" id="SpecFile"><a title="Reverse jump to listing" href="#rev:SpecFile">≡</a><a title="Jump to previous segment" href="#Node.class">△</a><a title="Jump to next segment" href="#SpecFile.nodes">▽</a><a title="Jump to this segment" href="#SpecFile">◎</a></div>
|
1006
1062
|
<h2 class="title">
|
1007
|
-
|
1063
|
+
3.2 Format specification file
|
1008
1064
|
</h2>
|
1009
1065
|
<div class="content"><p>A format specification file is a plain-text file marked up in <a href='http://yaml4r.sourceforge.net/cookbook/'>YAML syntax</a>. Through the following parameters, it defines (1) what types of nodes an input document may contain, (2) how the content of those nodes is transformed into output, and (3) how the processed document is transformed into the output document.</p>
|
1010
1066
|
<table border="1"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'>desc</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>A short description of the output format.</td>
|
1011
|
-
</tr><tr><td style='text-align: left;'>code</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Ruby code that will be loaded before the input document is processed. This source code will be evaluated inside the main
|
1067
|
+
</tr><tr><td style='text-align: left;'>code</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Ruby code that will be loaded before the input document is processed. This source code will be evaluated inside the main ERBook executable, so any file-system or path-dependent portions of this source code should take appropriate precautions.</td>
|
1012
1068
|
</tr><tr><td style='text-align: left;'>nodes</td><td style='text-align: left;'>Hash</td><td style='text-align: left;'>A listing of <a class="xref" href="#SpecFile.nodes" title="Section 3.2.1. Node definition">node definitions</a>.</td>
|
1013
1069
|
</tr><tr><td style='text-align: left;'>output</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>An eRuby template for the final output document. See <a class="xref" href="#SpecFile.output">Section 3.2.2. Document output template</a>.</td>
|
1014
1070
|
</tr></tbody></table>
|
1015
1071
|
<p><div class="section">
|
1072
|
+
<a name="SpecFile.nodes"/><div class="nav" id="SpecFile.nodes"><a title="Reverse jump to listing" href="#rev:SpecFile.nodes">≡</a><a title="Jump to previous segment" href="#SpecFile">△</a><a title="Jump to next segment" href="#SpecFile.nodes.output">▽</a><a title="Jump to this segment" href="#SpecFile.nodes">◎</a></div>
|
1016
1073
|
<h3 class="title">
|
1017
|
-
|
1074
|
+
3.2.1 Node definition
|
1018
1075
|
</h3>
|
1019
1076
|
<div class="content"><p>A node definition is a mapping from a name (the “node type”) to the following set of parameters:</p>
|
1020
1077
|
<table border="1"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'>index</td><td style='text-align: left;'>Boolean</td><td style='text-align: left;'>Assign a LaTeX-style section number to this node?</td>
|
1021
1078
|
</tr><tr><td style='text-align: left;'>number</td><td style='text-align: left;'>Boolean</td><td style='text-align: left;'>Assign an order-of-occurrence number to this node?</td>
|
1022
1079
|
</tr><tr><td style='text-align: left;'>silent</td><td style='text-align: left;'>Boolean</td><td style='text-align: left;'>Suppress the output of this node?</td>
|
1023
1080
|
</tr><tr><td style='text-align: left;'>output</td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>An eRuby template for the content of this node. See <a class="xref" href="#SpecFile.nodes.output">Section 3.2.1.1. Node output template</a>.</td>
|
1081
|
+
</tr><tr><td style='text-align: left;'>inline</td><td style='text-align: left;'>Boolean</td><td style='text-align: left;'>Is node’s output an in-line string of text that can be embedded anywhere in the document?</td>
|
1024
1082
|
</tr></tbody></table>
|
1025
1083
|
<p>You may define additional parameters in a node definition if you want.</p>
|
1026
1084
|
|
1027
1085
|
<p><div class="section">
|
1086
|
+
<a name="SpecFile.nodes.output"/><div class="nav" id="SpecFile.nodes.output"><a title="Reverse jump to listing" href="#rev:SpecFile.nodes.output">≡</a><a title="Jump to previous segment" href="#SpecFile.nodes">△</a><a title="Jump to next segment" href="#SpecFile.output">▽</a><a title="Jump to this segment" href="#SpecFile.nodes.output">◎</a></div>
|
1028
1087
|
<h4 class="title">
|
1029
|
-
|
1088
|
+
3.2.1.1 Node output template
|
1030
1089
|
</h4>
|
1031
|
-
<div class="content"><p>A node output template (the <strong>output</strong> parameter in a node definition) is an eRuby template that transforms a node’s content into output. During the processing stage,
|
1090
|
+
<div class="content"><p>A node output template (the <strong>output</strong> parameter in a node definition) is an eRuby template that transforms a node’s content into output. During the processing stage, ERBook replaces all nodes in the input document with the result of this template <em>unless</em> the <strong>silent</strong> parameter is enabled in this node’s definition.</p>
|
1032
1091
|
|
1033
1092
|
<p>The following variables are available for use in this template:</p>
|
1034
|
-
<table border="1"><thead><tr><th>Variable</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@node</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>The node for which this template is being evaluated.</td>
|
1035
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@roots</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All root nodes in the document tree.</td>
|
1036
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@nodes</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All nodes in the document tree.</td>
|
1037
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1038
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1093
|
+
<table border="1"><thead><tr><th>Variable</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@node</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>The node for which this template is being evaluated.</td>
|
1094
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@roots</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All root nodes in the document tree.</td>
|
1095
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@nodes</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All nodes in the document tree.</td>
|
1096
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@nodes_by_type</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Hash</span></code></td><td style='text-align: left;'>Mapping from node type (<code class="code"><span style="color:#036;font-weight:bold">String</span></code>) to array of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> objects having that type.</td>
|
1097
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@format</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Hash</span></code></td><td style='text-align: left;'>Data from the format specification file.</td>
|
1039
1098
|
</tr></tbody></table>
|
1040
|
-
<p>
|
1041
|
-
<table border="1"><thead><tr><th>Expression</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1042
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1099
|
+
<p>ERBook also provides the following mappings inside the <code class="code"><span style="color:#33B">@format</span></code> variable:</p>
|
1100
|
+
<table border="1"><thead><tr><th>Expression</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@format</span>[<span style="color:#A60">:name</span>]</code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Short-hand name of the current format.</td>
|
1101
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@format</span>[<span style="color:#A60">:file</span>]</code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Path of the current format specification file.</td>
|
1043
1102
|
</tr></tbody></table></div>
|
1044
1103
|
</div></p></div>
|
1045
1104
|
</div> <div class="section">
|
1105
|
+
<a name="SpecFile.output"/><div class="nav" id="SpecFile.output"><a title="Reverse jump to listing" href="#rev:SpecFile.output">≡</a><a title="Jump to previous segment" href="#SpecFile.nodes.output">△</a><a title="Jump to next segment" href="#HelloWorld">▽</a><a title="Jump to this segment" href="#SpecFile.output">◎</a></div>
|
1046
1106
|
<h3 class="title">
|
1047
|
-
|
1107
|
+
3.2.2 Document output template
|
1048
1108
|
</h3>
|
1049
1109
|
<div class="content"><p>A document output template (the <strong>output</strong> parameter in a format specification file) is an eRuby template that transforms a processed document into the final output document.</p>
|
1050
1110
|
|
1051
1111
|
<p>The following variables are available for use in this template:</p>
|
1052
1112
|
<table border="1"><thead><tr><th>Variable</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@content</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Content of the processed document.</td>
|
1053
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@roots</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All root nodes in the document tree.</td>
|
1054
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@nodes</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All nodes in the document tree.</td>
|
1055
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1056
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1113
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@roots</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All root nodes in the document tree.</td>
|
1114
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@nodes</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Array</span></code> of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code></td><td style='text-align: left;'>All nodes in the document tree.</td>
|
1115
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@nodes_by_type</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Hash</span></code></td><td style='text-align: left;'>Mapping from node type (<code class="code"><span style="color:#036;font-weight:bold">String</span></code>) to array of <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span></code> objects having that type.</td>
|
1116
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@format</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Hash</span></code></td><td style='text-align: left;'>Data from the format specification file.</td>
|
1057
1117
|
</tr></tbody></table>
|
1058
|
-
<p>
|
1059
|
-
<table border="1"><thead><tr><th>Expression</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1060
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@
|
1118
|
+
<p>ERBook also provides the following mappings inside the <code class="code"><span style="color:#33B">@format</span></code> variable:</p>
|
1119
|
+
<table border="1"><thead><tr><th>Expression</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@format</span>[<span style="color:#A60">:name</span>]</code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Short-hand name of the current format.</td>
|
1120
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#33B">@format</span>[<span style="color:#A60">:file</span>]</code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'>Path of the current format specification file.</td>
|
1061
1121
|
</tr></tbody></table></div>
|
1062
1122
|
</div> <div class="section">
|
1123
|
+
<a name="HelloWorld"/><div class="nav" id="HelloWorld"><a title="Reverse jump to listing" href="#rev:HelloWorld">≡</a><a title="Jump to previous segment" href="#SpecFile.output">△</a><a title="Jump to next segment" href="#HelloWorld.spec">▽</a><a title="Jump to this segment" href="#HelloWorld">◎</a></div>
|
1063
1124
|
<h3 class="title">
|
1064
|
-
|
1125
|
+
3.2.3 Creating your own document format
|
1065
1126
|
</h3>
|
1066
1127
|
<div class="content"><p>Here is a working example to help you digest all that you’ve learned so far about format specification files. A few things to notice in this example are:</p>
|
1067
1128
|
|
@@ -1098,35 +1159,38 @@ install: /home/sun/src/erbook
|
|
1098
1159
|
</ol>
|
1099
1160
|
|
1100
1161
|
<p><div class="example">
|
1101
|
-
<
|
1162
|
+
<a name="HelloWorld.spec"/><div class="nav" id="HelloWorld.spec"><a title="Reverse jump to listing" href="#rev:HelloWorld.spec">≡</a><a title="Jump to previous segment" href="#HelloWorld">△</a><a title="Jump to next segment" href="#HelloWorld.input">▽</a><a title="Jump to this segment" href="#HelloWorld.spec">◎</a></div>
|
1163
|
+
<p class="title">Example 1. HelloWorld format specification file</p>
|
1102
1164
|
<div class="content"><p><pre class="code" lang="rhtml">desc: An example format.
|
1103
1165
|
|
1104
1166
|
code: |
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1167
|
+
class ERBook::Node
|
1168
|
+
def name
|
1169
|
+
# dynamically compute (and store)
|
1170
|
+
# the name of this node on demand
|
1171
|
+
@name ||= generate_name
|
1172
|
+
end
|
1111
1173
|
|
1112
|
-
|
1174
|
+
private
|
1113
1175
|
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1176
|
+
# Returns a random, yet pronounceable, name.
|
1177
|
+
def generate_name
|
1178
|
+
letters = ('a'..'z').to_a - %w[ c q w x ] # redundant sounds
|
1179
|
+
vowels = %w[a e i o u]
|
1180
|
+
consonants = letters - vowels
|
1181
|
+
sets = [consonants, vowels]
|
1117
1182
|
|
1118
|
-
|
1119
|
-
set[rand(set.length)]
|
1120
|
-
end.join
|
1183
|
+
length = 3 + rand(5)
|
1121
1184
|
|
1122
|
-
|
1123
|
-
|
1185
|
+
name = (0...length).map do |i|
|
1186
|
+
# alternate between consonants and vowels
|
1187
|
+
set = sets[i % sets.length]
|
1124
1188
|
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1189
|
+
# choose a random letter from the set
|
1190
|
+
set[rand(set.length)]
|
1191
|
+
end.join
|
1192
|
+
|
1193
|
+
name
|
1130
1194
|
end
|
1131
1195
|
end
|
1132
1196
|
|
@@ -1140,7 +1204,7 @@ nodes:
|
|
1140
1204
|
|
1141
1205
|
My name is <span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@node</span>.name.inspect <span style="font-weight:bold;color:#888">%></span></span> and these are my properties:
|
1142
1206
|
|
1143
|
-
<span style="color:#070"><dl</span> <span style="color:#007">style</span>=<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#d70;font-weight:bold">$style</span> <span style="font-weight:bold;color:#888">%></span></span><span style="color:#710">"</span></span><span style="color:#070">></span>
|
1207
|
+
<span style="color:#070"><dl</span> <span style="color:#007">style</span>=<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#d70;font-weight:bold">$style</span> <span style="font-weight:bold;color:#888">%></span></span><span style="color:#710">"</span></span><span style="color:#070">></span>
|
1144
1208
|
<span style="color:#070"><dt></span>args<span style="color:#070"></dt></span>
|
1145
1209
|
<span style="color:#070"><dd></span><span style="color:#070"><code></span><span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@node</span>.args.inspect <span style="font-weight:bold;color:#888">%></span></span><span style="color:#070"></code></span><span style="color:#070"></dd></span>
|
1146
1210
|
|
@@ -1151,76 +1215,75 @@ nodes:
|
|
1151
1215
|
<span style="color:#070"><dd></span><span style="color:#070"><code></span><span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@node</span>.number.inspect <span style="font-weight:bold;color:#888">%></span></span><span style="color:#070"></code></span><span style="color:#070"></dd></span>
|
1152
1216
|
|
1153
1217
|
<span style="color:#070"><dt></span>trace<span style="color:#070"></dt></span>
|
1154
|
-
<span style="color:#070"><dd></span><span style="color:#070"><pre></span><span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@node</span>.trace.join(<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="color:#b0b">\n</span><span style="color:#710">"</span></span>) <span style="font-weight:bold;color:#888">%></span></span><span style="color:#070"></pre></span><span style="color:#070"></dd></span>
|
1218
|
+
<span style="color:#070"><dd></span><span style="color:#070"><pre></span><span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@node</span>.trace.join(<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="color:#b0b">\n</span><span style="color:#710">"</span></span>) <span style="font-weight:bold;color:#888">%></span></span><span style="color:#070"></pre></span><span style="color:#070"></dd></span>
|
1155
1219
|
|
1156
1220
|
<span style="color:#070"><dt></span>content<span style="color:#070"></dt></span>
|
1157
1221
|
<span style="color:#070"><dd></span><span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@node</span>.content <span style="font-weight:bold;color:#888">%></span></span><span style="color:#070"></dd></span>
|
1158
1222
|
<span style="color:#070"></dl></span>
|
1159
1223
|
|
1160
1224
|
output: |
|
1161
|
-
Welcome to the "<span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@
|
1225
|
+
Welcome to the "<span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@format</span>[<span style="color:#A60">:name</span>] <span style="font-weight:bold;color:#888">%></span></span>" format.
|
1162
1226
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> <span style="color:#33B">@content</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1163
1227
|
That's all folks!
|
1164
1228
|
</pre></p></div>
|
1165
1229
|
</div> <div class="example">
|
1166
|
-
<
|
1167
|
-
<
|
1168
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span>
|
1230
|
+
<a name="HelloWorld.input"/><div class="nav" id="HelloWorld.input"><a title="Reverse jump to listing" href="#rev:HelloWorld.input">≡</a><a title="Jump to previous segment" href="#HelloWorld.spec">△</a><a title="Jump to next segment" href="#HelloWorld.output">▽</a><a title="Jump to this segment" href="#HelloWorld.input">◎</a></div>
|
1231
|
+
<p class="title">Example 2. Input document for HelloWorld format</p>
|
1232
|
+
<div class="content"><p><pre class="code" lang="rhtml"><span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#d70;font-weight:bold">$style</span> = <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">border-left: thick dotted LightGrey; padding-left: 1em;</span><span style="color:#710">"</span></span> <span style="font-weight:bold;color:#888">%></span></span>
|
1233
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Pretentious</span><span style="color:#710">"</span></span>, <span style="color:#00D;font-weight:bold">1</span>, <span style="color:#00D;font-weight:bold">2</span>, <span style="color:#00D;font-weight:bold">3</span> <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1169
1234
|
<span style="color:#070"><big></span>I'm<span style="color:#070"></big></span> the very first node, oh _yes_ I am! *sneer*
|
1170
1235
|
|
1171
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1236
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Bashful</span><span style="color:#710">"</span></span>, <span style="color:#00D;font-weight:bold">4</span>, <span style="color:#00D;font-weight:bold">5</span>, <span style="color:#00D;font-weight:bold">6</span> <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1172
1237
|
Hi, I... *hide*
|
1173
1238
|
|
1174
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1239
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hopeful</span><span style="color:#710">"</span></span>, rand <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1175
1240
|
*sigh*
|
1176
1241
|
|
1177
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1242
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Confused</span><span style="color:#710">"</span></span>, (rand * rand) <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1178
1243
|
Huh?
|
1179
1244
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1180
1245
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1181
1246
|
|
1182
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1247
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Raving</span><span style="color:#710">"</span></span>, <span style="color:#038;font-weight:bold">__FILE__</span> <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1183
1248
|
Oh it's *on* now! You're going *down*!
|
1184
1249
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1185
1250
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1186
1251
|
|
1187
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1252
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Sleepy</span><span style="color:#710">"</span></span>, <span style="color:#036;font-weight:bold">Time</span>.now <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1188
1253
|
*yawn* Just five more minutes...
|
1189
1254
|
|
1190
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1255
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Peaceful</span><span style="color:#710">"</span></span>, <span style="color:#036;font-weight:bold">Dir</span>.pwd <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1191
1256
|
So _be_ happy my friend, *happy*!
|
1192
1257
|
|
1193
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1258
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Lonely (as you can see, I have no block)</span><span style="color:#710">"</span></span> <span style="font-weight:bold;color:#888">%></span></span>
|
1194
1259
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1195
1260
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1196
1261
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1197
1262
|
|
1198
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1263
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Snappy</span><span style="color:#710">"</span></span> <span style="color:#080;font-weight:bold">do</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1199
1264
|
Zip! Zap! Wake up, you sap!
|
1200
1265
|
_Whoo I'm wild!_ ;-)
|
1201
1266
|
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%</span> <span style="color:#080;font-weight:bold">end</span> <span style="font-weight:bold;color:#888">%></span></span>
|
1202
1267
|
|
1203
|
-
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> hello <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1268
|
+
<span style="background:#eee"><span style="font-weight:bold;color:#888"><%=</span> hello <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Independent (no block, no parents, I am _free_!)</span><span style="color:#710">"</span></span> <span style="font-weight:bold;color:#888">%></span></span></pre></p></div>
|
1204
1269
|
</div> <div class="example">
|
1205
|
-
<
|
1270
|
+
<a name="HelloWorld.output"/><div class="nav" id="HelloWorld.output"><a title="Reverse jump to listing" href="#rev:HelloWorld.output">≡</a><a title="Jump to previous segment" href="#HelloWorld.input">△</a><a title="Jump to next segment" href="#Usage">▽</a><a title="Jump to this segment" href="#HelloWorld.output">◎</a></div>
|
1271
|
+
<p class="title">Example 3. Output of HelloWorld format</p>
|
1206
1272
|
<div class="content"><p>Welcome to the “HelloWorld” format. <h3>hello #1: nil</h3></p>
|
1207
1273
|
|
1208
1274
|
<p>My name is nil and these are my properties:</p>
|
1209
1275
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1210
1276
|
<dt>args</dt>
|
1211
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1277
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Pretentious</span><span style="color:#710">"</span></span>, <span style="color:#00D;font-weight:bold">1</span>, <span style="color:#00D;font-weight:bold">2</span>, <span style="color:#00D;font-weight:bold">3</span>]</code></dd>
|
1212
1278
|
|
1213
1279
|
<dt>index</dt>
|
1214
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1280
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1</span><span style="color:#710">"</span></span></code></dd>
|
1215
1281
|
|
1216
1282
|
<dt>number</dt>
|
1217
1283
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">1</span></code></dd>
|
1218
1284
|
|
1219
1285
|
<dt>trace</dt>
|
1220
|
-
<dd><pre>doc/HelloWorld.input:1
|
1221
|
-
bin/erbook:307
|
1222
|
-
bin/erbook:307:in `instance_eval'
|
1223
|
-
bin/erbook:307</pre></dd>
|
1286
|
+
<dd><pre>doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1224
1287
|
|
1225
1288
|
<dt>content</dt>
|
1226
1289
|
<dd><big>I'm</big> the very first node, oh _yes_ I am! *sneer*
|
@@ -1231,22 +1294,17 @@ My name is nil and these are my properties:
|
|
1231
1294
|
|
1232
1295
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1233
1296
|
<dt>args</dt>
|
1234
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1297
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Bashful</span><span style="color:#710">"</span></span>, <span style="color:#00D;font-weight:bold">4</span>, <span style="color:#00D;font-weight:bold">5</span>, <span style="color:#00D;font-weight:bold">6</span>]</code></dd>
|
1235
1298
|
|
1236
1299
|
<dt>index</dt>
|
1237
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1300
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1.1</span><span style="color:#710">"</span></span></code></dd>
|
1238
1301
|
|
1239
1302
|
<dt>number</dt>
|
1240
1303
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">2</span></code></dd>
|
1241
1304
|
|
1242
1305
|
<dt>trace</dt>
|
1243
|
-
<dd><pre>doc/HelloWorld.input:3
|
1244
|
-
|
1245
|
-
bin/erbook:288:in `hello'
|
1246
|
-
doc/HelloWorld.input:1
|
1247
|
-
bin/erbook:307
|
1248
|
-
bin/erbook:307:in `instance_eval'
|
1249
|
-
bin/erbook:307</pre></dd>
|
1306
|
+
<dd><pre>doc/HelloWorld.input:3:in `initialize'
|
1307
|
+
doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1250
1308
|
|
1251
1309
|
<dt>content</dt>
|
1252
1310
|
<dd>Hi, I... *hide*
|
@@ -1257,25 +1315,18 @@ My name is nil and these are my properties:
|
|
1257
1315
|
|
1258
1316
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1259
1317
|
<dt>args</dt>
|
1260
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1318
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hopeful</span><span style="color:#710">"</span></span>, <span style="color:#60E;font-weight:bold">0.206825122967076</span>]</code></dd>
|
1261
1319
|
|
1262
1320
|
<dt>index</dt>
|
1263
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1321
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1.1.1</span><span style="color:#710">"</span></span></code></dd>
|
1264
1322
|
|
1265
1323
|
<dt>number</dt>
|
1266
1324
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">3</span></code></dd>
|
1267
1325
|
|
1268
1326
|
<dt>trace</dt>
|
1269
|
-
<dd><pre>doc/HelloWorld.input:5
|
1270
|
-
|
1271
|
-
|
1272
|
-
doc/HelloWorld.input:3
|
1273
|
-
bin/erbook:115:in `content_from_block'
|
1274
|
-
bin/erbook:288:in `hello'
|
1275
|
-
doc/HelloWorld.input:1
|
1276
|
-
bin/erbook:307
|
1277
|
-
bin/erbook:307:in `instance_eval'
|
1278
|
-
bin/erbook:307</pre></dd>
|
1327
|
+
<dd><pre>doc/HelloWorld.input:5:in `initialize'
|
1328
|
+
doc/HelloWorld.input:3:in `initialize'
|
1329
|
+
doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1279
1330
|
|
1280
1331
|
<dt>content</dt>
|
1281
1332
|
<dd>*sigh*
|
@@ -1286,28 +1337,19 @@ My name is nil and these are my properties:
|
|
1286
1337
|
|
1287
1338
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1288
1339
|
<dt>args</dt>
|
1289
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1340
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Confused</span><span style="color:#710">"</span></span>, <span style="color:#60E;font-weight:bold">0.491025424447163</span>]</code></dd>
|
1290
1341
|
|
1291
1342
|
<dt>index</dt>
|
1292
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1343
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1.1.1.1</span><span style="color:#710">"</span></span></code></dd>
|
1293
1344
|
|
1294
1345
|
<dt>number</dt>
|
1295
1346
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">4</span></code></dd>
|
1296
1347
|
|
1297
1348
|
<dt>trace</dt>
|
1298
|
-
<dd><pre>doc/HelloWorld.input:7
|
1299
|
-
|
1300
|
-
|
1301
|
-
doc/HelloWorld.input:
|
1302
|
-
bin/erbook:115:in `content_from_block'
|
1303
|
-
bin/erbook:288:in `hello'
|
1304
|
-
doc/HelloWorld.input:3
|
1305
|
-
bin/erbook:115:in `content_from_block'
|
1306
|
-
bin/erbook:288:in `hello'
|
1307
|
-
doc/HelloWorld.input:1
|
1308
|
-
bin/erbook:307
|
1309
|
-
bin/erbook:307:in `instance_eval'
|
1310
|
-
bin/erbook:307</pre></dd>
|
1349
|
+
<dd><pre>doc/HelloWorld.input:7:in `initialize'
|
1350
|
+
doc/HelloWorld.input:5:in `initialize'
|
1351
|
+
doc/HelloWorld.input:3:in `initialize'
|
1352
|
+
doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1311
1353
|
|
1312
1354
|
<dt>content</dt>
|
1313
1355
|
<dd>Huh?
|
@@ -1320,25 +1362,18 @@ My name is nil and these are my properties:
|
|
1320
1362
|
|
1321
1363
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1322
1364
|
<dt>args</dt>
|
1323
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1365
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Raving</span><span style="color:#710">"</span></span>, <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">doc/HelloWorld.input</span><span style="color:#710">"</span></span>]</code></dd>
|
1324
1366
|
|
1325
1367
|
<dt>index</dt>
|
1326
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1368
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1.1.2</span><span style="color:#710">"</span></span></code></dd>
|
1327
1369
|
|
1328
1370
|
<dt>number</dt>
|
1329
1371
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">5</span></code></dd>
|
1330
1372
|
|
1331
1373
|
<dt>trace</dt>
|
1332
|
-
<dd><pre>doc/HelloWorld.input:9
|
1333
|
-
|
1334
|
-
|
1335
|
-
doc/HelloWorld.input:3
|
1336
|
-
bin/erbook:115:in `content_from_block'
|
1337
|
-
bin/erbook:288:in `hello'
|
1338
|
-
doc/HelloWorld.input:1
|
1339
|
-
bin/erbook:307
|
1340
|
-
bin/erbook:307:in `instance_eval'
|
1341
|
-
bin/erbook:307</pre></dd>
|
1374
|
+
<dd><pre>doc/HelloWorld.input:9:in `initialize'
|
1375
|
+
doc/HelloWorld.input:3:in `initialize'
|
1376
|
+
doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1342
1377
|
|
1343
1378
|
<dt>content</dt>
|
1344
1379
|
<dd>Oh it's *on* now! You're going *down*!
|
@@ -1351,22 +1386,17 @@ My name is nil and these are my properties:
|
|
1351
1386
|
|
1352
1387
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1353
1388
|
<dt>args</dt>
|
1354
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1389
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Sleepy</span><span style="color:#710">"</span></span>, <span style="color:#036;font-weight:bold">Mon</span> <span style="color:#036;font-weight:bold">Jan</span> <span style="color:#00D;font-weight:bold">19</span> <span style="color:#00D;font-weight:bold">04</span>:<span style="color:#00D;font-weight:bold">46</span>:<span style="color:#00D;font-weight:bold">00</span> -<span style="color:#00D;font-weight:bold">0800</span> <span style="color:#00D;font-weight:bold">2009</span>]</code></dd>
|
1355
1390
|
|
1356
1391
|
<dt>index</dt>
|
1357
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1392
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1.2</span><span style="color:#710">"</span></span></code></dd>
|
1358
1393
|
|
1359
1394
|
<dt>number</dt>
|
1360
1395
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">6</span></code></dd>
|
1361
1396
|
|
1362
1397
|
<dt>trace</dt>
|
1363
|
-
<dd><pre>doc/HelloWorld.input:11
|
1364
|
-
|
1365
|
-
bin/erbook:288:in `hello'
|
1366
|
-
doc/HelloWorld.input:1
|
1367
|
-
bin/erbook:307
|
1368
|
-
bin/erbook:307:in `instance_eval'
|
1369
|
-
bin/erbook:307</pre></dd>
|
1398
|
+
<dd><pre>doc/HelloWorld.input:11:in `initialize'
|
1399
|
+
doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1370
1400
|
|
1371
1401
|
<dt>content</dt>
|
1372
1402
|
<dd>*yawn* Just five more minutes...
|
@@ -1377,25 +1407,18 @@ My name is nil and these are my properties:
|
|
1377
1407
|
|
1378
1408
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1379
1409
|
<dt>args</dt>
|
1380
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1410
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Peaceful</span><span style="color:#710">"</span></span>, <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">/home/sun/src/erbook</span><span style="color:#710">"</span></span>]</code></dd>
|
1381
1411
|
|
1382
1412
|
<dt>index</dt>
|
1383
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1413
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1.2.1</span><span style="color:#710">"</span></span></code></dd>
|
1384
1414
|
|
1385
1415
|
<dt>number</dt>
|
1386
1416
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">7</span></code></dd>
|
1387
1417
|
|
1388
1418
|
<dt>trace</dt>
|
1389
|
-
<dd><pre>doc/HelloWorld.input:13
|
1390
|
-
|
1391
|
-
|
1392
|
-
doc/HelloWorld.input:11
|
1393
|
-
bin/erbook:115:in `content_from_block'
|
1394
|
-
bin/erbook:288:in `hello'
|
1395
|
-
doc/HelloWorld.input:1
|
1396
|
-
bin/erbook:307
|
1397
|
-
bin/erbook:307:in `instance_eval'
|
1398
|
-
bin/erbook:307</pre></dd>
|
1419
|
+
<dd><pre>doc/HelloWorld.input:13:in `initialize'
|
1420
|
+
doc/HelloWorld.input:11:in `initialize'
|
1421
|
+
doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1399
1422
|
|
1400
1423
|
<dt>content</dt>
|
1401
1424
|
<dd>So _be_ happy my friend, *happy*!
|
@@ -1406,28 +1429,19 @@ My name is nil and these are my properties:
|
|
1406
1429
|
|
1407
1430
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1408
1431
|
<dt>args</dt>
|
1409
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1432
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Lonely (as you can see, I have no block)</span><span style="color:#710">"</span></span>]</code></dd>
|
1410
1433
|
|
1411
1434
|
<dt>index</dt>
|
1412
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1435
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">1.2.1.1</span><span style="color:#710">"</span></span></code></dd>
|
1413
1436
|
|
1414
1437
|
<dt>number</dt>
|
1415
1438
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">8</span></code></dd>
|
1416
1439
|
|
1417
1440
|
<dt>trace</dt>
|
1418
|
-
<dd><pre>doc/HelloWorld.input:15
|
1419
|
-
|
1420
|
-
|
1421
|
-
doc/HelloWorld.input:
|
1422
|
-
bin/erbook:115:in `content_from_block'
|
1423
|
-
bin/erbook:288:in `hello'
|
1424
|
-
doc/HelloWorld.input:11
|
1425
|
-
bin/erbook:115:in `content_from_block'
|
1426
|
-
bin/erbook:288:in `hello'
|
1427
|
-
doc/HelloWorld.input:1
|
1428
|
-
bin/erbook:307
|
1429
|
-
bin/erbook:307:in `instance_eval'
|
1430
|
-
bin/erbook:307</pre></dd>
|
1441
|
+
<dd><pre>doc/HelloWorld.input:15:in `initialize'
|
1442
|
+
doc/HelloWorld.input:13:in `initialize'
|
1443
|
+
doc/HelloWorld.input:11:in `initialize'
|
1444
|
+
doc/HelloWorld.input:1:in `initialize'</pre></dd>
|
1431
1445
|
|
1432
1446
|
<dt>content</dt>
|
1433
1447
|
<dd />
|
@@ -1439,19 +1453,16 @@ bin/erbook:307</pre></dd>
|
|
1439
1453
|
<p>My name is nil and these are my properties:</p>
|
1440
1454
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1441
1455
|
<dt>args</dt>
|
1442
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1456
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Snappy</span><span style="color:#710">"</span></span>]</code></dd>
|
1443
1457
|
|
1444
1458
|
<dt>index</dt>
|
1445
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1459
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">2</span><span style="color:#710">"</span></span></code></dd>
|
1446
1460
|
|
1447
1461
|
<dt>number</dt>
|
1448
1462
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">9</span></code></dd>
|
1449
1463
|
|
1450
1464
|
<dt>trace</dt>
|
1451
|
-
<dd><pre>doc/HelloWorld.input:17
|
1452
|
-
bin/erbook:307
|
1453
|
-
bin/erbook:307:in `instance_eval'
|
1454
|
-
bin/erbook:307</pre></dd>
|
1465
|
+
<dd><pre>doc/HelloWorld.input:17:in `initialize'</pre></dd>
|
1455
1466
|
|
1456
1467
|
<dt>content</dt>
|
1457
1468
|
<dd>Zip! Zap! Wake up, you sap!
|
@@ -1461,19 +1472,16 @@ _Whoo I'm wild!_ ;-)
|
|
1461
1472
|
<p>My name is nil and these are my properties:</p>
|
1462
1473
|
<dl style='border-left: thick dotted LightGrey; padding-left: 1em;'>
|
1463
1474
|
<dt>args</dt>
|
1464
|
-
<dd><code class="code">[<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1475
|
+
<dd><code class="code">[<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Independent (no block, no parents, I am _free_!)</span><span style="color:#710">"</span></span>]</code></dd>
|
1465
1476
|
|
1466
1477
|
<dt>index</dt>
|
1467
|
-
<dd><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1478
|
+
<dd><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">3</span><span style="color:#710">"</span></span></code></dd>
|
1468
1479
|
|
1469
1480
|
<dt>number</dt>
|
1470
1481
|
<dd><code class="code"><span style="color:#00D;font-weight:bold">10</span></code></dd>
|
1471
1482
|
|
1472
1483
|
<dt>trace</dt>
|
1473
|
-
<dd><pre>doc/HelloWorld.input:20
|
1474
|
-
bin/erbook:307
|
1475
|
-
bin/erbook:307:in `instance_eval'
|
1476
|
-
bin/erbook:307</pre></dd>
|
1484
|
+
<dd><pre>doc/HelloWorld.input:20:in `initialize'</pre></dd>
|
1477
1485
|
|
1478
1486
|
<dt>content</dt>
|
1479
1487
|
<dd />
|
@@ -1484,72 +1492,52 @@ bin/erbook:307</pre></dd>
|
|
1484
1492
|
</div></p></div>
|
1485
1493
|
</div>
|
1486
1494
|
<div class="chapter">
|
1495
|
+
<a name="Usage"/><div class="nav" id="Usage"><a title="Reverse jump to listing" href="#rev:Usage">≡</a><a title="Jump to previous segment" href="#HelloWorld.output">△</a><a title="Jump to next segment" href="#Command-line-interface">▽</a><a title="Jump to this segment" href="#Usage">◎</a></div>
|
1487
1496
|
<h1 class="title">
|
1488
|
-
Chapter 
|
1497
|
+
Chapter 4
|
1489
1498
|
<br/>
|
1490
|
-
<big
|
1499
|
+
<big>Usage</big>
|
1491
1500
|
</h1>
|
1492
1501
|
<div class="content"><p><div class="section">
|
1502
|
+
<a name="Command-line-interface"/><div class="nav" id="Command-line-interface"><a title="Reverse jump to listing" href="#rev:Command-line-interface">≡</a><a title="Jump to previous segment" href="#Usage">△</a><a title="Jump to next segment" href="#Saving-the-output-to-a-file">▽</a><a title="Jump to this segment" href="#Command-line-interface">◎</a></div>
|
1493
1503
|
<h2 class="title">
|
1494
|
-
|
1504
|
+
4.1 Command-line interface
|
1495
1505
|
</h2>
|
1496
|
-
<div class="content"><p>
|
1497
|
-
|
1498
|
-
<ul>
|
1499
|
-
<li>
|
1500
|
-
<p>The standard input stream will be read if an input file is not specified.</p>
|
1501
|
-
</li>
|
1502
|
-
|
1503
|
-
<li>
|
1504
|
-
<p>The final output document will be written to the standard output stream.</p>
|
1505
|
-
</li>
|
1506
|
+
<div class="content"><p><pre>ERBook - Extensible document processor based on eRuby
|
1506
1507
|
|
1507
|
-
|
1508
|
-
<p>If an error occurs, the input document will be written to the standard output stream, so that you can investigate line numbers in the error.</p>
|
1509
|
-
</li>
|
1510
|
-
</ul>
|
1511
|
-
<b>Usage:</b>
|
1512
|
-
<p><pre>erbook [Option...] FormatName [InputFile]</pre> <pre>erbook [Option...] FormatFile [InputFile]</pre></p>
|
1513
|
-
<b>FormatName:</b>
|
1514
|
-
<dl>
|
1515
|
-
<dt>latex</dt>
|
1508
|
+
* The standard input stream will be read if an input file is not specified.
|
1516
1509
|
|
1517
|
-
|
1510
|
+
* The final output document will be written to the standard output stream.
|
1518
1511
|
|
1519
|
-
|
1520
|
-
|
1521
|
-
<dd>manual page for UNIX</dd>
|
1522
|
-
|
1523
|
-
<dt>xhtml</dt>
|
1524
|
-
|
1525
|
-
<dd>web page for the Internet</dd>
|
1526
|
-
|
1527
|
-
<dt>text</dt>
|
1528
|
-
|
1529
|
-
<dd>plain text, nothing fancy</dd>
|
1530
|
-
</dl>
|
1531
|
-
<b>Option:</b>
|
1532
|
-
<dl>
|
1533
|
-
<dt><tt>--unindent</tt>, <tt>-u</tt></dt>
|
1512
|
+
* If an error occurs, the input document will be written to the standard
|
1513
|
+
output stream, so that you can investigate line numbers in the error.
|
1534
1514
|
|
1535
|
-
|
1515
|
+
Usage:
|
1536
1516
|
|
1537
|
-
|
1517
|
+
erbook [Option...] FormatName [InputFile]
|
1518
|
+
erbook [Option...] FormatFile [InputFile]
|
1538
1519
|
|
1539
|
-
|
1520
|
+
FormatName:
|
1521
|
+
latex: high-quality typesetting
|
1522
|
+
man: manual page for UNIX
|
1523
|
+
xhtml: web page for the Internet
|
1524
|
+
text: plain text, nothing fancy
|
1540
1525
|
|
1541
|
-
|
1526
|
+
Option:
|
1527
|
+
--unindent, -u: Unindent node content hierarchically
|
1528
|
+
--manual, -m: Show the user manual
|
1529
|
+
--version, -v: Print version and exit
|
1530
|
+
--help, -h: Show this message</pre></p>
|
1542
1531
|
|
1543
|
-
<
|
1544
|
-
</dl>
|
1532
|
+
<p>The first command-line argument to erbook is either the name of a predefined format (FormatName) or the path to a <a class="xref" href="#SpecFile" title="Section 3.2. Format specification file">format specification file</a> (FormatFile).</p>
|
1545
1533
|
|
1546
|
-
<p
|
1547
|
-
<p class="title"><a class="here" title="Permanent link to this section" href="#Command-line-arguments">Command-line arguments</a></p>
|
1548
|
-
<div class="content"><p>The first command-line argument to erbook is either the name of a predefined format (FormatName) or the path to a <a class="xref" href="#SpecFile" title="Section 3.2. Format specification file">format specification file</a> (FormatFile).</p>
|
1534
|
+
<p>Predefined formats are simply short-hand names of format specification files located in the <tt>fmt/</tt> subdirectory of the erbook installation directory (see <a class="xref" href="#Manifest">Section 2.3. Manifest</a>).</p>
|
1549
1535
|
|
1550
|
-
<p
|
1551
|
-
|
1552
|
-
<
|
1536
|
+
<p><div class="section">
|
1537
|
+
<a name="Saving-the-output-to-a-file"/><div class="nav" id="Saving-the-output-to-a-file"><a title="Reverse jump to listing" href="#rev:Saving-the-output-to-a-file">≡</a><a title="Jump to previous segment" href="#Command-line-interface">△</a><a title="Jump to next segment" href="#Save-XHTML-output-as-.xhtml">▽</a><a title="Jump to this segment" href="#Saving-the-output-to-a-file">◎</a></div>
|
1538
|
+
<h3 class="title">
|
1539
|
+
4.1.1 Saving the output to a file
|
1540
|
+
</h3>
|
1553
1541
|
<div class="content"><p>Simply redirect the standard ouput stream (STDOUT) to a file like this:</p>
|
1554
1542
|
|
1555
1543
|
<pre>erbook > YOUR_PATH_HERE</pre>
|
@@ -1557,15 +1545,20 @@ bin/erbook:307</pre></dd>
|
|
1557
1545
|
<p>In the above example, <strong>YOUR_PATH_HERE</strong> is the path of the file in which the output should be saved.</p>
|
1558
1546
|
|
1559
1547
|
<p><div class="important">
|
1560
|
-
<
|
1561
|
-
<
|
1562
|
-
|
1563
|
-
<
|
1548
|
+
<a name="Save-XHTML-output-as-.xhtml"/><div class="nav" id="Save-XHTML-output-as-.xhtml"><a title="Reverse jump to listing" href="#rev:Save-XHTML-output-as-.xhtml">≡</a><a title="Jump to previous segment" href="#Saving-the-output-to-a-file">△</a><a title="Jump to next segment" href="#include">▽</a><a title="Jump to this segment" href="#Save-XHTML-output-as-.xhtml">◎</a></div>
|
1549
|
+
<p class="title">Important 1. Save XHTML output as <tt>.xhtml</tt></p>
|
1550
|
+
<div class="content">
|
1551
|
+
<img class="icon" src="&icon_important;" alt="important"/>
|
1552
|
+
<p>When you use the XHTML format, ensure that the file extension of your saved output document is either <tt>.xhtml</tt> or <tt>.xml</tt>. Alternatively, ensure that your saved output document is served to web browsers under the <tt>application/xhtml+xml</tt> mime type.</p>
|
1553
|
+
|
1554
|
+
<p>Otherwise, most web browsers <em>will not display</em> the icons and graphics embedded in the saved XHTML output document because they will treat it as HTML instead of as XML. See <a href='http://www.quirksmode.org/bugreports/archives/2005/02/custom_dtds_int_1.html'>this QuirksMode.org bug report</a> for details.</p>
|
1555
|
+
</div>
|
1564
1556
|
</div></p></div>
|
1565
1557
|
</div></p></div>
|
1566
1558
|
</div> <div class="section">
|
1559
|
+
<a name="include"/><div class="nav" id="include"><a title="Reverse jump to listing" href="#rev:include">≡</a><a title="Jump to previous segment" href="#Save-XHTML-output-as-.xhtml">△</a><a title="Jump to next segment" href="#Unindenting-nodes-hierarchically">▽</a><a title="Jump to this segment" href="#include">◎</a></div>
|
1567
1560
|
<h2 class="title">
|
1568
|
-
|
1561
|
+
4.2 Including external documents
|
1569
1562
|
</h2>
|
1570
1563
|
<div class="content"><p>The <strong>include</strong> directive allows you to insert the content of an arbitrary file at a certain place in the input document. It is written like this:</p>
|
1571
1564
|
|
@@ -1575,41 +1568,45 @@ bin/erbook:307</pre></dd>
|
|
1575
1568
|
|
1576
1569
|
<p>You can divide a large document into separate files for easier editing and stitch them together, dynamically, into a single document using the <strong>include</strong> directive.</p></div>
|
1577
1570
|
</div> <div class="section">
|
1571
|
+
<a name="Unindenting-nodes-hierarchically"/><div class="nav" id="Unindenting-nodes-hierarchically"><a title="Reverse jump to listing" href="#rev:Unindenting-nodes-hierarchically">≡</a><a title="Jump to previous segment" href="#include">△</a><a title="Jump to next segment" href="#Formats">▽</a><a title="Jump to this segment" href="#Unindenting-nodes-hierarchically">◎</a></div>
|
1578
1572
|
<h2 class="title">
|
1579
|
-
|
1573
|
+
4.3 Unindenting nodes hierarchically
|
1580
1574
|
</h2>
|
1581
|
-
<div class="content"><p>When writing erbook documents, I prefer to indent the content of nodes according to their depth
|
1575
|
+
<div class="content"><p>When writing erbook documents, I prefer to indent the content of nodes according to their depth because my <a href='http://jedit.org'>text editor of choice</a> automatically folds blocks of text based on indentation.</p>
|
1582
1576
|
|
1583
1577
|
<p>If you also prefer to write documents in this way, be sure to pass the <tt>--unindent</tt> option to <strong>erbook</strong> so that the indentation will not affect the resulting output.</p></div>
|
1584
1578
|
</div></p></div>
|
1585
1579
|
</div>
|
1586
1580
|
<div class="part">
|
1581
|
+
<a name="Formats"/><div class="nav" id="Formats"><a title="Reverse jump to listing" href="#rev:Formats">≡</a><a title="Jump to previous segment" href="#Unindenting-nodes-hierarchically">△</a><a title="Jump to next segment" href="#xhtml">▽</a><a title="Jump to this segment" href="#Formats">◎</a></div>
|
1587
1582
|
<h1 class="title">
|
1588
|
-
Part 
|
1583
|
+
Part 5
|
1589
1584
|
<br/>
|
1590
|
-
<big
|
1585
|
+
<big>Formats</big>
|
1591
1586
|
</h1>
|
1592
|
-
<div class="content"><p>This part describes the default formats provided along with
|
1587
|
+
<div class="content"><p>This part describes the default formats provided along with ERBook. The <a class="xref" href="#SpecFile" title="Section 3.2. Format specification file">format specification files</a> for these formats can be found in the <tt>fmt/</tt> directory of the ERBook installation directory (see <a class="xref" href="#Manifest">Section 2.3. Manifest</a>).</p>
|
1593
1588
|
|
1594
|
-
<p>These formats are meant to serve as working examples. If you require more functionality from one of these formats, simply make a copy of the corresponding format specification file and edit the copy to suit your needs. If you would like to contribute or discuss your enhancements to these default formats, you can <a class="xref" href="#License" title="Section 1.2.
|
1589
|
+
<p>These formats are meant to serve as working examples. If you require more functionality from one of these formats, simply make a copy of the corresponding format specification file and edit the copy to suit your needs. If you would like to contribute or discuss your enhancements to these default formats, you can <a class="xref" href="#License" title="Section 1.2. License">contact the author</a>.</p>
|
1595
1590
|
|
1596
1591
|
<p><div class="chapter">
|
1592
|
+
<a name="xhtml"/><div class="nav" id="xhtml"><a title="Reverse jump to listing" href="#rev:xhtml">≡</a><a title="Jump to previous segment" href="#Formats">△</a><a title="Jump to next segment" href="#Text-to-XHTML-conversion">▽</a><a title="Jump to this segment" href="#xhtml">◎</a></div>
|
1597
1593
|
<h1 class="title">
|
1598
|
-
Chapter 
|
1594
|
+
Chapter 5.1
|
1599
1595
|
<br/>
|
1600
|
-
<big
|
1596
|
+
<big>XHTML (web page)</big>
|
1601
1597
|
</h1>
|
1602
1598
|
<div class="content"><p>This format generates a <em>monolithic</em> XHTML document that allows users to easily search for a particular topic using nothing more than their web browser’s built-in text search mechanism. This facilitates offline reading, where an Internet search engine is not available.</p>
|
1603
1599
|
|
1604
|
-
<p>
|
1600
|
+
<p>When viewing an XHTML document in a graphical web browser, you will notice navigation menus to the left of chapters, sections, figures, admonitions, and so on. These menus contain hyperlinks that make it easy to navigate the XHTML document, especially for users of text-only web browsers.</p>
|
1605
1601
|
|
1606
|
-
<p>Furthermore, the XHTML document comes equipped with a stylesheet that makes it suitable for printing. In particular, users of
|
1602
|
+
<p>Furthermore, the XHTML document comes equipped with a stylesheet that makes it suitable for printing. In particular, users of web browsers that support CSS3 selectors will notice that all hyperlinks have been expanded to include their target URL next to them. Try the “print preview” function of your web browser to see how the XHTML document would appear when printed.</p>
|
1607
1603
|
|
1608
1604
|
<p><div class="section">
|
1605
|
+
<a name="Text-to-XHTML-conversion"/><div class="nav" id="Text-to-XHTML-conversion"><a title="Reverse jump to listing" href="#rev:Text-to-XHTML-conversion">≡</a><a title="Jump to previous segment" href="#xhtml">△</a><a title="Jump to next segment" href="#Syntax-coloring-for-source-code">▽</a><a title="Jump to this segment" href="#Text-to-XHTML-conversion">◎</a></div>
|
1609
1606
|
<h3 class="title">
|
1610
|
-
|
1607
|
+
5.1.1 Text to XHTML conversion
|
1611
1608
|
</h3>
|
1612
|
-
<div class="content"><p>The <tt>lib/erbook/to_xhtml.rb</tt> file inside
|
1609
|
+
<div class="content"><p>The <tt>lib/erbook/to_xhtml.rb</tt> file inside ERBook’s installation directory (see <a class="xref" href="#Manifest">Section 2.3. Manifest</a>) defines the following methods:</p>
|
1613
1610
|
|
1614
1611
|
<ul>
|
1615
1612
|
<li>
|
@@ -1625,12 +1622,11 @@ bin/erbook:307</pre></dd>
|
|
1625
1622
|
|
1626
1623
|
<p>For example, if you replace the entire <tt>to_xhtml.rb</tt> file with the following code, then the output of all nodes will appear within red boxes in the final output document.</p>
|
1627
1624
|
|
1628
|
-
<p><pre class="code">
|
1629
|
-
<span style="color:#080;font-weight:bold">class</span> <span style="color:#B06;font-weight:bold">String</span>
|
1625
|
+
<p><pre class="code"><span style="color:#080;font-weight:bold">class</span> <span style="color:#B06;font-weight:bold">String</span>
|
1630
1626
|
<span style="color:#666"># Transforms this string into XHTML while ensuring that the</span>
|
1631
1627
|
<span style="color:#666"># result contains one or more block-level elements at the root.</span>
|
1632
1628
|
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">to_xhtml</span>
|
1633
|
-
<span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="
|
1629
|
+
<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">'</span><span style=""><p style="border: thin solid red"></span><span style="color:#710">'</span></span> + <span style="color:#038;font-weight:bold">self</span> + <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">'</span><span style=""></p></span><span style="color:#710">'</span></span>
|
1634
1630
|
<span style="color:#080;font-weight:bold">end</span>
|
1635
1631
|
|
1636
1632
|
<span style="color:#666"># Transforms this string into an *inline* XHTML string (one that</span>
|
@@ -1644,8 +1640,9 @@ bin/erbook:307</pre></dd>
|
|
1644
1640
|
<p>In addition to supporting Markdown syntax, the default implementation has some additional features which are described in the following subsections.</p>
|
1645
1641
|
|
1646
1642
|
<p><div class="section">
|
1643
|
+
<a name="Syntax-coloring-for-source-code"/><div class="nav" id="Syntax-coloring-for-source-code"><a title="Reverse jump to listing" href="#rev:Syntax-coloring-for-source-code">≡</a><a title="Jump to previous segment" href="#Text-to-XHTML-conversion">△</a><a title="Jump to next segment" href="#Specifying-the-programming-language">▽</a><a title="Jump to this segment" href="#Syntax-coloring-for-source-code">◎</a></div>
|
1647
1644
|
<h4 class="title">
|
1648
|
-
|
1645
|
+
5.1.1.1 Syntax coloring for source code
|
1649
1646
|
</h4>
|
1650
1647
|
<div class="content"><p>Syntax coloring is <em>automatically added</em> to source code found inside the <strong><code></strong> and <strong></code></strong> HTML tags. The syntax coloring library, <a href='http://coderay.rubychan.de'>CodeRay</a>, currently supports the following programming languages:</p>
|
1651
1648
|
|
@@ -1664,24 +1661,24 @@ bin/erbook:307</pre></dd>
|
|
1664
1661
|
</ul>
|
1665
1662
|
|
1666
1663
|
<p><div class="section">
|
1664
|
+
<a name="Specifying-the-programming-language"/><div class="nav" id="Specifying-the-programming-language"><a title="Reverse jump to listing" href="#rev:Specifying-the-programming-language">≡</a><a title="Jump to previous segment" href="#Syntax-coloring-for-source-code">△</a><a title="Jump to next segment" href="#Smart-sizing-of-source-code">▽</a><a title="Jump to this segment" href="#Specifying-the-programming-language">◎</a></div>
|
1667
1665
|
<h5 class="title">
|
1668
|
-
|
1666
|
+
5.1.1.1.1 Specifying the programming language
|
1669
1667
|
</h5>
|
1670
1668
|
<div class="content"><p>Because different programming languages have different syntax coloring schemes, you can specify the language of your source code using the <code class="code">lang</code> attribute to ensure that only the appropriate coloring scheme is used. Note that unless the <code class="code">lang</code> attribute is specified, <em>Ruby</em> is assumed to be the programming language of all source code by default.</p>
|
1671
1669
|
|
1672
1670
|
<p>For example, here is some source code <em>without</em> the <code class="code">lang</code> attribute:</p>
|
1673
1671
|
|
1674
|
-
<p><pre class="code">
|
1675
|
-
<span style="color:#666"># Ruby ###########################</span>
|
1672
|
+
<p><pre class="code"><span style="color:#666"># Ruby ###########################</span>
|
1676
1673
|
<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">hello</span>
|
1677
|
-
puts <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1674
|
+
puts <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hello world!</span><span style="color:#710">"</span></span>
|
1678
1675
|
<span style="color:#080;font-weight:bold">end</span>
|
1679
1676
|
|
1680
1677
|
|
1681
1678
|
<span style="background-color:#fff0ff"><span style="color:#404">/</span><span style="color:#808">* C ****************************</span><span style="color:#404">/</span></span>
|
1682
1679
|
<span style="color:#666">#include <stdio.h></span>
|
1683
1680
|
int main(int argc, char **argv) {
|
1684
|
-
printf(<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1681
|
+
printf(<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hello world!</span><span style="color:#b0b">\n</span><span style="color:#710">"</span></span>);
|
1685
1682
|
<span style="color:#080;font-weight:bold">return</span> <span style="color:#00D;font-weight:bold">0</span>;
|
1686
1683
|
}
|
1687
1684
|
|
@@ -1694,19 +1691,18 @@ int main(int argc, char **argv) {
|
|
1694
1691
|
<<span style="background-color:#fff0ff"><span style="color:#404">/</span><span style="color:#808">html>
|
1695
1692
|
</span></span></pre></p>
|
1696
1693
|
|
1697
|
-
<p>And here is the same source code with a <code class="code">lang=<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1694
|
+
<p>And here is the same source code with a <code class="code">lang=<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">c</span><span style="color:#710">"</span></span></code> attribute:</p>
|
1698
1695
|
|
1699
|
-
<p><pre class="code" lang="c">
|
1700
|
-
<span style="color:#579"># Ruby</span> <span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#
|
1696
|
+
<p><pre class="code" lang="c"><span style="color:#579"># Ruby</span> <span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#</span><span style="color:#579">#
|
1701
1697
|
def</span> hello
|
1702
|
-
puts <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1698
|
+
puts <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hello world!</span><span style="color:#710">"</span></span>
|
1703
1699
|
end
|
1704
1700
|
|
1705
1701
|
|
1706
1702
|
<span style="color:#666">/* C ****************************/</span>
|
1707
1703
|
<span style="color:#579">#include</span> <span style="color:#B44;font-weight:bold"><stdio.h></span>
|
1708
1704
|
<span style="color:#339;font-weight:bold">int</span> main(<span style="color:#339;font-weight:bold">int</span> argc, <span style="color:#339;font-weight:bold">char</span> **argv) {
|
1709
|
-
printf(<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1705
|
+
printf(<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Hello world!</span><span style="color:#b0b">\n</span><span style="color:#710">"</span></span>);
|
1710
1706
|
<span style="color:#080;font-weight:bold">return</span> <span style="color:#00D;font-weight:bold">0</span>;
|
1711
1707
|
}
|
1712
1708
|
|
@@ -1719,10 +1715,9 @@ end
|
|
1719
1715
|
</html>
|
1720
1716
|
</pre></p>
|
1721
1717
|
|
1722
|
-
<p>And here is the same source code with a <code class="code">lang=<span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1718
|
+
<p>And here is the same source code with a <code class="code">lang=<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">html</span><span style="color:#710">"</span></span></code> attribute:</p>
|
1723
1719
|
|
1724
|
-
<p><pre class="code" lang="html"
|
1725
|
-
# Ruby ###########################
|
1720
|
+
<p><pre class="code" lang="html"># Ruby ###########################
|
1726
1721
|
def hello
|
1727
1722
|
puts "Hello world!"
|
1728
1723
|
end
|
@@ -1745,8 +1740,9 @@ int main(int argc, char **argv) {
|
|
1745
1740
|
</pre></p></div>
|
1746
1741
|
</div></p></div>
|
1747
1742
|
</div> <div class="section">
|
1743
|
+
<a name="Smart-sizing-of-source-code"/><div class="nav" id="Smart-sizing-of-source-code"><a title="Reverse jump to listing" href="#rev:Smart-sizing-of-source-code">≡</a><a title="Jump to previous segment" href="#Specifying-the-programming-language">△</a><a title="Jump to next segment" href="#Protecting-verbatim-text">▽</a><a title="Jump to this segment" href="#Smart-sizing-of-source-code">◎</a></div>
|
1748
1744
|
<h4 class="title">
|
1749
|
-
|
1745
|
+
5.1.1.2 Smart sizing of source code
|
1750
1746
|
</h4>
|
1751
1747
|
<div class="content"><p>Source code is <em>automatically sized</em> to be displayed as either a line or paragraph of text, depending on whether it contains line breaks.</p>
|
1752
1748
|
|
@@ -1754,25 +1750,29 @@ int main(int argc, char **argv) {
|
|
1754
1750
|
<span style="color:#038;font-weight:bold">true</span> <span style="color:#080;font-weight:bold">or</span>
|
1755
1751
|
<span style="color:#038;font-weight:bold">false</span></pre> of code.</p></div>
|
1756
1752
|
</div> <div class="section">
|
1753
|
+
<a name="Protecting-verbatim-text"/><div class="nav" id="Protecting-verbatim-text"><a title="Reverse jump to listing" href="#rev:Protecting-verbatim-text">≡</a><a title="Jump to previous segment" href="#Smart-sizing-of-source-code">△</a><a title="Jump to next segment" href="#Parameters">▽</a><a title="Jump to this segment" href="#Protecting-verbatim-text">◎</a></div>
|
1757
1754
|
<h4 class="title">
|
1758
|
-
|
1755
|
+
5.1.1.3 Protecting verbatim text
|
1759
1756
|
</h4>
|
1760
1757
|
<div class="content"><p>Sometimes you just need to protect some text from being mangled by the text-to-XHTML conversion process . In such cases, you can wrap the text you want to proctect within <strong><noformat></strong> and <strong></noformat></strong> tags.</p></div>
|
1761
1758
|
</div></p></div>
|
1762
1759
|
</div> <div class="section">
|
1760
|
+
<a name="Parameters"/><div class="nav" id="Parameters"><a title="Reverse jump to listing" href="#rev:Parameters">≡</a><a title="Jump to previous segment" href="#Protecting-verbatim-text">△</a><a title="Jump to next segment" href="#Methods">▽</a><a title="Jump to this segment" href="#Parameters">◎</a></div>
|
1763
1761
|
<h3 class="title">
|
1764
|
-
|
1762
|
+
5.1.2 Parameters
|
1765
1763
|
</h3>
|
1766
|
-
<div class="content"><p>The XHTML format accepts the following document parameters.</p>
|
1767
|
-
<table border="1"><thead><tr><th>Parameter</th><th>Type</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$title</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'><code class="code"><span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1768
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$
|
1769
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$
|
1764
|
+
<div class="content"><p>The XHTML format accepts the following document parameters. To disable the default value for a particular parameter, simply set that parameter to <code class="code"><span style="color:#038;font-weight:bold">nil</span></code>. For example, to disable the <code class="code"><span style="color:#d70;font-weight:bold">$authors</span></code> parameter, you would write <code class="code"><span style="color:#d70;font-weight:bold">$authors</span> = <span style="color:#038;font-weight:bold">nil</span></code> in your input document.</p>
|
1765
|
+
<table border="1"><thead><tr><th>Parameter</th><th>Type</th><th>Default value</th><th>Description</th></tr></thead><tbody><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$title</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">$title</span><span style="color:#710">"</span></span></code></td><td style='text-align: left;'>Title of the document.</td>
|
1766
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$subtitle</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'><code class="code"><span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">$subtitle</span><span style="color:#710">"</span></span></code></td><td style='text-align: left;'>Secondary title of the document.</td>
|
1767
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$authors</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Hash</span></code></td><td style='text-align: left;'><code class="code">{<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">$authors</span><span style="color:#710">"</span></span> => <span style="color:#038;font-weight:bold">nil</span>}</code></td><td style='text-align: left;'>A mapping of author name to author URL. You can obfuscate e-mail addresses using the provided <code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_xml_entities</span></code> method like this: <code class="code">{ <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">Y. Matsumoto</span><span style="color:#710">"</span></span> => <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">mailto:matz@ruby.invalid</span><span style="color:#710">"</span></span>.to_xml_entities }</code></td>
|
1768
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$date</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Time</span>.now.strftime(<span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">%d %B %Y</span><span style="color:#710">"</span></span>)</code></td><td style='text-align: left;'>Date when the document was written.</td>
|
1770
1769
|
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$logo</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">String</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#038;font-weight:bold">nil</span></code></td><td style='text-align: left;'>Arbitrary content that goes above the document title in the default header.</td>
|
1771
|
-
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$feeds</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Hash</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#038;font-weight:bold">nil</span></code></td><td style='text-align: left;'>A mapping of feed URL to feed format. Here is an example: <code class="code"><span style="color:#d70;font-weight:bold">$feeds</span> = { <span style="background-color:#fff0f0"><span style="color:#710">"</span><span style="
|
1770
|
+
</tr><tr><td style='text-align: left;'><code class="code"><span style="color:#d70;font-weight:bold">$feeds</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#036;font-weight:bold">Hash</span></code></td><td style='text-align: left;'><code class="code"><span style="color:#038;font-weight:bold">nil</span></code></td><td style='text-align: left;'>A mapping of feed URL to feed format. Here is an example: <code class="code"><span style="color:#d70;font-weight:bold">$feeds</span> = { <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">my_rss_feed.xml</span><span style="color:#710">"</span></span> => <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">rss</span><span style="color:#710">"</span></span>, <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">my_atom_feed.xml</span><span style="color:#710">"</span></span> => <span style="background-color:#fff0f0;color:#D20"><span style="color:#710">"</span><span style="">atom</span><span style="color:#710">"</span></span> }</code></td>
|
1772
1771
|
</tr></tbody></table></div>
|
1773
1772
|
</div> <div class="section">
|
1773
|
+
<a name="Methods"/><div class="nav" id="Methods"><a title="Reverse jump to listing" href="#rev:Methods">≡</a><a title="Jump to previous segment" href="#Parameters">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-title">▽</a><a title="Jump to this segment" href="#Methods">◎</a></div>
|
1774
1774
|
<h3 class="title">
|
1775
|
-
|
1775
|
+
5.1.3 Methods
|
1776
1776
|
</h3>
|
1777
1777
|
<div class="content"><p>The XHTML format provides the following methods. In the method declarations shown below,</p>
|
1778
1778
|
|
@@ -1782,151 +1782,163 @@ int main(int argc, char **argv) {
|
|
1782
1782
|
<li>a double colon sign (::) indicates that the method is a <em>class method</em>, meaning that it can only be invoked on a class.</li>
|
1783
1783
|
</ul>
|
1784
1784
|
|
1785
|
-
<p><div class="
|
1786
|
-
<
|
1787
|
-
|
1788
|
-
</h4>
|
1785
|
+
<p><div class="paragraph">
|
1786
|
+
<a name="a-ERBook::Document::Node-title"/><div class="nav" id="a-ERBook::Document::Node-title"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-title">≡</a><a title="Jump to previous segment" href="#Methods">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-id">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-title">◎</a></div>
|
1787
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title()</span></code></p>
|
1789
1788
|
<div class="content"><p>
|
1790
1789
|
Returns the user-defined title for this node‘s content.
|
1791
1790
|
</p></div>
|
1792
|
-
</div><div class="
|
1793
|
-
<
|
1794
|
-
|
1795
|
-
</h4>
|
1791
|
+
</div><div class="paragraph">
|
1792
|
+
<a name="a-ERBook::Document::Node-id"/><div class="nav" id="a-ERBook::Document::Node-id"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-id">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-title">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-title_xhtml">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-id">◎</a></div>
|
1793
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#id()</span></code></p>
|
1796
1794
|
<div class="content"><p>
|
1797
1795
|
Returns the user-defined indentifer for this node.
|
1798
1796
|
</p></div>
|
1799
|
-
</div><div class="
|
1800
|
-
<
|
1801
|
-
|
1802
|
-
</h4>
|
1797
|
+
</div><div class="paragraph">
|
1798
|
+
<a name="a-ERBook::Document::Node-title_xhtml"/><div class="nav" id="a-ERBook::Document::Node-title_xhtml"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-title_xhtml">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-id">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-content_xhtml">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-title_xhtml">◎</a></div>
|
1799
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title_xhtml()</span></code></p>
|
1803
1800
|
<div class="content"><p>
|
1804
1801
|
Returns the title of this node as XHTML.
|
1805
1802
|
</p></div>
|
1806
|
-
</div><div class="
|
1807
|
-
<
|
1808
|
-
|
1809
|
-
</h4>
|
1803
|
+
</div><div class="paragraph">
|
1804
|
+
<a name="a-ERBook::Document::Node-content_xhtml"/><div class="nav" id="a-ERBook::Document::Node-content_xhtml"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-content_xhtml">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-title_xhtml">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-title_link-title-nil">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-content_xhtml">◎</a></div>
|
1805
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#content_xhtml()</span></code></p>
|
1810
1806
|
<div class="content"><p>
|
1811
1807
|
Returns the content of this node as XHTML.
|
1812
1808
|
</p></div>
|
1813
|
-
</div><div class="
|
1814
|
-
<
|
1815
|
-
|
1816
|
-
</h4>
|
1809
|
+
</div><div class="paragraph">
|
1810
|
+
<a name="a-ERBook::Document::Node-title_link-title-nil"/><div class="nav" id="a-ERBook::Document::Node-title_link-title-nil"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-title_link-title-nil">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-content_xhtml">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-index_link">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-title_link-title-nil">◎</a></div>
|
1811
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#title_link(title = nil)</span></code></p>
|
1817
1812
|
<div class="content"><p>
|
1818
1813
|
Returns a hyperlink to this node containing its title.
|
1819
1814
|
</p></div>
|
1820
|
-
</div><div class="
|
1821
|
-
<
|
1822
|
-
|
1823
|
-
</h4>
|
1815
|
+
</div><div class="paragraph">
|
1816
|
+
<a name="a-ERBook::Document::Node-index_link"/><div class="nav" id="a-ERBook::Document::Node-index_link"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-index_link">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-title_link-title-nil">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-number_link">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-index_link">◎</a></div>
|
1817
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#index_link()</span></code></p>
|
1824
1818
|
<div class="content"><p>
|
1825
1819
|
Returns a hyperlink to this node containing its LaTeX-style index number.
|
1826
1820
|
</p></div>
|
1827
|
-
</div><div class="
|
1828
|
-
<
|
1829
|
-
|
1830
|
-
</h4>
|
1821
|
+
</div><div class="paragraph">
|
1822
|
+
<a name="a-ERBook::Document::Node-number_link"/><div class="nav" id="a-ERBook::Document::Node-number_link"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-number_link">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-index_link">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-navigation">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-number_link">◎</a></div>
|
1823
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#number_link()</span></code></p>
|
1831
1824
|
<div class="content"><p>
|
1832
1825
|
Returns a hyperlink to this node containing its occurrence number.
|
1833
1826
|
</p></div>
|
1834
|
-
</div><div class="
|
1835
|
-
<
|
1836
|
-
|
1837
|
-
|
1827
|
+
</div><div class="paragraph">
|
1828
|
+
<a name="a-ERBook::Document::Node-navigation"/><div class="nav" id="a-ERBook::Document::Node-navigation"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-navigation">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-number_link">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-navigation">◎</a></div>
|
1829
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#navigation()</span></code></p>
|
1830
|
+
<div class="content"><p>
|
1831
|
+
Returns a navigation menu relative to this node.
|
1832
|
+
</p></div>
|
1833
|
+
</div><div class="paragraph">
|
1834
|
+
<a name="a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag"/><div class="nav" id="a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-navigation">△</a><a title="Jump to next segment" href="#a-ERBook::Document::Node-xref_link-label-nil">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag">◎</a></div>
|
1835
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span>::navigation(here_frag, list_frag, prev_frag, next_frag)</code></p>
|
1836
|
+
<div class="content"><p>
|
1837
|
+
Calculates a local navigation menu containing links to the given URI
|
1838
|
+
fragments (which can be nil).
|
1839
|
+
</p></div>
|
1840
|
+
</div><div class="paragraph">
|
1841
|
+
<a name="a-ERBook::Document::Node-xref_link-label-nil"/><div class="nav" id="a-ERBook::Document::Node-xref_link-label-nil"><a title="Reverse jump to listing" href="#rev:a-ERBook::Document::Node-xref_link-label-nil">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node::navigation-here_frag-list_frag-prev_frag-next_frag">△</a><a title="Jump to next segment" href="#a-Hash-to_xml_atts">▽</a><a title="Jump to this segment" href="#a-ERBook::Document::Node-xref_link-label-nil">◎</a></div>
|
1842
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Node</span><span style="color:#666">#xref_link(label = nil)</span></code></p>
|
1843
|
+
<div class="content"><p>
|
1844
|
+
Returns a hyperlink to this node.
|
1845
|
+
</p><p>
|
1846
|
+
@param [String] label
|
1847
|
+
</p>
|
1848
|
+
<p><pre> Optional label (may contain XHTML) for the hyperlink.
|
1849
|
+
|
1850
|
+
If not specified, the title and designation of
|
1851
|
+
this node will be used as the label instead.</pre></p></div>
|
1852
|
+
</div><div class="paragraph">
|
1853
|
+
<a name="a-Hash-to_xml_atts"/><div class="nav" id="a-Hash-to_xml_atts"><a title="Reverse jump to listing" href="#rev:a-Hash-to_xml_atts">≡</a><a title="Jump to previous segment" href="#a-ERBook::Document::Node-xref_link-label-nil">△</a><a title="Jump to next segment" href="#a-ERBook::Template-verbatim-content">▽</a><a title="Jump to this segment" href="#a-Hash-to_xml_atts">◎</a></div>
|
1854
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">Hash</span><span style="color:#666">#to_xml_atts()</span></code></p>
|
1838
1855
|
<div class="content"><p>
|
1839
1856
|
Transforms this hash into a string of XML attribute key="value"
|
1840
1857
|
pairs.
|
1841
1858
|
</p></div>
|
1842
|
-
</div><div class="
|
1843
|
-
<
|
1844
|
-
|
1845
|
-
</h4>
|
1859
|
+
</div><div class="paragraph">
|
1860
|
+
<a name="a-ERBook::Template-verbatim-content"/><div class="nav" id="a-ERBook::Template-verbatim-content"><a title="Reverse jump to listing" href="#rev:a-ERBook::Template-verbatim-content">≡</a><a title="Jump to previous segment" href="#a-Hash-to_xml_atts">△</a><a title="Jump to next segment" href="#a-ERBook::Template-hyperlink-url-label-url-title-nil">▽</a><a title="Jump to this segment" href="#a-ERBook::Template-verbatim-content">◎</a></div>
|
1861
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#verbatim(content)</span></code></p>
|
1846
1862
|
<div class="content"><p>
|
1847
1863
|
Protects the given content from the text-to-XHTML conversion process.
|
1848
1864
|
</p></div>
|
1849
|
-
</div><div class="
|
1850
|
-
<
|
1851
|
-
|
1852
|
-
</h4>
|
1865
|
+
</div><div class="paragraph">
|
1866
|
+
<a name="a-ERBook::Template-hyperlink-url-label-url-title-nil"/><div class="nav" id="a-ERBook::Template-hyperlink-url-label-url-title-nil"><a title="Reverse jump to listing" href="#rev:a-ERBook::Template-hyperlink-url-label-url-title-nil">≡</a><a title="Jump to previous segment" href="#a-ERBook::Template-verbatim-content">△</a><a title="Jump to next segment" href="#a-ERBook::Template-embed_image_file-path-format-path-w-atts">▽</a><a title="Jump to this segment" href="#a-ERBook::Template-hyperlink-url-label-url-title-nil">◎</a></div>
|
1867
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#hyperlink(url, label = url, title = nil)</span></code></p>
|
1853
1868
|
<div class="content"><p>
|
1854
1869
|
Returns XHTML for a hyperlink to the given URL of the given label and
|
1855
1870
|
mouse-hover title.
|
1856
1871
|
</p></div>
|
1857
|
-
</div><div class="
|
1858
|
-
<
|
1859
|
-
|
1860
|
-
</h4>
|
1872
|
+
</div><div class="paragraph">
|
1873
|
+
<a name="a-ERBook::Template-embed_image_file-path-format-path-w-atts"/><div class="nav" id="a-ERBook::Template-embed_image_file-path-format-path-w-atts"><a title="Reverse jump to listing" href="#rev:a-ERBook::Template-embed_image_file-path-format-path-w-atts">≡</a><a title="Jump to previous segment" href="#a-ERBook::Template-hyperlink-url-label-url-title-nil">△</a><a title="Jump to next segment" href="#a-ERBook::Template-embed_image_data-data-format-atts">▽</a><a title="Jump to this segment" href="#a-ERBook::Template-embed_image_file-path-format-path-w-atts">◎</a></div>
|
1874
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#embed_image_file(path, format = path[/\w+/], atts = {})</span></code></p>
|
1861
1875
|
<div class="content"><p>
|
1862
1876
|
Returns an <img/> tag that embeds the given image file.
|
1863
1877
|
</p><table border="1">
|
1864
|
-
<tr><td valign='top'>
|
1878
|
+
<tr><td valign='top'>path:</td><td>path to the image file
|
1865
1879
|
|
1866
1880
|
</td></tr>
|
1867
|
-
<tr><td valign='top'>
|
1881
|
+
<tr><td valign='top'>format:</td><td>format of the image file (e.g. PNG, JPEG, GIF, etc.)
|
1868
1882
|
|
1869
1883
|
</td></tr>
|
1870
|
-
<tr><td valign='top'>
|
1884
|
+
<tr><td valign='top'>atts:</td><td>additional attributes for the <img> tag
|
1871
1885
|
|
1872
1886
|
</td></tr>
|
1873
1887
|
</table></div>
|
1874
|
-
</div><div class="
|
1875
|
-
<
|
1876
|
-
|
1877
|
-
</h4>
|
1888
|
+
</div><div class="paragraph">
|
1889
|
+
<a name="a-ERBook::Template-embed_image_data-data-format-atts"/><div class="nav" id="a-ERBook::Template-embed_image_data-data-format-atts"><a title="Reverse jump to listing" href="#rev:a-ERBook::Template-embed_image_data-data-format-atts">≡</a><a title="Jump to previous segment" href="#a-ERBook::Template-embed_image_file-path-format-path-w-atts">△</a><a title="Jump to next segment" href="#a-String-to_xml_entities">▽</a><a title="Jump to this segment" href="#a-ERBook::Template-embed_image_data-data-format-atts">◎</a></div>
|
1890
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Template</span><span style="color:#666">#embed_image_data(data, format, atts = {})</span></code></p>
|
1878
1891
|
<div class="content"><p>
|
1879
1892
|
Returns an <img/> tag that embeds the given raw image data.
|
1880
1893
|
</p><table border="1">
|
1881
|
-
<tr><td valign='top'>
|
1894
|
+
<tr><td valign='top'>data:</td><td>raw image data
|
1882
1895
|
|
1883
1896
|
</td></tr>
|
1884
|
-
<tr><td valign='top'>
|
1897
|
+
<tr><td valign='top'>format:</td><td>format of the image file (e.g. PNG, JPEG, GIF, etc.)
|
1885
1898
|
|
1886
1899
|
</td></tr>
|
1887
|
-
<tr><td valign='top'>
|
1900
|
+
<tr><td valign='top'>atts:</td><td>additional attributes for the <img> tag
|
1888
1901
|
|
1889
1902
|
</td></tr>
|
1890
1903
|
</table></div>
|
1891
|
-
</div><div class="
|
1892
|
-
<
|
1893
|
-
|
1894
|
-
</h4>
|
1904
|
+
</div><div class="paragraph">
|
1905
|
+
<a name="a-String-to_xml_entities"/><div class="nav" id="a-String-to_xml_entities"><a title="Reverse jump to listing" href="#rev:a-String-to_xml_entities">≡</a><a title="Jump to previous segment" href="#a-ERBook::Template-embed_image_data-data-format-atts">△</a><a title="Jump to next segment" href="#a-String-to_uri_fragment">▽</a><a title="Jump to this segment" href="#a-String-to_xml_entities">◎</a></div>
|
1906
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_xml_entities()</span></code></p>
|
1895
1907
|
<div class="content"><p>
|
1896
1908
|
Transforms this UTF-8 string into XML entities.
|
1897
1909
|
</p></div>
|
1898
|
-
</div><div class="
|
1899
|
-
<
|
1900
|
-
|
1901
|
-
</h4>
|
1910
|
+
</div><div class="paragraph">
|
1911
|
+
<a name="a-String-to_uri_fragment"/><div class="nav" id="a-String-to_uri_fragment"><a title="Reverse jump to listing" href="#rev:a-String-to_uri_fragment">≡</a><a title="Jump to previous segment" href="#a-String-to_xml_entities">△</a><a title="Jump to next segment" href="#a-String-to_inline_xhtml">▽</a><a title="Jump to this segment" href="#a-String-to_uri_fragment">◎</a></div>
|
1912
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_uri_fragment()</span></code></p>
|
1902
1913
|
<div class="content"><p>
|
1903
1914
|
Transforms this string into a valid URI fragment. See <a href='http://www.nmt.edu/tcc/help/pubs/xhtml/id-type.html'>www.nmt.edu/tcc/help/pubs/xhtml/id-type.html</a>
|
1904
1915
|
</p></div>
|
1905
|
-
</div><div class="
|
1906
|
-
<
|
1907
|
-
|
1908
|
-
</h4>
|
1916
|
+
</div><div class="paragraph">
|
1917
|
+
<a name="a-String-to_inline_xhtml"/><div class="nav" id="a-String-to_inline_xhtml"><a title="Reverse jump to listing" href="#rev:a-String-to_inline_xhtml">≡</a><a title="Jump to previous segment" href="#a-String-to_uri_fragment">△</a><a title="Jump to next segment" href="#a-String-to_xhtml-inline-false">▽</a><a title="Jump to this segment" href="#a-String-to_inline_xhtml">◎</a></div>
|
1918
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_inline_xhtml()</span></code></p>
|
1909
1919
|
<div class="content"><p>
|
1910
1920
|
Transforms this string into an <b>inline</b> XHTML string (one that does
|
1911
1921
|
not contain any block-level XHTML elements at the root).
|
1912
1922
|
</p></div>
|
1913
|
-
</div><div class="
|
1914
|
-
<
|
1915
|
-
|
1916
|
-
</h4>
|
1923
|
+
</div><div class="paragraph">
|
1924
|
+
<a name="a-String-to_xhtml-inline-false"/><div class="nav" id="a-String-to_xhtml-inline-false"><a title="Reverse jump to listing" href="#rev:a-String-to_xhtml-inline-false">≡</a><a title="Jump to previous segment" href="#a-String-to_inline_xhtml">△</a><a title="Jump to next segment" href="#xhtml.nodes">▽</a><a title="Jump to this segment" href="#a-String-to_xhtml-inline-false">◎</a></div>
|
1925
|
+
<p class="title"><code class="code"><span style="color:#036;font-weight:bold">String</span><span style="color:#666">#to_xhtml(inline = false)</span></code></p>
|
1917
1926
|
<div class="content"><p>
|
1918
1927
|
Transforms this string into XHTML while ensuring that the result contains
|
1919
1928
|
one or more block-level elements at the root.
|
1920
|
-
</p><
|
1921
|
-
If
|
1922
|
-
|
1923
|
-
|
1929
|
+
</p><table border="1">
|
1930
|
+
<tr><td valign='top'>inline:</td><td>If true, the resulting XHTML will <b>not</b> contain a block-level element
|
1931
|
+
at the root.
|
1932
|
+
|
1933
|
+
</td></tr>
|
1934
|
+
</table></div>
|
1924
1935
|
</div></p></div>
|
1925
1936
|
</div> <div class="chapter">
|
1937
|
+
<a name="xhtml.nodes"/><div class="nav" id="xhtml.nodes"><a title="Reverse jump to listing" href="#rev:xhtml.nodes">≡</a><a title="Jump to previous segment" href="#a-String-to_xhtml-inline-false">△</a><a title="Jump to next segment" href="#Structural-nodes">▽</a><a title="Jump to this segment" href="#xhtml.nodes">◎</a></div>
|
1926
1938
|
<h1 class="title">
|
1927
|
-
Chapter 
|
1939
|
+
Chapter 5.1.4
|
1928
1940
|
<br/>
|
1929
|
-
<big
|
1941
|
+
<big>Nodes</big>
|
1930
1942
|
</h1>
|
1931
1943
|
<div class="content"><p>Unless otherwise noted, all nodes defined by the XHTML format accept two arguments, in this order:</p>
|
1932
1944
|
|
@@ -1943,29 +1955,34 @@ string.
|
|
1943
1955
|
</tr><tr><td style='text-align: left;'>lof</td><td style='text-align: left;'>Boolean</td><td style='text-align: left;'>Include this node in the <strong>List of Figures</strong> (LOF)?</td>
|
1944
1956
|
</tr></tbody></table>
|
1945
1957
|
<p><div class="section">
|
1958
|
+
<a name="Structural-nodes"/><div class="nav" id="Structural-nodes"><a title="Reverse jump to listing" href="#rev:Structural-nodes">≡</a><a title="Jump to previous segment" href="#xhtml.nodes">△</a><a title="Jump to next segment" href="#xhtml.nodes.header">▽</a><a title="Jump to this segment" href="#Structural-nodes">◎</a></div>
|
1946
1959
|
<h4 class="title">
|
1947
|
-
|
1960
|
+
5.1.4.1 Structural nodes
|
1948
1961
|
</h4>
|
1949
1962
|
<div class="content"><p>The nodes described in this section form the overall structure of the output document.</p>
|
1950
1963
|
|
1951
1964
|
<p><div class="section">
|
1965
|
+
<a name="xhtml.nodes.header"/><div class="nav" id="xhtml.nodes.header"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.header">≡</a><a title="Jump to previous segment" href="#Structural-nodes">△</a><a title="Jump to next segment" href="#xhtml.nodes.footer">▽</a><a title="Jump to this segment" href="#xhtml.nodes.header">◎</a></div>
|
1952
1966
|
<h5 class="title">
|
1953
|
-
|
1967
|
+
5.1.4.1.1 header
|
1954
1968
|
</h5>
|
1955
1969
|
<div class="content"><p>This node overrides the logo, title, list of authors, and date when the document was written, all of which are shown at the top of the document.</p></div>
|
1956
1970
|
</div> <div class="section">
|
1971
|
+
<a name="xhtml.nodes.footer"/><div class="nav" id="xhtml.nodes.footer"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.footer">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.header">△</a><a title="Jump to next segment" href="#xhtml.nodes.abstract">▽</a><a title="Jump to this segment" href="#xhtml.nodes.footer">◎</a></div>
|
1957
1972
|
<h5 class="title">
|
1958
|
-
|
1973
|
+
5.1.4.1.2 footer
|
1959
1974
|
</h5>
|
1960
|
-
<div class="content"><p>This node overrides (1) the date when this document was generated and (2) the hyperlink to the
|
1975
|
+
<div class="content"><p>This node overrides (1) the date when this document was generated and (2) the hyperlink to the ERBook website, shown at the bottom of the document. The hyperlink is there as a way of saying thanks for ERBook, the <em>wonderful</em> little utility you have grown so fond of! ;-)</p></div>
|
1961
1976
|
</div> <div class="section">
|
1977
|
+
<a name="xhtml.nodes.abstract"/><div class="nav" id="xhtml.nodes.abstract"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.abstract">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.footer">△</a><a title="Jump to next segment" href="#xhtml.nodes.xref">▽</a><a title="Jump to this segment" href="#xhtml.nodes.abstract">◎</a></div>
|
1962
1978
|
<h5 class="title">
|
1963
|
-
|
1979
|
+
5.1.4.1.3 abstract
|
1964
1980
|
</h5>
|
1965
1981
|
<div class="content"><p>A summary of the entire document. This is what most readers will <em>skim</em> through, if you are lucky. Alas, nobody reads entire documents these days! :-(</p></div>
|
1966
1982
|
</div> <div class="section">
|
1983
|
+
<a name="xhtml.nodes.xref"/><div class="nav" id="xhtml.nodes.xref"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.xref">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.abstract">△</a><a title="Jump to next segment" href="#Organizational-nodes">▽</a><a title="Jump to this segment" href="#xhtml.nodes.xref">◎</a></div>
|
1967
1984
|
<h5 class="title">
|
1968
|
-
|
1985
|
+
5.1.4.1.4 xref
|
1969
1986
|
</h5>
|
1970
1987
|
<div class="content"><p>A cross-reference; a hyperlink that takes you to any node in the document.</p>
|
1971
1988
|
|
@@ -1986,203 +2003,263 @@ string.
|
|
1986
2003
|
<p>appears in the output document like this: <a class="xref" href="#SpecFile" title="Section 3.2. Format specification file">custom link text</a>.</p></div>
|
1987
2004
|
</div></p></div>
|
1988
2005
|
</div> <div class="section">
|
2006
|
+
<a name="Organizational-nodes"/><div class="nav" id="Organizational-nodes"><a title="Reverse jump to listing" href="#rev:Organizational-nodes">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.xref">△</a><a title="Jump to next segment" href="#xhtml.nodes.node">▽</a><a title="Jump to this segment" href="#Organizational-nodes">◎</a></div>
|
1989
2007
|
<h4 class="title">
|
1990
|
-
|
2008
|
+
5.1.4.2 Organizational nodes
|
1991
2009
|
</h4>
|
1992
2010
|
<div class="content"><p>The nodes described in this section are meant to help organize the document’s content logically. Based on how deeply these nodes are nested in the document, their heading will be larger (shallow depth) or smaller (deep depth).</p>
|
1993
2011
|
|
1994
2012
|
<p><div class="section">
|
2013
|
+
<a name="xhtml.nodes.node"/><div class="nav" id="xhtml.nodes.node"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.node">≡</a><a title="Jump to previous segment" href="#Organizational-nodes">△</a><a title="Jump to next segment" href="#xhtml.nodes.part">▽</a><a title="Jump to this segment" href="#xhtml.nodes.node">◎</a></div>
|
1995
2014
|
<h5 class="title">
|
1996
|
-
|
2015
|
+
5.1.4.2.1 node
|
2016
|
+
</h5>
|
2017
|
+
<div class="content"><p>A placeholder that simply passes its content to the output.</p>
|
2018
|
+
|
2019
|
+
<p>This node has no real use in the writing of a document. It mainly helps programmers define “virtual” nodes that simply wrap some user-provided content. Programmers can then manipluate the content of those virtual nodes when processing the document.</p>
|
2020
|
+
|
2021
|
+
<p><p>This is how a <strong>node</strong> node appears.</p></p></div>
|
2022
|
+
</div> <div class="section">
|
2023
|
+
<a name="xhtml.nodes.part"/><div class="nav" id="xhtml.nodes.part"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.part">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.node">△</a><a title="Jump to next segment" href="#An-example">▽</a><a title="Jump to this segment" href="#xhtml.nodes.part">◎</a></div>
|
2024
|
+
<h5 class="title">
|
2025
|
+
5.1.4.2.2 part
|
1997
2026
|
</h5>
|
1998
2027
|
<div class="content"><p>A collection of chapters.</p>
|
1999
2028
|
|
2000
2029
|
<p><div class="part">
|
2030
|
+
<a name="An-example"/><div class="nav" id="An-example"><a title="Reverse jump to listing" href="#rev:An-example">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.part">△</a><a title="Jump to next segment" href="#xhtml.nodes.chapter">▽</a><a title="Jump to this segment" href="#An-example">◎</a></div>
|
2001
2031
|
<h1 class="title">
|
2002
|
-
Part 
|
2032
|
+
Part 5.1.4.2.2.1
|
2003
2033
|
<br/>
|
2004
|
-
<big
|
2034
|
+
<big>An example</big>
|
2005
2035
|
</h1>
|
2006
2036
|
<div class="content"><p>This is how a <strong>part</strong> node appears.</p></div>
|
2007
2037
|
</div></p></div>
|
2008
2038
|
</div> <div class="section">
|
2039
|
+
<a name="xhtml.nodes.chapter"/><div class="nav" id="xhtml.nodes.chapter"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.chapter">≡</a><a title="Jump to previous segment" href="#An-example">△</a><a title="Jump to next segment" href="#An-example-5.1.4.2.3.1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.chapter">◎</a></div>
|
2009
2040
|
<h5 class="title">
|
2010
|
-
|
2041
|
+
5.1.4.2.3 chapter
|
2011
2042
|
</h5>
|
2012
2043
|
<div class="content"><p>A collection of sections.</p>
|
2013
2044
|
|
2014
2045
|
<p><div class="chapter">
|
2046
|
+
<a name="An-example-5.1.4.2.3.1"/><div class="nav" id="An-example-5.1.4.2.3.1"><a title="Reverse jump to listing" href="#rev:An-example-5.1.4.2.3.1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.chapter">△</a><a title="Jump to next segment" href="#xhtml.nodes.section">▽</a><a title="Jump to this segment" href="#An-example-5.1.4.2.3.1">◎</a></div>
|
2015
2047
|
<h1 class="title">
|
2016
|
-
Chapter 
|
2048
|
+
Chapter 5.1.4.2.3.1
|
2017
2049
|
<br/>
|
2018
|
-
<big
|
2050
|
+
<big>An example</big>
|
2019
2051
|
</h1>
|
2020
2052
|
<div class="content"><p>This is how a <strong>chapter</strong> node appears.</p></div>
|
2021
2053
|
</div></p></div>
|
2022
2054
|
</div> <div class="section">
|
2055
|
+
<a name="xhtml.nodes.section"/><div class="nav" id="xhtml.nodes.section"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.section">≡</a><a title="Jump to previous segment" href="#An-example-5.1.4.2.3.1">△</a><a title="Jump to next segment" href="#An-example-5.1.4.2.4.1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.section">◎</a></div>
|
2023
2056
|
<h5 class="title">
|
2024
|
-
|
2057
|
+
5.1.4.2.4 section
|
2025
2058
|
</h5>
|
2026
2059
|
<div class="content"><p>A collection of paragraphs about a particular topic.</p>
|
2027
2060
|
|
2028
2061
|
<p><div class="section">
|
2062
|
+
<a name="An-example-5.1.4.2.4.1"/><div class="nav" id="An-example-5.1.4.2.4.1"><a title="Reverse jump to listing" href="#rev:An-example-5.1.4.2.4.1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.section">△</a><a title="Jump to next segment" href="#xhtml.nodes.paragraph">▽</a><a title="Jump to this segment" href="#An-example-5.1.4.2.4.1">◎</a></div>
|
2029
2063
|
<h6 class="title">
|
2030
|
-
|
2064
|
+
5.1.4.2.4.1 An example
|
2031
2065
|
</h6>
|
2032
2066
|
<div class="content"><p>This is how a <strong>section</strong> node appears.</p></div>
|
2033
2067
|
</div></p></div>
|
2034
2068
|
</div> <div class="section">
|
2069
|
+
<a name="xhtml.nodes.paragraph"/><div class="nav" id="xhtml.nodes.paragraph"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.paragraph">≡</a><a title="Jump to previous segment" href="#An-example-5.1.4.2.4.1">△</a><a title="Jump to next segment" href="#An-example-608866148">▽</a><a title="Jump to this segment" href="#xhtml.nodes.paragraph">◎</a></div>
|
2035
2070
|
<h5 class="title">
|
2036
|
-
|
2071
|
+
5.1.4.2.5 paragraph
|
2037
2072
|
</h5>
|
2038
2073
|
<div class="content"><p>A collection of sentences about a particular idea.</p>
|
2039
2074
|
|
2040
2075
|
<p><div class="paragraph">
|
2041
|
-
<
|
2076
|
+
<a name="An-example-608866148"/><div class="nav" id="An-example-608866148"><a title="Reverse jump to listing" href="#rev:An-example-608866148">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.paragraph">△</a><a title="Jump to next segment" href="#Admonition-nodes">▽</a><a title="Jump to this segment" href="#An-example-608866148">◎</a></div>
|
2077
|
+
<p class="title">An example</p>
|
2042
2078
|
<div class="content"><p>This is how a <strong>paragraph</strong> node appears. Notice that there is no LaTeX-style index number in the heading of this <strong>paragraph</strong> node.</p></div>
|
2043
2079
|
</div></p></div>
|
2044
2080
|
</div></p></div>
|
2045
2081
|
</div> <div class="section">
|
2082
|
+
<a name="Admonition-nodes"/><div class="nav" id="Admonition-nodes"><a title="Reverse jump to listing" href="#rev:Admonition-nodes">≡</a><a title="Jump to previous segment" href="#An-example-608866148">△</a><a title="Jump to next segment" href="#xhtml.nodes.warning">▽</a><a title="Jump to this segment" href="#Admonition-nodes">◎</a></div>
|
2046
2083
|
<h4 class="title">
|
2047
|
-
|
2084
|
+
5.1.4.3 Admonition nodes
|
2048
2085
|
</h4>
|
2049
2086
|
<div class="content"><p>An admonition is basically a box that is indented more deeply than the text surrounding it. It is typically used to convey extraneous or pertinent information about the application of ideas discussed in the surrounding text.</p>
|
2050
2087
|
|
2051
2088
|
<p>I like to follow the KDE guidelines<sup>[<a class="cite" href="#KDE.admonitions">1</a>]</sup> when determining which admonition to use in my documents.</p>
|
2052
2089
|
|
2053
2090
|
<p> <div class="section">
|
2091
|
+
<a name="xhtml.nodes.warning"/><div class="nav" id="xhtml.nodes.warning"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.warning">≡</a><a title="Jump to previous segment" href="#Admonition-nodes">△</a><a title="Jump to next segment" href="#An-example-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.warning">◎</a></div>
|
2054
2092
|
<h5 class="title">
|
2055
|
-
|
2093
|
+
5.1.4.3.1 warning
|
2056
2094
|
</h5>
|
2057
2095
|
<div class="content"><p>Use a <strong>warning</strong> node when “data loss could occur if you follow the procedure being described.” <sup>[<a class="cite" href="#KDE.admonitions">1</a>]</sup></p>
|
2058
2096
|
|
2059
2097
|
<p><div class="warning">
|
2060
|
-
<
|
2061
|
-
<
|
2098
|
+
<a name="An-example-1"/><div class="nav" id="An-example-1"><a title="Reverse jump to listing" href="#rev:An-example-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.warning">△</a><a title="Jump to next segment" href="#xhtml.nodes.caution">▽</a><a title="Jump to this segment" href="#An-example-1">◎</a></div>
|
2099
|
+
<p class="title">Warning 1. An example</p>
|
2100
|
+
<div class="content">
|
2101
|
+
<img class="icon" src="&icon_warning;" alt="warning"/>
|
2102
|
+
<p>This is how a <strong>warning</strong> node appears.</p>
|
2103
|
+
</div>
|
2062
2104
|
</div></p></div>
|
2063
2105
|
</div> <div class="section">
|
2106
|
+
<a name="xhtml.nodes.caution"/><div class="nav" id="xhtml.nodes.caution"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.caution">≡</a><a title="Jump to previous segment" href="#An-example-1">△</a><a title="Jump to next segment" href="#An-example-1-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.caution">◎</a></div>
|
2064
2107
|
<h5 class="title">
|
2065
|
-
|
2108
|
+
5.1.4.3.2 caution
|
2066
2109
|
</h5>
|
2067
2110
|
<div class="content"><p>bq. A note of caution. Use this for example when the reader may lose easily recovered or replaceable information (e.g. user settings), or when they could cause data loss if they don’t correctly follow the procedure being outlined. <sup>[<a class="cite" href="#KDE.admonitions">1</a>]</sup></p>
|
2068
2111
|
|
2069
2112
|
<p><div class="caution">
|
2070
|
-
<
|
2071
|
-
<
|
2113
|
+
<a name="An-example-1-1"/><div class="nav" id="An-example-1-1"><a title="Reverse jump to listing" href="#rev:An-example-1-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.caution">△</a><a title="Jump to next segment" href="#xhtml.nodes.important">▽</a><a title="Jump to this segment" href="#An-example-1-1">◎</a></div>
|
2114
|
+
<p class="title">Caution 1. An example</p>
|
2115
|
+
<div class="content">
|
2116
|
+
<img class="icon" src="&icon_caution;" alt="caution"/>
|
2117
|
+
<p>This is how a <strong>caution</strong> node appears.</p>
|
2118
|
+
</div>
|
2072
2119
|
</div></p></div>
|
2073
2120
|
</div> <div class="section">
|
2121
|
+
<a name="xhtml.nodes.important"/><div class="nav" id="xhtml.nodes.important"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.important">≡</a><a title="Jump to previous segment" href="#An-example-1-1">△</a><a title="Jump to next segment" href="#An-example-2">▽</a><a title="Jump to this segment" href="#xhtml.nodes.important">◎</a></div>
|
2074
2122
|
<h5 class="title">
|
2075
|
-
|
2123
|
+
5.1.4.3.3 important
|
2076
2124
|
</h5>
|
2077
2125
|
<div class="content"><p>Use an <strong>important</strong> node when:</p>
|
2078
2126
|
|
2079
2127
|
<p>bq. When there is no danger of data loss, but you wish to make clear to the reader a consequence that isn’t immediately obvious (e.g. when changing the font for one instance of a program also changes the default setting, and this isn’t clear from the GUI.) <sup>[<a class="cite" href="#KDE.admonitions">1</a>]</sup></p>
|
2080
2128
|
|
2081
2129
|
<p><div class="important">
|
2082
|
-
<
|
2083
|
-
<
|
2130
|
+
<a name="An-example-2"/><div class="nav" id="An-example-2"><a title="Reverse jump to listing" href="#rev:An-example-2">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.important">△</a><a title="Jump to next segment" href="#xhtml.nodes.note">▽</a><a title="Jump to this segment" href="#An-example-2">◎</a></div>
|
2131
|
+
<p class="title">Important 2. An example</p>
|
2132
|
+
<div class="content">
|
2133
|
+
<img class="icon" src="&icon_important;" alt="important"/>
|
2134
|
+
<p>This is how a <strong>important</strong> node appears.</p>
|
2135
|
+
</div>
|
2084
2136
|
</div></p></div>
|
2085
2137
|
</div> <div class="section">
|
2138
|
+
<a name="xhtml.nodes.note"/><div class="nav" id="xhtml.nodes.note"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.note">≡</a><a title="Jump to previous segment" href="#An-example-2">△</a><a title="Jump to next segment" href="#An-example-1-1-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.note">◎</a></div>
|
2086
2139
|
<h5 class="title">
|
2087
|
-
|
2140
|
+
5.1.4.3.4 note
|
2088
2141
|
</h5>
|
2089
2142
|
<div class="content"><p>Use a <strong>note</strong> node to convey:</p>
|
2090
2143
|
|
2091
2144
|
<p>bq. Information the user should be aware of, but is peripheral to the actual task being described. <sup>[<a class="cite" href="#KDE.admonitions">1</a>]</sup></p>
|
2092
2145
|
|
2093
2146
|
<p><div class="note">
|
2094
|
-
<
|
2095
|
-
<
|
2147
|
+
<a name="An-example-1-1-1"/><div class="nav" id="An-example-1-1-1"><a title="Reverse jump to listing" href="#rev:An-example-1-1-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.note">△</a><a title="Jump to next segment" href="#xhtml.nodes.tip">▽</a><a title="Jump to this segment" href="#An-example-1-1-1">◎</a></div>
|
2148
|
+
<p class="title">Note 1. An example</p>
|
2149
|
+
<div class="content">
|
2150
|
+
<img class="icon" src="&icon_note;" alt="note"/>
|
2151
|
+
<p>This is how a <strong>note</strong> node appears.</p>
|
2152
|
+
</div>
|
2096
2153
|
</div></p></div>
|
2097
2154
|
</div> <div class="section">
|
2155
|
+
<a name="xhtml.nodes.tip"/><div class="nav" id="xhtml.nodes.tip"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.tip">≡</a><a title="Jump to previous segment" href="#An-example-1-1-1">△</a><a title="Jump to next segment" href="#An-example-1-1-1-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.tip">◎</a></div>
|
2098
2156
|
<h5 class="title">
|
2099
|
-
|
2157
|
+
5.1.4.3.5 tip
|
2100
2158
|
</h5>
|
2101
2159
|
<div class="content"><p>Use a <strong>tip</strong> node when:</p>
|
2102
2160
|
|
2103
2161
|
<p>bq. When you’re giving a hint to make things easier or more productive for the reader. <sup>[<a class="cite" href="#KDE.admonitions">1</a>]</sup></p>
|
2104
2162
|
|
2105
2163
|
<p><div class="tip">
|
2106
|
-
<
|
2107
|
-
<
|
2164
|
+
<a name="An-example-1-1-1-1"/><div class="nav" id="An-example-1-1-1-1"><a title="Reverse jump to listing" href="#rev:An-example-1-1-1-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.tip">△</a><a title="Jump to next segment" href="#Auxilary-materials">▽</a><a title="Jump to this segment" href="#An-example-1-1-1-1">◎</a></div>
|
2165
|
+
<p class="title">Tip 1. An example</p>
|
2166
|
+
<div class="content">
|
2167
|
+
<img class="icon" src="&icon_tip;" alt="tip"/>
|
2168
|
+
<p>This is how a <strong>tip</strong> node appears.</p>
|
2169
|
+
</div>
|
2108
2170
|
</div></p></div>
|
2109
2171
|
</div></p></div>
|
2110
2172
|
</div> <div class="section">
|
2173
|
+
<a name="Auxilary-materials"/><div class="nav" id="Auxilary-materials"><a title="Reverse jump to listing" href="#rev:Auxilary-materials">≡</a><a title="Jump to previous segment" href="#An-example-1-1-1-1">△</a><a title="Jump to next segment" href="#xhtml.nodes.figure">▽</a><a title="Jump to this segment" href="#Auxilary-materials">◎</a></div>
|
2111
2174
|
<h4 class="title">
|
2112
|
-
|
2175
|
+
5.1.4.4 Auxilary materials
|
2113
2176
|
</h4>
|
2114
2177
|
<div class="content"><p><div class="section">
|
2178
|
+
<a name="xhtml.nodes.figure"/><div class="nav" id="xhtml.nodes.figure"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.figure">≡</a><a title="Jump to previous segment" href="#Auxilary-materials">△</a><a title="Jump to next segment" href="#An-example-1-1-1-1-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.figure">◎</a></div>
|
2115
2179
|
<h5 class="title">
|
2116
|
-
|
2180
|
+
5.1.4.4.1 figure
|
2117
2181
|
</h5>
|
2118
2182
|
<div class="content"><p>A diagram, sketch, image, or illustration; something that visually depicts an idea or thought.</p>
|
2119
2183
|
|
2120
2184
|
<p><div class="figure">
|
2121
|
-
<
|
2185
|
+
<a name="An-example-1-1-1-1-1"/><div class="nav" id="An-example-1-1-1-1-1"><a title="Reverse jump to listing" href="#rev:An-example-1-1-1-1-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.figure">△</a><a title="Jump to next segment" href="#xhtml.nodes.table">▽</a><a title="Jump to this segment" href="#An-example-1-1-1-1-1">◎</a></div>
|
2186
|
+
<p class="title">Figure 1. An example</p>
|
2122
2187
|
<div class="content"><p>This is how a <strong>figure</strong> node appears.</p></div>
|
2123
2188
|
</div></p></div>
|
2124
2189
|
</div> <div class="section">
|
2190
|
+
<a name="xhtml.nodes.table"/><div class="nav" id="xhtml.nodes.table"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.table">≡</a><a title="Jump to previous segment" href="#An-example-1-1-1-1-1">△</a><a title="Jump to next segment" href="#An-example-1-1-1-1-1-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.table">◎</a></div>
|
2125
2191
|
<h5 class="title">
|
2126
|
-
|
2192
|
+
5.1.4.4.2 table
|
2127
2193
|
</h5>
|
2128
2194
|
<div class="content"><p>Information (typically measurement data) represented in tabular form for easy reading, comparison, and analysis.</p>
|
2129
2195
|
|
2130
2196
|
<p><div class="table">
|
2131
|
-
<
|
2197
|
+
<a name="An-example-1-1-1-1-1-1"/><div class="nav" id="An-example-1-1-1-1-1-1"><a title="Reverse jump to listing" href="#rev:An-example-1-1-1-1-1-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.table">△</a><a title="Jump to next segment" href="#xhtml.nodes.example">▽</a><a title="Jump to this segment" href="#An-example-1-1-1-1-1-1">◎</a></div>
|
2198
|
+
<p class="title">Table 1. An example</p>
|
2132
2199
|
<div class="content"><p>This is how a <strong>table</strong> node appears.</p></div>
|
2133
2200
|
</div></p></div>
|
2134
2201
|
</div> <div class="section">
|
2202
|
+
<a name="xhtml.nodes.example"/><div class="nav" id="xhtml.nodes.example"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.example">≡</a><a title="Jump to previous segment" href="#An-example-1-1-1-1-1-1">△</a><a title="Jump to next segment" href="#An-example-4">▽</a><a title="Jump to this segment" href="#xhtml.nodes.example">◎</a></div>
|
2135
2203
|
<h5 class="title">
|
2136
|
-
|
2204
|
+
5.1.4.4.3 example
|
2137
2205
|
</h5>
|
2138
2206
|
<div class="content"><p>A sample application of an idea or thought.</p>
|
2139
2207
|
|
2140
2208
|
<p><div class="example">
|
2141
|
-
<
|
2209
|
+
<a name="An-example-4"/><div class="nav" id="An-example-4"><a title="Reverse jump to listing" href="#rev:An-example-4">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.example">△</a><a title="Jump to next segment" href="#xhtml.nodes.equation">▽</a><a title="Jump to this segment" href="#An-example-4">◎</a></div>
|
2210
|
+
<p class="title">Example 4. An example</p>
|
2142
2211
|
<div class="content"><p>This is how a <strong>example</strong> node appears.</p></div>
|
2143
2212
|
</div></p></div>
|
2144
2213
|
</div> <div class="section">
|
2214
|
+
<a name="xhtml.nodes.equation"/><div class="nav" id="xhtml.nodes.equation"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.equation">≡</a><a title="Jump to previous segment" href="#An-example-4">△</a><a title="Jump to next segment" href="#An-example-1-1-1-1-1-1-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.equation">◎</a></div>
|
2145
2215
|
<h5 class="title">
|
2146
|
-
|
2216
|
+
5.1.4.4.4 equation
|
2147
2217
|
</h5>
|
2148
2218
|
<div class="content"><p>A mathematical equation or formula.</p>
|
2149
2219
|
|
2150
2220
|
<p><div class="equation">
|
2151
|
-
<
|
2221
|
+
<a name="An-example-1-1-1-1-1-1-1"/><div class="nav" id="An-example-1-1-1-1-1-1-1"><a title="Reverse jump to listing" href="#rev:An-example-1-1-1-1-1-1-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.equation">△</a><a title="Jump to next segment" href="#xhtml.nodes.procedure">▽</a><a title="Jump to this segment" href="#An-example-1-1-1-1-1-1-1">◎</a></div>
|
2222
|
+
<p class="title">Equation 1. An example</p>
|
2152
2223
|
<div class="content"><p>This is how a <strong>equation</strong> node appears.</p></div>
|
2153
2224
|
</div></p></div>
|
2154
2225
|
</div> <div class="section">
|
2226
|
+
<a name="xhtml.nodes.procedure"/><div class="nav" id="xhtml.nodes.procedure"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.procedure">≡</a><a title="Jump to previous segment" href="#An-example-1-1-1-1-1-1-1">△</a><a title="Jump to next segment" href="#An-example-1-1-1-1-1-1-1-1">▽</a><a title="Jump to this segment" href="#xhtml.nodes.procedure">◎</a></div>
|
2155
2227
|
<h5 class="title">
|
2156
|
-
|
2228
|
+
5.1.4.4.5 procedure
|
2157
2229
|
</h5>
|
2158
2230
|
<div class="content"><p>An outline; a series of steps outlining some kind of process.</p>
|
2159
2231
|
|
2160
2232
|
<p><div class="procedure">
|
2161
|
-
<
|
2233
|
+
<a name="An-example-1-1-1-1-1-1-1-1"/><div class="nav" id="An-example-1-1-1-1-1-1-1-1"><a title="Reverse jump to listing" href="#rev:An-example-1-1-1-1-1-1-1-1">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.procedure">△</a><a title="Jump to next segment" href="#Bibliographical-nodes">▽</a><a title="Jump to this segment" href="#An-example-1-1-1-1-1-1-1-1">◎</a></div>
|
2234
|
+
<p class="title">Procedure 1. An example</p>
|
2162
2235
|
<div class="content"><p>This is how a <strong>procedure</strong> node appears.</p></div>
|
2163
2236
|
</div></p></div>
|
2164
2237
|
</div></p></div>
|
2165
2238
|
</div> <div class="section">
|
2239
|
+
<a name="Bibliographical-nodes"/><div class="nav" id="Bibliographical-nodes"><a title="Reverse jump to listing" href="#rev:Bibliographical-nodes">≡</a><a title="Jump to previous segment" href="#An-example-1-1-1-1-1-1-1-1">△</a><a title="Jump to next segment" href="#xhtml.nodes.reference">▽</a><a title="Jump to this segment" href="#Bibliographical-nodes">◎</a></div>
|
2166
2240
|
<h4 class="title">
|
2167
|
-
|
2241
|
+
5.1.4.5 Bibliographical nodes
|
2168
2242
|
</h4>
|
2169
2243
|
<div class="content"><p>The nodes in this section deal with attribution of ideas—an important weapon against plagiarism.</p>
|
2170
2244
|
|
2171
2245
|
<p><div class="section">
|
2246
|
+
<a name="xhtml.nodes.reference"/><div class="nav" id="xhtml.nodes.reference"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.reference">≡</a><a title="Jump to previous segment" href="#Bibliographical-nodes">△</a><a title="Jump to next segment" href="#An-example-609181648">▽</a><a title="Jump to this segment" href="#xhtml.nodes.reference">◎</a></div>
|
2172
2247
|
<h5 class="title">
|
2173
|
-
|
2248
|
+
5.1.4.5.1 reference
|
2174
2249
|
</h5>
|
2175
2250
|
<div class="content"><p>This node stores bibliography information about an information source that is relevant to your document.</p>
|
2176
2251
|
|
2177
2252
|
<p>If you wish to cite a certain source in several places in your document, start by creating a <strong>reference</strong> node first and then use a <strong>cite</strong> node (see <a class="xref" href="#xhtml.nodes.cite">Section 5.1.4.5.2. cite</a>) to perform the citation.</p>
|
2178
2253
|
|
2179
2254
|
<p><div class="paragraph">
|
2180
|
-
<
|
2255
|
+
<a name="An-example-609181648"/><div class="nav" id="An-example-609181648"><a title="Reverse jump to listing" href="#rev:An-example-609181648">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.reference">△</a><a title="Jump to next segment" href="#xhtml.nodes.cite">▽</a><a title="Jump to this segment" href="#An-example-609181648">◎</a></div>
|
2256
|
+
<p class="title">An example</p>
|
2181
2257
|
<div class="content"><p>See <a class="xref" href="#xhtml.nodes.reference.example">Reference 2</a> for an example of how a <strong>reference</strong> node appears.</p></div>
|
2182
2258
|
</div> </p></div>
|
2183
2259
|
</div> <div class="section">
|
2260
|
+
<a name="xhtml.nodes.cite"/><div class="nav" id="xhtml.nodes.cite"><a title="Reverse jump to listing" href="#rev:xhtml.nodes.cite">≡</a><a title="Jump to previous segment" href="#An-example-609181648">△</a><a title="Jump to next segment" href="#text">▽</a><a title="Jump to this segment" href="#xhtml.nodes.cite">◎</a></div>
|
2184
2261
|
<h5 class="title">
|
2185
|
-
|
2262
|
+
5.1.4.5.2 cite
|
2186
2263
|
</h5>
|
2187
2264
|
<div class="content"><p>A citation to a <strong>reference</strong> node (see <a class="xref" href="#xhtml.nodes.reference">Section 5.1.4.5.1. reference</a>) in the document’s bibliography.</p>
|
2188
2265
|
|
@@ -2205,34 +2282,148 @@ string.
|
|
2205
2282
|
</div></p>
|
2206
2283
|
|
2207
2284
|
<p><div class="chapter">
|
2285
|
+
<a name="text"/><div class="nav" id="text"><a title="Reverse jump to listing" href="#rev:text">≡</a><a title="Jump to previous segment" href="#xhtml.nodes.cite">△</a><a title="Jump to next segment" href="#latex">▽</a><a title="Jump to this segment" href="#text">◎</a></div>
|
2208
2286
|
<h1 class="title">
|
2209
|
-
Chapter 
|
2287
|
+
Chapter 5.2
|
2210
2288
|
<br/>
|
2211
|
-
<big
|
2289
|
+
<big>Plain text</big>
|
2212
2290
|
</h1>
|
2213
|
-
<div class="content"><p>This format is not yet implemented.
|
2291
|
+
<div class="content"><p>This format is not yet implemented. Patches are welcome! :-)</p>
|
2214
2292
|
<a href='http://en.wikipedia.org/wiki/Plain_text'>http://en.wikipedia.org/wiki/Plain_text</a></div>
|
2215
2293
|
</div> <div class="chapter">
|
2294
|
+
<a name="latex"/><div class="nav" id="latex"><a title="Reverse jump to listing" href="#rev:latex">≡</a><a title="Jump to previous segment" href="#text">△</a><a title="Jump to next segment" href="#man">▽</a><a title="Jump to this segment" href="#latex">◎</a></div>
|
2216
2295
|
<h1 class="title">
|
2217
|
-
Chapter 
|
2296
|
+
Chapter 5.3
|
2218
2297
|
<br/>
|
2219
|
-
<big
|
2298
|
+
<big>LaTeX (PDF)</big>
|
2220
2299
|
</h1>
|
2221
|
-
<div class="content"><p>This format is not yet implemented.
|
2300
|
+
<div class="content"><p>This format is not yet implemented. Patches are welcome! :-)</p>
|
2222
2301
|
<a href='http://www.latex-project.org'>http://www.latex-project.org</a></div>
|
2223
2302
|
</div> <div class="chapter">
|
2303
|
+
<a name="man"/><div class="nav" id="man"><a title="Reverse jump to listing" href="#rev:man">≡</a><a title="Jump to previous segment" href="#latex">△</a><a title="Jump to next segment" href="#history">▽</a><a title="Jump to this segment" href="#man">◎</a></div>
|
2224
2304
|
<h1 class="title">
|
2225
|
-
Chapter 
|
2305
|
+
Chapter 5.4
|
2226
2306
|
<br/>
|
2227
|
-
<big
|
2307
|
+
<big>UNIX manual page</big>
|
2228
2308
|
</h1>
|
2229
|
-
<div class="content"><p>This format is not yet implemented.
|
2309
|
+
<div class="content"><p>This format is not yet implemented. Patches are welcome! :-)</p>
|
2230
2310
|
<a href='http://en.wikipedia.org/wiki/Man_page'>http://en.wikipedia.org/wiki/Man_page</a></div>
|
2231
2311
|
</div></p></div>
|
2312
|
+
</div><div class="chapter">
|
2313
|
+
<a name="history"/><div class="nav" id="history"><a title="Reverse jump to listing" href="#rev:history">≡</a><a title="Jump to previous segment" href="#man">△</a><a title="Jump to next segment" href="#Version-6.0.0-2009-01-19">▽</a><a title="Jump to this segment" href="#history">◎</a></div>
|
2314
|
+
<h1 class="title">
|
2315
|
+
Chapter 6
|
2316
|
+
<br/>
|
2317
|
+
<big>Project history</big>
|
2318
|
+
</h1>
|
2319
|
+
<div class="content"><p><p><div class="section">
|
2320
|
+
<a name="Version-6.0.0-2009-01-19"/><div class="nav" id="Version-6.0.0-2009-01-19"><a title="Reverse jump to listing" href="#rev:Version-6.0.0-2009-01-19">≡</a><a title="Jump to previous segment" href="#history">△</a><a title="Jump to next segment" href="#Incompatible-changes">▽</a><a title="Jump to this segment" href="#Version-6.0.0-2009-01-19">◎</a></div>
|
2321
|
+
<h2 class="title">
|
2322
|
+
6.1 Version 6.0.0 (2009-01-19)
|
2323
|
+
</h2>
|
2324
|
+
<div class="content"><p>This release improves the appearance & usability of the XHTML format, refactors the core logic into reusable libraries, fixes some bugs and improves variable names.</p>
|
2325
|
+
|
2326
|
+
<p><div class="paragraph">
|
2327
|
+
<a name="Incompatible-changes"/><div class="nav" id="Incompatible-changes"><a title="Reverse jump to listing" href="#rev:Incompatible-changes">≡</a><a title="Jump to previous segment" href="#Version-6.0.0-2009-01-19">△</a><a title="Jump to next segment" href="#New-features">▽</a><a title="Jump to this segment" href="#Incompatible-changes">◎</a></div>
|
2328
|
+
<p class="title">Incompatible changes</p>
|
2329
|
+
<div class="content"><ul>
|
2330
|
+
<li>
|
2331
|
+
<p>Renamed <code class="code"><span style="color:#33B">@types</span></code> to <code class="code"><span style="color:#33B">@nodes_by_type</span></code> and <code class="code"><span style="color:#33B">@spec</span></code> to <code class="code"><span style="color:#33B">@format</span></code> in XHTML format.</p>
|
2332
|
+
</li>
|
2333
|
+
|
2334
|
+
<li>
|
2335
|
+
<p>Moved the core logic of the <strong>erbook</strong> executable into the <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span></code> and <code class="code"><span style="color:#036;font-weight:bold">ERBook</span>::<span style="color:#036;font-weight:bold">Document</span>::<span style="color:#036;font-weight:bold">Template</span></code> classes.</p>
|
2336
|
+
</li>
|
2337
|
+
</ul></div>
|
2338
|
+
</div> <div class="paragraph">
|
2339
|
+
<a name="New-features"/><div class="nav" id="New-features"><a title="Reverse jump to listing" href="#rev:New-features">≡</a><a title="Jump to previous segment" href="#Incompatible-changes">△</a><a title="Jump to next segment" href="#Bug-fixes">▽</a><a title="Jump to this segment" href="#New-features">◎</a></div>
|
2340
|
+
<p class="title">New features</p>
|
2341
|
+
<div class="content"><ul>
|
2342
|
+
<li>
|
2343
|
+
<p>Addded navigation menus beside every segment in the user manual. These menus allow you to jump to the next/previous segment, whereas previously you always had to go back to the table of contents and select a new segment.</p>
|
2344
|
+
</li>
|
2345
|
+
|
2346
|
+
<li>
|
2347
|
+
<p>A star is drawn beside a reverse jump target in the table of contents, so the user can continue where they left off.</p>
|
2348
|
+
</li>
|
2349
|
+
|
2350
|
+
<li>
|
2351
|
+
<p>Added “inline” node definition parameter (see <a class="xref" href="#SpecFile.nodes">Section 3.2.1. Node definition</a>).</p>
|
2352
|
+
</li>
|
2353
|
+
|
2354
|
+
<li>
|
2355
|
+
<p>Added <code class="code"><span style="color:#d70;font-weight:bold">$subtitle</span></code> parameter to XHTML format.</p>
|
2356
|
+
</li>
|
2357
|
+
|
2358
|
+
<li>
|
2359
|
+
<p>Document parameters for the XHTML format, such as <code class="code"><span style="color:#d70;font-weight:bold">$title</span></code>, can now be disabled by setting them to <code class="code"><span style="color:#038;font-weight:bold">nil</span></code>.</p>
|
2360
|
+
</li>
|
2361
|
+
|
2362
|
+
<li>
|
2363
|
+
<p>Relative file paths can now be specified in <%#include#%> directives.</p>
|
2364
|
+
</li>
|
2365
|
+
|
2366
|
+
<li>
|
2367
|
+
<p>Added a “node” node (see <a class="xref" href="#xhtml.nodes.node">Section 5.1.4.2.1. node</a>), which serves as a pass-through container, in the XHTML format.</p>
|
2368
|
+
</li>
|
2369
|
+
|
2370
|
+
<li>
|
2371
|
+
<p>Allow user to type <code class="code"><pre></code> blocks on single lines without affecting the display of their content.</p>
|
2372
|
+
</li>
|
2373
|
+
|
2374
|
+
<li>
|
2375
|
+
<p>Initial newline in the body of <code class="code"><code></code> is now stripped. This allows users to write their code blocks normally:</p>
|
2376
|
+
|
2377
|
+
<p><code><br /> foo<br /> bar<br /> </code><br /></p>
|
2378
|
+
|
2379
|
+
<p>Instead of abnormally to avoid an extra leading newline:</p>
|
2380
|
+
|
2381
|
+
<p><code>foo<br /> bar<br /> </code><br /></p>
|
2382
|
+
</li>
|
2383
|
+
|
2384
|
+
<li>
|
2385
|
+
<p>Paragraph nodes are now included in the table of contents.</p>
|
2386
|
+
</li>
|
2387
|
+
</ul></div>
|
2388
|
+
</div> <div class="paragraph">
|
2389
|
+
<a name="Bug-fixes"/><div class="nav" id="Bug-fixes"><a title="Reverse jump to listing" href="#rev:Bug-fixes">≡</a><a title="Jump to previous segment" href="#New-features">△</a><a title="Jump to next segment" href="#Housekeeping">▽</a><a title="Jump to this segment" href="#Bug-fixes">◎</a></div>
|
2390
|
+
<p class="title">Bug fixes</p>
|
2391
|
+
<div class="content"><ul>
|
2392
|
+
<li>
|
2393
|
+
<p>Input to unindentation algorithm was being partially unindented beforehand by the logic that silences code-only eRuby directives. This corrupted the unindentation algorithm’s output in some cases.</p>
|
2394
|
+
</li>
|
2395
|
+
|
2396
|
+
<li>
|
2397
|
+
<p><code class="code"><pre></code> blocks now expand to fit their content in the XHTML format. No more scrollbars!</p>
|
2398
|
+
</li>
|
2399
|
+
|
2400
|
+
<li>
|
2401
|
+
<p><code class="code"><a/></code> without href was treated as external hyperlink.</p>
|
2402
|
+
</li>
|
2403
|
+
</ul></div>
|
2404
|
+
</div> <div class="paragraph">
|
2405
|
+
<a name="Housekeeping"/><div class="nav" id="Housekeeping"><a title="Reverse jump to listing" href="#rev:Housekeeping">≡</a><a title="Jump to previous segment" href="#Bug-fixes">△</a>▽<a title="Jump to this segment" href="#Housekeeping">◎</a></div>
|
2406
|
+
<p class="title">Housekeeping</p>
|
2407
|
+
<div class="content"><ul>
|
2408
|
+
<li>
|
2409
|
+
<p>Revised the project logo to emphasize the owl mascot.</p>
|
2410
|
+
</li>
|
2411
|
+
|
2412
|
+
<li>
|
2413
|
+
<p>Replaced dull MediaWiki hyperlink colors with more lively colors in XHTML format.</p>
|
2414
|
+
</li>
|
2415
|
+
|
2416
|
+
<li>
|
2417
|
+
<p>Wrote more API documentation and use <a href='http://snk.tuxfamily.org/lib/inochi'>Inochi</a> to simplify project maintenance.</p>
|
2418
|
+
</li>
|
2419
|
+
</ul></div>
|
2420
|
+
</div></p></div>
|
2421
|
+
</div></p></p></div>
|
2232
2422
|
</div></div>
|
2233
2423
|
|
2234
2424
|
<div id="bib">
|
2235
|
-
<
|
2425
|
+
<a name="References"/><div class="nav" id="References"><a title="Reverse jump to listing" href="#rev:References">≡</a>△▽<a title="Jump to this segment" href="#References">◎</a></div>
|
2426
|
+
<h1 class="title" >References</h1>
|
2236
2427
|
<ol>
|
2237
2428
|
<li id="KDE.admonitions"><p>L. Watts, “Admonitions: Tips, hints, and Warnings”, in <em>The KDE DocBook Authors guide</em>, Chapter 13, [Online document], 22 September 2004 (Revision 1.00.00), [cited 8 December 2007], Available at <a href='http://l10n.kde.org/docs/markup/tips-hints-etc.html'>http://l10n.kde.org/docs/markup/tips-hints-etc.html</a></p></li>
|
2238
2429
|
<li id="xhtml.nodes.reference.example"><p>This is how a <strong>reference</strong> node appears.</p></li>
|
@@ -2246,7 +2437,7 @@ string.
|
|
2246
2437
|
|
2247
2438
|
<div id="footer">
|
2248
2439
|
|
2249
|
-
Generated by <a href="http://snk.tuxfamily.org/lib/erbook">
|
2440
|
+
Generated by <a href="http://snk.tuxfamily.org/lib/erbook/">ERBook 6.0.0</a> on Mon Jan 19 04:46:04 -0800 2009.
|
2250
2441
|
|
2251
2442
|
<div id="footer-credits">
|
2252
2443
|
<p>
|
@@ -2273,5 +2464,6 @@ string.
|
|
2273
2464
|
|
2274
2465
|
</div>
|
2275
2466
|
|
2467
|
+
</div>
|
2276
2468
|
</body>
|
2277
2469
|
</html>
|