review 5.5.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +31 -0
- data/.github/workflows/ruby-tex.yml +1 -1
- data/.github/workflows/ruby-win.yml +1 -1
- data/.github/workflows/ruby.yml +2 -2
- data/.rubocop.yml +13 -2
- data/NEWS.ja.md +40 -0
- data/NEWS.md +39 -0
- data/README.md +1 -1
- data/doc/format.ja.md +70 -33
- data/doc/format.md +69 -34
- data/doc/quickstart.ja.md +7 -1
- data/doc/quickstart.md +7 -1
- data/lib/review/book/base.rb +1 -1
- data/lib/review/builder.rb +6 -10
- data/lib/review/epubmaker/epubcommon.rb +13 -7
- data/lib/review/epubmaker/epubv2.rb +0 -5
- data/lib/review/epubmaker/epubv3.rb +9 -1
- data/lib/review/epubmaker/producer.rb +2 -3
- data/lib/review/epubmaker.rb +2 -4
- data/lib/review/htmlbuilder.rb +2 -2
- data/lib/review/i18n.yml +24 -2
- data/lib/review/idgxmlbuilder.rb +29 -10
- data/lib/review/idgxmlmaker.rb +11 -1
- data/lib/review/img_math.rb +9 -2
- data/lib/review/init.rb +10 -5
- data/lib/review/latexbuilder.rb +2 -2
- data/lib/review/lineinput.rb +2 -2
- data/lib/review/makerhelper.rb +2 -2
- data/lib/review/pdfmaker.rb +3 -5
- data/lib/review/update.rb +3 -7
- data/lib/review/version.rb +1 -1
- data/lib/review/yamlloader.rb +0 -3
- data/review.gemspec +3 -3
- data/samples/syntax-book/Gemfile +1 -1
- data/templates/latex/config.erb +6 -1
- data/templates/latex/review-jlreq/review-base.sty +11 -8
- data/templates/latex/review-jsbook/review-base.sty +15 -11
- data/templates/opf/epubv2.opf.erb +2 -0
- data/templates/opf/epubv3.opf.erb +2 -0
- data/templates/opf/opf_manifest_epubv2.opf.erb +2 -0
- data/templates/opf/opf_manifest_epubv3.opf.erb +2 -0
- data/templates/opf/opf_tocx_epubv3.opf.erb +2 -0
- metadata +24 -139
- data/test/assets/black.eps +0 -280
- data/test/assets/fit.png +0 -0
- data/test/assets/header_listener.html +0 -35
- data/test/assets/img_math/img1.png +0 -0
- data/test/assets/img_math/img2.png +0 -0
- data/test/assets/img_math/img3.png +0 -0
- data/test/assets/large.gif +0 -0
- data/test/assets/large.jpg +0 -0
- data/test/assets/large.png +0 -0
- data/test/assets/large.svg +0 -65
- data/test/assets/syntax_book_index_detail.txt +0 -60
- data/test/assets/test.xml.erb +0 -3
- data/test/assets/test_template.tex +0 -179
- data/test/assets/test_template_backmatter.tex +0 -190
- data/test/book_test_helper.rb +0 -44
- data/test/run_test.rb +0 -12
- data/test/test_book.rb +0 -588
- data/test/test_book_chapter.rb +0 -329
- data/test/test_book_part.rb +0 -53
- data/test/test_builder.rb +0 -126
- data/test/test_catalog.rb +0 -174
- data/test/test_catalog_converter_cmd.rb +0 -73
- data/test/test_compiler.rb +0 -52
- data/test/test_configure.rb +0 -91
- data/test/test_converter.rb +0 -21
- data/test/test_epub3maker.rb +0 -733
- data/test/test_epubmaker.rb +0 -931
- data/test/test_epubmaker_cmd.rb +0 -56
- data/test/test_extentions_hash.rb +0 -66
- data/test/test_helper.rb +0 -62
- data/test/test_htmlbuilder.rb +0 -3312
- data/test/test_htmltoc.rb +0 -29
- data/test/test_htmlutils.rb +0 -43
- data/test/test_i18n.rb +0 -300
- data/test/test_idgxmlbuilder.rb +0 -1487
- data/test/test_idgxmlmaker_cmd.rb +0 -50
- data/test/test_image_finder.rb +0 -81
- data/test/test_img_math.rb +0 -120
- data/test/test_index.rb +0 -287
- data/test/test_indexbuilder.rb +0 -52
- data/test/test_latexbuilder.rb +0 -2964
- data/test/test_latexbuilder_v2.rb +0 -1654
- data/test/test_lineinput.rb +0 -104
- data/test/test_location.rb +0 -30
- data/test/test_logger.rb +0 -33
- data/test/test_makerhelper.rb +0 -44
- data/test/test_markdownbuilder.rb +0 -371
- data/test/test_md2inaobuilder.rb +0 -90
- data/test/test_pdfmaker.rb +0 -354
- data/test/test_pdfmaker_cmd.rb +0 -130
- data/test/test_plaintextbuilder.rb +0 -1211
- data/test/test_preprocessor.rb +0 -196
- data/test/test_review_ext.rb +0 -30
- data/test/test_reviewheaderlistener.rb +0 -49
- data/test/test_rstbuilder.rb +0 -616
- data/test/test_sec_counter.rb +0 -156
- data/test/test_template.rb +0 -33
- data/test/test_textmaker_cmd.rb +0 -58
- data/test/test_textutils.rb +0 -187
- data/test/test_tocprinter.rb +0 -46
- data/test/test_topbuilder.rb +0 -1298
- data/test/test_update.rb +0 -473
- data/test/test_webtocprinter.rb +0 -195
- data/test/test_yamlloader.rb +0 -186
- data/test/test_zip_exporter.rb +0 -106
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11969067c8cb25999f37895ba330bd5c030c62402d1540510e241c6029c38d90
|
|
4
|
+
data.tar.gz: 4294e10f33abcb6063ea0098c3b7256374a5696d693fe2284dcb0fed4f2b2348
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dddd61f8870c1f2e0d1117d3318cb456bcf49db10a12c4c93dc8b7638b08e5b6894efdfbdbd635d432196f82d40f906b29435f4f6e5ddbb78d2dcbd3829715af
|
|
7
|
+
data.tar.gz: 695257c02903d581c061cd7813e8951923a4a63986e879aa6e6ee31d963d627bf0e9512f85ffc56ca6a596a8f8f114ed012c3cce9daa7dd41072aabc89a9cb3d
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Lint by RuboCop
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
ruby: ['2.7', '3.0', '3.1', '3.2']
|
|
17
|
+
os: [ubuntu-latest]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v2
|
|
20
|
+
- name: Set up Ruby
|
|
21
|
+
uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
|
24
|
+
- name: fix ImageMagick policy.xml on Linux
|
|
25
|
+
if: runner.os == 'Linux'
|
|
26
|
+
run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml
|
|
27
|
+
- name: Build and test with Rake
|
|
28
|
+
run: |
|
|
29
|
+
gem install bundler --no-document
|
|
30
|
+
bundle install --retry 3
|
|
31
|
+
bundle exec rubocop -P
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
strategy:
|
|
14
14
|
fail-fast: false
|
|
15
15
|
matrix:
|
|
16
|
-
ruby: ['2.
|
|
16
|
+
ruby: ['2.7', '3.0', '3.1', '3.2']
|
|
17
17
|
os: [ubuntu-latest, macOS-latest]
|
|
18
18
|
steps:
|
|
19
19
|
- uses: actions/checkout@v2
|
|
@@ -28,4 +28,4 @@ jobs:
|
|
|
28
28
|
run: |
|
|
29
29
|
gem install bundler --no-document
|
|
30
30
|
bundle install --retry 3
|
|
31
|
-
bundle exec rake
|
|
31
|
+
bundle exec rake test
|
data/.rubocop.yml
CHANGED
|
@@ -5,7 +5,7 @@ AllCops:
|
|
|
5
5
|
- tmp/*
|
|
6
6
|
DisplayCopNames: true
|
|
7
7
|
NewCops: enable
|
|
8
|
-
TargetRubyVersion: 2.
|
|
8
|
+
TargetRubyVersion: 2.7
|
|
9
9
|
|
|
10
10
|
require:
|
|
11
11
|
- rubocop-performance
|
|
@@ -38,6 +38,9 @@ Performance/StringInclude:
|
|
|
38
38
|
Performance/CollectionLiteralInLoop:
|
|
39
39
|
Enabled: false
|
|
40
40
|
|
|
41
|
+
Performance/MapCompact:
|
|
42
|
+
Enabled: false
|
|
43
|
+
|
|
41
44
|
#### Style
|
|
42
45
|
|
|
43
46
|
Style/AsciiComments:
|
|
@@ -109,7 +112,7 @@ Style/LineEndConcatenation:
|
|
|
109
112
|
Enabled: false
|
|
110
113
|
|
|
111
114
|
Style/MethodCallWithArgsParentheses:
|
|
112
|
-
|
|
115
|
+
AllowedMethods:
|
|
113
116
|
- 'require'
|
|
114
117
|
- 'include'
|
|
115
118
|
- 'file'
|
|
@@ -194,6 +197,9 @@ Style/OptionalBooleanParameter:
|
|
|
194
197
|
Style/CombinableLoops:
|
|
195
198
|
Enabled: false
|
|
196
199
|
|
|
200
|
+
Style/FetchEnvVar:
|
|
201
|
+
Enabled: false
|
|
202
|
+
|
|
197
203
|
### Layout
|
|
198
204
|
|
|
199
205
|
Layout/BlockAlignment:
|
|
@@ -296,3 +302,8 @@ Naming/VariableNumber:
|
|
|
296
302
|
|
|
297
303
|
Gemspec/RequiredRubyVersion:
|
|
298
304
|
Enabled: false
|
|
305
|
+
|
|
306
|
+
Gemspec/DevelopmentDependencies:
|
|
307
|
+
EnforcedStyle: gemspec
|
|
308
|
+
Exclude:
|
|
309
|
+
- samples/syntax-book/Gemfile
|
data/NEWS.ja.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
# Version 5.7.0
|
|
2
|
+
## バグ修正
|
|
3
|
+
* Windows において、`review-init -w` の実行時にバインドアドレスを省略したときにエラーが発生するのを修正しました ([#1824])
|
|
4
|
+
* PDFMaker: `//blankline` でページをまたいだときに、ページの先頭に空行が入るのを抑制しました ([#1872])
|
|
5
|
+
* EPUBMaker: MathJax で数式を表現する際に、`<`, `>`, `&` を変換し、HTML のエラーが出ないようにしました ([#1876], [#1877])
|
|
6
|
+
|
|
7
|
+
## 非互換の変更
|
|
8
|
+
* 動作検証済みバージョンを Ruby 2.7 以降としました ([#1871])
|
|
9
|
+
* EPUMaker: EPUB の検証ルールに従い、EPUB の目次に表紙へのリンクを含めました ([#1874])
|
|
10
|
+
|
|
11
|
+
## その他
|
|
12
|
+
* Ruby 3.2 を動作検証テスト対象に含めました ([#1871])
|
|
13
|
+
* RuboCop 1.45.1 の指摘を反映しました ([#1878])
|
|
14
|
+
|
|
15
|
+
[#1824]: https://github.com/kmuto/review/issues/1824
|
|
16
|
+
[#1871]: https://github.com/kmuto/review/pull/1871
|
|
17
|
+
[#1872]: https://github.com/kmuto/review/issues/1872
|
|
18
|
+
[#1874]: https://github.com/kmuto/review/issues/1874
|
|
19
|
+
[#1876]: https://github.com/kmuto/review/pull/1876
|
|
20
|
+
[#1877]: https://github.com/kmuto/review/pull/1877
|
|
21
|
+
[#1878]: https://github.com/kmuto/review/pull/1878
|
|
22
|
+
|
|
23
|
+
# Version 5.6.0
|
|
24
|
+
## 新機能
|
|
25
|
+
* IDGXMLBuilder: `//texequation` と `@<m>` で `imgmath` math_formatに対応しました ([#1829])
|
|
26
|
+
* LATEXBuilder: `@<icon>`用のマクロとして`reviewicon`マクロを追加し、 `reviewincludegraphics`マクロの代わりに使うようにしました ([#1838])
|
|
27
|
+
* ルビ文字列の前後のスペースを削除するようにしました ([#1839])
|
|
28
|
+
|
|
29
|
+
## 非互換の変更
|
|
30
|
+
* LATEXBuilder: 囲み記事の見出しとして `■メモ` の代わりに `MEMO`, `NOTICE`, `CAUTION` 等を使うようにしました。以前の見出しを使う場合は`locale.yml`に記載してください ([#1856])
|
|
31
|
+
|
|
32
|
+
## その他
|
|
33
|
+
* ドキュメント `format.md` と `format.ja.md` を更新しました ([#1860])
|
|
34
|
+
|
|
35
|
+
[#1829]: https://github.com/kmuto/review/pull/1829
|
|
36
|
+
[#1838]: https://github.com/kmuto/review/pull/1838
|
|
37
|
+
[#1839]: https://github.com/kmuto/review/pull/1839
|
|
38
|
+
[#1856]: https://github.com/kmuto/review/pull/1856
|
|
39
|
+
[#1860]: https://github.com/kmuto/review/pull/1860
|
|
40
|
+
|
|
1
41
|
# Version 5.5.0
|
|
2
42
|
## 新機能
|
|
3
43
|
* 節や項を参照するインライン命令として、 `@<secref>` , `@<sec>` , `@<sectitle>` を追加しました。`@<secref>` は節や項の番号+タイトルを含むテキスト( `@<hd>` と同じ)、 `@<sec>` は節や項の番号のみ、`@<sectitle>` はタイトルのみに展開されます ([#1809])
|
data/NEWS.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
# Version 5.7.0
|
|
2
|
+
## Bug Fixes
|
|
3
|
+
* Fixed error when omitting a bind address of `review-init -w` on Windows ([#1824])
|
|
4
|
+
* EPUBMaker: escape `<`, `>`, and `&` when converting to MathJax to avoid HTML errors ([#1876], [#1877])
|
|
5
|
+
|
|
6
|
+
## Breaking Changes
|
|
7
|
+
* Ruby 2.6 or earlier was excluded from the operation verification ([#1871])
|
|
8
|
+
* EPUMaker: included a link to the cover in the table of contents according to EPUB validation rules ([#1874])
|
|
9
|
+
|
|
10
|
+
## Others
|
|
11
|
+
* Ruby 3.2 is now included in the testing target ([#1871])
|
|
12
|
+
* refactor code with RuboCop 1.45.1 ([#1878])
|
|
13
|
+
|
|
14
|
+
[#1824]: https://github.com/kmuto/review/issues/1824
|
|
15
|
+
[#1871]: https://github.com/kmuto/review/pull/1871
|
|
16
|
+
[#1872]: https://github.com/kmuto/review/issues/1872
|
|
17
|
+
[#1874]: https://github.com/kmuto/review/issues/1874
|
|
18
|
+
[#1876]: https://github.com/kmuto/review/pull/1876
|
|
19
|
+
[#1877]: https://github.com/kmuto/review/pull/1877
|
|
20
|
+
[#1878]: https://github.com/kmuto/review/pull/1878
|
|
21
|
+
|
|
22
|
+
# Version 5.6.0
|
|
23
|
+
## New Features
|
|
24
|
+
* IDGXMLBuilder: support `imgmath` math_format in `//texequation` and `@<m>` ([#1829])
|
|
25
|
+
* LATEXBuilder: use `reviewicon` macro instead of `reviewincludegraphics` in `@<icon>` ([#1838])
|
|
26
|
+
* trim spaces before/after characters in ruby text ([#1839])
|
|
27
|
+
|
|
28
|
+
## Breaking Changes
|
|
29
|
+
* LATEXBuilder: use `MEMO`, `NOTICE`, `CAUTION` or other headers instead of `■メモ`. If you want to use older headers, add `■メモ` in `locale.yml`. ([#1856])
|
|
30
|
+
|
|
31
|
+
## Others
|
|
32
|
+
* update documents `format.md` and `format.ja.md` ([#1860])
|
|
33
|
+
|
|
34
|
+
[#1829]: https://github.com/kmuto/review/pull/1829
|
|
35
|
+
[#1838]: https://github.com/kmuto/review/pull/1838
|
|
36
|
+
[#1839]: https://github.com/kmuto/review/pull/1839
|
|
37
|
+
[#1856]: https://github.com/kmuto/review/pull/1856
|
|
38
|
+
[#1860]: https://github.com/kmuto/review/pull/1860
|
|
39
|
+
|
|
1
40
|
# Version 5.5.0
|
|
2
41
|
## New Features
|
|
3
42
|
* introduced `@<secref>`, `@<sec>`, and `@<sectitle>` as inline op to refer sections ([#1809])
|
data/README.md
CHANGED
data/doc/format.ja.md
CHANGED
|
@@ -96,7 +96,7 @@ Re:VIEW フォーマットの文法について解説します。Re:VIEW フォ
|
|
|
96
96
|
|
|
97
97
|
## 番号付き箇条書き
|
|
98
98
|
|
|
99
|
-
番号付きの箇条書き(HTML で言う ol)は「` 1. 〜`」「` 2. 〜`」「` 3.
|
|
99
|
+
番号付きの箇条書き(HTML で言う ol)は「` 1. 〜`」「` 2. 〜`」「` 3. 〜`」のように示します。`1-1` のようなネスト出力は標準では提供していません( `//beginchild` 〜 `//endchild` を使った入れ子の表現は可能です)。
|
|
100
100
|
|
|
101
101
|
例:
|
|
102
102
|
|
|
@@ -108,6 +108,23 @@ Re:VIEW フォーマットの文法について解説します。Re:VIEW フォ
|
|
|
108
108
|
|
|
109
109
|
番号付き箇条書きも、ただの箇条書きと同様、行頭に1つ以上の空白が必要です。
|
|
110
110
|
|
|
111
|
+
数字が実際にそのとおり出るかは、出力を行うソフトウェアに依存します。
|
|
112
|
+
|
|
113
|
+
- HTML (EPUB), TeX: 記入の数字にかかわらず1から始まる番号になります。
|
|
114
|
+
- IDGXML, テキスト: 記入したとおりの番号が出力されます。よって、すべて「1.」にするといった形にしてしまうとおかしな結果になります。
|
|
115
|
+
|
|
116
|
+
HTML (EPUB) や TeX ビルダにおいて最初の番号を 1 ではないものにしたいときには、`//olnum[番号]` を指定します。なお、番号箇条書きの途中の番号を変えることはできません。
|
|
117
|
+
|
|
118
|
+
例:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
//olnum[10]
|
|
122
|
+
|
|
123
|
+
1. この箇条書きの番号は出力ソフトウェア上では10になる
|
|
124
|
+
2. これは11になる
|
|
125
|
+
6. 記入上で飛ばしても連続数で12となる
|
|
126
|
+
```
|
|
127
|
+
|
|
111
128
|
## 用語リスト
|
|
112
129
|
|
|
113
130
|
用語リスト(HTML で言う dl)は空白→「:」→空白、で始まる行を使って示します。
|
|
@@ -186,7 +203,7 @@ Re:VIEW フォーマットの文法について解説します。Re:VIEW フォ
|
|
|
186
203
|
|
|
187
204
|
## ソースコードなどのリスト
|
|
188
205
|
|
|
189
|
-
|
|
206
|
+
ソースコードなどのリストには `//list` を使います。連番を付けたくない場合は先頭に `em`(embedded の略)、行番号を付ける場合は末尾に `num` を付加します。まとめると、以下の4種類になります。
|
|
190
207
|
|
|
191
208
|
* `//list[識別子][キャプション][言語指定]{ 〜 //}`
|
|
192
209
|
* 通常のリスト。言語指定は省略できます。
|
|
@@ -471,7 +488,7 @@ complexmatrixという識別子に基づく画像ファイルが貼り込まれ
|
|
|
471
488
|
//}
|
|
472
489
|
```
|
|
473
490
|
|
|
474
|
-
##
|
|
491
|
+
## 引用・中央揃え・右揃え
|
|
475
492
|
|
|
476
493
|
引用は「`//quote{ 〜 //}`」を使って記述します。
|
|
477
494
|
|
|
@@ -485,6 +502,24 @@ complexmatrixという識別子に基づく画像ファイルが貼り込まれ
|
|
|
485
502
|
|
|
486
503
|
複数の段落を入れる場合は、空行で区切ります。
|
|
487
504
|
|
|
505
|
+
中央揃えの段落を表現するには、「`//centering{ 〜 //}`」を使います。同様に右寄せにするには「`//flushright{ 〜 //}`」を使います。複数の段落を入れる場合は、空行で区切ります。
|
|
506
|
+
|
|
507
|
+
例:
|
|
508
|
+
|
|
509
|
+
```
|
|
510
|
+
//centering{
|
|
511
|
+
これは
|
|
512
|
+
|
|
513
|
+
中央合わせ
|
|
514
|
+
//}
|
|
515
|
+
|
|
516
|
+
//flushright{
|
|
517
|
+
これは
|
|
518
|
+
|
|
519
|
+
右寄せ合わせ
|
|
520
|
+
//}
|
|
521
|
+
```
|
|
522
|
+
|
|
488
523
|
## 囲み記事
|
|
489
524
|
|
|
490
525
|
技術書でよくある、コラムにするほどではないけれども本文から独立したちょっとした記事を入れるために、以下の命令があります。
|
|
@@ -634,7 +669,7 @@ LaTeX の式を挿入するには、`//texequation{ 〜 //}` を使います。
|
|
|
634
669
|
|
|
635
670
|
参照するにはインライン命令 `@<eq>` を使います(たとえば `@<eq>{emc}`)。
|
|
636
671
|
|
|
637
|
-
インライン命令では `@<m>{〜}` を使います。インライン命令の式中に「}」を含む場合、`\}` とエスケープする必要があることに注意してください(`{`
|
|
672
|
+
インライン命令では `@<m>{〜}` を使います。インライン命令の式中に「}」を含む場合、`\}` とエスケープする必要があることに注意してください(`{` はエスケープ不要)。長い式を書くときにはフェンス記法(`@<m>$〜$` または `@<m>|〜|`)を使うと、エスケープが不要になり、記述が楽になります。「インライン命令のフェンス記法」を参照してください。
|
|
638
673
|
|
|
639
674
|
LaTeX の数式が正常に整形されるかどうかは処理系に依存します。LaTeX を利用する PDFMaker では問題なく利用できます。
|
|
640
675
|
|
|
@@ -889,32 +924,7 @@ Lesser General Public License, ★"i"nternationalizatio"n"☆
|
|
|
889
924
|
|
|
890
925
|
## 生データ行
|
|
891
926
|
|
|
892
|
-
Re:VIEW のタグ範囲を超えて何か特別な行を挿入したい場合、`//raw`
|
|
893
|
-
|
|
894
|
-
### `//raw`行
|
|
895
|
-
|
|
896
|
-
例:
|
|
897
|
-
|
|
898
|
-
```
|
|
899
|
-
//raw[|html|<div class="special">\nここは特別な行です。\n</div>]
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
ブロック命令は1つだけオプションをとり、「|ビルダ名|そのまま出力させる内容」という書式です。`\n`は改行文字に変換されます。
|
|
903
|
-
|
|
904
|
-
ビルダ名には「`html`」「`latex`」「`idgxml`」「`markdown`」「`top`」のいずれかが入ります。ビルダ名は「,」で区切って複数指定することも可能です。該当のビルダを使用しているときのみ、内容が出力されます。
|
|
905
|
-
|
|
906
|
-
例:
|
|
907
|
-
|
|
908
|
-
```
|
|
909
|
-
(HTMLビルダの場合:)
|
|
910
|
-
<div class="special">
|
|
911
|
-
ここは特別な行です。
|
|
912
|
-
</div>
|
|
913
|
-
|
|
914
|
-
(ほかのビルダの場合は単に無視されて何も出力されない)
|
|
915
|
-
```
|
|
916
|
-
|
|
917
|
-
インライン命令は、`@<raw>{|ビルダ名|〜}` という書式で、記述はブロック命令に同じです。
|
|
927
|
+
Re:VIEW のタグ範囲を超えて何か特別な行を挿入したい場合、`//embed`ブロック命令や `@<embed>` インライン命令を使います。ほかに従来の `//raw` ブロック命令および `@<raw>` インライン命令もありますが、IDGXML ビルダ以外での使用は推奨しません。
|
|
918
928
|
|
|
919
929
|
### `//embed`ブロック
|
|
920
930
|
|
|
@@ -963,13 +973,38 @@ LaTeXビルダを使用している場合:
|
|
|
963
973
|
|
|
964
974
|
```
|
|
965
975
|
|
|
976
|
+
### `//raw`行(IDGXML ビルダ以外では非推奨)
|
|
977
|
+
|
|
978
|
+
例:
|
|
979
|
+
|
|
980
|
+
```
|
|
981
|
+
//raw[|html|<div class="special">\nここは特別な行です。\n</div>]
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
ブロック命令は1つだけオプションをとり、「|ビルダ名|そのまま出力させる内容」という書式です。`\n`は改行文字に変換されます。
|
|
985
|
+
|
|
986
|
+
ビルダ名には「`html`」「`latex`」「`idgxml`」「`markdown`」「`top`」のいずれかが入ります。ビルダ名は「,」で区切って複数指定することも可能です。該当のビルダを使用しているときのみ、内容が出力されます。
|
|
987
|
+
|
|
988
|
+
例:
|
|
989
|
+
|
|
990
|
+
```
|
|
991
|
+
(HTMLビルダの場合:)
|
|
992
|
+
<div class="special">
|
|
993
|
+
ここは特別な行です。
|
|
994
|
+
</div>
|
|
995
|
+
|
|
996
|
+
(ほかのビルダの場合は単に無視されて何も出力されない)
|
|
997
|
+
```
|
|
998
|
+
|
|
999
|
+
インライン命令は、`@<raw>{|ビルダ名|〜}` という書式で、記述はブロック命令に同じです。
|
|
1000
|
+
|
|
966
1001
|
`//raw`、`//embed`、`@<raw>` および `@<embed>` は、HTML、XML や TeX の文書構造を容易に壊す可能性があります。使用には十分に注意してください。
|
|
967
1002
|
|
|
968
1003
|
### 入れ子の箇条書き
|
|
969
1004
|
|
|
970
1005
|
Re:VIEW の箇条書きは `*` 型の箇条書きを除き、基本的に入れ子を表現できません。いずれの箇条書きも、別の箇条書き、あるいは図表・リストを箇条書きの途中に配置することを許容していません。
|
|
971
1006
|
|
|
972
|
-
この対策として、Re:VIEW 4.2
|
|
1007
|
+
この対策として、Re:VIEW 4.2 以降では `//beginchild`、`//endchild` というブロック命令があります。箇条書きの途中に何かを含めたいときには、それを `//beginchild` 〜 `//endchild` で囲んで配置します。多重に入れ子にすることも可能です。
|
|
973
1008
|
|
|
974
1009
|
```
|
|
975
1010
|
* UL1
|
|
@@ -1054,6 +1089,8 @@ UL1-OL1-PARAGRAPH
|
|
|
1054
1089
|
* `@<tcy>{〜}` : 縦書きの文書において文字を縦中横にします。
|
|
1055
1090
|
* `@<ins>{〜}` : 挿入箇所を明示します(デフォルトでは下線が引かれます)。
|
|
1056
1091
|
* `@<del>{〜}` : 削除箇所を明示します(デフォルトでは打ち消し線が引かれます)。
|
|
1092
|
+
* `@<sup>{〜}` : 上付き文字にします。
|
|
1093
|
+
* `@<sub>{〜}` : 下付き文字にします。
|
|
1057
1094
|
|
|
1058
1095
|
### 参照
|
|
1059
1096
|
* `@<chap>{章ファイル名}` : 「第17章」のような、章番号を含むテキストに置換されます。
|
|
@@ -1067,7 +1104,7 @@ UL1-OL1-PARAGRAPH
|
|
|
1067
1104
|
* `@<column>{ラベルまたは見出し}` : コラムを参照します。
|
|
1068
1105
|
|
|
1069
1106
|
### その他
|
|
1070
|
-
* `@<ruby>{
|
|
1107
|
+
* `@<ruby>{親文字,ルビ}` : ルビを振ります。たとえば `@<ruby>{愕然,がくぜん}` のように表記します。
|
|
1071
1108
|
* `@<br>{}` : 段落途中で改行します。濫用は避けたいところですが、表のセル内や箇条書き内などで必要になることもあります。
|
|
1072
1109
|
* `@<uchar>{番号}` : Unicode文字を出力します。引数は16進数で指定します。
|
|
1073
1110
|
* `@<href>{URL}`, `@<href>{URL, 文字表現}` : ハイパーリンクを作成します(後述)。
|
|
@@ -1075,8 +1112,8 @@ UL1-OL1-PARAGRAPH
|
|
|
1075
1112
|
* `@<m>{数式}` : インラインの数式を出力します。
|
|
1076
1113
|
* `@<w>{キー}` : キー文字列に対応する、単語ファイル内の値文字列を展開します。
|
|
1077
1114
|
* `@<wb>{キー}` : キー文字列に対応する、単語ファイル内の値文字列を展開し、太字にします。
|
|
1078
|
-
* `@<raw>{|ビルダ|〜}` : 生の文字列を出力します。`\}`は`}`に、`\\`は`\`に、`\n`は改行に置き換えられます。
|
|
1079
1115
|
* `@<embed>{|ビルダ|〜}` : 生の文字列を埋め込みます。`\}`は`}`に、`\\`は`\`に置き換えられます(`\n`はそのままです)。
|
|
1116
|
+
* `@<raw>{|ビルダ|〜}` : 生の文字列を出力します。`\}`は`}`に、`\\`は`\`に、`\n`は改行に置き換えられます(非推奨)。
|
|
1080
1117
|
* `@<idx>{文字列}` : 文字列を出力するとともに、索引として登録します。索引の使い方については、makeindex.ja.md を参照してください。
|
|
1081
1118
|
* `@<hidx>{文字列}` : 索引として登録します (idx と異なり、紙面内に出力はしません)。`親索引文字列<<>>子索引文字列` のように親子関係にある索引も定義できます。
|
|
1082
1119
|
* `@<balloon>{〜}` : コードブロック (emlist など) 内などでのいわゆる吹き出しを作成します。たとえば「`@<balloon>{ABC}`」とすると、「`←ABC`」となります。デフォルトの挙動および表現は簡素なので、より装飾されたものにするにはスタイルシートを改変するか、`review-ext.rb` を使って挙動を書き換える必要があります。
|
data/doc/format.md
CHANGED
|
@@ -4,7 +4,7 @@ The document is a brief guide for Re:VIEW markup syntax.
|
|
|
4
4
|
|
|
5
5
|
Re:VIEW is based on EWB of ASCII (now KADOKAWA), influenced RD and other Wiki system's syntax.
|
|
6
6
|
|
|
7
|
-
This document explains about the format of Re:VIEW 5.
|
|
7
|
+
This document explains about the format of Re:VIEW 5.5.
|
|
8
8
|
|
|
9
9
|
## Paragraph
|
|
10
10
|
|
|
@@ -112,7 +112,7 @@ You should add emply lines between Paragraphs and Itemize (same as Ordered and N
|
|
|
112
112
|
## Ordered Itemize
|
|
113
113
|
|
|
114
114
|
Ordered itemize (ol in HTML) uses ` 1. ...`, ` 2. ...`, ` 3. ...`.
|
|
115
|
-
|
|
115
|
+
Nesting output like `1-1` is not supported by default (nesting can be expressed using `//beginchild` - `//endchild`).
|
|
116
116
|
|
|
117
117
|
Usage:
|
|
118
118
|
|
|
@@ -122,15 +122,24 @@ Usage:
|
|
|
122
122
|
3. 3rd condition
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
You must write one more space character at line head like itemize.
|
|
126
|
+
|
|
127
|
+
Whether the numbers appear as described depends on the software that produces the output.
|
|
128
|
+
|
|
129
|
+
* HTML (EPUB), TeX: The number will start from 1 regardless of the number entered.
|
|
130
|
+
* IDGXML, text: The numbers will be output as described. Therefore, writing all numbers as "1." will produce strange results.
|
|
131
|
+
|
|
132
|
+
In HTML (EPUB) and TeX builders, use `//olnum[number]` to change the first number. Note that the intermediate numbers cannot be changed.
|
|
133
|
+
|
|
134
|
+
Usage:
|
|
126
135
|
|
|
127
136
|
```
|
|
128
|
-
|
|
129
|
-
1. 2nd condition
|
|
130
|
-
1. 3rd condition
|
|
131
|
-
```
|
|
137
|
+
//olnum[10]
|
|
132
138
|
|
|
133
|
-
|
|
139
|
+
1. This number will be 10
|
|
140
|
+
2. This number will be 11
|
|
141
|
+
6. 12 in continuity, not 6 or 15.
|
|
142
|
+
```
|
|
134
143
|
|
|
135
144
|
## Definition List
|
|
136
145
|
|
|
@@ -512,6 +521,26 @@ Seeing is believing.
|
|
|
512
521
|
|
|
513
522
|
You can use inline markup in quotations.
|
|
514
523
|
|
|
524
|
+
Center-aligned paragraphs are represented by `//centering{ ~ //}` and right-aligned paragraphs by `//flushright{ ~ //}`.
|
|
525
|
+
|
|
526
|
+
To include multiple paragraphs, separate them with a blank line.
|
|
527
|
+
|
|
528
|
+
Usage:
|
|
529
|
+
|
|
530
|
+
```
|
|
531
|
+
//centering{
|
|
532
|
+
This is
|
|
533
|
+
|
|
534
|
+
center aligned.
|
|
535
|
+
//}
|
|
536
|
+
|
|
537
|
+
//flushright{
|
|
538
|
+
This is
|
|
539
|
+
|
|
540
|
+
right aligned.
|
|
541
|
+
//}
|
|
542
|
+
```
|
|
543
|
+
|
|
515
544
|
## Short column
|
|
516
545
|
|
|
517
546
|
Some block commands are used for short column.
|
|
@@ -670,7 +699,7 @@ If you'd like to assign a number like 'Equation 1.1`, specify the identifier and
|
|
|
670
699
|
|
|
671
700
|
To reference this, use the inline command `@<eq>`.
|
|
672
701
|
|
|
673
|
-
There is `@<m>{ ... }` for inline (see "Fence notation for inline commands" section also).
|
|
702
|
+
There is `@<m>{ ... }` for inline. When writing long expressions, it is convenient to use fence notation (`@<m>$~$` or `@<m>|~|`) to avoid escaping. (see "Fence notation for inline commands" section also).
|
|
674
703
|
|
|
675
704
|
Whether LaTeX formula is correctly displayed or not depends on the processing system. PDFMaker uses LaTeX internally, so there is no problem.
|
|
676
705
|
|
|
@@ -943,20 +972,27 @@ Usage:
|
|
|
943
972
|
|
|
944
973
|
## Raw Data Block
|
|
945
974
|
|
|
946
|
-
When you want to write non-Re:VIEW line, use `//
|
|
975
|
+
When you want to write non-Re:VIEW line, use `//embed` or `@<embed>`.
|
|
947
976
|
|
|
948
|
-
### `//
|
|
977
|
+
### `//embed` block
|
|
949
978
|
|
|
950
979
|
Usage:
|
|
951
980
|
|
|
952
981
|
```
|
|
953
|
-
//
|
|
982
|
+
//embed{
|
|
983
|
+
<div class="special">
|
|
984
|
+
this is a special line.
|
|
985
|
+
</div>
|
|
986
|
+
//}
|
|
987
|
+
|
|
988
|
+
//embed[html,markdown]{
|
|
989
|
+
<div class="special">
|
|
990
|
+
this is a special line.
|
|
991
|
+
</div>
|
|
992
|
+
//}
|
|
954
993
|
```
|
|
955
994
|
|
|
956
|
-
In above line, `html` is a builder name that handle raw data.
|
|
957
|
-
You can use `html`, `latex`, `idgxml` and `top` as builder name.
|
|
958
|
-
You can specify multiple builder names with separator `,`.
|
|
959
|
-
`\n` is translated into newline(U+000A).
|
|
995
|
+
In above line, `html` and `markdown` is a builder name that handle raw data.
|
|
960
996
|
|
|
961
997
|
Output:
|
|
962
998
|
|
|
@@ -970,27 +1006,22 @@ this is a special line.
|
|
|
970
1006
|
|
|
971
1007
|
(In other formats, it is just ignored.)
|
|
972
1008
|
|
|
973
|
-
|
|
1009
|
+
For inline, use `@<embed>{|builder|raw string}`.
|
|
974
1010
|
|
|
975
|
-
### `//
|
|
1011
|
+
### `//raw` block
|
|
1012
|
+
|
|
1013
|
+
`//raw` and `@<raw>` is an old notation and should no longer be used (use it only if you want to avoid line breaks in IDGXML builder).
|
|
976
1014
|
|
|
977
1015
|
Usage:
|
|
978
1016
|
|
|
979
1017
|
```
|
|
980
|
-
//
|
|
981
|
-
<div class="special">
|
|
982
|
-
this is a special line.
|
|
983
|
-
</div>
|
|
984
|
-
//}
|
|
985
|
-
|
|
986
|
-
//embed[html,markdown]{
|
|
987
|
-
<div class="special">
|
|
988
|
-
this is a special line.
|
|
989
|
-
</div>
|
|
990
|
-
//}
|
|
1018
|
+
//raw[|html|<div class="special">\nthis is a special line.\n</div>]
|
|
991
1019
|
```
|
|
992
1020
|
|
|
993
|
-
In above line, `html`
|
|
1021
|
+
In above line, `html` is a builder name that handle raw data.
|
|
1022
|
+
You can use `html`, `latex`, `idgxml` and `top` as builder name.
|
|
1023
|
+
You can specify multiple builder names with separator `,`.
|
|
1024
|
+
`\n` is translated into newline(U+000A).
|
|
994
1025
|
|
|
995
1026
|
Output:
|
|
996
1027
|
|
|
@@ -1004,11 +1035,13 @@ this is a special line.
|
|
|
1004
1035
|
|
|
1005
1036
|
(In other formats, it is just ignored.)
|
|
1006
1037
|
|
|
1038
|
+
Note: `//embed`, `@<embed>`, `//raw` and `@<raw>` may break structured document easily.
|
|
1039
|
+
|
|
1007
1040
|
### Nested itemize block
|
|
1008
1041
|
|
|
1009
1042
|
Re:VIEW itemize blocks basically cannot express nested items. Also, none of itemize blocks allow to contain another itemize block or paragraph/image/table/list.
|
|
1010
1043
|
|
|
1011
|
-
As a workaround, Re:VIEW
|
|
1044
|
+
As a workaround, Re:VIEW provides `//beginchild` and `//endchild` since Re:VIEW 4.2. If you want to include something in an itemize block, enclose it with `//beginchild` and `//endchild`. It is also possible to create a multiple nest.
|
|
1012
1045
|
|
|
1013
1046
|
```
|
|
1014
1047
|
* UL1
|
|
@@ -1091,9 +1124,11 @@ Output:
|
|
|
1091
1124
|
@<tti>{FooClass}:: teletype (monospaced font) and italic
|
|
1092
1125
|
@<ttb>{BarClass}:: teletype (monospaced font) and bold
|
|
1093
1126
|
@<code>{a.foo(bar)}:: teletype (monospaced font) for fragments of code
|
|
1094
|
-
@<tcy>{}:: short horizontal text in vertical text
|
|
1127
|
+
@<tcy>{text}:: short horizontal text in vertical text
|
|
1095
1128
|
@<ins>{sentence}:: inserted part (underline)
|
|
1096
1129
|
@<del>{sentence}:: deleted part (strike through)
|
|
1130
|
+
@<sup>{text}:: superscript
|
|
1131
|
+
@<sub>{text}:: subscript
|
|
1097
1132
|
```
|
|
1098
1133
|
|
|
1099
1134
|
### References
|
|
@@ -1113,7 +1148,7 @@ Output:
|
|
|
1113
1148
|
### Other inline commands
|
|
1114
1149
|
|
|
1115
1150
|
```
|
|
1116
|
-
@<ruby>{Matsumoto,
|
|
1151
|
+
@<ruby>{Matsumoto,Matz}:: ruby markups
|
|
1117
1152
|
@<br>{}:: linebreak in paragraph
|
|
1118
1153
|
@<uchar>{2460}:: Unicode code point
|
|
1119
1154
|
@<href>{http://www.google.com/, google}:: hyper link(URL)
|
|
@@ -1121,8 +1156,8 @@ Output:
|
|
|
1121
1156
|
@<m>{a + \alpha}:: TeX inline equation
|
|
1122
1157
|
@<w>{key}:: expand the value corresponding to the key.
|
|
1123
1158
|
@<wb>{key}:: expand the value corresponding to the key with bold style.
|
|
1124
|
-
@<raw>{|html|<span>ABC</span>}:: inline raw data inline. `\}` is `}`, `\\` is `\`, and `\n` is newline.
|
|
1125
1159
|
@<embed>{|html|<span>ABC</span>}:: inline raw data inline. `\}` is `}` and `\\` is `\`.
|
|
1160
|
+
@<raw>{|html|<span>ABC</span>}:: inline raw data inline. `\}` is `}`, `\\` is `\`, and `\n` is newline. (deprecated)
|
|
1126
1161
|
@<idx>{string}:: output a string and register it as an index. See makeindex.md.
|
|
1127
1162
|
@<hidx>{string}:: register a string as an index. A leveled index is expressed like `parent<<>>child`
|
|
1128
1163
|
@<balloon>{abc}:: inline balloon in code block. For example, `@<balloon>{ABC}` produces `←ABC`. This may seem too simple. To decorate it, modify the style sheet file or override a function by `review-ext.rb`
|
data/doc/quickstart.ja.md
CHANGED
|
@@ -67,7 +67,13 @@ review-init コマンドを使って、雛型となるプロジェクトフォ
|
|
|
67
67
|
$ review-init プロジェクト名
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
TeX を利用した PDF 作成を目的としているならば、雛型の作成時に、Web
|
|
70
|
+
TeX を利用した PDF 作成を目的としているならば、雛型の作成時に、Web ブラウザによるウィザードモードで基本版面設計を行うことができます。外部 gem の webrick が必要なので、インストールしておいてください。
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
$ gem install webrick
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
ウィザードモードで起動するため、review-init コマンドに `-w` オプションを付けます。
|
|
71
77
|
|
|
72
78
|
```
|
|
73
79
|
$ review-init -w プロジェクト名
|
data/doc/quickstart.md
CHANGED
|
@@ -72,7 +72,13 @@ $ ls hello
|
|
|
72
72
|
Rakefile catalog.yml config.yml hello.re images/ layouts/ sty/ style.css
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
If your purpose is to create a PDF using TeX, it is a good idea to use the wizard mode for basic layouting in a web browser.
|
|
75
|
+
If your purpose is to create a PDF using TeX, it is a good idea to use the wizard mode for basic layouting in a web browser. Because the wizard mode requires webrick library, please install webrick gem before running.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
$ gem install webrick
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Run review-init with `-w` option.
|
|
76
82
|
|
|
77
83
|
(notice: currently wizard UI supports only Japanese language)
|
|
78
84
|
|
data/lib/review/book/base.rb
CHANGED