review 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.travis.yml +1 -0
  4. data/ChangeLog +87 -0
  5. data/bin/review-check +2 -2
  6. data/bin/review-compile +15 -30
  7. data/bin/review-index +1 -1
  8. data/bin/review-init +12 -7
  9. data/bin/review-vol +9 -1
  10. data/doc/catalog.ja.md +53 -0
  11. data/doc/catalog.md +52 -0
  12. data/doc/format.ja.md +734 -0
  13. data/doc/format.md +746 -0
  14. data/doc/format_idg.ja.md +203 -0
  15. data/doc/{quickstart.rdoc → quickstart.ja.md} +138 -104
  16. data/doc/quickstart.md +252 -0
  17. data/doc/sample.yml +216 -48
  18. data/lib/epubmaker.rb +0 -1
  19. data/lib/epubmaker/content.rb +2 -2
  20. data/lib/epubmaker/epubcommon.rb +440 -0
  21. data/lib/epubmaker/epubv2.rb +8 -418
  22. data/lib/epubmaker/epubv3.rb +67 -61
  23. data/lib/epubmaker/producer.rb +60 -19
  24. data/lib/review/book.rb +1 -3
  25. data/lib/review/book/base.rb +18 -11
  26. data/lib/review/book/chapter.rb +5 -24
  27. data/lib/review/book/compilable.rb +5 -1
  28. data/lib/review/book/index.rb +48 -17
  29. data/lib/review/book/page_metric.rb +17 -8
  30. data/lib/review/book/part.rb +12 -2
  31. data/lib/review/book/volume.rb +3 -2
  32. data/lib/review/builder.rb +30 -10
  33. data/lib/review/compiler.rb +6 -4
  34. data/lib/review/configure.rb +3 -3
  35. data/lib/review/epubmaker.rb +56 -26
  36. data/lib/review/htmlbuilder.rb +33 -42
  37. data/lib/review/htmlutils.rb +12 -7
  38. data/lib/review/i18n.rb +77 -17
  39. data/lib/review/i18n.yml +80 -4
  40. data/lib/review/idgxmlbuilder.rb +27 -57
  41. data/lib/review/inaobuilder.rb +3 -3
  42. data/lib/review/latexbuilder.rb +90 -67
  43. data/lib/review/layout.tex.erb +54 -7
  44. data/lib/review/markdownbuilder.rb +21 -3
  45. data/lib/review/pdfmaker.rb +67 -38
  46. data/lib/review/sec_counter.rb +1 -1
  47. data/lib/review/tocparser.rb +9 -5
  48. data/lib/review/topbuilder.rb +6 -6
  49. data/lib/review/version.rb +1 -1
  50. data/review.gemspec +3 -1
  51. data/test/book_test_helper.rb +1 -1
  52. data/test/sample-book/README.md +2 -0
  53. data/test/sample-book/src/Rakefile +31 -0
  54. data/test/sample-book/src/_cover.html +0 -0
  55. data/test/sample-book/src/catalog.yml +10 -0
  56. data/test/sample-book/src/ch01.re +0 -0
  57. data/test/sample-book/src/ch02.re +0 -0
  58. data/test/sample-book/src/config.yml +160 -32
  59. data/test/sample-book/src/images/ch01-imgsample.jpg +0 -0
  60. data/test/sample-book/src/images/cover.jpg +0 -0
  61. data/test/sample-book/src/preface.re +0 -0
  62. data/test/sample-book/src/sty/jumoline.sty +0 -0
  63. data/test/sample-book/src/sty/reviewmacro.sty +18 -0
  64. data/test/sample-book/src/style.css +0 -0
  65. data/test/test_book.rb +25 -27
  66. data/test/test_book_chapter.rb +4 -73
  67. data/test/test_book_part.rb +5 -4
  68. data/test/test_builder.rb +3 -3
  69. data/test/test_epub3maker.rb +527 -0
  70. data/test/test_epubmaker.rb +6 -6
  71. data/test/test_htmlbuilder.rb +143 -6
  72. data/test/test_i18n.rb +95 -10
  73. data/test/test_idgxmlbuilder.rb +28 -2
  74. data/test/test_index.rb +109 -1
  75. data/test/test_latexbuilder.rb +51 -0
  76. data/test/test_markdownbuilder.rb +54 -1
  77. data/test/test_pdfmaker.rb +7 -6
  78. data/test/test_review_ext.rb +31 -0
  79. data/test/test_topbuilder.rb +3 -1
  80. metadata +46 -13
  81. data/doc/catalog.rdoc +0 -49
  82. data/doc/format.rdoc +0 -618
  83. data/doc/format_idg.rdoc +0 -180
  84. data/doc/libepubmaker/config.yml +0 -207
  85. data/lib/epubmaker/resource.rb +0 -82
  86. data/test/sample-book/src/CHAPS +0 -2
  87. data/test/sample-book/src/PREDEF +0 -1
data/doc/format.md ADDED
@@ -0,0 +1,746 @@
1
+ # Re:VIEW Format Guide
2
+
3
+ The document is a brief guide for Re:VIEW markup syntax.
4
+
5
+ Re:VIEW is based on EWB of ASCII, influenced RD and other Wiki system's syntax.
6
+
7
+ ## Paragraph
8
+
9
+ Paragraphs are separated by an empty line.
10
+
11
+ Usage:
12
+
13
+ ```
14
+ This is a paragraph, paragraph,
15
+ and paragraph.
16
+
17
+ Next paragraph here is ...
18
+ ```
19
+
20
+ Two empty lines or more are same as one empty line.
21
+
22
+ ## Chapter, Section, Subsection (headings)
23
+
24
+ Chapters, sections, subsections, subsubsections use `=`, `==`, `===`, `====`, `=====`.
25
+
26
+ Usage:
27
+
28
+ ```review
29
+ = 1st level (chapter)
30
+
31
+ == 2nd level (section)
32
+
33
+ === 3rd level (subsection)
34
+
35
+ ==== 4th level
36
+
37
+ ===== 5th level
38
+ ```
39
+
40
+ Headings should not have any spaces before title; if line head has space, it is as paragraph.
41
+
42
+ ## Column
43
+
44
+ `[column]` in heading are column's caption.
45
+
46
+ Usage:
47
+
48
+ ```review
49
+ ===[column] Compiler-compiler
50
+ ```
51
+
52
+ `=` and `[column]` should be closed to. Any spaces are not permitted.
53
+
54
+ Columns are closed with next headings.
55
+
56
+ ```
57
+ == head 01
58
+
59
+ ===[column] a column
60
+
61
+ == head 02 and the end of 'a column'
62
+ ```
63
+
64
+ If you want to close column without headings, you can use `===[/column]`
65
+
66
+ Usage:
67
+
68
+ ```review
69
+ ===[column] Compiler-compiler
70
+
71
+ Compiler-compiler is ...
72
+
73
+ ===[/column]
74
+
75
+ blah, blah, blah (this is paragraphs outside of the column)
76
+ ```
77
+
78
+ ## Itemize
79
+
80
+ Itemize (ul in HTML) use ` *` (one space char and asterisk).
81
+
82
+ Nested itemize is like ` **`, ` ***`.
83
+
84
+ Usage:
85
+
86
+ ```
87
+ * 1st item
88
+ ** nested 1st item
89
+ * 2nd item
90
+ ** nested 2nd item
91
+ * 3rd item
92
+ ```
93
+
94
+ In itemize, you must write one more space character at line head.
95
+ When you use `*` without spaces in line head, it's just paragraph.
96
+
97
+ ## Ordered itemize
98
+
99
+ Ordered itemize (ol in HTML) use ` 1. ...`, ` 2. ...`, ` 3. ...`.
100
+ They aren't nested.
101
+
102
+ Usage:
103
+
104
+
105
+ ```
106
+ 1. 1st condition
107
+ 2. 2nd condition
108
+ 3. 3rd condition
109
+ ```
110
+
111
+ The value of Number is ignored.
112
+
113
+ ```
114
+ 1. 1st condition
115
+ 1. 2nd condition
116
+ 1. 3rd condition
117
+ ```
118
+
119
+ You must write one more space character at line head like itemize.
120
+
121
+ ## Definition List
122
+
123
+ Definition list (dl in HTML) use `:` and indented lines.
124
+
125
+ Usage:
126
+
127
+ ```review
128
+ : Alpha
129
+ RISC CPU made by DEC.
130
+ : POWER
131
+ RSIC CPU made by IBM and Motolora.
132
+ POWER PC is delivered from this.
133
+ : SPARC
134
+ RISC CPU made by SUN.
135
+ ```
136
+
137
+ `:` in line head is not used as a text.
138
+ The text after `:` is as the term (dt in HTML).
139
+
140
+ In definition list, `:` at line head allow space characters.
141
+ After dt line, space-indented lines are descriptions(dd in HTML).
142
+
143
+ You can use inline markup in texts of lists.
144
+
145
+ ## Code list
146
+
147
+ Code list like source codes is `//list`. If you don't need numbers, you can use ``em`` prefix (as embedded). If you need line numbers, you can use ``num`` postfix. So you can use four types of lists.
148
+
149
+ * ``//list[ID][caption][language]{ ... //}``
150
+ * normal list. language is optional.
151
+ * ``//listnum[ID][caption][language]{ ... //}``
152
+ * normal list with line numbers. language is optional.
153
+ * ``//emlist[caption][language]{ ... //}``
154
+ * list without caption counters. caption and language are optional.
155
+ * ``//emlistnum[caption][language]{ ... //}``
156
+ * list with line numbers without caption counters. caption and language are optional.
157
+
158
+ Usage:
159
+
160
+ ```review
161
+ //list[main][main()][c]{ ←ID is `main`, caption is `main()`
162
+ int
163
+ main(int argc, char **argv)
164
+ {
165
+ puts("OK");
166
+ return 0;
167
+ }
168
+ //}
169
+ ```
170
+
171
+ Usage:
172
+
173
+ ```review
174
+ //listnum[hello][hello world][ruby]{
175
+ puts "hello world!"
176
+ //}
177
+ ```
178
+
179
+ Usage:
180
+
181
+ ```review
182
+ //emlist[][ruby]{
183
+ printf("hello");
184
+ //}
185
+ ```
186
+
187
+ Usage:
188
+
189
+ ```review
190
+ //emlistnum[][ruby]{
191
+ puts "hello world!"
192
+ //}
193
+ ```
194
+
195
+
196
+ You can use inline markup in blocks.
197
+
198
+ When you refer a list like `see list X`, you can use an ID in `//list`
199
+ such as `@<list>{main}`.
200
+
201
+
202
+ ### Quoting source code
203
+
204
+ `//source` is for quoting source code. filename is mandatory.
205
+
206
+ Usage:
207
+
208
+ ```review
209
+ //source[/hello/world.rb]{
210
+ puts "hello world!"
211
+ //}
212
+ ```
213
+
214
+ `//source` and `//emlist` with caption is not so different.
215
+ You can use them with different style with CSS (in HTML) and style file (in LaTeX).
216
+
217
+ `//source` can be referred same as the list.
218
+
219
+ Usage:
220
+
221
+ ```
222
+ When you ..., see @<list>{hello}.
223
+ ```
224
+
225
+ ## Inline source code
226
+
227
+ You can use `@<code>{...}` in inline context.
228
+
229
+ Usage:
230
+
231
+ ```review
232
+ @<code>{p = obj.ref_cnt}
233
+ ```
234
+
235
+ ## Shell session
236
+
237
+ When you want to show command line operation, you can use `//cmd{ ... //}`.
238
+
239
+ Usage:
240
+
241
+ ```
242
+ //cmd{
243
+ $ ls /
244
+ //}
245
+ ```
246
+
247
+ You can use inline markup in `//cmd` blocks.
248
+
249
+ ## Figure
250
+
251
+ You can use `//image{ ... //}` for figures.
252
+ You can write comments or Ascii art in the block as an alternative description.
253
+ When publishing, it's simply ignored.
254
+
255
+
256
+ Usage:
257
+
258
+ ```
259
+ //image[unixhistory][a brief history of UNIX-like OS]{
260
+ System V
261
+ +----------- SVr4 --> Commercial UNIX(Solaris, AIX, HP-UX, ...)
262
+ V1 --> V6 --|
263
+ +--------- 4.4BSD --> FreeBSD, NetBSD, OpenBSD, ...
264
+ BSD
265
+
266
+ --------------> Linux
267
+ //}
268
+ ```
269
+
270
+ When you want to refer images such as "see figure 1.", you can use
271
+ inline reference markup like `@<img>{unixhistory}`.
272
+
273
+ When you want to use images in paragraph or other inline context, you can use `@<icon>`.
274
+
275
+ ### Finding image pathes
276
+
277
+ The order of finding image is as follows. The first matched one is used.
278
+
279
+ ```
280
+ 1. <imgdir>/<builder>/<chapid>/<id>.<ext>
281
+ 2. <imgdir>/<builder>/<chapid>-<id>.<ext>
282
+ 3. <imgdir>/<builder>/<id>.<ext>
283
+ 4. <imgdir>/<chapid>/<id>.<ext>
284
+ 5. <imgdir>/<chapid>-<id>.<ext>
285
+ 6. <imgdir>/<id>.<ext>
286
+ ```
287
+
288
+ * ``<imgdir>`` is `images` as default.
289
+ * ``<builder>`` is a builder (target) name to use. When you use review-comile commmand with ``--target=html``, `<imagedir>/<builder>` is `images/html`.
290
+ * ``<chapid>`` is basename of *.re file. If the filename is `ch01.re`, chapid is `ch01`.
291
+ * ``<id>`` is the ID of the first argument of `//image`. You should use only printable ASCII characters as ID.
292
+ * ``<ext>`` is file extensions of Re:VIEW. They are different by the builder you use.
293
+
294
+ ## Images without caption counter
295
+
296
+ `//indepimage[filename][caption]` makes images without caption counter.
297
+ caption is optional.
298
+
299
+ Usage:
300
+
301
+ ```
302
+ //indepimage[unixhistory2]
303
+ ```
304
+
305
+ Note that there are similar markup `//numberlessimage`, but it is deprecated.
306
+
307
+
308
+ ## Figures with graph tools
309
+
310
+ Re:VIEW generates image files using graph tool with command `//graph[filename][commandname][caption]`. The caption is optional.
311
+
312
+ Usage: using with Gnuplot
313
+
314
+ ```
315
+ //graph[sin_x][gnuplot]{
316
+ plot sin(x)
317
+ //}
318
+ ```
319
+
320
+ You can use `graphviz`, `gnuplot`, `blockdiag`, `aafigure` as the command name.
321
+ Before using these tools, you should installed them.
322
+
323
+ ## Tables
324
+
325
+ The markup of table is `//table[ID][caption]{ ... //}`
326
+ You can separate header and content with `------------`.
327
+
328
+ The columns are splitted by TAB character. When the first character in the column is `.`, the character is removed. If you want to write `.` at the first, you should write `..`.
329
+
330
+ When you want to use an empty column, you write `.`.
331
+
332
+ Usage:
333
+
334
+ ```
335
+ //table[envvars][Important environment varialbes]{
336
+ Name Comment
337
+ -------------------------------------------------------------
338
+ PATH Directories where commands exist
339
+ TERM Terminal. ex: linux, kterm, vt100
340
+ LANG default local of users. ja_JP.eucJP and ja_JP.utf8 are popular in Japan
341
+ LOGNAME login name of the user
342
+ TEMP temporary directory. ex: /tmp
343
+ PAGER text viewer on man command. ex: less, more
344
+ EDITOR default editor. ex: vi, emacs
345
+ MANPATH Directories where sources of man exist
346
+ DISPLAY default display of X Window System
347
+ //}
348
+ ```
349
+
350
+ When you want to write "see table X", you can write `@<table>{envvars}`.
351
+
352
+ You can use inline markup in the tables.
353
+
354
+ ## Quoting text
355
+
356
+ You can use `//quote{ 〜 //}` as quotations.
357
+
358
+ Usage:
359
+
360
+ ```
361
+ //quote{
362
+ Seeing is believing.
363
+ //}
364
+ ```
365
+
366
+ You can use inline markup in quotations.
367
+
368
+
369
+ ## Footnotes
370
+
371
+ You can use `//footnote` to write footnotes.
372
+
373
+ Usage:
374
+
375
+ ```
376
+ You can get the packages from support site for the book.@<fn>{site}
377
+ You should get and install it before reading the book.
378
+ //footnote[site][support site of the book: http://i.loveruby.net/ja/stdcompiler ]
379
+ ```
380
+
381
+ `@<fn>{site}` in source are replaced by footnote marks, and the phrase "support site of .."
382
+ is in footnotes.
383
+
384
+ Note that In LATEXBuilder, you should use `footnotetext` option to use `@<fn>{...}` in columns and tables.
385
+
386
+ ### --footnotetext option
387
+
388
+ When you want to use `footnotetext` option, you can add `--footnotetext` with `params` in config.yml.
389
+ With this option, you can use footnote in tables and short notes.
390
+
391
+ Note that there are some constraints that (because of normal footnote )
392
+
393
+ And you cannot use footnote and footnotemark/footnotetext at the same time.
394
+
395
+ Note that with this option, Re:VIEW use footnotemark and footnotetext instead of normal footnote.
396
+ There are some constraints to use this option.
397
+ You cannot use footnote and footnotemark/footnotetext at the same time.
398
+
399
+ ## Bibliography
400
+
401
+ When you want to use a bibliography, you should write them in the file `bib.re`.
402
+
403
+ ```
404
+ //bibpaper[cite][caption]{..comment..}
405
+ ```
406
+
407
+ The comment is optional.
408
+
409
+ ```
410
+ //bibpaper[cite][caption]
411
+ ```
412
+
413
+ Usage:
414
+
415
+ ```
416
+ //bibpaper[lins][Lins, 1991]{
417
+ Refael D. Lins. A shared memory architecture for parallel study of
418
+ algorithums for cyclic reference_counting. Technical Report 92,
419
+ Computing Laboratory, The University of Kent at Canterbury , August
420
+ 1991
421
+ //}
422
+ ```
423
+
424
+ When you want to refer some references, You should write as:
425
+
426
+ Usage:
427
+
428
+ ```
429
+ … is the well-known project.(@<bib>{lins})
430
+ ```
431
+
432
+ ## Lead sentences
433
+
434
+ lead sentences are `//lead{ ... //}`.
435
+ You can write as `//read{ ... //}`.
436
+
437
+ Usage:
438
+
439
+ ```
440
+ //lead{
441
+ In the chapter, I introduce brief summary of the book,
442
+ and I show the way how to write a program in Linux.
443
+ //}
444
+ ```
445
+
446
+ ## TeX equations
447
+
448
+ You can use `//texequation{ ... //}` to insert mathematical equations of LaTeX.
449
+
450
+ Usage:
451
+
452
+ ```
453
+ //texequation{
454
+ \sum_{i=1}^nf_n(x)
455
+ //}
456
+ ```
457
+
458
+ ## Spacing
459
+
460
+ `//noindent` is a tag for spacing.
461
+
462
+
463
+ * `//noindent` : ingore indentation immediately following line. (in HTML, use noindent class)
464
+
465
+
466
+ `//linebreak` and `//pagebreak` will be obsoleted.
467
+
468
+ ## Comments
469
+
470
+ If you want to write some comments that do not output in the document, you can use comment notation `#@#`.
471
+
472
+ Usage:
473
+
474
+ ```
475
+ #@# Must one empty line
476
+ ```
477
+
478
+ If you want to write some warnings, use `#@warn(...)`.
479
+
480
+ Usage:
481
+
482
+ ```
483
+ #@warn(TBD)
484
+ ```
485
+
486
+ When you want to write comments in the output document, use `//comment` and `@<comment>` with the option `--draft` of review-compile command.
487
+
488
+ Usage:
489
+
490
+ ```
491
+ @<comment>{TODO}
492
+ ```
493
+
494
+ ## Raw data block
495
+
496
+ When you want to write non-Re:VIEW line, use `//raw`.
497
+
498
+ Usage:
499
+
500
+ ```
501
+ //raw[|html|<div class="special">\nthis is a special line.\n</div>]
502
+ ```
503
+
504
+ In above line, `html` is a builder name that handle raw data.
505
+ You can use `html`, `latex`, `idgxml` and `top` as builder name.
506
+ You can specify multiple builder names with separator `,`.
507
+ `\n` is translated into newline(U+000A).
508
+
509
+ Output:
510
+
511
+ (In HTML:)
512
+
513
+ ```
514
+ <div class="special">
515
+ this is a special line.
516
+ </div>
517
+ ```
518
+
519
+ (In other formats, it is just ignored.)
520
+
521
+ Note: `//raw` and `@<raw>` may break structured document easily.
522
+
523
+ ## Other syntax
524
+
525
+ In Re:VIEW, you can add your customized blocks. So you can define
526
+ special block for some books.
527
+
528
+ * `//prototype` : function prototype. It's used in the book `Futu no Linux programming`.
529
+ * `//type` : type definition. It's used in the book `Futu no Haskell programming`.
530
+
531
+ You can define customized block in the file `review-ext.rb`.
532
+
533
+ Usage:
534
+
535
+ ```ruby
536
+ # review-ext.rb
537
+ ReVIEW::Compiler.defblock :foo, 0..1
538
+ class ReVIEW::HTMLBuilder
539
+ def foo(lines, caption = nil)
540
+ puts lines.join(",")
541
+ end
542
+ end
543
+ ```
544
+
545
+ You can add the syntax as below:
546
+
547
+ ```
548
+ //foo{
549
+ A
550
+ B
551
+ C
552
+ //}
553
+ ```
554
+
555
+ ```
556
+ # Result
557
+ A,B,C
558
+ ```
559
+
560
+
561
+ ## Syntax in paragraph (Inline Markups)
562
+
563
+ ```
564
+ @<list>{program}:: `List 1.5`
565
+ @<img>{unixhistory}:: `Figure 1.3`
566
+ @<table>{ascii}:: `Table 1.2`
567
+ @<fn>{site}:: footnote number
568
+ @<kw>{Credential, credential}:: keyword.
569
+ @<chap>{advanced}:: chapter number like `Chapter 17`
570
+ @<title>{advanced}:: title of the chapter
571
+ @<chapref>{advanced}:: a chapter number and chapter title like `Chapter 17. advanced topic`
572
+ @<bou>{appropriate}:: bou-ten.
573
+ @<ruby>{Matsumoto, Matz}:: ruby
574
+ @<ami>{point}:: ami-kake (shaded text)
575
+ @<b>{Please}:: bold
576
+ @<i>{Please}:: italic
577
+ @<strong>{Please}:: strong(emphasis)
578
+ @<em>{Please}:: another emphasis
579
+ @<tt>{foo($bar)}:: teletype (monospaced font)
580
+ @<tti>{FooClass}:: teletype (monospaced font) and italic
581
+ @<ttb>{BarClass}:: teletype (monospaced font) and bold
582
+ @<u>{AB}:: underline
583
+ @<br>{}:: linebreak in paragraph
584
+ @<m>{a + \alpha}:: TeX inline equation
585
+ @<icon>{samplephoto}:: inline image
586
+ @<uchar>{2460}:: Unicode code point
587
+ @<href>{http://www.google.com/, google}:: hyper link(URL)
588
+ @<raw>{|html|<span>ABC</span>}:: inline raw data inline. `\}` is `}` and `\\` is `\`.
589
+ ```
590
+
591
+ ## Tags for Authors (pre-processor commands)
592
+
593
+ These tags are used in the output document. In contrast,
594
+ tags as below are not used in the output document, used
595
+ by the author.
596
+
597
+ ```
598
+ #@#:: Comments. All texts in this line are ignored.
599
+ #@warn(...):: Warning messages. The messages are showed when pre-process.
600
+ #@require, #@provide:: Define dependency with keywords.
601
+ #@mapfile(filename) ... #@end:: Insert all content of files.
602
+ #@maprange(filename, range name) ... #@end:: Insert some area in content of files.
603
+ #@mapoutput(command) ... #@end:: Execute command and insert their output.
604
+ ```
605
+
606
+ ## HTML/LaTeX layout
607
+
608
+ `layouts/layout.html.erb` and `layouts/layout.tex.erb` are used as layout file.
609
+ You can use ERb tags in the layout files.
610
+
611
+
612
+ Sample layout file(layout.html.erb):
613
+
614
+ ```html
615
+ <html>
616
+ <head>
617
+ <title><%= title %></title>
618
+ </head>
619
+ <body>
620
+ <%= body %>
621
+ <hr/>
622
+ </body>
623
+ </html>
624
+ ```
625
+
626
+ ## Part title (in TOC)
627
+
628
+ In version 1.2 or before, you can define the parts in PART file.
629
+ PART file correspond with chapters in CHAPS file.
630
+
631
+ Usage:
632
+
633
+ ```
634
+ CHAPS:
635
+ intro.re
636
+
637
+ start.re
638
+
639
+ end.re
640
+ ```
641
+
642
+ ```
643
+ PART:
644
+ (empty line)
645
+ start section
646
+ last section
647
+ ```
648
+
649
+ In version 1.3 or after, you can use catalog.yml file.
650
+ For more information of catalog.yml, see Re:VIEW catalog file guide(catalog.md).
651
+
652
+ ## Referring headings
653
+
654
+ `@<hd>` generate referred section title and section number.
655
+ You can use deeper section with separator `|`.
656
+
657
+ Usage:
658
+
659
+ ```
660
+ @<hd>{intro|first section}
661
+ ```
662
+
663
+ If section title is unique, `|` is not needed.
664
+
665
+ ```
666
+ @<hd>{first section}
667
+ ```
668
+
669
+ If you want to refer another chapter (file), you should add the ID of chapter.
670
+
671
+ Usage:
672
+
673
+ ```
674
+ @<hd>{preface|Introduction|first section}
675
+ ```
676
+
677
+ When section has the label, you can use the label.
678
+
679
+ ```
680
+ =={intro} Introduction
681
+ :
682
+ === first section
683
+ :
684
+ @<hd>{intro|first section}
685
+ ```
686
+
687
+
688
+ ### Heading of columns
689
+
690
+ You can refer the heading of a column with `@<column>`.
691
+
692
+ Usage:
693
+
694
+ ```
695
+ @<column>{The usage of Re:VIEW}
696
+ ```
697
+
698
+ You can refer labels.
699
+
700
+ ```
701
+ ==[column]{review-application} The application of Re:VIEW
702
+ :
703
+ @<column>{review-application}
704
+ ```
705
+
706
+ ## Links
707
+
708
+ You can add a hyperlink with `@<href>` and `//label`.
709
+ Notation of the markup is `@<href>{URL, anchor}`. If you can use URL itself
710
+ as anchor, use `@<href>{URL}`.
711
+ If you want to use `,` in URL, use `\,`.
712
+
713
+ Usage:
714
+
715
+ ```
716
+ @<href>{http://github.com/, GitHub}
717
+ @<href>{http://www.google.com/}
718
+ @<href>{#point1, point1 in document}
719
+ @<href>{chap1.html#point1, point1 in document}
720
+ //label[point1]
721
+ ```
722
+
723
+ ## Internationalization (i18n)
724
+
725
+ Re:VIEW support I18N of some text like `Chapter`, `Figure`, and `Table`.
726
+ Current default language is Japanese.
727
+
728
+
729
+ You add the file locale.yml in the project directory.
730
+
731
+ Sample local.yml file:
732
+
733
+ ```yaml
734
+ locale: ja
735
+ ```
736
+
737
+ If you want to customize texts, overwrite items.
738
+ Default locale configuration file is in lib/review/i18n.yml.
739
+
740
+ Sample local.yml file:
741
+
742
+ ```yaml
743
+ locale: en
744
+ image: Fig.
745
+ table: Tbl.
746
+ ```