org-parse 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/.document +5 -0
  2. data/.gitignore +23 -0
  3. data/ChangeLog +4 -0
  4. data/LICENSE +20 -0
  5. data/README.rdoc +68 -0
  6. data/Rakefile +54 -0
  7. data/VERSION.yml +5 -0
  8. data/bin/org-parse +51 -0
  9. data/bin/org-test +74 -0
  10. data/doc/images/org-parse-struct_1ffae50f0c5eb867f9418df6800f40a5cc3d1751.png +0 -0
  11. data/doc/org-parse.html +203 -0
  12. data/doc/org-parse.org +71 -0
  13. data/doc/struct.dot +10 -0
  14. data/doc/struct.png +0 -0
  15. data/examples/body-only.html.erb +1 -0
  16. data/examples/dot.org-parse-rc +21 -0
  17. data/lib/org-parse/inline-parser.output +945 -0
  18. data/lib/org-parse/inline-parser.rb +219 -0
  19. data/lib/org-parse/inline-parser.ry +77 -0
  20. data/lib/org-parse/inline-parser.tab.rb +411 -0
  21. data/lib/org-parse/node.rb +329 -0
  22. data/lib/org-parse/struct-parser.output +1019 -0
  23. data/lib/org-parse/struct-parser.rb +78 -0
  24. data/lib/org-parse/struct-parser.ry +125 -0
  25. data/lib/org-parse/struct-parser.tab.rb +608 -0
  26. data/lib/org-parse/struct-scanner.rb +272 -0
  27. data/lib/org-parse/templates/single.html.erb +118 -0
  28. data/lib/org-parse/textile-visitor.rb +296 -0
  29. data/lib/org-parse/utils.rb +15 -0
  30. data/lib/org-parse/visitor.rb +542 -0
  31. data/lib/org-parse.rb +46 -0
  32. data/org-parse.gemspec +113 -0
  33. data/rakelib/racc.rake +16 -0
  34. data/test/data/blocks.org +67 -0
  35. data/test/data/emphasis.org +7 -0
  36. data/test/data/footnote.html +136 -0
  37. data/test/data/footnote.org +8 -0
  38. data/test/data/html-export.html +1062 -0
  39. data/test/data/html-export.org +342 -0
  40. data/test/data/images.html +179 -0
  41. data/test/data/images.org +30 -0
  42. data/test/data/index.org +242 -0
  43. data/test/data/lily20100228.jpg +0 -0
  44. data/test/data/lily20100228t.jpg +0 -0
  45. data/test/data/link.org +7 -0
  46. data/test/data/list_before_1st_headline.html +119 -0
  47. data/test/data/list_before_1st_headline.org +7 -0
  48. data/test/data/lists.html +284 -0
  49. data/test/data/lists.org +78 -0
  50. data/test/data/no-headline.org +6 -0
  51. data/test/data/one-headline.org +2 -0
  52. data/test/data/paragraph.org +13 -0
  53. data/test/data/quote.org +15 -0
  54. data/test/data/sections.html +173 -0
  55. data/test/data/sections.org +9 -0
  56. data/test/data/simple-list.org +6 -0
  57. data/test/data/skip_t.org +3 -0
  58. data/test/data/structure.org +53 -0
  59. data/test/data/table.org +14 -0
  60. data/test/data/test-list.org +12 -0
  61. data/test/data/text-bef-hl.org +5 -0
  62. data/test/data/text.org +6 -0
  63. data/test/data/title.html +88 -0
  64. data/test/data/title.org +6 -0
  65. data/test/data/verse.org +48 -0
  66. data/test/helper.rb +31 -0
  67. data/test/test_org-parse.rb +148 -0
  68. metadata +134 -0
@@ -0,0 +1,1062 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml"
5
+ lang="en" xml:lang="en">
6
+ <head>
7
+ <title>sample dayo</title>
8
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
9
+ <meta name="generator" content="Org-mode"/>
10
+ <meta name="generated" content="2010-03-11 15:18:42 JST"/>
11
+ <meta name="author" content="knb"/>
12
+ <meta name="description" content=""/>
13
+ <meta name="keywords" content=""/>
14
+ <style type="text/css">
15
+ <!--/*--><![CDATA[/*><!--*/
16
+ html { font-family: Times, serif; font-size: 12pt; }
17
+ .title { text-align: center; }
18
+ .todo { color: red; }
19
+ .done { color: green; }
20
+ .tag { background-color: #add8e6; font-weight:normal }
21
+ .target { }
22
+ .timestamp { color: #bebebe; }
23
+ .timestamp-kwd { color: #5f9ea0; }
24
+ p.verse { margin-left: 3% }
25
+ pre {
26
+ border: 1pt solid #AEBDCC;
27
+ background-color: #F3F5F7;
28
+ padding: 5pt;
29
+ font-family: courier, monospace;
30
+ font-size: 90%;
31
+ overflow:auto;
32
+ }
33
+ table { border-collapse: collapse; }
34
+ td, th { vertical-align: top; }
35
+ dt { font-weight: bold; }
36
+ div.figure { padding: 0.5em; }
37
+ div.figure p { text-align: center; }
38
+ .linenr { font-size:smaller }
39
+ .code-highlighted {background-color:#ffff00;}
40
+ .org-info-js_info-navigation { border-style:none; }
41
+ #org-info-js_console-label { font-size:10px; font-weight:bold;
42
+ white-space:nowrap; }
43
+ .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
44
+ font-weight:bold; }
45
+ /*]]>*/-->
46
+ </style>
47
+ <link rel="stylesheet" type="text/css" href="css/eiffel.css" />
48
+ <script type="text/javascript">
49
+ <!--/*--><![CDATA[/*><!--*/
50
+ function CodeHighlightOn(elem, id)
51
+ {
52
+ var target = document.getElementById(id);
53
+ if(null != target) {
54
+ elem.cacheClassElem = elem.className;
55
+ elem.cacheClassTarget = target.className;
56
+ target.className = "code-highlighted";
57
+ elem.className = "code-highlighted";
58
+ }
59
+ }
60
+ function CodeHighlightOff(elem, id)
61
+ {
62
+ var target = document.getElementById(id);
63
+ if(elem.cacheClassElem)
64
+ elem.className = elem.cacheClassElem;
65
+ if(elem.cacheClassTarget)
66
+ target.className = elem.cacheClassTarget;
67
+ }
68
+ /*]]>*///-->
69
+ </script>
70
+ </head>
71
+ <body>
72
+ <div id="content">
73
+
74
+ <h1 class="title">sample dayo</h1>
75
+
76
+ <p>head block
77
+ this area is &lt;b&gt; <b>literal</b> &lt;/b&gt;
78
+ OrgParse HTML export specification
79
+ </p>
80
+
81
+ <div id="table-of-contents">
82
+ <h2>Table of Contents</h2>
83
+ <div id="text-table-of-contents">
84
+ <ul>
85
+ <li><a href="#sec-1">1 texts before 1st headline </a>
86
+ <ul>
87
+ <li><a href="#sec-1.1">1.1 by default </a></li>
88
+ <li><a href="#sec-1.2">1.2 #+TITLE: xxxx </a></li>
89
+ <li><a href="#sec-1.3">1.3 Options: skip:t </a></li>
90
+ <li><a href="#sec-1.4">1.4 #+TEXT: xxxx </a></li>
91
+ <li><a href="#sec-1.5">1.5 Mark up </a></li>
92
+ </ul>
93
+ </li>
94
+ <li><a href="#sec-2">2 sections </a>
95
+ <ul>
96
+ <li><a href="#sec-2.1">2.1 paragraphs </a></li>
97
+ <li><a href="#sec-2.2">2.2 list </a></li>
98
+ <li><a href="#sec-2.3">2.3 blocks </a></li>
99
+ <li><a href="#sec-2.4">2.4 Verse </a></li>
100
+ <li><a href="#sec-2.5">2.5 Example </a></li>
101
+ <li><a href="#sec-2.6">2.6 example の内部は、解釈されないわけね</a></li>
102
+ <li><a href="#sec-2.7">2.7 Quote </a></li>
103
+ <li><a href="#sec-2.8">2.8 section 3 </a></li>
104
+ </ul>
105
+ </li>
106
+ <li><a href="#sec-3">3 options </a></li>
107
+ <li><a href="#sec-4">4 footnote </a></li>
108
+ <li><a href="#sec-5">5 Section node </a></li>
109
+ <li><a href="#sec-6">6 Brock nodes </a>
110
+ <ul>
111
+ <li><a href="#sec-6.1">6.1 Headline node </a>
112
+ <ul>
113
+ <li><a href="#sec-6.1.1">6.1.1 Tags </a></li>
114
+ </ul>
115
+ </li>
116
+ <li><a href="#sec-6.2">6.2 Paragraph node </a></li>
117
+ <li><a href="#sec-6.3">6.3 Whiteline node </a></li>
118
+ <li><a href="#sec-6.4">6.4 Block nodes </a>
119
+ <ul>
120
+ <li><a href="#sec-6.4.1">6.4.1 EXAMPLE </a></li>
121
+ <li><a href="#sec-6.4.2">6.4.2 SRC </a></li>
122
+ <li><a href="#sec-6.4.3">6.4.3 VERSE </a></li>
123
+ <li><a href="#sec-6.4.4">6.4.4 HTML </a></li>
124
+ </ul>
125
+ </li>
126
+ <li><a href="#sec-6.5">6.5 Plain Lists </a>
127
+ <ul>
128
+ <li><a href="#sec-6.5.1">6.5.1 Unordered list </a></li>
129
+ <li><a href="#sec-6.5.2">6.5.2 Ordered list </a></li>
130
+ <li><a href="#sec-6.5.3">6.5.3 Description list </a></li>
131
+ </ul>
132
+ </li>
133
+ <li><a href="#sec-6.6">6.6 Comment line </a></li>
134
+ <li><a href="#sec-6.7">6.7 Option node </a>
135
+ <ul>
136
+ <li><a href="#sec-6.7.1">6.7.1 #+ATTR<sub>HTML</sub> </a></li>
137
+ </ul>
138
+ </li>
139
+ <li><a href="#sec-6.8">6.8 Horizontal line </a></li>
140
+ </ul>
141
+ </li>
142
+ <li><a href="#sec-7">7 Inline nodes </a>
143
+ <ul>
144
+ <li><a href="#sec-7.1">7.1 Footnotes </a></li>
145
+ <li><a href="#sec-7.2">7.2 Emphasis and monospace </a></li>
146
+ <li><a href="#sec-7.3">7.3 Quoting HTML tags </a></li>
147
+ <li><a href="#sec-7.4">7.4 Linkとイメージ </a>
148
+ <ul>
149
+ <li><a href="#sec-7.4.1">7.4.1 Link format </a></li>
150
+ <li><a href="#sec-7.4.2">7.4.2 Internal links </a></li>
151
+ <li><a href="#sec-7.4.3">7.4.3 External links </a></li>
152
+ <li><a href="#sec-7.4.4">7.4.4 Images </a>
153
+ <ul>
154
+ <li><a href="#sec-7.4.4.1">7.4.4.1 そのままの大きさで表示 </a></li>
155
+ <li><a href="#sec-7.4.4.2">7.4.4.2 サムネールとリンク </a></li>
156
+ </ul></li>
157
+ </ul></li>
158
+ </ul>
159
+ </li>
160
+ <li><a href="#sec-8">8 Table of contents </a></li>
161
+ <li><a href="#sec-9">9 test files </a></li>
162
+ </ul>
163
+ </div>
164
+ </div>
165
+
166
+ <div id="outline-container-1" class="outline-2">
167
+ <h2 id="sec-1"><span class="section-number-2">1</span> texts before 1st headline </h2>
168
+ <div class="outline-text-2" id="text-1">
169
+
170
+
171
+ </div>
172
+
173
+ <div id="outline-container-1.1" class="outline-3">
174
+ <h3 id="sec-1.1"><span class="section-number-3">1.1</span> by default </h3>
175
+ <div class="outline-text-3" id="text-1.1">
176
+
177
+ <p><a href="text-bef-hl.html">text-bef-hl</a> <a href="#text-bef-hl.html">html</a>
178
+ 最初のテキストラインが、待った無しでタイトルになり、
179
+ 残りの部分は、普通にHTMLに変換される。
180
+ </p><pre class="example">
181
+ title
182
+
183
+ xxxx
184
+ * 1st headline
185
+ </pre>
186
+
187
+ <p>の場合、
188
+ </p><pre class="example">
189
+ &lt;h1&gt;title&lt;/h1&gt;
190
+
191
+ xxxx
192
+ &lt;h2&gt;1st headline&lt;/h2&gt;
193
+ </pre>
194
+
195
+ <p>の様に変換。<sup><a class="footref" name="fnr.1" href="#fn.1">1</a></sup>
196
+ </p>
197
+ <p>
198
+ ヘッドラインから始まる場合は、最初のヘッドラインの内容がタイトルとなる。
199
+ </p></div>
200
+
201
+ </div>
202
+
203
+ <div id="outline-container-1.2" class="outline-3">
204
+ <h3 id="sec-1.2"><span class="section-number-3">1.2</span> #+TITLE: xxxx </h3>
205
+ <div class="outline-text-3" id="text-1.2">
206
+
207
+ <pre class="example">
208
+ #+TITLE: xxxx
209
+ </pre>
210
+
211
+ <p>が指定されている場合は、xxxx がタイトルになる。
212
+ </p>
213
+ </div>
214
+
215
+ </div>
216
+
217
+ <div id="outline-container-1.3" class="outline-3">
218
+ <h3 id="sec-1.3"><span class="section-number-3">1.3</span> Options: skip:t </h3>
219
+ <div class="outline-text-3" id="text-1.3">
220
+
221
+ <pre class="example">
222
+ #+OPTIONS: skip:t
223
+ </pre>
224
+
225
+ <p>が指定されていると、最初のセクション以前のテキストは捨てられる。
226
+ タイトルには、ファイル名 が使われる。
227
+ </p>
228
+ <p>
229
+ この場合も、
230
+ </p><pre class="example">
231
+ #+TITLE: xxxx
232
+ </pre>
233
+
234
+ <p>で、タイトルを指定出来る。
235
+ </p></div>
236
+
237
+ </div>
238
+
239
+ <div id="outline-container-1.4" class="outline-3">
240
+ <h3 id="sec-1.4"><span class="section-number-3">1.4</span> #+TEXT: xxxx </h3>
241
+ <div class="outline-text-3" id="text-1.4">
242
+
243
+ <p>skip: t が指定されている場合、
244
+ </p><pre class="example">
245
+ #+TEXT: xxxx
246
+ #+TEXT: xxxx
247
+ </pre>
248
+
249
+ <p>の様に、書くと、それが、最初のセクションの前に挿入される。
250
+ </p></div>
251
+
252
+ </div>
253
+
254
+ <div id="outline-container-1.5" class="outline-3">
255
+ <h3 id="sec-1.5"><span class="section-number-3">1.5</span> Mark up </h3>
256
+ <div class="outline-text-3" id="text-1.5">
257
+
258
+ <p>タイトルに対してもインライン要素としての解釈は実行される
259
+ </p></div>
260
+ </div>
261
+
262
+ </div>
263
+
264
+ <div id="outline-container-2" class="outline-2">
265
+ <h2 id="sec-2"><span class="section-number-2">2</span> sections </h2>
266
+ <div class="outline-text-2" id="text-2">
267
+
268
+ <p><a href="sections.html">sections</a>
269
+ </p>
270
+ <p class="verse">
271
+ セクション 1<br/>
272
+ &nbsp;&nbsp;&nbsp;&nbsp; セクション 1.1<br/>
273
+ セクション 2<br/>
274
+ </p>
275
+
276
+ <p>の様に、下位レベルのセクションは、上位レベルのセクションに含まれる
277
+ </p>
278
+ <p>
279
+ セクションのタイトルは、'*' -&gt; &lt;h2&gt; から始まり、'****' 以降は、UL
280
+ として出力される。
281
+ &lt;h&gt; と &lt;ul&gt; の閾値は、#+OPTIONS: H:n で指定出来る。
282
+ (デフォルトは、n=3)
283
+ </p>
284
+ </div>
285
+
286
+ <div id="outline-container-2.1" class="outline-3">
287
+ <h3 id="sec-2.1"><span class="section-number-3">2.1</span> paragraphs </h3>
288
+ <div class="outline-text-3" id="text-2.1">
289
+
290
+ <p>セクションは、パラグラフから始まる?
291
+ </p>
292
+ <p>
293
+ paragraph 1
294
+ </p>
295
+ <p>
296
+ paragraph 2
297
+ indent deeper
298
+ indent shallower
299
+ </p>
300
+ <p>
301
+ paragraph 3
302
+ </p></div>
303
+
304
+ </div>
305
+
306
+ <div id="outline-container-2.2" class="outline-3">
307
+ <h3 id="sec-2.2"><span class="section-number-3">2.2</span> list </h3>
308
+ <div class="outline-text-3" id="text-2.2">
309
+
310
+ </div>
311
+
312
+ </div>
313
+
314
+ <div id="outline-container-2.3" class="outline-3">
315
+ <h3 id="sec-2.3"><span class="section-number-3">2.3</span> blocks </h3>
316
+ <div class="outline-text-3" id="text-2.3">
317
+
318
+ </div>
319
+
320
+ </div>
321
+
322
+ <div id="outline-container-2.4" class="outline-3">
323
+ <h3 id="sec-2.4"><span class="section-number-3">2.4</span> Verse </h3>
324
+ <div class="outline-text-3" id="text-2.4">
325
+
326
+ <p>verse ブロック内では、改行が保存される。//
327
+ &lt;p class="verse"&gt; 〜 &lt;/p&gt; でくくる。//
328
+ </p>
329
+ <p>
330
+ インデントは、ブロック指定行のインデントを基準に、
331
+ 各行のインデント * 2 の &amp;nbsp; に置き換わる。
332
+ </p>
333
+ <p class="verse">
334
+ &nbsp;&nbsp; verse line1<br/>
335
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verse line2<br/>
336
+ &nbsp;&nbsp; verse line3<br/>
337
+ verse line4<br/>
338
+ </p>
339
+
340
+ </div>
341
+
342
+ </div>
343
+
344
+ <div id="outline-container-2.5" class="outline-3">
345
+ <h3 id="sec-2.5"><span class="section-number-3">2.5</span> Example </h3>
346
+ <div class="outline-text-3" id="text-2.5">
347
+
348
+ <p>example ブロックは、&lt;pre class="example"&gt;&lt;/pre&gt;でくくる
349
+ </p>
350
+ <p>
351
+ インデントは、 <b>ブロック</b> 先頭行のインデント位置からの
352
+ インデントに変換される。<a href="#sec-2.5">blocks.html</a>
353
+ </p>
354
+
355
+
356
+ <pre class="example"> # *非破壊的*
357
+ def expand_tab( str )
358
+ str.gsub(/([^\t]{8})|([^\t]*)\t/n) { [$+].pack("A8") }
359
+ end
360
+
361
+ ** example の内部は、解釈されないわけね
362
+
363
+ # 破壊的 [[link]]
364
+ def expand_tab!( str )
365
+ 1 while str.sub!(/(^[^\t]*)\t(\t*)/) { $1 + ' ' * (8-$1.size%8+8*$2.size) }
366
+ end
367
+
368
+ # 破壊的 (2)
369
+ def expand_tab!( str )
370
+ 1 while str.sub!(/\t(\t*)/) {' ' * (8-$~.begin(0)%8+8*$1.size) }
371
+ end
372
+ </pre>
373
+
374
+
375
+
376
+
377
+ <p><textarea cols="40" rows="3" overflow-x:scroll >
378
+ (defun org-xor (a b)
379
+ "Exclusive or."
380
+ (if a (not b) b))
381
+ </textarea>
382
+ </p>
383
+
384
+
385
+
386
+
387
+ </div>
388
+
389
+ </div>
390
+
391
+ <div id="outline-container-2.6" class="outline-3">
392
+ <h3 id="sec-2.6"><span class="section-number-3">2.6</span> Quote </h3>
393
+ <div class="outline-text-3" id="text-2.6">
394
+
395
+ <blockquote>
396
+
397
+
398
+ blockquote も書ける
399
+
400
+ </blockquote>
401
+
402
+ </div>
403
+
404
+ </div>
405
+
406
+ <div id="outline-container-2.7" class="outline-3">
407
+ <h3 id="sec-2.7"><span class="section-number-3">2.7</span> section 3 </h3>
408
+ <div class="outline-text-3" id="text-2.7">
409
+
410
+ <ul>
411
+ <li>
412
+ list1
413
+ <ul>
414
+ <li>
415
+ list1-1
416
+ </li>
417
+ </ul>
418
+ </li>
419
+ <li>
420
+ list2
421
+
422
+ </li>
423
+ </ul>
424
+ </div>
425
+ </div>
426
+
427
+ </div>
428
+
429
+ <div id="outline-container-3" class="outline-2">
430
+ <h2 id="sec-3"><span class="section-number-2">3</span> options </h2>
431
+ <div class="outline-text-2" id="text-3">
432
+
433
+ <ul>
434
+ <li>
435
+ H: set the number of headline levels for export
436
+ </li>
437
+ <li>
438
+ num: turn on/off section-numbers
439
+ </li>
440
+ <li>
441
+ toc: turn on/off table of contents, or set level limit (integer)
442
+ </li>
443
+ <li>
444
+ \n: turn on/off line-break-preservation (DOES NOT WORK)
445
+ </li>
446
+ <li>
447
+ @: turn on/off quoted HTML tags
448
+ </li>
449
+ <li>
450
+ :: turn on/off fixed-width sections
451
+ </li>
452
+ <li>
453
+ |: turn on/off tables
454
+ </li>
455
+ <li>
456
+ ^: turn on/off TeX-like syntax for sub- and superscripts. If
457
+ you write "^:{}", a<sub>b</sub> will be interpreted, but
458
+ the simple a<sub>b</sub> will be left as it is.
459
+ </li>
460
+ <li>
461
+ -: turn on/off conversion of special strings.
462
+ </li>
463
+ <li>
464
+ f: turn on/off footnotes like this<sup><a class="footref" name="fnr.2" href="#fn.2">2</a></sup>.
465
+ </li>
466
+ <li>
467
+ todo: turn on/off inclusion of TODO keywords into exported text
468
+ </li>
469
+ <li>
470
+ pri: turn on/off priority cookies
471
+ </li>
472
+ <li>
473
+ tags: turn on/off inclusion of tags, may also be not-in-toc
474
+ </li>
475
+ <li>
476
+ &lt;: turn on/off inclusion of any time/date stamps like DEADLINES
477
+ </li>
478
+ <li>
479
+ *: turn on/off emphasized text (bold, italic, underlined)
480
+ </li>
481
+ <li>
482
+ TeX: turn on/off simple TeX macros in plain text
483
+ </li>
484
+ <li>
485
+ LaTeX: turn on/off LaTeX fragments
486
+ </li>
487
+ <li>
488
+ skip: turn on/off skipping the text before the first heading
489
+ </li>
490
+ <li>
491
+ author: turn on/off inclusion of author name/email into exported file
492
+ </li>
493
+ <li>
494
+ creator: turn on/off inclusion of creator info into exported file
495
+ </li>
496
+ <li>
497
+ timestamp: turn on/off inclusion creation time into exported file
498
+ </li>
499
+ <li>
500
+ d: turn on/off inclusion of drawers
501
+ </li>
502
+ </ul>
503
+ </div>
504
+
505
+ </div>
506
+
507
+ <div id="outline-container-4" class="outline-2">
508
+ <h2 id="sec-4"><span class="section-number-2">4</span> footnote </h2>
509
+ <div class="outline-text-2" id="text-4">
510
+
511
+ <p><a href="./footnote.html">./footnote.org</a>
512
+ </p></div>
513
+
514
+ </div>
515
+
516
+ <div id="outline-container-5" class="outline-2">
517
+ <h2 id="sec-5"><span class="section-number-2">5</span> Section node </h2>
518
+ <div class="outline-text-2" id="text-5">
519
+
520
+ <p>Section node は、Headline から始まり、次のHeadline(又は文末)の直前までを、
521
+ 子要素に含むノードである。
522
+ </p>
523
+
524
+
525
+
526
+ <pre class="example">Section node
527
+ Headline
528
+ some other nodes
529
+ </pre>
530
+
531
+
532
+
533
+ <p>
534
+ COMMENT から始まるヘッドラインを持つ Section は、全体をコメントとして扱う。
535
+ </p>
536
+ </div>
537
+
538
+ </div>
539
+
540
+ <div id="outline-container-6" class="outline-2">
541
+ <h2 id="sec-6"><span class="section-number-2">6</span> Brock nodes </h2>
542
+ <div class="outline-text-2" id="text-6">
543
+
544
+ <p>行単位の範囲を持つ要素。
545
+ </p>
546
+
547
+ </div>
548
+
549
+ <div id="outline-container-6.1" class="outline-3">
550
+ <h3 id="sec-6.1"><span class="section-number-3">6.1</span> Headline node </h3>
551
+ <div class="outline-text-3" id="text-6.1">
552
+
553
+ <p>/<sup>\</sup>*+ / から始まる行。'*' の数がセクションのレベルを表す。
554
+ </p>
555
+ <p>
556
+ セクションの開始を示す。
557
+ </p>
558
+ </div>
559
+
560
+ <div id="outline-container-6.1.1" class="outline-4">
561
+ <h4 id="sec-6.1.1"><span class="section-number-4">6.1.1</span> Tags </h4>
562
+ <div class="outline-text-4" id="text-6.1.1">
563
+
564
+ <p>ヘッドラインには、TAGを付けることが出来る。
565
+ </p></div>
566
+ </div>
567
+
568
+ </div>
569
+
570
+ <div id="outline-container-6.2" class="outline-3">
571
+ <h3 id="sec-6.2"><span class="section-number-3">6.2</span> Paragraph node </h3>
572
+ <div class="outline-text-3" id="text-6.2">
573
+
574
+ <p>ヘッドラインの次の行から始まり、セクションの最後か、1行以上の空行で終わる部分は、
575
+ 段落として扱う。段落中で、改行させたい場合には、行末に"\\"を置く。
576
+ </p>
577
+ <pre class="example">
578
+ #+BEGIN_VERSE 〜 #+END_VERSE
579
+ </pre>
580
+
581
+ <p>で囲われた部分は、改行が保存される。
582
+ <a href="./verse.html">verse example</a> <a href="./verse.html">html</a>
583
+ </p>
584
+
585
+
586
+
587
+ <pre class="example">&lt;p class="verse"&gt;
588
+ ...&lt;br/&gt;
589
+ &amp;nbsp;&amp;nbsp;...&lt;br/&gt;
590
+ &lt;/p&gt;
591
+ </pre>
592
+
593
+
594
+
595
+ <p>
596
+ の様に、展開される様だ。
597
+ </p>
598
+ </div>
599
+
600
+ </div>
601
+
602
+ <div id="outline-container-6.3" class="outline-3">
603
+ <h3 id="sec-6.3"><span class="section-number-3">6.3</span> Whiteline node </h3>
604
+ <div class="outline-text-3" id="text-6.3">
605
+
606
+ <p>空行のノード。
607
+ パラグラフや、その他のブロックの終端を示す。
608
+ </p>
609
+ <p>
610
+ インデントのチェックが必要か?
611
+ </p>
612
+ </div>
613
+
614
+ </div>
615
+
616
+ <div id="outline-container-6.4" class="outline-3">
617
+ <h3 id="sec-6.4"><span class="section-number-3">6.4</span> Block nodes </h3>
618
+ <div class="outline-text-3" id="text-6.4">
619
+
620
+
621
+ </div>
622
+
623
+ <div id="outline-container-6.4.1" class="outline-4">
624
+ <h4 id="sec-6.4.1"><span class="section-number-4">6.4.1</span> EXAMPLE </h4>
625
+ <div class="outline-text-4" id="text-6.4.1">
626
+
627
+
628
+
629
+
630
+ <pre class="example">: #+BEGIN_EXMPLE
631
+ : ...
632
+ : #+END_EXAMPLE
633
+ </pre>
634
+
635
+
636
+
637
+ <p>
638
+ you can also start the example lines with a colon followed by a space.
639
+ There may also be additional whitespace before the colon:
640
+ </p>
641
+ <pre class="example">
642
+ : example
643
+ </pre>
644
+
645
+
646
+ <p>
647
+ EXAMPL ブロックは、&lt;pre&gt; タグに変換される
648
+ </p></div>
649
+
650
+ </div>
651
+
652
+ <div id="outline-container-6.4.2" class="outline-4">
653
+ <h4 id="sec-6.4.2"><span class="section-number-4">6.4.2</span> SRC </h4>
654
+ <div class="outline-text-4" id="text-6.4.2">
655
+
656
+
657
+
658
+
659
+ <pre class="example">(+ 1 2)
660
+ </pre>
661
+
662
+
663
+
664
+
665
+
666
+ <div class="org-comment">
667
+ </br>
668
+ <p>
669
+ <p>
670
+ ここは、コメントブロックだよ#+BEGIN<sub>HTML</sub>
671
+ &lt;/p&gt;
672
+ &lt;/div&gt;
673
+ </p>
674
+ </div>
675
+
676
+ </div>
677
+
678
+ <div id="outline-container-6.4.3" class="outline-4">
679
+ <h4 id="sec-6.4.3"><span class="section-number-4">6.4.3</span> VERSE </h4>
680
+ <div class="outline-text-4" id="text-6.4.3">
681
+
682
+
683
+ <p class="verse">
684
+ このブロック内では、改行が<br/>
685
+ 保存される。<br/>
686
+ <br/>
687
+ 行頭のインデントは、html の場合、&amp;nbsp; に変換される<br/>
688
+ </p>
689
+
690
+
691
+ <p>
692
+ 行頭のインデントは、~#+BEGIN<sub>VERSE</sub>~ のインデント + 1 をベースとして、
693
+ (各行のインデント - ベース) * 2 = &amp;nbsp; の数となる。
694
+ </p>
695
+ </div>
696
+
697
+ </div>
698
+
699
+ <div id="outline-container-6.4.4" class="outline-4">
700
+ <h4 id="sec-6.4.4"><span class="section-number-4">6.4.4</span> HTML </h4>
701
+ <div class="outline-text-4" id="text-6.4.4">
702
+
703
+ <p><a href="#sec-6.4.4">Quote HTML</a>
704
+ </p>
705
+
706
+
707
+ <literal html code>
708
+
709
+ <h2> ここには、自由に</h2>
710
+ <p>HTML tag が書ける。</p>
711
+
712
+ </div>
713
+ </div>
714
+
715
+ </div>
716
+
717
+ <div id="outline-container-6.5" class="outline-3">
718
+ <h3 id="sec-6.5"><span class="section-number-3">6.5</span> Plain Lists </h3>
719
+ <div class="outline-text-3" id="text-6.5">
720
+
721
+ <p><a href="./lists.html">lists.org</a> <a href="./lists.html">html</a>
722
+ </p>
723
+
724
+ </div>
725
+
726
+ <div id="outline-container-6.5.1" class="outline-4">
727
+ <h4 id="sec-6.5.1"><span class="section-number-4">6.5.1</span> Unordered list </h4>
728
+ <div class="outline-text-4" id="text-6.5.1">
729
+
730
+ <p>先頭が[-+*]で始まる行は、順序無リストアイテムの開始を示し、
731
+ これに続く、インデントが開始マークより大きい行、又は、空行は
732
+ このアイテムに含まれる。
733
+ </p>
734
+ <p>
735
+ リストは、ネスト出来る。
736
+ </p>
737
+ <p>
738
+ 空行のインデントは、チェックされない。
739
+ </p></div>
740
+
741
+ </div>
742
+
743
+ <div id="outline-container-6.5.2" class="outline-4">
744
+ <h4 id="sec-6.5.2"><span class="section-number-4">6.5.2</span> Ordered list </h4>
745
+ <div class="outline-text-4" id="text-6.5.2">
746
+
747
+ <p>先頭が、"数字." 又は "数字)" で始まる行は、番号付きリストを表す。
748
+ </p></div>
749
+
750
+ </div>
751
+
752
+ <div id="outline-container-6.5.3" class="outline-4">
753
+ <h4 id="sec-6.5.3"><span class="section-number-4">6.5.3</span> Description list </h4>
754
+ <div class="outline-text-4" id="text-6.5.3">
755
+
756
+ <pre class="example">
757
+ - XXXX :: mmmmm
758
+ </pre>
759
+
760
+ <p>の形式の行は、説明付きリストを表す。
761
+ </p>
762
+ </div>
763
+ </div>
764
+
765
+ </div>
766
+
767
+ <div id="outline-container-6.6" class="outline-3">
768
+ <h3 id="sec-6.6"><span class="section-number-3">6.6</span> Comment line </h3>
769
+ <div class="outline-text-3" id="text-6.6">
770
+
771
+ <p>だけど、
772
+ # これは、コメント行では無い。 でも、 #+ ここからは? やっぱり地の文。
773
+ </p>
774
+
775
+ </div>
776
+
777
+ </div>
778
+
779
+ <div id="outline-container-6.7" class="outline-3">
780
+ <h3 id="sec-6.7"><span class="section-number-3">6.7</span> Option node </h3>
781
+ <div class="outline-text-3" id="text-6.7">
782
+
783
+ <pre class="example">
784
+ #+TITLE
785
+ </pre>
786
+
787
+ <p>等の、オプション設定を行う行
788
+ </p>
789
+ </div>
790
+
791
+ <div id="outline-container-6.7.1" class="outline-4">
792
+ <h4 id="sec-6.7.1"><span class="section-number-4">6.7.1</span> #+ATTR<sub>HTML</sub> </h4>
793
+ <div class="outline-text-4" id="text-6.7.1">
794
+
795
+ <p>If you want to specify attributes for links,
796
+ you can do so using a special #+ATTR<sub>HTML</sub> line
797
+ to define attributes
798
+ that will be added to the &lt;a&gt; or &lt;img&gt; tags.
799
+ </p>
800
+ <p>
801
+ Here is an example that sets title and style attributes for a link:
802
+ </p><pre class="example">
803
+ #+ATTR_HTML: title="The Org-mode homepage" style="color:red;"
804
+ [[http://orgmode.org]]
805
+ </pre>
806
+
807
+
808
+
809
+ </div>
810
+ </div>
811
+
812
+ </div>
813
+
814
+ <div id="outline-container-6.8" class="outline-3">
815
+ <h3 id="sec-6.8"><span class="section-number-3">6.8</span> Horizontal line </h3>
816
+ <div class="outline-text-3" id="text-6.8">
817
+
818
+
819
+ <hr/>
820
+ <p>
821
+ '-'が5個以上のみの行は、&lt;hr/&gt; に変換される
822
+ </p></div>
823
+ </div>
824
+
825
+ </div>
826
+
827
+ <div id="outline-container-7" class="outline-2">
828
+ <h2 id="sec-7"><span class="section-number-2">7</span> Inline nodes </h2>
829
+ <div class="outline-text-2" id="text-7">
830
+
831
+ <p>行内で完結している諸要素
832
+ </p>
833
+ </div>
834
+
835
+ <div id="outline-container-7.1" class="outline-3">
836
+ <h3 id="sec-7.1"><span class="section-number-3">7.1</span> Footnotes </h3>
837
+ <div class="outline-text-3" id="text-7.1">
838
+
839
+ </div>
840
+
841
+ </div>
842
+
843
+ <div id="outline-container-7.2" class="outline-3">
844
+ <h3 id="sec-7.2"><span class="section-number-3">7.2</span> Emphasis and monospace </h3>
845
+ <div class="outline-text-3" id="text-7.2">
846
+
847
+ <ul>
848
+ <li>
849
+ <b>bold</b>
850
+ </li>
851
+ <li>
852
+ <i>italic</i>
853
+ </li>
854
+ <li>
855
+ <span style="text-decoration:underline;">underlined</span>
856
+ </li>
857
+ <li>
858
+ <code>code</code>
859
+ </li>
860
+ <li>
861
+ <code>verbatim</code>
862
+ </li>
863
+ <li>
864
+ <del>strike through</del>
865
+ </li>
866
+ </ul>
867
+
868
+ <p><b>bold and /italic/</b> <span style="text-decoration:underline;">underlined and *bold*</span> <code>verbatim without *bold*</code>
869
+ <code>code without *bold*</code>
870
+ *bold <a href="#sec-2.6">link</a>* =code is <a href="#link">link</a> allowed= <b>bold =code</b> code=
871
+ <b>bold in *bold</b> is* not bold <b>1234</b>
872
+ *bold <a href="#sec-2.6">link</a>*, <a href="#sec-2.6"> <b>bold</b> </a>
873
+ </p>
874
+ </div>
875
+
876
+ </div>
877
+
878
+ <div id="outline-container-7.3" class="outline-3">
879
+ <h3 id="sec-7.3"><span class="section-number-3">7.3</span> Quoting HTML tags </h3>
880
+ <div class="outline-text-3" id="text-7.3">
881
+
882
+ <p><a href="#sec-6.4.4">Quote HTML</a>
883
+ <br/> <b>bold</b> の様にすることが出来る
884
+ </p></div>
885
+
886
+ </div>
887
+
888
+ <div id="outline-container-7.4" class="outline-3">
889
+ <h3 id="sec-7.4"><span class="section-number-3">7.4</span> Linkとイメージ </h3>
890
+ <div class="outline-text-3" id="text-7.4">
891
+
892
+ <p>リンクの、拡張子が画像ファイルの場合、&lt;img&gt;タグに展開される
893
+ </p>
894
+ <ul>
895
+ <li>
896
+ [ [image file] ] の場合、&lt;img src="image file"&gt; に展開される
897
+ </li>
898
+ <li>
899
+ [ [link][image file] ] の場合、&lt;a href="link"&gt;&lt;img src="image file"&gt;&lt;/a&gt; に展開される
900
+ </li>
901
+ <li>
902
+ img を表示する際に、#+CAPTION: xxxx が指定されている場合、<br/>
903
+
904
+ <p class="verse">
905
+ </li>
906
+ </ul>
907
+
908
+ <p>&lt;div class="figure"&gt;<br/>
909
+ &lt;p&gt;&lt;img src="lily20100228t.jpg" alt="lily20100228t.jpg"&gt;&lt;/p&gt;<br/>
910
+ &lt;p&gt;寝起きのリリー君&lt;/p&gt;<br/>
911
+ &lt;/div&gt;<br/>
912
+ </p>
913
+ </p>
914
+ <p>に展開される
915
+ </p><ul>
916
+ <li>
917
+ [ [xxx][yyy] ] の場合、&lt;a href="xxx"&gt;yyy&lt;/a&gt; に展開される
918
+
919
+ </li>
920
+ </ul>
921
+
922
+ </div>
923
+
924
+ <div id="outline-container-7.4.1" class="outline-4">
925
+ <h4 id="sec-7.4.1"><span class="section-number-4">7.4.1</span> Link format </h4>
926
+ <div class="outline-text-4" id="text-7.4.1">
927
+
928
+ <pre class="example">
929
+ [[link][description]] or [[link]]
930
+ </pre>
931
+
932
+
933
+ <p>
934
+ <a href="#index.html">desc <b>bold</b> </a> &lt;- description part は修飾出来る。
935
+ </p>
936
+ </div>
937
+
938
+ </div>
939
+
940
+ <div id="outline-container-7.4.2" class="outline-4">
941
+ <h4 id="sec-7.4.2"><span class="section-number-4">7.4.2</span> Internal links </h4>
942
+ <div class="outline-text-4" id="text-7.4.2">
943
+
944
+ </div>
945
+
946
+ </div>
947
+
948
+ <div id="outline-container-7.4.3" class="outline-4">
949
+ <h4 id="sec-7.4.3"><span class="section-number-4">7.4.3</span> External links </h4>
950
+ <div class="outline-text-4" id="text-7.4.3">
951
+
952
+ <p>外部へのリンク
953
+ </p><ul>
954
+ <li>
955
+ <a href="http://www.astro.uva.nl/~dominik">http://www.astro.uva.nl/~dominik</a> on the web
956
+ </li>
957
+ <li>
958
+ <img src="/home/dominik/images/jupiter.jpg" alt="/home/dominik/images/jupiter.jpg" /> file, absolute path
959
+ </li>
960
+ <li>
961
+ /home/dominik/images/jupiter.jpg same as above
962
+ </li>
963
+ <li>
964
+ <a href="papers/last.pdf">file:papers/last.pdf</a> file, relative path
965
+ </li>
966
+ <li>
967
+ ./papers/last.pdf same as above
968
+
969
+ </li>
970
+ </ul>
971
+ </div>
972
+
973
+ </div>
974
+
975
+ <div id="outline-container-7.4.4" class="outline-4">
976
+ <h4 id="sec-7.4.4"><span class="section-number-4">7.4.4</span> Images </h4>
977
+ <div class="outline-text-4" id="text-7.4.4">
978
+
979
+ <p><a href="images.html">images</a> <a href="images.html">file:images.html</a>
980
+ </p>
981
+ </div>
982
+
983
+ <div id="outline-container-7.4.4.1" class="outline-5">
984
+ <h5 id="sec-7.4.4.1"><span class="section-number-5">7.4.4.1</span> そのままの大きさで表示 </h5>
985
+ <div class="outline-text-5" id="text-7.4.4.1">
986
+
987
+ <pre class="example">
988
+ [[lily20100228t.jpg]]
989
+ </pre>
990
+
991
+ <p><a href="#sec-7.4"><img src="lily20100228t.jpg"/></a>
992
+ </p></div>
993
+
994
+ </div>
995
+
996
+ <div id="outline-container-7.4.4.2" class="outline-5">
997
+ <h5 id="sec-7.4.4.2"><span class="section-number-5">7.4.4.2</span> サムネールとリンク </h5>
998
+ <div class="outline-text-5" id="text-7.4.4.2">
999
+
1000
+ <pre class="example">
1001
+ [[lily20100228.jpg][lily20100228t.jpg]]
1002
+ </pre>
1003
+
1004
+ <p><a href="lily20100228.jpg"><img src="lily20100228t.jpg"/></a>
1005
+ </p>
1006
+ </div>
1007
+ </div>
1008
+ </div>
1009
+ </div>
1010
+
1011
+ </div>
1012
+
1013
+ <div id="outline-container-8" class="outline-2">
1014
+ <h2 id="sec-8"><span class="section-number-2">8</span> Table of contents </h2>
1015
+ <div class="outline-text-2" id="text-8">
1016
+
1017
+ <p>サポートは後回しにするかね。
1018
+ </p>
1019
+
1020
+ <p>
1021
+ :#+OPTIONS: skip:t
1022
+ </p></div>
1023
+
1024
+ </div>
1025
+
1026
+ <div id="outline-container-9" class="outline-2">
1027
+ <h2 id="sec-9"><span class="section-number-2">9</span> test files </h2>
1028
+ <div class="outline-text-2" id="text-9">
1029
+
1030
+ <ul>
1031
+ <li>
1032
+ <a href="#sec-1">texts before 1st headline</a> <a href="text-bef-hl.html">text-bef-hl</a> <a href="#text-bef-hl.html">html</a>
1033
+ </li>
1034
+ <li>
1035
+ <a href="#+TITLE:==xxxx">#+TITLE: xxxx</a> <a href="title.html">title</a> <a href="title.html">html</a>
1036
+
1037
+ </li>
1038
+ </ul>
1039
+
1040
+
1041
+
1042
+ </div>
1043
+ </div>
1044
+ <div id="footnotes">
1045
+ <h2 class="footnotes">Footnotes: </h2>
1046
+ <div id="text-footnotes">
1047
+ <p class="footnote"><sup><a class="footnum" name="fn.1" href="#fnr.1">1</a></sup> 実際はセクションヘッダには&lt;div&gt;やら何やらくっつく
1048
+ </p>
1049
+ <p class="footnote"><sup><a class="footnum" name="fn.2" href="#fnr.2">2</a></sup> FOOTNOTE DEFINITION NOT FOUND: 1
1050
+ </p>
1051
+ </div>
1052
+ </div>
1053
+ <div id="postamble">
1054
+ <p class="author"> Author: knb
1055
+ <a href="mailto:knb@artif.org">&lt;knb@artif.org&gt;</a>
1056
+ </p>
1057
+ <p class="date"> Date: 2010-03-11 15:18:42 JST</p>
1058
+ <p class="creator">HTML generated by org-mode 6.34c in emacs 23</p>
1059
+ </div>
1060
+ </div>
1061
+ </body>
1062
+ </html>