review 5.1.1 → 5.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby-tex.yml +6 -2
- data/.github/workflows/ruby-win.yml +6 -2
- data/.github/workflows/ruby.yml +6 -2
- data/.rubocop.yml +5 -319
- data/NEWS.ja.md +149 -0
- data/NEWS.md +149 -1
- data/README.md +9 -8
- data/bin/review +1 -1
- data/bin/review-catalog-converter +15 -15
- data/bin/review-check +7 -7
- data/bin/review-compile +14 -23
- data/bin/review-index +1 -1
- data/bin/review-preproc +29 -35
- data/bin/review-validate +2 -2
- data/doc/config.yml.sample +9 -1
- data/doc/config.yml.sample-simple +1 -1
- data/doc/format.ja.md +29 -3
- data/doc/format.md +32 -3
- data/doc/writing_vertical.ja.md +6 -0
- data/lib/review/book/base.rb +3 -3
- data/lib/review/book/book_unit.rb +13 -3
- data/lib/review/book/chapter.rb +1 -1
- data/lib/review/book/index.rb +7 -4
- data/lib/review/book/part.rb +12 -13
- data/lib/review/book/volume.rb +1 -1
- data/lib/review/builder.rb +92 -65
- data/lib/review/catalog.rb +6 -5
- data/lib/review/compiler.rb +76 -57
- data/lib/review/configure.rb +5 -2
- data/lib/review/epub2html.rb +12 -12
- data/lib/review/epubmaker/content.rb +1 -1
- data/lib/review/epubmaker/epubcommon.rb +47 -45
- data/lib/review/epubmaker/epubv2.rb +2 -1
- data/lib/review/epubmaker/epubv3.rb +5 -4
- data/lib/review/epubmaker/producer.rb +6 -7
- data/lib/review/epubmaker/reviewheaderlistener.rb +1 -1
- data/lib/review/epubmaker.rb +56 -67
- data/lib/review/exception.rb +7 -0
- data/lib/review/extentions/string.rb +1 -1
- data/lib/review/htmlbuilder.rb +90 -34
- data/lib/review/htmlutils.rb +17 -17
- data/lib/review/i18n.rb +3 -3
- data/lib/review/i18n.yml +6 -0
- data/lib/review/idgxmlbuilder.rb +61 -39
- data/lib/review/idgxmlmaker.rb +27 -26
- data/lib/review/img_math.rb +12 -18
- data/lib/review/index_builder.rb +94 -53
- data/lib/review/init.rb +4 -4
- data/lib/review/latexbuilder.rb +84 -76
- data/lib/review/lineinput.rb +3 -3
- data/lib/review/location.rb +1 -1
- data/lib/review/loggable.rb +27 -0
- data/lib/review/logger.rb +69 -21
- data/lib/review/makerhelper.rb +8 -4
- data/lib/review/markdownbuilder.rb +21 -12
- data/lib/review/pdfmaker.rb +63 -42
- data/lib/review/plaintextbuilder.rb +16 -15
- data/lib/review/preprocessor/directive.rb +35 -0
- data/lib/review/preprocessor/line.rb +34 -0
- data/lib/review/preprocessor/repository.rb +177 -0
- data/lib/review/preprocessor.rb +94 -296
- data/lib/review/rstbuilder.rb +12 -3
- data/lib/review/template.rb +5 -1
- data/lib/review/textmaker.rb +32 -31
- data/lib/review/textutils.rb +5 -6
- data/lib/review/tocprinter.rb +12 -7
- data/lib/review/topbuilder.rb +96 -19
- data/lib/review/update.rb +16 -8
- data/lib/review/version.rb +1 -1
- data/lib/review/volumeprinter.rb +9 -9
- data/lib/review/webmaker.rb +45 -46
- data/lib/review/webtocprinter.rb +10 -10
- data/lib/review/yamlloader.rb +35 -2
- data/review.gemspec +2 -1
- data/samples/sample-book/src/config.yml +0 -1
- data/samples/sample-book/src/lib/tasks/review.rake +3 -1
- data/samples/sample-book/src/lib/tasks/z01_copy_sty.rake +2 -1
- data/samples/syntax-book/ch02.re +9 -0
- data/samples/syntax-book/lib/tasks/z01_copy_sty.rake +2 -1
- data/templates/html/_titlepage.html.erb +9 -17
- data/templates/latex/config.erb +3 -0
- data/templates/latex/review-jlreq/review-base.sty +4 -5
- data/templates/latex/review-jlreq/review-jlreq.cls +39 -5
- data/templates/latex/review-jsbook/review-base.sty +9 -3
- data/templates/latex/review-jsbook/review-jsbook.cls +32 -5
- data/templates/opf/opf_manifest_epubv2.opf.erb +1 -1
- data/templates/opf/opf_manifest_epubv3.opf.erb +1 -1
- data/test/assets/syntax_book_index_detail.txt +10 -8
- data/test/assets/test_template.tex +4 -1
- data/test/assets/test_template_backmatter.tex +4 -1
- data/test/book_test_helper.rb +10 -10
- data/test/test_book_chapter.rb +25 -2
- data/test/test_builder.rb +10 -8
- data/test/test_epub3maker.rb +3 -3
- data/test/test_epubmaker.rb +27 -37
- data/test/test_epubmaker_cmd.rb +14 -3
- data/test/test_htmlbuilder.rb +111 -31
- data/test/test_idgxmlbuilder.rb +41 -33
- data/test/test_idgxmlmaker_cmd.rb +1 -1
- data/test/test_img_math.rb +11 -2
- data/test/test_index.rb +30 -4
- data/test/test_latexbuilder.rb +46 -25
- data/test/test_latexbuilder_v2.rb +18 -10
- data/test/test_markdownbuilder.rb +13 -0
- data/test/test_pdfmaker.rb +19 -0
- data/test/test_pdfmaker_cmd.rb +10 -10
- data/test/test_plaintextbuilder.rb +46 -22
- data/test/test_preprocessor.rb +188 -1
- data/test/test_rstbuilder.rb +13 -0
- data/test/test_textmaker_cmd.rb +1 -1
- data/test/test_topbuilder.rb +195 -29
- data/test/test_yamlloader.rb +28 -42
- metadata +11 -6
data/NEWS.ja.md
CHANGED
@@ -1,3 +1,152 @@
|
|
1
|
+
# Version 5.4.0
|
2
|
+
## 新機能
|
3
|
+
* Re:VIEW に関する質問の受け付けに対応する [GitHub Discussions](https://github.com/kmuto/review/discussions) を開始しました
|
4
|
+
|
5
|
+
## 非互換の変更
|
6
|
+
* EPUBMaker: opf ファイルの `manifest` 内の `item` を ID 文字列の辞書順でソートするようにしました ([#1763])
|
7
|
+
* TextMaker: 表の見出しセル行を太字表現(★〜☆)にするのではなく、見出しセル行と通常セル行の区切り線を入れるようにしました。従来の太字表現に戻すには `textmaker` セクションの `th_bold` パラメータを true に設定してください ([#1789])
|
8
|
+
* TextMaker: `//indepimage` 命令の出力結果を `//image` に合わせました。開始・終了マークが入り、画像ファイルが見つからないときにはコメント内容を出力するようになります ([#1790])
|
9
|
+
* TextMaker: `//imgtable` 命令の出力結果を `//image` および `//table` に合わせました。開始・終了マークが入り、画像ファイルが見つからないときにはコメント内容を出力するようになります ([#1791])
|
10
|
+
* ハイライト有効時に、`//source` 命令もハイライト対象として中身をエスケープしないようにしました ([#1788])
|
11
|
+
|
12
|
+
## バグ修正
|
13
|
+
* Ruby 3.1 で YAML のエラーが発生するのを修正し、互換性も持たせました ([#1767], [#1775])
|
14
|
+
* EPUBMaker: `epub:type=cover` が大扉や奥付に入るのを修正しました ([#1776])
|
15
|
+
* 無効な urnid の例がサンプルとして示されているのを削除しました ([#1779])
|
16
|
+
* config.yml の YAML 構文にエラーがあったときに例外ではなく妥当なエラーを返すようにしました ([#1797])
|
17
|
+
* IDGXMLMaker: secttags を有効にしている状態で前付や後付がエラーになるのを修正しました ([#1800])
|
18
|
+
|
19
|
+
## 機能強化
|
20
|
+
* EPUBMaker, WebMaker: 表紙・大扉・奥付・部のベーステンプレートに通常の章と同じく `layout.html.erb` または `layout-web.html.erb` を使うようにしました ([#1780])
|
21
|
+
* EPUBMaker, WebMaker: 表紙・大扉・奥付・部のカスタムテンプレートとして、`layouts` フォルダの `_cover.html.erb`、`_titlepage.html.erb`、`_colophon.html.erb`、`_colophon_history.html.erb`、`_part_body.html.erb` で上書きできるようにしました ([#1777])
|
22
|
+
|
23
|
+
## ドキュメント
|
24
|
+
* GitHub Discussions について README.md に記載しました ([#1772])
|
25
|
+
|
26
|
+
## その他
|
27
|
+
* RuboCop 1.25.1 の指摘を反映しました ([#1773], [#1782], [#1783], [#1784], [#1792])
|
28
|
+
|
29
|
+
[#1763]: https://github.com/kmuto/review/pull/1763
|
30
|
+
[#1767]: https://github.com/kmuto/review/pull/1767
|
31
|
+
[#1772]: https://github.com/kmuto/review/pull/1772
|
32
|
+
[#1773]: https://github.com/kmuto/review/pull/1773
|
33
|
+
[#1775]: https://github.com/kmuto/review/pull/1775
|
34
|
+
[#1776]: https://github.com/kmuto/review/pull/1776
|
35
|
+
[#1777]: https://github.com/kmuto/review/issues/1777
|
36
|
+
[#1779]: https://github.com/kmuto/review/pull/1779
|
37
|
+
[#1780]: https://github.com/kmuto/review/pull/1780
|
38
|
+
[#1782]: https://github.com/kmuto/review/pull/1782
|
39
|
+
[#1783]: https://github.com/kmuto/review/pull/1783
|
40
|
+
[#1784]: https://github.com/kmuto/review/pull/1784
|
41
|
+
[#1788]: https://github.com/kmuto/review/pull/1788
|
42
|
+
[#1789]: https://github.com/kmuto/review/issues/1789
|
43
|
+
[#1790]: https://github.com/kmuto/review/issues/1790
|
44
|
+
[#1791]: https://github.com/kmuto/review/issues/1791
|
45
|
+
[#1792]: https://github.com/kmuto/review/pull/1792
|
46
|
+
[#1797]: https://github.com/kmuto/review/issues/1797
|
47
|
+
[#1800]: https://github.com/kmuto/review/pull/1800
|
48
|
+
|
49
|
+
# Version 5.3.0
|
50
|
+
## 新機能
|
51
|
+
* 後注のサポートを追加しました。`//endnote` 命令で後注内容、`@<endnote>` 命令で後注参照、`//printendnotes` 命令で後注を配置する場所を指定します ([#1724])
|
52
|
+
|
53
|
+
## バグ修正
|
54
|
+
* 新しい jlreq において ifthen パッケージに非依存になったことによるエラーを修正しました ([#1718])
|
55
|
+
* review-jsbook と新しい TeXLive 2020 以降の組み合わせにおいて、隠しノンブルがすべて1になってしまう問題を修正しました ([#1720])
|
56
|
+
* coverimage パラメータに実際に存在しないファイルを指定したときに例外エラーが発生するのを修正しました ([#1726], [#1729])
|
57
|
+
* titlefile・creditfile・profile パラメータに存在しないファイルを指定したときに警告を表示するようにしました ([#1730])
|
58
|
+
* review-jlreq で `@<tcy>` 命令がエラーになるのを修正しました。縦中横の TeX 表現側での抽象名に `\reviewtcy` マクロを使うようにしました ([#1733])
|
59
|
+
* review-vol および review-index の例外エラーを修正しました ([#1740])
|
60
|
+
* 数式ビルドエラーが出たときに `__IMGMATH_BODY__.tex` のコピーを忘れているのを修正しました ([#1747])
|
61
|
+
* `//beginchild`・`//endchild` 命令でエラーが起きたときにエラー位置の表示がされていなかったのを修正しました ([#1742])
|
62
|
+
* `//graph` 命令を使うとビルドエラーになるのを修正しました ([#1744])
|
63
|
+
* epubmaker.rb で未定義の変数を参照している箇所を修正しました ([#1755])
|
64
|
+
* review-catalog-converter がエラーになるのを修正しました ([#1753])
|
65
|
+
|
66
|
+
## 機能強化
|
67
|
+
* 脚注 (`//footnote`)・後注(`//endnote`) を定義したけれども参照(`@<fn>`、`@<endnote>`)していないときに警告するようにしました ([#1725])
|
68
|
+
* 紙面全体に画像を貼り込む `\includefullpagegraphics` マクロを縦書きにも対応するようにしました ([#1734])
|
69
|
+
* plantuml の jar ファイル探索先を作業フォルダのほか、`/usr/share/plantuml`、`/usr/share/java` からも探すようにしました ([#1760])
|
70
|
+
|
71
|
+
## ドキュメント
|
72
|
+
* format.ja.md, format.md: SVG数式を作成するコマンドラインの間違いを修正しました ([#1748])
|
73
|
+
|
74
|
+
## その他
|
75
|
+
* Windows 版 Ruby 2.7 のテストを追加しました ([#1743])
|
76
|
+
* Rubocop 1.22.1 に対応しました ([#1759])
|
77
|
+
|
78
|
+
## コントリビューターのみなさん
|
79
|
+
* [@munepi](https://github.com/munepi)
|
80
|
+
* [@huideyeren](https://github.com/huideyeren)
|
81
|
+
|
82
|
+
[#1718]: https://github.com/kmuto/review/issues/1718
|
83
|
+
[#1720]: https://github.com/kmuto/review/issues/1720
|
84
|
+
[#1724]: https://github.com/kmuto/review/issues/1724
|
85
|
+
[#1725]: https://github.com/kmuto/review/issues/1725
|
86
|
+
[#1726]: https://github.com/kmuto/review/issues/1726
|
87
|
+
[#1729]: https://github.com/kmuto/review/pull/1729
|
88
|
+
[#1730]: https://github.com/kmuto/review/pull/1730
|
89
|
+
[#1733]: https://github.com/kmuto/review/issues/1733
|
90
|
+
[#1734]: https://github.com/kmuto/review/issues/1734
|
91
|
+
[#1740]: https://github.com/kmuto/review/pull/1740
|
92
|
+
[#1742]: https://github.com/kmuto/review/pull/1742
|
93
|
+
[#1743]: https://github.com/kmuto/review/pull/1743
|
94
|
+
[#1744]: https://github.com/kmuto/review/issues/1744
|
95
|
+
[#1747]: https://github.com/kmuto/review/pull/1747
|
96
|
+
[#1748]: https://github.com/kmuto/review/pull/1748
|
97
|
+
[#1753]: https://github.com/kmuto/review/issues/1753
|
98
|
+
[#1755]: https://github.com/kmuto/review/issues/1755
|
99
|
+
[#1759]: https://github.com/kmuto/review/pull/1759
|
100
|
+
[#1760]: https://github.com/kmuto/review/pull/1760
|
101
|
+
|
102
|
+
# Version 5.2.0
|
103
|
+
## 新機能
|
104
|
+
* EPUBMaker: CSS 組版向けに、見出しの存在に応じて `<section>` で階層化する機能を追加しました。config.yml で `epubmaker` セクションの `use_section` パラメータを `true` にすると有効化されます ([#1685])
|
105
|
+
|
106
|
+
## バグ修正
|
107
|
+
* PDFMaker: Ruby 2.6 以上でテンプレートの引数についての警告が出る問題を修正しました ([#1683])
|
108
|
+
* EPUBMaker: Docker 環境においてファイルがコピーされず空になる問題を修正しました ([#1686])
|
109
|
+
* 縦中横を正しく表示する CSS 設定を追加しました ([#1688])
|
110
|
+
* PDFMaker: 新しい TeXLive との組み合わせで pxjahyper のオプション競合エラーが発生するのを修正しました ([#1690])
|
111
|
+
* PDFMaker: 画像が見つからないときにコンパイルエラーになるのを修正しました ([#1706])
|
112
|
+
|
113
|
+
## 機能強化
|
114
|
+
* 警告とエラーを出力する際の処理を改善しました。`error!` (すぐに終了) および `app_error` (`ApplicationError` 例外を上げる) メソッドを導入しました ([#1674])
|
115
|
+
* PDFMaker: ビルドのために画像ファイルをコピーする際、実コピーではなくシンボリックリンクを利用して処理を高速化するオプションを追加しました。`pdfmaker` セクションの `use_symlink` パラメータを `true` にすると、デフォルト挙動の実コピーの代わりにシンボリックリンクが使われます。Windows など一部の OS ではこれは動作しない可能性があります ([#1696])
|
116
|
+
* PDFMaker: review-jlreq で `serial_pagination=true, openany` を指定したときには前付の後の空ページが入らないようにしました ([#1711])
|
117
|
+
|
118
|
+
## その他
|
119
|
+
* GitHub Actions まわりを修正しました ([#1684], [#1691])
|
120
|
+
* review-preproc: リファクタリングを行いました ([#1697])
|
121
|
+
* 入れ子の箇条書きの処理をリファクタリングしました ([#1698])
|
122
|
+
* Rubocop 1.12 に対応しました ([#1689], [#1692], [#1699], [#1700])
|
123
|
+
* 各ビルダの `builder_init_file` メソッドで最初に `super` で基底 builder の `builder_init_file` を実行するようにしました ([#1702])
|
124
|
+
* PDFMaker: FileUtils ライブラリを内部で使う際に、明示記法の `FIleUtils.foobar` を使うようにしました ([#1704])
|
125
|
+
|
126
|
+
## コントリビューターのみなさん
|
127
|
+
* [@odaki](https://github.com/odaki)
|
128
|
+
* [@imamurayusuke](https://github.com/imamurayusuke)
|
129
|
+
|
130
|
+
[#1674]: https://github.com/kmuto/review/issues/1674
|
131
|
+
[#1683]: https://github.com/kmuto/review/pulls/1683
|
132
|
+
[#1684]: https://github.com/kmuto/review/pulls/1684
|
133
|
+
[#1685]: https://github.com/kmuto/review/pulls/1685
|
134
|
+
[#1686]: https://github.com/kmuto/review/issues/1686
|
135
|
+
[#1688]: https://github.com/kmuto/review/pulls/1688
|
136
|
+
[#1689]: https://github.com/kmuto/review/pulls/1689
|
137
|
+
[#1690]: https://github.com/kmuto/review/pulls/1690
|
138
|
+
[#1691]: https://github.com/kmuto/review/pulls/1691
|
139
|
+
[#1692]: https://github.com/kmuto/review/pulls/1692
|
140
|
+
[#1696]: https://github.com/kmuto/review/issues/1696
|
141
|
+
[#1697]: https://github.com/kmuto/review/pulls/1697
|
142
|
+
[#1698]: https://github.com/kmuto/review/pulls/1698
|
143
|
+
[#1699]: https://github.com/kmuto/review/pulls/1699
|
144
|
+
[#1700]: https://github.com/kmuto/review/pulls/1700
|
145
|
+
[#1702]: https://github.com/kmuto/review/pulls/1702
|
146
|
+
[#1704]: https://github.com/kmuto/review/pulls/1704
|
147
|
+
[#1706]: https://github.com/kmuto/review/issues/1706
|
148
|
+
[#1711]: https://github.com/kmuto/review/issues/1711
|
149
|
+
|
1
150
|
# Version 5.1.1
|
2
151
|
## バグ修正
|
3
152
|
* `review-preproc` がエラーになるのを修正しました ([#1679])
|
data/NEWS.md
CHANGED
@@ -1,3 +1,152 @@
|
|
1
|
+
# Version 5.4.0
|
2
|
+
## New Features
|
3
|
+
* [GitHub Discussions](https://github.com/kmuto/review/discussions) has been opened to answer questions about Re:VIEW
|
4
|
+
|
5
|
+
## Breaking Changes
|
6
|
+
* EPUBMaker: `manifest/item` in the opf file is now sorted by the dictional order of ID strings ([#1763])
|
7
|
+
* TextMaker: the separator line now put between the heading rows and the normal rows of the table. To revert this behavior to old version, set `textmaker/th_bold` parameter to true ([#1789])
|
8
|
+
* TextMaker: the output result of the `//indepimage` op has been adjusted to `//image` ([#1790])
|
9
|
+
* TextMaker: the output result of the `//imgtable` op has been adjusted to `//image` and `//table` ([#1791])
|
10
|
+
* `//source` op is now also not escaped when highlighting is enabled ([#1788])
|
11
|
+
|
12
|
+
## Bug Fixes
|
13
|
+
* fixed YAML error in Ruby 3.1 and kept backward compatibility ([#1767], [#1775])
|
14
|
+
* EPUBMaker: removed `epub:type=cover` from titlepage and colophon ([#1776])
|
15
|
+
* removed invalid urnid sample ([#1779])
|
16
|
+
* when there is a syntax error in config.yml, exit with proper error message instead of an exception ([#1797])
|
17
|
+
* IDGXMLMaker: fixed an error to compile prefaces or postfaces when secttags is enabled ([#1800])
|
18
|
+
|
19
|
+
## Enhancements
|
20
|
+
* EPUBMaker, WebMaker: use `layout.html.erb` or `layout-web.html.erb` as the base template for cover, titlepage, colophon, and part, just like regular chapters ([#1780])
|
21
|
+
* EPUBMaker, WebMaker: cover, titlepage, colophon, and part can now be overwritten with `_cover.html.erb`, `_titlepage.html.erb`, `_colophon.html.erb`, `_colophon_history.html.erb`, and `_part_body.html.erb` ([#1777])
|
22
|
+
|
23
|
+
## Docs
|
24
|
+
* mentioned GitHub Discussions in README.md ([#1772])
|
25
|
+
|
26
|
+
## Others
|
27
|
+
* refactor code with RuboCop 1.25.1 ([#1773], [#1782], [#1783], [#1784], [#1792])
|
28
|
+
|
29
|
+
[#1763]: https://github.com/kmuto/review/pull/1763
|
30
|
+
[#1767]: https://github.com/kmuto/review/pull/1767
|
31
|
+
[#1772]: https://github.com/kmuto/review/pull/1772
|
32
|
+
[#1773]: https://github.com/kmuto/review/pull/1773
|
33
|
+
[#1775]: https://github.com/kmuto/review/pull/1775
|
34
|
+
[#1776]: https://github.com/kmuto/review/pull/1776
|
35
|
+
[#1777]: https://github.com/kmuto/review/issues/1777
|
36
|
+
[#1779]: https://github.com/kmuto/review/pull/1779
|
37
|
+
[#1780]: https://github.com/kmuto/review/pull/1780
|
38
|
+
[#1782]: https://github.com/kmuto/review/pull/1782
|
39
|
+
[#1783]: https://github.com/kmuto/review/pull/1783
|
40
|
+
[#1784]: https://github.com/kmuto/review/pull/1784
|
41
|
+
[#1788]: https://github.com/kmuto/review/pull/1788
|
42
|
+
[#1789]: https://github.com/kmuto/review/issues/1789
|
43
|
+
[#1790]: https://github.com/kmuto/review/issues/1790
|
44
|
+
[#1791]: https://github.com/kmuto/review/issues/1791
|
45
|
+
[#1792]: https://github.com/kmuto/review/pull/1792
|
46
|
+
[#1797]: https://github.com/kmuto/review/issues/1797
|
47
|
+
[#1800]: https://github.com/kmuto/review/pull/1800
|
48
|
+
|
49
|
+
# Version 5.3.0
|
50
|
+
## New Features
|
51
|
+
* add the future of endnote. `//endnote` specifies the content of the endnote, `@<endnote>` specifies the reference to the endnote, and `//printendnotes` places endnotes ([#1724])
|
52
|
+
|
53
|
+
## Bug Fixes
|
54
|
+
* fixed an error in new jlreq that caused it to become independent of ifthen package ([#1718])
|
55
|
+
* fixed an issue with hidden folio being set to all 1 when using review-jsbook with TeXLive 2020 or later ([#1720])
|
56
|
+
* fixed an error that occurred when a non-existent file was specified in the coverimage parameter ([#1726], [#1729])
|
57
|
+
* it now warns when a non-existent file is specified in the titlefile, creditfile, and profile parameters ([#1730])
|
58
|
+
* fixed `@<tcy>` op error in review-jlreq. this op will be expanded into `\reviewtcy` macro ([#1733])
|
59
|
+
* fixed exception errors in review-vol and review-index ([#1740])
|
60
|
+
* fixed forgetting to copy `__IMGMATH_BODY__.tex` when math compiling error occurs ([#1747])
|
61
|
+
* fixed the problem that the position of `//beginchild` and `//endchild` is not displayed when an error occurs ([#1742])
|
62
|
+
* fixed a build error when using `//graph` op ([#1744])
|
63
|
+
* fixed undefined variable in epubmaker.rb ([#1755])
|
64
|
+
* fixed execution error in review-catalog-converter ([#1753])
|
65
|
+
|
66
|
+
## Enhancements
|
67
|
+
* warnings are now given when footnotes (`//footnote`) and endnotes (`//endnote`) are defined but not referenced (`@<fn>`, `@<endnote>`) ([#1725])
|
68
|
+
* `\includefullpagegraphics` macro that pastes an image over the entire page now supports vertical writing ([#1734])
|
69
|
+
* try to find plantuml.jar from the working folder, `/usr/share/plantuml`, or `/usr/share/java` ([#1760])
|
70
|
+
|
71
|
+
## Docs
|
72
|
+
* format.ja.md, format.md: fixed a mistake in the command line for creating SVG formulas ([#1748])
|
73
|
+
|
74
|
+
## Others
|
75
|
+
* added tests for Ruby 2.7 for Windows ([#1743])
|
76
|
+
* refactor code with Rubocop 1.22.1 ([#1759])
|
77
|
+
|
78
|
+
## Contributors
|
79
|
+
* [@munepi](https://github.com/munepi)
|
80
|
+
* [@huideyeren](https://github.com/huideyeren)
|
81
|
+
|
82
|
+
[#1718]: https://github.com/kmuto/review/issues/1718
|
83
|
+
[#1720]: https://github.com/kmuto/review/issues/1720
|
84
|
+
[#1724]: https://github.com/kmuto/review/issues/1724
|
85
|
+
[#1725]: https://github.com/kmuto/review/issues/1725
|
86
|
+
[#1726]: https://github.com/kmuto/review/issues/1726
|
87
|
+
[#1729]: https://github.com/kmuto/review/pull/1729
|
88
|
+
[#1730]: https://github.com/kmuto/review/pull/1730
|
89
|
+
[#1733]: https://github.com/kmuto/review/issues/1733
|
90
|
+
[#1734]: https://github.com/kmuto/review/issues/1734
|
91
|
+
[#1740]: https://github.com/kmuto/review/pull/1740
|
92
|
+
[#1742]: https://github.com/kmuto/review/pull/1742
|
93
|
+
[#1743]: https://github.com/kmuto/review/pull/1743
|
94
|
+
[#1744]: https://github.com/kmuto/review/issues/1744
|
95
|
+
[#1747]: https://github.com/kmuto/review/pull/1747
|
96
|
+
[#1748]: https://github.com/kmuto/review/pull/1748
|
97
|
+
[#1753]: https://github.com/kmuto/review/issues/1753
|
98
|
+
[#1755]: https://github.com/kmuto/review/issues/1755
|
99
|
+
[#1759]: https://github.com/kmuto/review/pull/1759
|
100
|
+
[#1760]: https://github.com/kmuto/review/pull/1760
|
101
|
+
|
102
|
+
# Version 5.2.0
|
103
|
+
## New Features
|
104
|
+
* EPUBMaker: added `<section>` based on heading level for CSS formatting, when the `epubmaker/use_section` parameter is set to `true` ([#1685])
|
105
|
+
|
106
|
+
## Bug Fixes
|
107
|
+
* PDFMaker: fixed a problem that caused a warning in templates for Ruby 2.6 and above ([#1683])
|
108
|
+
* EPUBMaker: fixed an issue that caused copied files to be empty in Docker environments ([#1686])
|
109
|
+
* added CSS style for correct displaying horizontal characters in vertical typesetting ([#1688])
|
110
|
+
* PDFMaker: fixed the pxjahyper option conflict error on latest TeXLive ([#1690])
|
111
|
+
* PDFMaker: fixed compile error when image is not found ([#1706])
|
112
|
+
|
113
|
+
## Enhancements
|
114
|
+
* improve around warn and error handling ([#1674])
|
115
|
+
* PDFMaker: introduced `pdfmaker/use_symlink` parameter to speed up the process by using symbolic links instead of actual copies. This may not work on some operating systems such as Windows ([#1696])
|
116
|
+
* PDFMaker: don't insert empty page after frontmatter when using review-jlreq with `serial_pagination=true, openany` ([#1711])
|
117
|
+
|
118
|
+
## Others
|
119
|
+
* fixed related to GitHub Actions ([#1684], [#1691])
|
120
|
+
* review-preproc: refactored ([#1697])
|
121
|
+
* refactored nested lists handling ([#1698])
|
122
|
+
* refactor code with Rubocop 1.12 ([#1689], [#1692], [#1699], [#1700])
|
123
|
+
* The `builder_init_file` method of each builder now executes `super` first to use base builder's `builder_init_file` ([#1702])
|
124
|
+
* PDFMaker: Stopped implicitly including FileUtils library ([#1704])
|
125
|
+
|
126
|
+
## Contributors
|
127
|
+
* [@odaki](https://github.com/odaki)
|
128
|
+
* [@imamurayusuke](https://github.com/imamurayusuke)
|
129
|
+
|
130
|
+
[#1674]: https://github.com/kmuto/review/issues/1674
|
131
|
+
[#1683]: https://github.com/kmuto/review/pulls/1683
|
132
|
+
[#1684]: https://github.com/kmuto/review/pulls/1684
|
133
|
+
[#1685]: https://github.com/kmuto/review/pulls/1685
|
134
|
+
[#1686]: https://github.com/kmuto/review/issues/1686
|
135
|
+
[#1688]: https://github.com/kmuto/review/pulls/1688
|
136
|
+
[#1689]: https://github.com/kmuto/review/pulls/1689
|
137
|
+
[#1690]: https://github.com/kmuto/review/pulls/1690
|
138
|
+
[#1691]: https://github.com/kmuto/review/pulls/1691
|
139
|
+
[#1692]: https://github.com/kmuto/review/pulls/1692
|
140
|
+
[#1696]: https://github.com/kmuto/review/issues/1696
|
141
|
+
[#1697]: https://github.com/kmuto/review/pulls/1697
|
142
|
+
[#1698]: https://github.com/kmuto/review/pulls/1698
|
143
|
+
[#1699]: https://github.com/kmuto/review/pulls/1699
|
144
|
+
[#1700]: https://github.com/kmuto/review/pulls/1700
|
145
|
+
[#1702]: https://github.com/kmuto/review/pulls/1702
|
146
|
+
[#1704]: https://github.com/kmuto/review/pulls/1704
|
147
|
+
[#1706]: https://github.com/kmuto/review/issues/1706
|
148
|
+
[#1711]: https://github.com/kmuto/review/issues/1711
|
149
|
+
|
1
150
|
# Version 5.1.1
|
2
151
|
## Bug Fixes
|
3
152
|
* Fix the runtime error of `review-preproc` ([#1679])
|
@@ -1808,4 +1957,3 @@ To support language parameter for syntax highlighting, if you use review-ext.rb
|
|
1808
1957
|
* add headline level 5 and 6 (paragraph, subparagraph)
|
1809
1958
|
* escape all dash
|
1810
1959
|
* add ``begin{alltt}..\end{alltt}`` into ``\reviewemlist``, ``\reviewlist`` and ``\reviewcmd``
|
1811
|
-
|
data/README.md
CHANGED
@@ -74,13 +74,14 @@ For further information, see [doc/quickstart.md](https://github.com/kmuto/review
|
|
74
74
|
|
75
75
|
## Resources
|
76
76
|
|
77
|
-
| | URL
|
78
|
-
|
79
|
-
| Home | http://reviewml.org
|
80
|
-
| Project | https://github.com/kmuto/review/
|
81
|
-
| Gems | https://rubygems.org/gems/review
|
82
|
-
|
|
83
|
-
|
|
77
|
+
| | URL |
|
78
|
+
|---------|---------------------------------------------|
|
79
|
+
| Home | http://reviewml.org |
|
80
|
+
| Project | https://github.com/kmuto/review/ |
|
81
|
+
| Gems | https://rubygems.org/gems/review |
|
82
|
+
| Q&A | https://github.com/kmuto/review/discussions |
|
83
|
+
| Wiki | https://github.com/kmuto/review/wiki |
|
84
|
+
| Bugs | https://github.com/kmuto/review/issues |
|
84
85
|
|
85
86
|
### Documents
|
86
87
|
|
@@ -116,4 +117,4 @@ Exception:
|
|
116
117
|
|
117
118
|
## Copyright
|
118
119
|
|
119
|
-
Copyright (c) 2006-
|
120
|
+
Copyright (c) 2006-2022 Minero Aoki, Kenshi Muto, Masayoshi Takahashi, Masanori Kado.
|
data/bin/review
CHANGED
@@ -58,7 +58,7 @@ unless File.exist?(command_path)
|
|
58
58
|
usage
|
59
59
|
end
|
60
60
|
|
61
|
-
if RUBY_PLATFORM
|
61
|
+
if RUBY_PLATFORM.match?(/mswin|bccwin|mingw/)
|
62
62
|
cmd = File.join(RbConfig::CONFIG['bindir'],
|
63
63
|
RbConfig::CONFIG['ruby_install_name'])
|
64
64
|
cmd << RbConfig::CONFIG['EXEEXT']
|
@@ -55,21 +55,21 @@ def main
|
|
55
55
|
end
|
56
56
|
# chaps and parts
|
57
57
|
if File.exist?("#{dir}/CHAPS")
|
58
|
-
if File.exist?("#{dir}/PART")
|
59
|
-
|
58
|
+
catalog << if File.exist?("#{dir}/PART")
|
59
|
+
parse_parts(File.read("#{dir}/PART"),
|
60
60
|
File.read("#{dir}/CHAPS"))
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
else
|
62
|
+
parse_chaps(File.read("#{dir}/CHAPS"))
|
63
|
+
end
|
64
64
|
end
|
65
65
|
# postdef
|
66
66
|
if File.exist?("#{dir}/POSTDEF")
|
67
67
|
postdef = File.read("#{dir}/POSTDEF")
|
68
|
-
if ask_yes?('Do you want to convert POSTDEF into APPENDIX? [y/n]')
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
68
|
+
catalog << if ask_yes?('Do you want to convert POSTDEF into APPENDIX? [y/n]')
|
69
|
+
parse_postdef(postdef, true)
|
70
|
+
else
|
71
|
+
parse_postdef(postdef)
|
72
|
+
end
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
@@ -99,11 +99,11 @@ def parse_chaps(str)
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def parse_postdef(str, to_appendix = false)
|
102
|
-
if to_appendix
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
102
|
+
header = if to_appendix
|
103
|
+
"APPENDIX:\n"
|
104
|
+
else
|
105
|
+
"POSTDEF:\n"
|
106
|
+
end
|
107
107
|
parse_internal(str, header) + "\n"
|
108
108
|
end
|
109
109
|
|
data/bin/review-check
CHANGED
@@ -18,7 +18,7 @@ include ReVIEW::TextUtils
|
|
18
18
|
|
19
19
|
def sigmain
|
20
20
|
Signal.trap(:INT) { exit 1 }
|
21
|
-
|
21
|
+
unless RUBY_PLATFORM.match?(/mswin(?!ce)|mingw|cygwin|bccwin/)
|
22
22
|
Signal.trap(:PIPE, 'IGNORE')
|
23
23
|
end
|
24
24
|
main
|
@@ -95,7 +95,7 @@ end
|
|
95
95
|
def find_line(lines, re)
|
96
96
|
# single line?
|
97
97
|
lines.each_with_index do |line, idx|
|
98
|
-
if re
|
98
|
+
if re&.match?(line)
|
99
99
|
return line.gsub(re, '<<<\&>>>'), idx
|
100
100
|
end
|
101
101
|
end
|
@@ -104,7 +104,7 @@ def find_line(lines, re)
|
|
104
104
|
i = 0
|
105
105
|
while i < lines.size - 1
|
106
106
|
str = lines[i] + lines[i + 1]
|
107
|
-
return str.gsub(re, '<<<\&>>>'), i if re
|
107
|
+
return str.gsub(re, '<<<\&>>>'), i if re&.match?(str)
|
108
108
|
|
109
109
|
i += 1
|
110
110
|
end
|
@@ -118,7 +118,7 @@ def words_re(rc)
|
|
118
118
|
File.foreach(rc) do |line|
|
119
119
|
next if line[0, 1] == '#'
|
120
120
|
|
121
|
-
if /
|
121
|
+
if / !/.match?(line)
|
122
122
|
line, n = *line.split('!', 2)
|
123
123
|
nega.push(n.strip)
|
124
124
|
end
|
@@ -141,7 +141,7 @@ def each_paragraph(f)
|
|
141
141
|
yield [$1], f.filename, f.lineno
|
142
142
|
when %r<\A//\w.*\{\s*\z>
|
143
143
|
while line = f.gets
|
144
|
-
break if %r{//\}}
|
144
|
+
break if %r{//\}}.match?(line)
|
145
145
|
end
|
146
146
|
when /\A=/
|
147
147
|
yield [line.slice(/\A=+(?:\[.*?\])?\s+(.*)/, 1).strip], f.lineno
|
@@ -150,8 +150,8 @@ def each_paragraph(f)
|
|
150
150
|
lineno = f.lineno
|
151
151
|
while line = f.gets
|
152
152
|
break if line.strip.empty?
|
153
|
-
break if %r{\A(?:=|//[\w\}])}
|
154
|
-
next if /\A
|
153
|
+
break if %r{\A(?:=|//[\w\}])}.match?(line)
|
154
|
+
next if /\A\#@/.match?(line)
|
155
155
|
|
156
156
|
buf.push(line.strip)
|
157
157
|
end
|
data/bin/review-compile
CHANGED
@@ -16,11 +16,13 @@ require 'fileutils'
|
|
16
16
|
require 'optparse'
|
17
17
|
require 'yaml'
|
18
18
|
|
19
|
+
include ReVIEW::Loggable
|
20
|
+
|
19
21
|
DEFAULT_CONFIG_FILENAME = 'config.yml'.freeze
|
20
22
|
|
21
23
|
def main
|
22
24
|
Signal.trap(:INT) { exit 1 }
|
23
|
-
|
25
|
+
unless RUBY_PLATFORM.match?(/mswin(?!ce)|mingw|cygwin|bccwin/)
|
24
26
|
Signal.trap(:PIPE, 'IGNORE')
|
25
27
|
end
|
26
28
|
_main
|
@@ -32,11 +34,9 @@ def _main
|
|
32
34
|
@logger = ReVIEW.logger
|
33
35
|
@mode = :files
|
34
36
|
@basedir = nil
|
35
|
-
if File.basename($PROGRAM_NAME).start_with?('review2')
|
36
|
-
|
37
|
-
|
38
|
-
@target = nil
|
39
|
-
end
|
37
|
+
@target = if File.basename($PROGRAM_NAME).start_with?('review2')
|
38
|
+
File.basename($PROGRAM_NAME, '.rb').sub('review2', '')
|
39
|
+
end
|
40
40
|
@check_only = false
|
41
41
|
@output_filename = nil
|
42
42
|
|
@@ -47,17 +47,17 @@ def _main
|
|
47
47
|
begin
|
48
48
|
loader = ReVIEW::YAMLLoader.new
|
49
49
|
if @config['yaml']
|
50
|
-
error "#{@config['yaml']} not found." unless File.exist?(@config['yaml'])
|
50
|
+
error! "#{@config['yaml']} not found." unless File.exist?(@config['yaml'])
|
51
51
|
begin
|
52
52
|
@config.deep_merge!(loader.load_file(@config['yaml']))
|
53
|
-
rescue => e
|
54
|
-
error "yaml error #{e.message}"
|
53
|
+
rescue StandardError => e
|
54
|
+
error! "yaml error #{e.message}"
|
55
55
|
end
|
56
56
|
elsif File.exist?(DEFAULT_CONFIG_FILENAME)
|
57
57
|
begin
|
58
58
|
@config.deep_merge!(loader.load_file(DEFAULT_CONFIG_FILENAME))
|
59
|
-
rescue => e
|
60
|
-
error "yaml error #{e.message}"
|
59
|
+
rescue StandardError => e
|
60
|
+
error! "yaml error #{e.message}"
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -73,12 +73,12 @@ def _main
|
|
73
73
|
|
74
74
|
case @mode
|
75
75
|
when :files
|
76
|
-
error('no input') if ARGV.empty?
|
76
|
+
error!('no input') if ARGV.empty?
|
77
77
|
|
78
78
|
@basedir = File.dirname(ARGV[0])
|
79
79
|
book = ReVIEW::Book::Base.new(@basedir, config: @config)
|
80
80
|
ARGV.each do |item|
|
81
|
-
error("file not found: #{item}") unless File.exist?(File.join(book.config['contentdir'], item))
|
81
|
+
error!("file not found: #{item}") unless File.exist?(File.join(book.config['contentdir'], item))
|
82
82
|
chap_name = File.basename(item, '.*')
|
83
83
|
chap = book.chapter(chap_name)
|
84
84
|
compiler = ReVIEW::Compiler.new(load_builder_class(@target, @check_only))
|
@@ -105,7 +105,7 @@ def _main
|
|
105
105
|
raise "must not happen: #{@mode}"
|
106
106
|
end
|
107
107
|
rescue ReVIEW::ApplicationError => e
|
108
|
-
error
|
108
|
+
error! e.message
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
@@ -164,15 +164,6 @@ def parse_opts
|
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
|
-
def error(msg)
|
168
|
-
@logger.error msg
|
169
|
-
exit 1
|
170
|
-
end
|
171
|
-
|
172
|
-
def warn(msg)
|
173
|
-
@logger.warn msg
|
174
|
-
end
|
175
|
-
|
176
167
|
def load_builder_class(target, strict)
|
177
168
|
require "review/#{target}builder"
|
178
169
|
ReVIEW.const_get("#{target.upcase}Builder").new(strict)
|
data/bin/review-index
CHANGED