rabbit 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. data/Gemfile +0 -1
  2. data/doc/_layouts/en.html +1 -1
  3. data/doc/_layouts/ja.html +1 -1
  4. data/doc/en/news.rd +10 -0
  5. data/doc/index.html.en +1 -1
  6. data/doc/index.html.ja +1 -1
  7. data/doc/ja/news.rd +10 -0
  8. data/lib/rabbit/rabbit.rb +1 -1
  9. metadata +15 -139
  10. data/doc/_site/css/jquery-ui/themes/ui-lightness.css +0 -573
  11. data/doc/_site/css/rabbit.css +0 -287
  12. data/doc/_site/en/development.html +0 -140
  13. data/doc/_site/en/faq.html +0 -117
  14. data/doc/_site/en/hiki.html +0 -420
  15. data/doc/_site/en/how-to-make/hiki.html +0 -113
  16. data/doc/_site/en/how-to-make/index.html +0 -135
  17. data/doc/_site/en/how-to-make/pdf.html +0 -111
  18. data/doc/_site/en/how-to-make/rd.html +0 -151
  19. data/doc/_site/en/how-to-make/theme.html +0 -249
  20. data/doc/_site/en/index.html +0 -343
  21. data/doc/_site/en/install/homebrew.html +0 -273
  22. data/doc/_site/en/install/index.html +0 -146
  23. data/doc/_site/en/install/macports.html +0 -158
  24. data/doc/_site/en/install/windows.html +0 -200
  25. data/doc/_site/en/news.html +0 -1039
  26. data/doc/_site/en/rd.html +0 -555
  27. data/doc/_site/en/sample/hiki/rabbit.html +0 -380
  28. data/doc/_site/en/sample/index.html +0 -117
  29. data/doc/_site/en/sample/rd/rabbit.html +0 -572
  30. data/doc/_site/en/slides.html +0 -113
  31. data/doc/_site/en/usage.html +0 -445
  32. data/doc/_site/en/users.html +0 -127
  33. data/doc/_site/favicon.ico +0 -0
  34. data/doc/_site/favicon.png +0 -0
  35. data/doc/_site/images/background-sample.svg +0 -290
  36. data/doc/_site/images/background.png +0 -0
  37. data/doc/_site/images/background.svg +0 -131
  38. data/doc/_site/images/hare-and-tortoise.png +0 -0
  39. data/doc/_site/images/hare-and-tortoise.svg +0 -541
  40. data/doc/_site/images/jp.png +0 -0
  41. data/doc/_site/images/lavie-icon.png +0 -0
  42. data/doc/_site/images/lavie.png +0 -0
  43. data/doc/_site/images/screenshots/en/blue-circle-raw.png +0 -0
  44. data/doc/_site/images/screenshots/en/blue-circle.png +0 -0
  45. data/doc/_site/images/screenshots/en/clear-blue-raw.png +0 -0
  46. data/doc/_site/images/screenshots/en/clear-blue.png +0 -0
  47. data/doc/_site/images/screenshots/en/cozmixng-raw.png +0 -0
  48. data/doc/_site/images/screenshots/en/cozmixng.png +0 -0
  49. data/doc/_site/images/screenshots/en/dark-gradation-raw.png +0 -0
  50. data/doc/_site/images/screenshots/en/dark-gradation.png +0 -0
  51. data/doc/_site/images/screenshots/en/day-white-raw.png +0 -0
  52. data/doc/_site/images/screenshots/en/day-white.png +0 -0
  53. data/doc/_site/images/screenshots/en/debian-raw.png +0 -0
  54. data/doc/_site/images/screenshots/en/debian.png +0 -0
  55. data/doc/_site/images/screenshots/en/green-circle-raw.png +0 -0
  56. data/doc/_site/images/screenshots/en/green-circle.png +0 -0
  57. data/doc/_site/images/screenshots/en/night-black-raw.png +0 -0
  58. data/doc/_site/images/screenshots/en/night-black.png +0 -0
  59. data/doc/_site/images/screenshots/en/rabbit-raw.png +0 -0
  60. data/doc/_site/images/screenshots/en/rabbit.png +0 -0
  61. data/doc/_site/images/screenshots/en/ranguba-raw.png +0 -0
  62. data/doc/_site/images/screenshots/en/ranguba.png +0 -0
  63. data/doc/_site/images/screenshots/en/red-frame-raw.png +0 -0
  64. data/doc/_site/images/screenshots/en/red-frame.png +0 -0
  65. data/doc/_site/images/screenshots/en/ruby-gnome2-raw.png +0 -0
  66. data/doc/_site/images/screenshots/en/ruby-gnome2.png +0 -0
  67. data/doc/_site/images/screenshots/ja/blue-circle-raw.png +0 -0
  68. data/doc/_site/images/screenshots/ja/blue-circle.png +0 -0
  69. data/doc/_site/images/screenshots/ja/clear-blue-raw.png +0 -0
  70. data/doc/_site/images/screenshots/ja/clear-blue.png +0 -0
  71. data/doc/_site/images/screenshots/ja/cozmixng-raw.png +0 -0
  72. data/doc/_site/images/screenshots/ja/cozmixng.png +0 -0
  73. data/doc/_site/images/screenshots/ja/dark-gradation-raw.png +0 -0
  74. data/doc/_site/images/screenshots/ja/dark-gradation.png +0 -0
  75. data/doc/_site/images/screenshots/ja/day-white-raw.png +0 -0
  76. data/doc/_site/images/screenshots/ja/day-white.png +0 -0
  77. data/doc/_site/images/screenshots/ja/debian-raw.png +0 -0
  78. data/doc/_site/images/screenshots/ja/debian.png +0 -0
  79. data/doc/_site/images/screenshots/ja/green-circle-raw.png +0 -0
  80. data/doc/_site/images/screenshots/ja/green-circle.png +0 -0
  81. data/doc/_site/images/screenshots/ja/night-black-raw.png +0 -0
  82. data/doc/_site/images/screenshots/ja/night-black.png +0 -0
  83. data/doc/_site/images/screenshots/ja/rabbit-raw.png +0 -0
  84. data/doc/_site/images/screenshots/ja/rabbit.png +0 -0
  85. data/doc/_site/images/screenshots/ja/ranguba-raw.png +0 -0
  86. data/doc/_site/images/screenshots/ja/ranguba.png +0 -0
  87. data/doc/_site/images/screenshots/ja/red-frame-raw.png +0 -0
  88. data/doc/_site/images/screenshots/ja/red-frame.png +0 -0
  89. data/doc/_site/images/screenshots/ja/ruby-gnome2-raw.png +0 -0
  90. data/doc/_site/images/screenshots/ja/ruby-gnome2.png +0 -0
  91. data/doc/_site/images/us.png +0 -0
  92. data/doc/_site/index.html.en +0 -128
  93. data/doc/_site/index.html.ja +0 -128
  94. data/doc/_site/ja/about.html +0 -120
  95. data/doc/_site/ja/development.html +0 -141
  96. data/doc/_site/ja/faq.html +0 -243
  97. data/doc/_site/ja/hiki.html +0 -416
  98. data/doc/_site/ja/how-to-make/hiki.html +0 -113
  99. data/doc/_site/ja/how-to-make/index.html +0 -135
  100. data/doc/_site/ja/how-to-make/pdf.html +0 -112
  101. data/doc/_site/ja/how-to-make/rd.html +0 -161
  102. data/doc/_site/ja/how-to-make/theme.html +0 -254
  103. data/doc/_site/ja/index.html +0 -351
  104. data/doc/_site/ja/install/homebrew.html +0 -273
  105. data/doc/_site/ja/install/index.html +0 -148
  106. data/doc/_site/ja/install/macports.html +0 -174
  107. data/doc/_site/ja/install/windows.html +0 -200
  108. data/doc/_site/ja/news.html +0 -1030
  109. data/doc/_site/ja/rd.html +0 -565
  110. data/doc/_site/ja/sample/hiki/rabbit.html +0 -390
  111. data/doc/_site/ja/sample/index.html +0 -117
  112. data/doc/_site/ja/sample/rd/rabbit.html +0 -580
  113. data/doc/_site/ja/slides.html +0 -142
  114. data/doc/_site/ja/usage.html +0 -449
  115. data/doc/_site/ja/users.html +0 -331
  116. data/doc/_site/javascripts/jquery-ui.js +0 -11544
  117. data/doc/_site/javascripts/jquery.js +0 -7179
  118. data/doc/_site/screenshot.en.rab +0 -10
  119. data/doc/_site/screenshot.ja.rab +0 -10
@@ -1,555 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <title>Rabbit - RD</title>
6
- <link rel="shortcut icon" href="/favicon.ico"
7
- type="image/vnd.microsfot.icon">
8
- <link rel="icon" href="/favicon.png" type="image/png">
9
- <link rel="stylesheet" href="/css/jquery-ui/themes/ui-lightness.css"
10
- type="text/css">
11
- <link rel="stylesheet" href="/css/rabbit.css" type="text/css">
12
- <meta property="fb:page_id" content="rabbit.shockers">
13
- <meta property="fb:admins" content="kouhei.sutou">
14
- <meta property="og:type" content="product">
15
- <meta property="og:image"
16
- content="http://rabbit-shockers.org/images/lavie.png">
17
- <meta property="og:site_name" content="Rabbit">
18
- <script type="text/javascript" src="/javascripts/jquery.js"></script>
19
- <script type="text/javascript" src="/javascripts/jquery-ui.js"></script>
20
- <!--[if lt IE 9]>
21
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
22
- <![endif]-->
23
- </head>
24
- <body>
25
- <header id="header">
26
- <h1 class="title">
27
- <a href="/">
28
- <span class="project">Rabbit</span>
29
- <span class="separator">-</span>
30
- <span class="description">RD</span>
31
- </a>
32
- </h1>
33
- <div class="facebook-buttons">
34
- <fb:like href="http://www.facebook.com/pages/Rabbit/202603309766491"
35
- layout="standard"></fb:like>
36
- </div>
37
- <pre id="install" class="command">gem install rabbit</pre>
38
- <div class="other-language-links">
39
- <ul>
40
-
41
-
42
-
43
- <li><a href="/ja/rd.html" alt="日本語" title="日本語"><img src="/images/jp.png"></a></li>
44
-
45
- </ul>
46
- </div>
47
- </header>
48
-
49
- <nav class="menu">
50
- <ul>
51
- <li><a href="/en/">README</a></li>
52
- <li><a href="/en/install/">Install</a></li>
53
- <li><a href="/en/usage.html">Usage</a></li>
54
- <li><a href="/en/how-to-make/">How to make</a></li>
55
- <li><a href="/en/users.html">Shockers</a></li>
56
- <li><a href="/en/development.html">Development</a></li>
57
- </ul>
58
- </nav>
59
-
60
-
61
- <div id="body">
62
- <div id="main">
63
- <section class="contents">
64
- <h2><a name="label-0" id="label-0">What is RD?</a></h2><!-- RDLabel: "What is RD?" -->
65
- <p>RD is Ruby's POD, embeddable documentation format in script file. </p>
66
- <p>RD is influenced mainly from plain2, a program to translate from plain text to
67
- some mark-up language. So, RD looks like plain text, and its simpleness and
68
- neatness make it easy to read and write.</p>
69
- <h2><a name="label-1" id="label-1">How does the interpreter work for RD?</a></h2><!-- RDLabel: "How does the interpreter work for RD?" -->
70
- <p>Ruby's interpreter, <code>ruby</code>, simply ignores text between a line beginning
71
- with "<code>=begin</code>" and one beginning with "<code>=end</code>". So, RD is not only
72
- embeddable. You can write anything between <code>=begin</code> and <code>=end</code>. RD is
73
- one of them, but RD will be a standard one.<a name="footmark-1" id="footmark-1" href="#foottext-1"><sup><small>*1</small></sup></a></p>
74
- <h2><a name="label-2" id="label-2">Concepts and Syntax</a></h2><!-- RDLabel: "Concepts and Syntax" -->
75
- <h3><a name="label-3" id="label-3">Element, Block and Inline</a></h3><!-- RDLabel: "Element, Block and Inline" -->
76
- <p>We will use the term "Element" for features of RD which add information
77
- of document structure to text. In addition, we use a term
78
- "<a href="#label-4">Block</a>" for Elements for large and global structures, and a term
79
- "<a href="#label-34">Inline</a>" for ones for small and local decorations.</p>
80
- <p>Paragraph, headline or list is a kind of Block. RD uses indentation and
81
- special characters to describe Blocks. You can also write complicated
82
- structure to nested Blocks. And this style of Block looks naturally like
83
- plain text format. See <a href="#label-4">Block</a> for details.</p>
84
- <p>Emphasis, code or reference is a kind of Inline. Parentheses and special
85
- characters, like ((? ... ?)), are used for Inline. Almost all
86
- Inline may be nested inside each other. See <a href="#label-34">Inline</a> for more details.</p>
87
- <h3><a name="label-4" id="label-4">Block</a></h3><!-- RDLabel: "Block" -->
88
- <h4><a name="label-5" id="label-5">Basic Syntax</a></h4><!-- RDLabel: "Basic Syntax" -->
89
- <p>Block has line oriented syntax. i.e. each character on the same line belongs to the
90
- same Block. And the indentation of the line represents nesting level and type of Block.
91
- The first character of the line represents the type of Block.</p>
92
- <h5><a name="label-6" id="label-6">Concepts and Terms</a></h5><!-- RDLabel: "Concepts and Terms" -->
93
- <dl>
94
- <dt><a name="label-7" id="label-7">Baseline</a></dt><!-- RDLabel: "Baseline" -->
95
- <dd>
96
- Baseline is standard depth of indent. Relative depth between indent of one
97
- line and Baseline affects its Block-type.
98
- </dd>
99
- <dt><a name="label-8" id="label-8">Head Char</a></dt><!-- RDLabel: "Head Char" -->
100
- <dd>
101
- Head Char is the first character of line, except whitespace.
102
- </dd>
103
- <dt><a name="label-9" id="label-9">STRINGLINE</a></dt><!-- RDLabel: "STRINGLINE" -->
104
- <dd>
105
- STRINGLINE is line which consists of strings.
106
- STRINGLINE doesn't have "<code>*</code>", "<code>(<var>num</var>)</code>", "<code>:</code>", "<code>=</code>"
107
- nor "<code>+</code>" as Head Char. But if the line is indented, "<code>=</code>" and "<code>+</code>"
108
- can be Head Char.
109
- </dd>
110
- <dt><a name="label-10" id="label-10">WHITELINE</a></dt><!-- RDLabel: "WHITELINE" -->
111
- <dd>
112
- WHITELINE is a line which consists of whitespace, "<code>\s</code>", "<code>\t</code>" and
113
- "<code>\n</code>".
114
- </dd>
115
- <dt><a name="label-11" id="label-11">Comment</a></dt><!-- RDLabel: "Comment" -->
116
- <dd>
117
- A line which is matched with <code>/^#/</code> is regarded as a comment.
118
- </dd>
119
- </dl>
120
- <h5><a name="label-12" id="label-12">How Baseline is defined and how it works</a></h5><!-- RDLabel: "How Baseline is defined and how it works" -->
121
- <p>At the top level, Baseline is at left end, i.e., indent is 0. In List,
122
- Baseline is defined by first Block of ListItem. For example,</p>
123
- <pre>Example: "|" means Baseline
124
- |Regard this line as one of TextBlock's in top level.
125
- |&lt;- So this Baseline is at the left-most position.
126
- *|it is in List. (1)
127
- |&lt;- this Baseline is defined by the marked with a (1).
128
- * |Different Item of List can have different Baseline inside.
129
- |&lt;- So this Baseline differs from one of this list's first item.</pre>
130
- <p>|Regard this line as one of TextBlock's in top level.
131
- |&lt;- So this Baseline is at the left-most position.</p>
132
- <ul>
133
- <li>|it is in List. (1)
134
- |&lt;- this Baseline is defined by the marked with a (1).</li>
135
- <li>|Different Items in Lists can have different Baselines inside.
136
- |&lt;- So this Baseline differs from the one of this list's first item.</li>
137
- </ul>
138
- <p>If one Block is nested in another Block, the Baseline of the inside Blocks is deeper
139
- than the Baseline of outside Blocks.</p>
140
- <p>The relative position between Baseline and indent affects the type of Block.
141
- If a <a href="#label-9">STRINGLINE</a> has same indent with Baseline, it belongs to
142
- <a href="#label-19">TextBlock</a>, otherwise, i.e. it has deeper indent than Baseline,
143
- it belongs to <a href="#label-20">Verbatim</a>.</p>
144
- <h4><a name="label-13" id="label-13">Types of Block</a></h4><!-- RDLabel: "Types of Block" -->
145
- <h5><a name="label-14" id="label-14">Headline</a></h5><!-- RDLabel: "Headline" -->
146
- <p>Headline consists of a line which <a href="#label-8">Head Char</a> is "<code>=</code>" or
147
- "<code>+</code>". And Headline can't include more than one line. Headline can
148
- be on only top level.</p>
149
- <pre>Example:
150
- |&lt;- Regard this as top level Baseline.
151
- = Headline 1.
152
- === Headline 1.1.1.
153
- + Headline 1.1.1.1.1.</pre>
154
- <h1><a name="label-15" id="label-15">Headline 1.</a></h1><!-- RDLabel: "Headline 1." -->
155
- <h3><a name="label-16" id="label-16">Headline 1.1.1.</a></h3><!-- RDLabel: "Headline 1.1.1." -->
156
- <h5><a name="label-17" id="label-17">Headline 1.1.1.1.1.</a></h5><!-- RDLabel: "Headline 1.1.1.1.1." -->
157
- <p>Headline Mark represents level of Headline. See following figure. first
158
- Mark is biggest one, and last Mark has two parts.</p>
159
- <pre>Fig: Headline Marks
160
- =
161
- ==
162
- ===
163
- ====
164
- +
165
- ++</pre>
166
- <p>Text which follows Mark is title of Headline. It is also used as Label of
167
- <a href="#label-45">Reference</a>.</p>
168
- <p>Title of Headline can contain <a href="#label-34">Inline</a>s except for <a href="#label-45">Reference</a> and
169
- Footnote.</p>
170
- <h5><a name="label-18" id="label-18">Include</a></h5><!-- RDLabel: "Include" -->
171
- <p>Include is a line that line head "<code>&lt;&lt;&lt;</code>" and included file name.
172
- You can input from other file text, both RD and target format, with Include.</p>
173
- <p>When you include RD file, included file name have to have ".rd" or ".rb" as
174
- suffix, like "foo.rd", and write full name (not full path) of file after
175
- "<code>&lt;&lt;&lt;</code>". For example,</p>
176
- <pre>&lt;&lt;&lt; foo.rd</pre>
177
- <p>When you include target format file, include file name have to have suffix
178
- of target format standard one, for example ".html" in the case of outputting
179
- HTML, ".texi" in the case of outputting Texinfo, and write base name of file
180
- after "<code>&lt;&lt;&lt;</code>". For example,</p>
181
- <pre>&lt;&lt;&lt; foo</pre>
182
- <p>RD formatter include "foo.html" to output HTML, and include "foo.texi" to
183
- output Texinfo. If you want to use Include for target format, you should
184
- prepare plural type of included file. </p>
185
- <h5><a name="label-19" id="label-19">TextBlock</a></h5><!-- RDLabel: "TextBlock" -->
186
- <p>TextBlock is composed of <a href="#label-9">STRINGLINE</a>s, but the <a href="#label-9">STRINGLINE</a>s
187
- must have same indent with <a href="#label-7">Baseline</a>. If its indent is deeper
188
- than <a href="#label-7">Baseline</a>, the <a href="#label-9">STRINGLINE</a> belongs to <a href="#label-20">Verbatim</a>.</p>
189
- <p>TextBlock can include <a href="#label-34">Inline</a> inside.</p>
190
- <pre>Example:
191
- |
192
- This is TextBlock.
193
- Second line of same TextBlock.
194
- This line is not TextBlock, but Verbatim.
195
- * And this line is List. (But this line is exactly TextBlock in ListItem.)</pre>
196
- <p>And this example is formatted such like:</p>
197
- <p>This is TextBlock.
198
- Second line of same TextBlock.</p>
199
- <pre>This line is not TextBlock, but Verbatim.</pre>
200
- <ul>
201
- <li>And this line is List. (But this line is exactly TextBlock in ListItem.)</li>
202
- </ul>
203
- <h5><a name="label-20" id="label-20">Verbatim</a></h5><!-- RDLabel: "Verbatim" -->
204
- <p>You can use Verbatim to cite Ruby script. Verbatim is composed of
205
- <a href="#label-9">STRINGLINE</a>s, and they must be indented deeper than
206
- <a href="#label-7">Baseline</a>. Verbatim can also include a line whose <a href="#label-8">Head Char</a> is
207
- "<code>*</code>", "<code>(1)</code>" and "<code>:</code>", But it can't be first line of
208
- Verbatim, it is regarded as <a href="#label-21">List</a>. Verbatim can't include a line
209
- which is indented shallower than first line. Verbatim can include
210
- <a href="#label-10">WHITELINE</a>.</p>
211
- <p>You can't use <a href="#label-34">Inline</a> in Verbatim.</p>
212
- <pre>Example:
213
- This is Verbatim.
214
- Even if a line is indented deeper than first line, it is also in same
215
- Verbatim.
216
- * A line seems like list is also included in Verbatim.
217
- But if the line is indented shallower, it is not in same Verbatim.
218
- It is in other Verbatim.</pre>
219
- <p>And this example is formatted such like:</p>
220
- <pre>This is Verbatim.
221
- Even if a line is indented deeper than first line, it is also in same
222
- Verbatim.
223
- * A line seems like list is also included in Verbatim.</pre>
224
- <pre>But if the line is indented shallower, it is not in same Verbatim.
225
- It is in other Verbatim.</pre>
226
- <h5><a name="label-21" id="label-21">List</a></h5><!-- RDLabel: "List" -->
227
- <p>List is special <a href="#label-4">Block</a>. List is composed of ListItems, and
228
- ListItem is composed of Blocks. So List can include Blocks inside,
229
- even also List itself.<a name="footmark-2" id="footmark-2" href="#foottext-2"><sup><small>*2</small></sup></a></p>
230
- <p>ListItem can include <a href="#label-10">WHITELINE</a>, and <a href="#label-19">TextBlock</a> can't
231
- include WHITELINE, so when you want to write 2 TextBlock inside
232
- ListItem, put a WHITELINE between TextBlocks.</p>
233
- <p>There is 3 type of List, "<a href="#label-22">ItemList</a>", "<a href="#label-23">EnumList</a>",
234
- "<a href="#label-24">DescList</a>" and "<a href="#label-27">MethodList</a>.</p>
235
- <h6><a name="label-22" id="label-22">ItemList</a></h6><!-- RDLabel: "ItemList" -->
236
- <p>ItemList is simple and not numbered List. ItemListItem begins by a line
237
- whose <a href="#label-8">Head Char</a> is "<code>*</code>", and first Block of ItemListItem must be
238
- <a href="#label-19">TextBlock</a>.</p>
239
- <pre>Example:
240
- * first item of parent list
241
- * first item of sub list
242
- * second item of sub list
243
- text block ( line of first item of parent list)</pre>
244
- <p>And this example is formatted such like:</p>
245
- <ul>
246
- <li><p>first item of parent list</p>
247
- <ul>
248
- <li>first item of sub list</li>
249
- <li>second item of sub list</li>
250
- </ul>
251
- <p>text block ( line of first item of parent list)</p></li>
252
- </ul>
253
- <h6><a name="label-23" id="label-23">EnumList</a></h6><!-- RDLabel: "EnumList" -->
254
- <p>EnumList is numbered List. EnumListItem starts with a line whose
255
- <a href="#label-8">Head Char</a> is "<code>(<var>num</var>)</code>"(<var>num</var> is integer). EnumList
256
- is same as <a href="#label-22">ItemList</a> on other points.</p>
257
- <pre>Example:
258
- (1) first line of parent list
259
- * first line of sub list(ItemList)
260
- (2) second list of parent list
261
- (10) number is ignored...</pre>
262
- <p>And this example is formatted such like:</p>
263
- <ol>
264
- <li>first line of parent list
265
- <ul>
266
- <li>first line of sub list(ItemList)</li>
267
- </ul></li>
268
- <li>second list of parent list</li>
269
- <li>number is ignored...</li>
270
- </ol>
271
- <h6><a name="label-24" id="label-24">DescList</a></h6><!-- RDLabel: "DescList" -->
272
- <p>DescList is List for descriptions. DescListItem has 2 part. One is Term part,
273
- the other is Description part. Term of DescListItem is also used as Label
274
- for <a href="#label-45">Reference</a>.</p>
275
- <p>Term part is composed of a line whose <a href="#label-8">Head Char</a> is "<code>:</code>",
276
- and Term part is same as <a href="#label-14">Headline</a>, except that a line of Term
277
- part can be indented.</p>
278
- <p>Description part is starts with next line of Term part. <a href="#label-7">Baseline</a> of
279
- Description part must be same or deeper than term of Term part of its pair.
280
- For example, following style is illegal.</p>
281
- <pre>Example:
282
- : |Term
283
- |Description.</pre>
284
- <p>Description part can include <a href="#label-4">Block</a>s. <a href="#label-21">List</a> can be first
285
- Block of Description part. Term part can contain <a href="#label-34">Inline</a>s except
286
- for <a href="#label-45">Reference</a> and <!-- Reference, RDLabel "Footnote" doesn't exist --><em class="label-not-found">Footnote</em><!-- Reference end -->.</p>
287
- <pre>Example:
288
- :Term
289
- first line of Description
290
- second line of Description
291
- :Term2
292
- * also include List
293
- * ...</pre>
294
- <p>And this example is formatted such like:</p>
295
- <dl>
296
- <dt><a name="label-25" id="label-25">Term</a></dt><!-- RDLabel: "Term" -->
297
- <dd>
298
- first line of definition.
299
- second line of definition
300
- </dd>
301
- <dt><a name="label-26" id="label-26">Term2</a></dt><!-- RDLabel: "Term2" -->
302
- <dd>
303
- <ul>
304
- <li>also include list</li>
305
- <li>...</li>
306
- </ul>
307
- </dd>
308
- </dl>
309
- <h6><a name="label-27" id="label-27">MethodList</a></h6><!-- RDLabel: "MethodList" -->
310
- <p>MethodList is the special type of <a href="#label-24">DescList</a> for explanation
311
- methods of your classes. MethodList is similar with <a href="#label-24">DescList</a> in
312
- almost all part, but it is labeled differently. RD formatters know it
313
- is some kind of program code, e.g. method or constants of class in
314
- Ruby or function prototype in C..., which is on Term part of
315
- MethodList. So, MethodList is labeled without the part which seems to
316
- be parameters of methods. See <a href="#label-43">Label and Reference</a> for more
317
- detail.</p>
318
- <p>Each item of MethodList has Term part and Description part like
319
- <a href="#label-24">DescList</a>. And its Term part start with its <a href="#label-8">Head Char</a>,
320
- "<code>---</code>". Its Description part can contain <a href="#label-19">TextBlock</a>,
321
- <a href="#label-20">Verbatim</a> and <a href="#label-21">List</a>. But you shouldn't write MethodList
322
- in any kind of <a href="#label-21">List</a>. RD will come to deny it possibly in
323
- future.</p>
324
- <pre>Example:
325
- --- Array#each {|i| ... } # =&gt; labeled as "Array#each"
326
- yield block for each item.
327
- --- Array#index(val) # =&gt; labeled as "Array#index"
328
- return index of first item which equals with ((|val|)). if it hasn't
329
- same item, return (({nil})).</pre>
330
- <p>And this example is formatted such like:</p>
331
- <dl>
332
- <dt><a name="label-28" id="label-28"><code>Array#each {|<var>i</var>| ... }</code></a></dt><!-- RDLabel: "Array#each" -->
333
- <dd>
334
- yield block for each item.</dd>
335
- <dt><a name="label-29" id="label-29"><code>Array#index(<var>val</var>)</code></a></dt><!-- RDLabel: "Array#index" -->
336
- <dd>
337
- return index of first item which equals with <var>val</var>. if it hasn't
338
- same item, return <code>nil</code>.</dd>
339
- </dl>
340
- <p>Some formatter assumes it is Ruby's methods, constants or etc. which
341
- is in Term part of MethodList. it can format term part of MethodList
342
- intelligently, but you have to write according as specific formula
343
- to make the best of its feature. </p>
344
- <p>Standard Ruby class reference formula is suggested such like: </p>
345
- <dl>
346
- <dt><a name="label-30" id="label-30">instance method</a></dt><!-- RDLabel: "instance method" -->
347
- <dd>
348
- <p>instance method <var>method</var> of class <var>Class</var></p>
349
- <pre>Class#method(its params ...) { parameter block }</pre>
350
- </dd>
351
- <dt><a name="label-31" id="label-31">class method (class singleton method)</a></dt><!-- RDLabel: "class method (class singleton method)" -->
352
- <dd>
353
- <p>class method <var>method</var> of class <var>Class</var></p>
354
- <pre>Class.method(its params ...) { parameter block }</pre>
355
- </dd>
356
- <dt><a name="label-32" id="label-32">class constants</a></dt><!-- RDLabel: "class constants" -->
357
- <dd>
358
- <p>constant <var>Const</var> of class <var>Class</var></p>
359
- <pre>Class::Const</pre>
360
- </dd>
361
- <dt><a name="label-33" id="label-33">functions (private methods on top level)</a></dt><!-- RDLabel: "functions (private methods on top level)" -->
362
- <dd>
363
- <p>function <var>func</var></p>
364
- <pre>function#func(its params ...) { parameter block }</pre>
365
- </dd>
366
- </dl>
367
- <p>Ruby use some symbol characters (e.g. [], []=, +, - or &lt;&lt;) for the names
368
- of methods. ruby, Ruby interpreter, parses them with different manner from
369
- normal methods, but write them as same as others in this formula.</p>
370
- <pre>Example:
371
- --- Array#[](key)
372
- return value which in at index ((|key|)).
373
- --- Array#[]=(key, value)
374
- put ((|value|)) into cell of index ((|key|)).
375
- --- Array#+(other)
376
- return concatenated (({Array})).</pre>
377
- <h3><a name="label-34" id="label-34">Inline</a></h3><!-- RDLabel: "Inline" -->
378
- <p>You can use Inline in <a href="#label-19">TextBlock</a>, <a href="#label-14">Headline</a> and Term part of
379
- <a href="#label-24">DescList</a>. Common style of parentheses is used for Inline. Inline
380
- can nest each other.</p>
381
- <p>in following list of Inlines, preformatted text is on left hand side
382
- and postformatted text is on right hand side.</p>
383
- <dl>
384
- <dt><a name="label-35" id="label-35">((*Em*)) =&gt; <em>Em</em></a></dt><!-- RDLabel: "((*Em*)) => Em" -->
385
- <dd>
386
- Emphasis.
387
- </dd>
388
- <dt><a name="label-36" id="label-36">(({while gets...})) =&gt; <code>while gets...</code></a></dt><!-- RDLabel: "(({while gets...})) => while gets..." -->
389
- <dd>
390
- Code.
391
- </dd>
392
- <dt><a name="label-37" id="label-37">((|var|)) =&gt; <var>var</var></a></dt><!-- RDLabel: "((|var|)) => var" -->
393
- <dd>
394
- Var.<a name="footmark-3" id="footmark-3" href="#foottext-3"><sup><small>*3</small></sup></a>
395
- </dd>
396
- <dt><a name="label-38" id="label-38">((%ruby -v%)) =&gt; <kbd>ruby -v</kbd></a></dt><!-- RDLabel: "((%ruby -v%)) => ruby -v" -->
397
- <dd>
398
- Keyboard.
399
- </dd>
400
- <dt><a name="label-39" id="label-39">((:Term:))</a></dt><!-- RDLabel: "((:Term:))" -->
401
- <dd>
402
- <p>=&gt; <a name="index-0" id="index-0">Term</a></p>
403
- <p>Term of Index.</p>
404
- </dd>
405
- <dt><a name="label-40" id="label-40">((&lt;Identity or URL&gt;))</a></dt><!-- RDLabel: "((<Identity or URL>))" -->
406
- <dd>
407
- <p>=&gt; <!-- Reference, RDLabel "Identity or URL" doesn't exist --><em class="label-not-found">Identity or URL</em><!-- Reference end --></p>
408
- <p>Link, Reference. See <a href="RD">Label and Reference</a> for more detail.</p>
409
- </dd>
410
- <dt><a name="label-41" id="label-41">((-Footnote-))</a></dt><!-- RDLabel: "((-Footnote-))" -->
411
- <dd>
412
- <p>=&gt; <a name="footmark-4" id="footmark-4" href="#foottext-4"><sup><small>*4</small></sup></a></p>
413
- <p>Footnote.</p>
414
- </dd>
415
- <dt><a name="label-42" id="label-42">(('verb')) =&gt; verb</a></dt><!-- RDLabel: "(('verb')) => verb" -->
416
- <dd>
417
- Inline Verbatim.
418
- </dd>
419
- </dl>
420
- <h4><a name="label-43" id="label-43">Label and Reference</a></h4><!-- RDLabel: "Label and Reference" -->
421
- <p>Reference needs Label. In RD, only title of <a href="#label-14">Headline</a> and Term of
422
- <a href="#label-24">DescList</a> and <a href="#label-27">MethodList</a> is regarded as Label. So, you must
423
- choose different titles for different <a href="#label-14">Headline</a>s. This problem
424
- has not resolved yet.</p>
425
- <h5><a name="label-44" id="label-44">How to RD generates Label from Headline, DescList or MethodList</a></h5><!-- RDLabel: "How to RD generates Label from Headline, DescList or MethodList" -->
426
- <p>Title of <a href="#label-14">Headline</a> and Term part of <a href="#label-24">DescList</a> and <a href="#label-27">MethodList</a>
427
- are regarded as Label. But they can contain <a href="#label-34">Inline</a>s, so the situation
428
- isn't so simple.</p>
429
- <p>First, <a href="#label-27">MethodList</a> is special in the part of Labeling. Term part of
430
- <a href="#label-27">MethodList</a> can't contain <a href="#label-34">Inline</a>s, and RD assumes it is method
431
- reference or such thing which is in Term part of <a href="#label-27">MethodList</a>. So
432
- it is Labeled under following rules.</p>
433
- <ol>
434
- <li>It is regarded as Label which is before a character of "<code>(</code>" or
435
- "<code>{</code>".<a name="footmark-5" id="footmark-5" href="#foottext-5"><sup><small>*5</small></sup></a></li>
436
- </ol>
437
- <p>Following example will help you to understand how this rule works. the Label
438
- which is generated from the term part of <a href="#label-27">MethodList</a> is after mark of
439
- "<code># =&gt;</code>".</p>
440
- <pre>Example:
441
- --- Array.new([size[, val]]) # =&gt; Array.new
442
- --- Array#[]=(key, val) # =&gt; Array#[]=
443
- --- Array#each { ... } # =&gt; Array#each
444
- --- void rb_define_method(VALUE class, ...) # =&gt; void rb_define_method</pre>
445
- <p>Second, in the case of title of <a href="#label-14">Headline</a> or term part of <a href="#label-24">DescList</a>,
446
- there is not such a special rule. But you can use <a href="#label-34">Inline</a>s for text on
447
- them, so there are rules to strip <a href="#label-34">Inline</a> mark-ups from text.</p>
448
- <ol>
449
- <li><p>Any <a href="#label-34">Inline</a> mark-ups makes any difference to Label. So, both</p>
450
- <pre>= ((*Headline*))</pre>
451
- <p>and</p>
452
- <pre>= Headline</pre>
453
- <p>are Labeled as "Headline".</p></li>
454
- <li><p>But white spaces which is after open parenthesis and before close
455
- parenthesis of <a href="#label-34">Inline</a> are striped when RD generates Label from
456
- it. So, both</p>
457
- <pre>= ((* Headline *))</pre>
458
- <p>and</p>
459
- <pre>= ((*Headline*))</pre>
460
- <p>are Labeled as "Headline".</p></li>
461
- </ol>
462
- <h5><a name="label-45" id="label-45">Reference</a></h5><!-- RDLabel: "Reference" -->
463
- <p>You can refer Labeled element with Reference which is a kind of <a href="#label-34">Inline</a>
464
- marked up with ((&lt;...&gt;)).</p>
465
- <p>Most simple use of Reference is to write Label inside parenthesis.</p>
466
- <pre>((&lt;Label&gt;))</pre>
467
- <p>This works as reference to Label of "Label" and text "Label" is used
468
- also for display such like: <!-- Reference, RDLabel "Label" doesn't exist --><em class="label-not-found">Label</em><!-- Reference end -->.<a name="footmark-6" id="footmark-6" href="#foottext-6"><sup><small>*6</small></sup></a></p>
469
- <p>When you want to refer a resource pointed with URL, write such like:</p>
470
- <pre>((&lt;URL:http://www.ruby-lang.org/en/raa.html&gt;))</pre>
471
- <p>RD formatter will format it as hyper-link to its URL if possible
472
- such like:<a href="http://www.ruby-lang.org/en/raa.html">&lt;URL:http://www.ruby-lang.org/en/raa.html&gt;</a>.</p>
473
- <p>When you want to use other text than Label for display, write such like:</p>
474
- <pre>((&lt;Text for display|Label&gt;))</pre>
475
- <p>"Text for display" is used for display and "Label" is used as Label to
476
- refer such like: <!-- Reference, RDLabel "Label" doesn't exist --><em class="label-not-found">Text for display</em><!-- Reference end --></p>
477
- <p>Text for display can contain some <a href="#label-34">Inline</a>, except for Footnotes and
478
- Reference.</p>
479
- <p>In Reference, "|" and "/" are syntax keywords. So if you will write them
480
- inside Reference, you have to double-quote the part it's inside, such like:</p>
481
- <pre>((&lt;"Bar | inside display text"|Label&gt;))</pre>
482
- <p><!-- Reference, RDLabel "Label" doesn't exist --><em class="label-not-found">Bar | inside display text</em><!-- Reference end --></p>
483
- <p>The situations are same whether you will write them inside Substitution
484
- part, Filename part and Label part.</p>
485
- <p>Of course, you can use the text for the display for Reference to URL resource.</p>
486
- <pre>((&lt;Ruby Application Archive|URL:http://www.ruby-lang.org/en/raa.html&gt;))</pre>
487
- <p><a href="http://www.ruby-lang.org/en/raa.html">Ruby Application Archive</a></p>
488
- <p>When the text for the display is omitted, you can use <a href="#label-34">Inline</a> for Label.</p>
489
- <pre>((&lt;((*Label*))&gt;))</pre>
490
- <p><!-- Reference, RDLabel "Label" doesn't exist --><em class="label-not-found"><em>Label</em></em><!-- Reference end --></p>
491
- </section>
492
- <section class="footnotes">
493
- <h2>Footnotes</h2>
494
-
495
- <p class="foottext">
496
- <a name="foottext-1" id="foottext-1" href="#footmark-1"><sup><small>*1</small></sup></a><small> If you are interested in others,
497
- see rubyapi2
498
- <a href="http://www.ueda.info.waseda.ac.jp/~igarashi/ruby/xml.html#rubyapi2">&lt;URL:http://www.ueda.info.waseda.ac.jp/~igarashi/ruby/xml.html#rubyapi2&gt;</a>
499
- for example. </small><br />
500
- <a name="foottext-2" id="foottext-2" href="#footmark-2"><sup><small>*2</small></sup></a><small> But List can't include <a href="#label-14">Headline</a>
501
- nor <a href="#label-18">Include</a>. </small><br />
502
- <a name="foottext-3" id="foottext-3" href="#footmark-3"><sup><small>*3</small></sup></a><small> You can read very good explanation about Var in texinfo.info. </small><br />
503
- <a name="foottext-4" id="foottext-4" href="#footmark-4"><sup><small>*4</small></sup></a><small>Footnote</small><br />
504
- <a name="foottext-5" id="foottext-5" href="#footmark-5"><sup><small>*5</small></sup></a><small> text inside "<code>(...)</code>" is regarded as parameters
505
- of method, and text inside "<code>{...}</code>" is regarded as parameter
506
- block of methods.</small><br />
507
- <a name="foottext-6" id="foottext-6" href="#footmark-6"><sup><small>*6</small></sup></a><small> There is no element Labeled
508
- "Label", so it doesn't seems to be Reference probably. </small><br />
509
- </p>
510
- </section>
511
- </div>
512
- <nav id="sidebar">
513
- <h3>The Latest Release</h3>
514
- <p><a href="en/news.html">1.0.0</a> is the latest release. It had been released at 2011-07-15.</p>
515
- <h3>Links</h3>
516
- <ul>
517
- <li><a href="/en/">README</a></li>
518
- <li><a href="/en/install/">Install</a></li>
519
- <li><a href="/en/usage.html">Usage</a></li>
520
- <li><a href="/en/how-to-make/">How to make</a></li>
521
- <li><a href="/en/users.html">Shockers</a></li>
522
- <li><a href="/en/development.html">Development</a></li>
523
- </ul>
524
- </nav>
525
- </div>
526
-
527
-
528
- <footer>
529
- <p class="copyright">&copy; 2004-2011 Kouhei Sutou.</p>
530
- </footer>
531
- <script src="http://connect.facebook.net/en_US/all.js"></script>
532
- <script>
533
- FB.init({
534
- appId : null,
535
- status : true, // check login status
536
- cookie : true, // enable cookies to allow the server to access the session
537
- xfbml : true // parse XFBML
538
- });
539
- </script>
540
- <script type="text/javascript">
541
- if (document.location.protocol != "file:" &&
542
- document.location.host != "localhost") {
543
- var _gaq = _gaq || [];
544
- _gaq.push(['_setAccount', 'UA-12143252-4']);
545
- _gaq.push(['_trackPageview']);
546
-
547
- (function() {
548
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
549
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
550
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
551
- })();
552
- }
553
- </script>
554
- </body>
555
- </html>