review 2.5.0 → 3.0.0.preview1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +28 -10
- data/.travis.yml +11 -2
- data/NEWS.ja.md +89 -17
- data/NEWS.md +92 -0
- data/README.md +1 -1
- data/Rakefile +0 -13
- data/bin/review-catalog-converter +83 -37
- data/bin/review-check +17 -5
- data/bin/review-compile +1 -1
- data/bin/review-index +6 -0
- data/bin/review-init +3 -155
- data/bin/review-preproc +0 -5
- data/bin/review-validate +21 -7
- data/bin/review-vol +13 -5
- data/doc/config.yml.sample +12 -7
- data/doc/config.yml.sample-simple +1 -1
- data/doc/format.ja.md +39 -3
- data/doc/format.md +39 -3
- data/doc/format_idg.ja.md +0 -4
- data/doc/pdfmaker.ja.md +1 -1
- data/doc/pdfmaker.md +1 -1
- data/doc/sample.css +7 -0
- data/lib/epubmaker/content.rb +31 -12
- data/lib/epubmaker/epubcommon.rb +10 -3
- data/lib/epubmaker/epubv2.rb +11 -3
- data/lib/epubmaker/epubv3.rb +11 -3
- data/lib/epubmaker/producer.rb +55 -20
- data/lib/review/book/base.rb +63 -48
- data/lib/review/book/chapter.rb +19 -7
- data/lib/review/book/compilable.rb +5 -20
- data/lib/review/book/image_finder.rb +10 -3
- data/lib/review/book/index.rb +30 -9
- data/lib/review/book/part.rb +9 -6
- data/lib/review/book.rb +0 -14
- data/lib/review/builder.rb +110 -18
- data/lib/review/catalog.rb +24 -4
- data/lib/review/compiler.rb +3 -1
- data/lib/review/configure.rb +43 -9
- data/lib/review/epubmaker/reviewheaderlistener.rb +57 -0
- data/lib/review/epubmaker.rb +129 -85
- data/lib/review/htmlbuilder.rb +76 -58
- data/lib/review/htmlutils.rb +20 -13
- data/lib/review/i18n.rb +6 -2
- data/lib/review/idgxmlbuilder.rb +52 -41
- data/lib/review/init.rb +194 -0
- data/lib/review/latexbuilder.rb +118 -34
- data/lib/review/latexutils.rb +5 -5
- data/lib/review/logger.rb +2 -1
- data/lib/review/makerhelper.rb +1 -1
- data/lib/review/markdownbuilder.rb +66 -6
- data/lib/review/md2inaobuilder.rb +2 -2
- data/lib/review/pdfmaker.rb +74 -22
- data/lib/review/plaintextbuilder.rb +8 -4
- data/lib/review/preprocessor.rb +14 -17
- data/lib/review/sec_counter.rb +8 -2
- data/lib/review/textmaker.rb +2 -2
- data/lib/review/textutils.rb +9 -2
- data/lib/review/tocparser.rb +7 -4
- data/lib/review/tocprinter.rb +3 -1
- data/lib/review/version.rb +1 -1
- data/lib/review/webmaker.rb +19 -7
- data/lib/review/webtocprinter.rb +8 -4
- data/review.gemspec +4 -3
- data/templates/latex/config.erb +84 -0
- data/templates/latex/layout.tex.erb +76 -361
- data/templates/latex/review-jlreq/README.md +22 -0
- data/templates/latex/review-jlreq/review-base.sty +178 -0
- data/templates/latex/review-jlreq/review-custom.sty +1 -0
- data/templates/latex/review-jlreq/review-jlreq.cls +141 -0
- data/templates/latex/review-jlreq/review-style.sty +149 -0
- data/templates/latex/review-jlreq/reviewmacro.sty +8 -0
- data/templates/latex/review-jsbook/jumoline.sty +310 -0
- data/templates/latex/review-jsbook/plistings.sty +326 -0
- data/templates/latex/review-jsbook/review-base.sty +405 -0
- data/templates/latex/review-jsbook/review-custom.sty +1 -0
- data/templates/latex/review-jsbook/review-style.sty +38 -0
- data/templates/latex/review-jsbook/reviewmacro.sty +8 -0
- data/templates/latex-compat2/layout.tex.erb +387 -0
- data/test/assets/test_template.tex +105 -235
- data/test/assets/test_template_backmatter.tex +133 -14
- data/test/book_test_helper.rb +1 -1
- data/test/run_test.rb +2 -0
- data/test/sample-book/src/Rakefile +11 -6
- data/test/sample-book/src/config.yml +2 -2
- data/test/sample-book/src/sty/reviewmacro.sty +1 -39
- data/test/sample-book/src/style.css +6 -0
- data/test/syntax-book/config.yml +1 -1
- data/test/test_book.rb +13 -16
- data/test/test_book_chapter.rb +4 -10
- data/test/test_book_part.rb +4 -3
- data/test/test_catalog.rb +15 -4
- data/test/test_helper.rb +2 -2
- data/test/test_htmlbuilder.rb +78 -10
- data/test/test_htmlutils.rb +12 -5
- data/test/test_idgxmlbuilder.rb +1 -1
- data/test/test_latexbuilder.rb +94 -49
- data/test/test_latexbuilder_v2.rb +1077 -0
- data/test/test_logger.rb +20 -0
- data/test/test_markdownbuilder.rb +10 -0
- data/test/test_pdfmaker.rb +6 -7
- data/test/test_plaintextbuilder.rb +1 -1
- data/test/test_review_ext.rb +0 -1
- data/test/test_rstbuilder.rb +1 -1
- data/test/test_topbuilder.rb +19 -7
- data/test/test_webtocprinter.rb +14 -14
- data/{test/sample-book/src/vendor → vendor}/jumoline/README +0 -0
- data/{test/sample-book/src/vendor → vendor}/jumoline/jumoline.dtx +0 -0
- data/{test/sample-book/src/vendor → vendor}/jumoline/jumoline.ins +0 -0
- data/{test/sample-book/src/vendor → vendor}/jumoline/lppl.txt +0 -0
- data/vendor/plistings/.gitignore +9 -0
- data/vendor/plistings/LICENSE +21 -0
- data/vendor/plistings/README.md +18 -0
- data/vendor/plistings/plistings.sty +326 -0
- data/vendor/plistings/test1.tex +174 -0
- data/vendor/plistings/test2.tex +54 -0
- metadata +48 -19
- data/lib/review/unfold.rb +0 -129
- data/test/CHAPS +0 -2
- data/test/bib.re +0 -13
- data/test/test.re +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c379da1ca7400f142cf42b8ebb3bd9196b22c86184dad2a8b61c0fac95b5d3f6
|
4
|
+
data.tar.gz: c5570b188a143204d0fff2b5300ef51a6871e564704543dd8412d9c46a8cfcde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f1fca511ff7d85f498db78f7efa61b2a50ef2048f7e6ac0962119fe22347a1a859296b0379cbfa6b4a3e2addeb72b36f6a9eb8da98c9a7526160cff56ba720b
|
7
|
+
data.tar.gz: e0f005fb46be742ee79a29454b063db9194879fbf81f4aa35834bea4b62970f4c730c37c8f15febab55eae6a1068903365704fa86963f8ede6035104803b79d4
|
data/.rubocop.yml
CHANGED
@@ -9,12 +9,6 @@ inherit_from: .rubocop_todo.yml
|
|
9
9
|
|
10
10
|
#### Lint
|
11
11
|
|
12
|
-
Lint/BlockAlignment:
|
13
|
-
Enabled: true
|
14
|
-
|
15
|
-
Lint/EndAlignment:
|
16
|
-
Enabled: AlignWith
|
17
|
-
|
18
12
|
Lint/EmptyWhen:
|
19
13
|
Enabled: true
|
20
14
|
|
@@ -46,7 +40,7 @@ Lint/UselessAssignment:
|
|
46
40
|
#### Performance
|
47
41
|
|
48
42
|
Performance/RegexpMatch:
|
49
|
-
Enabled:
|
43
|
+
Enabled: false
|
50
44
|
|
51
45
|
Performance/ReverseEach:
|
52
46
|
Enabled: true
|
@@ -60,6 +54,9 @@ Performance/RangeInclude:
|
|
60
54
|
|
61
55
|
#### Style
|
62
56
|
|
57
|
+
Style/AccessModifierDeclarations:
|
58
|
+
Enabled: false
|
59
|
+
|
63
60
|
Style/AsciiComments:
|
64
61
|
Enabled: false
|
65
62
|
|
@@ -229,7 +226,7 @@ Style/RedundantParentheses:
|
|
229
226
|
Enabled: true
|
230
227
|
|
231
228
|
Style/RedundantReturn:
|
232
|
-
Enabled:
|
229
|
+
Enabled: false
|
233
230
|
|
234
231
|
Style/RedundantSelf:
|
235
232
|
Enabled: false
|
@@ -264,7 +261,10 @@ Style/SymbolProc:
|
|
264
261
|
Style/SymbolArray:
|
265
262
|
Enabled: true
|
266
263
|
|
267
|
-
Style/
|
264
|
+
Style/TrailingCommaInArrayLiteral:
|
265
|
+
Enabled: true
|
266
|
+
|
267
|
+
Style/TrailingCommaInHashLiteral:
|
268
268
|
Enabled: true
|
269
269
|
|
270
270
|
Style/WordArray:
|
@@ -280,6 +280,13 @@ Style/WhileUntilModifier:
|
|
280
280
|
# Enabled: true
|
281
281
|
|
282
282
|
### Layout
|
283
|
+
|
284
|
+
Layout/BlockAlignment:
|
285
|
+
Enabled: true
|
286
|
+
|
287
|
+
Layout/EndAlignment:
|
288
|
+
Enabled: AlignWith
|
289
|
+
|
283
290
|
Layout/MultilineMethodCallBraceLayout:
|
284
291
|
Enabled: true
|
285
292
|
|
@@ -287,6 +294,9 @@ Layout/AccessModifierIndentation:
|
|
287
294
|
EnforcedStyle: indent
|
288
295
|
Enabled: true
|
289
296
|
|
297
|
+
Layout/ClosingHeredocIndentation:
|
298
|
+
Enabled: false
|
299
|
+
|
290
300
|
Layout/DotPosition:
|
291
301
|
EnforcedStyle: trailing
|
292
302
|
Enabled: true
|
@@ -377,7 +387,7 @@ Metrics/BlockNesting:
|
|
377
387
|
Max: 4
|
378
388
|
|
379
389
|
Metrics/ModuleLength:
|
380
|
-
Max:
|
390
|
+
Max: 200
|
381
391
|
|
382
392
|
Metrics/ParameterLists:
|
383
393
|
Max: 8
|
@@ -387,6 +397,8 @@ Metrics/PerceivedComplexity:
|
|
387
397
|
|
388
398
|
Metrics/ClassLength:
|
389
399
|
Max: 1500
|
400
|
+
Exclude:
|
401
|
+
- 'test/*.rb'
|
390
402
|
|
391
403
|
Metrics/LineLength:
|
392
404
|
Max: 256
|
@@ -433,9 +445,15 @@ Naming/AccessorMethodName:
|
|
433
445
|
Naming/HeredocDelimiterNaming:
|
434
446
|
Enabled: false
|
435
447
|
|
448
|
+
Naming/MemoizedInstanceVariableName:
|
449
|
+
Enabled: false
|
450
|
+
|
436
451
|
Naming/MethodName:
|
437
452
|
Enabled: true
|
438
453
|
|
454
|
+
Naming/UncommunicativeMethodParamName:
|
455
|
+
Enabled: false
|
456
|
+
|
439
457
|
# Use snake_case for variable names.
|
440
458
|
Naming/VariableName:
|
441
459
|
Enabled: true
|
data/.travis.yml
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
language: ruby
|
2
2
|
sudo: false
|
3
|
+
dist: trusty
|
4
|
+
|
5
|
+
addons:
|
6
|
+
apt:
|
7
|
+
packages:
|
8
|
+
- texlive-fonts-recommended
|
9
|
+
- texlive-latex-extra
|
10
|
+
- texlive-latex-recommended
|
11
|
+
- dvipng
|
3
12
|
|
4
13
|
before_install:
|
5
14
|
- gem update --system
|
@@ -8,8 +17,8 @@ before_install:
|
|
8
17
|
rvm:
|
9
18
|
## - 2.0
|
10
19
|
- 2.1
|
11
|
-
- 2.2
|
12
|
-
- 2.3.
|
20
|
+
- 2.2.7
|
21
|
+
- 2.3.4
|
13
22
|
- 2.4.1
|
14
23
|
- 2.5.0
|
15
24
|
## - ruby-head
|
data/NEWS.ja.md
CHANGED
@@ -1,24 +1,95 @@
|
|
1
|
-
# Version 3.
|
1
|
+
# Version 3.0.0 preview 1
|
2
2
|
|
3
|
-
|
3
|
+
## 新機能
|
4
|
+
* `contentdir` パラメータで、re ファイルをサブフォルダに配置してそのフォルダを指定できるようにしました ([#920], [#938])
|
5
|
+
* `//graph` 命令 で PlantUML をサポートしました ([#1006],[#1008])
|
6
|
+
* CSV 形式の単語ファイルから指定キーに対応する値を展開する、`@<w>` および `@<wb>` 命令を追加しました ([#1007], [#1010])
|
7
|
+
* catalog.ymlにある`*.re`ファイルが存在しない場合エラーになるようにしました ([#957])
|
8
|
+
* LATEXBuilder: LaTeX でルビを表現できるよう pxrubrica パッケージを読み込むようにしました ([#655])
|
9
|
+
* LATEXBuilder: 複数の LaTeX レイアウトファイルから選択できるようにしました ([#812])
|
10
|
+
* `@<balloon>`を標準サポートタグとしました ([#829])
|
11
|
+
* LATEXBuilder: `@<uchar>`でUnicode文字を直接出力できるようにしました ([#1045])
|
12
|
+
* RakefileのオプションでCONFIG_FILEを上書きできるようにしました ([#1059])
|
13
|
+
|
14
|
+
## 非互換の変更
|
15
|
+
* review_version の値が 3 以上のときには、LaTeX の `@<m>` によるインラインの数式の前後にスペース文字を入れないようにしました ([#943])
|
16
|
+
* HTML ビルダにおいて、`//list`, `//listnum` で識別子に基づくハイライト言語の自動検出をやめました (ハイライト言語は命令の 3 つめのオプションで指定してください) ([#1016])
|
17
|
+
* LATEXBuilder: layout.tex.erbを整理・再構成しました ([#950])
|
18
|
+
* LATEXBuilder: LaTeX のコードリストを reviewlistblock 環境で囲むようにしました ([#916])
|
19
|
+
* LATEXBuilder: LaTeX のコードリスト環境を jlisting から plistings パッケージに変更しました ([#635])
|
20
|
+
* LATEXBuilder: PDF生成時にリンクの枠線について、標準では消すようにしました ([#808])
|
21
|
+
* LATEXBuilder: インライン文字装飾の LaTeX への変換結果を`\textbf`ではなく`\reviewbold`のように抽象化した名前にしました ([#792])
|
22
|
+
* LATEXBuilder: LaTeX の表紙 (coverパラメータ) と大扉 (titlepageパラメータ) は独立した設定となりました ([#848])
|
23
|
+
* review-preproc: --final オプションを削除しました ([#993])
|
24
|
+
* LATEXBuilder: キャプションブロックの出力について`reviewminicolumn`を使わず`reviewnote`等を使うようにしました ([#1046])
|
4
25
|
|
5
|
-
|
26
|
+
## バグ修正
|
27
|
+
* Ruby 2.3 以下で実行時のログ表示が冗長になるのを修正しました ([#975])
|
28
|
+
* Version 2.5.0 で削除した `usepackage` パラメータを、互換性のために戻しました ([#1001])
|
29
|
+
* HTMLBuilder: `@<m>`や`//texequation{...//}`でのログ出力を抑制するようにしました ([#1027])
|
30
|
+
* LATEXBuilder: リストのキャプションが空の場合の出力を修正しました ([#1040])
|
31
|
+
* MeCabのロードパスを修正しました ([#1063])
|
6
32
|
|
7
|
-
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
|
19
|
-
|
33
|
+
## 機能強化
|
34
|
+
* Windows でも `//graph` 命令が動作するようにしました ([#1008])
|
35
|
+
* 画像ファイルやフォントファイルの拡張子が大文字・小文字どちらでも利用できるようにしました ([#1002])
|
36
|
+
* review-pdfmaker: pdfmakerで実行したコマンド情報を出力するようにしました ([#962],[#968])
|
37
|
+
* IDGXMLBuilder: `=[notoc]`および`=[nodisp]`をサポートしました ([#1022])
|
38
|
+
* PDFMaker: psdファイルもコピーするようにしました ([#879])
|
39
|
+
* PDFMaker: config.ymlの `texoptions`のデフォルト値を変更してLaTeX実行中に入力待ちにしないようにしました ([#1029])
|
40
|
+
* LATEXBuilder: LaTeXなどのログメッセージを正常時には出力しないようにしました ([#1036])
|
41
|
+
* MARKDOWNBuilder: サポートするコマンドを追加しました ([#881])
|
42
|
+
* image_finder.rb: シンボリックリンクされたディレクトリをサポートしました ([#743])
|
43
|
+
* Rakefileの依存関係にcatalog.ymlなどのファイルを追加しました ([#1060])
|
44
|
+
|
45
|
+
## ドキュメント
|
46
|
+
* `//graph` 命令の各外部ツールについての説明を追加しました ([#1008])
|
47
|
+
* `@<w>`, `@<wb>` 命令の説明を追加しました ([#1007])
|
48
|
+
* LaTeX から生成する PDF の圧縮レベルオプション指定 (-z 9、最大圧縮) を config.yml のサンプルに記載しました ([#935])
|
20
49
|
|
21
|
-
|
50
|
+
## コントリビューターのみなさん
|
51
|
+
* [@TeTiRoss](https://github.com/TeTiRoss)
|
52
|
+
* [@kauplan](https://github.com/kauplan)
|
53
|
+
* [@munepi](https://github.com/munepi)
|
54
|
+
* [@m-shibata](https://github.com/m-shibata)
|
55
|
+
|
56
|
+
[#635]: https://github.com/kmuto/review/issues/635
|
57
|
+
[#655]: https://github.com/kmuto/review/issues/655
|
58
|
+
[#743]: https://github.com/kmuto/review/issues/743
|
59
|
+
[#792]: https://github.com/kmuto/review/issues/792
|
60
|
+
[#808]: https://github.com/kmuto/review/issues/808
|
61
|
+
[#812]: https://github.com/kmuto/review/issues/812
|
62
|
+
[#829]: https://github.com/kmuto/review/issues/829
|
63
|
+
[#848]: https://github.com/kmuto/review/issues/848
|
64
|
+
[#879]: https://github.com/kmuto/review/issues/879
|
65
|
+
[#881]: https://github.com/kmuto/review/issues/881
|
66
|
+
[#916]: https://github.com/kmuto/review/issues/916
|
67
|
+
[#920]: https://github.com/kmuto/review/issues/920
|
68
|
+
[#938]: https://github.com/kmuto/review/issues/938
|
69
|
+
[#935]: https://github.com/kmuto/review/issues/935
|
70
|
+
[#943]: https://github.com/kmuto/review/issues/943
|
71
|
+
[#950]: https://github.com/kmuto/review/issues/950
|
72
|
+
[#957]: https://github.com/kmuto/review/issues/957
|
73
|
+
[#962]: https://github.com/kmuto/review/issues/962
|
74
|
+
[#968]: https://github.com/kmuto/review/issues/968
|
75
|
+
[#975]: https://github.com/kmuto/review/issues/975
|
76
|
+
[#993]: https://github.com/kmuto/review/issues/993
|
77
|
+
[#1001]: https://github.com/kmuto/review/pull/1001
|
78
|
+
[#1002]: https://github.com/kmuto/review/issues/1002
|
79
|
+
[#1006]: https://github.com/kmuto/review/issues/1006
|
80
|
+
[#1007]: https://github.com/kmuto/review/issues/1007
|
81
|
+
[#1008]: https://github.com/kmuto/review/pull/1008
|
82
|
+
[#1016]: https://github.com/kmuto/review/issues/1016
|
83
|
+
[#1022]: https://github.com/kmuto/review/issues/1022
|
84
|
+
[#1027]: https://github.com/kmuto/review/issues/1027
|
85
|
+
[#1029]: https://github.com/kmuto/review/issues/1029
|
86
|
+
[#1036]: https://github.com/kmuto/review/issues/1036
|
87
|
+
[#1040]: https://github.com/kmuto/review/issues/1040
|
88
|
+
[#1045]: https://github.com/kmuto/review/issues/1045
|
89
|
+
[#1046]: https://github.com/kmuto/review/issues/1046
|
90
|
+
[#1059]: https://github.com/kmuto/review/issues/1059
|
91
|
+
[#1060]: https://github.com/kmuto/review/issues/1060
|
92
|
+
[#1063]: https://github.com/kmuto/review/issues/1063
|
22
93
|
|
23
94
|
# Version 2.5.0
|
24
95
|
|
@@ -31,6 +102,7 @@ TODO:lib/review/version.rbとreview.gemspecの更新をすること
|
|
31
102
|
* `//include` 命令は不完全でユーザーの混乱を招くため、削除しました ([#887])
|
32
103
|
* LaTeX において、見出しや図表キャプション内にある脚注は `\footnotemark` を暗黙に使うようにしました ([#841])
|
33
104
|
* EPUB および WebMaker の大扉では、印刷所 (prt) の代わりに出版社 (pbl) を記載するようにしました ([#927])
|
105
|
+
* PDFMaker における layout.tex.erb の `usepackage` パラメータは、`texstyle` パラメータに置き換えられました。書式も変更されているので、独自の layoute.tex.erb を使っている場合は書き換えが必要です ([#908])
|
34
106
|
|
35
107
|
## バグ修正
|
36
108
|
* column の終了が正しく動作しないのを修正しました ([#894])
|
data/NEWS.md
CHANGED
@@ -1,3 +1,94 @@
|
|
1
|
+
# Version 3.0.0 preview 1
|
2
|
+
|
3
|
+
## New Features
|
4
|
+
* .re files can be placed in subfolders by specifying a folder with `contentdir` parameter ([#920])
|
5
|
+
* `//graph` supports PlantUML ([#1006])
|
6
|
+
* add `@<w>` and `@<wb>` to expand the value corresponding to the specified key from CSV word file ([#1007], [#1010])
|
7
|
+
* LATEXBuilder: raise error when `*.re` file in catalog.yml does not exist ([#957])
|
8
|
+
* LATEXBuilder: add pxrubrica package to support 'ruby' ([#655])
|
9
|
+
* LATEXBuilder: support multiple layout files for LaTeX style ([#812])
|
10
|
+
* support inline `@<balloon>` as default settings ([#829])
|
11
|
+
* LATEXBuilder: allow to use Unicode character without otf package if possible ([#1045])
|
12
|
+
* override `CONFIG_FILE` in Rakefile with rake options ([#1059])
|
13
|
+
|
14
|
+
## Breaking Changes
|
15
|
+
* When the value of review_version is 3 or more, `@<m>` no longer add a space before and after formula ([#943])
|
16
|
+
* the function of automatic detection of highlight target language by identifier in `//list`, `//listnum` is removed from HTMLBuilder ([#1016])
|
17
|
+
* LATEXBuilder: restructured `layout.tex.erb` ([#950])
|
18
|
+
* LATEXBuilder: add a new envirionment `reviewlistblock` in LaTeX ([#916])
|
19
|
+
* LATEXBuilder: attach `plistings` package and suport it instead of jlisting for `listings` ([#635])
|
20
|
+
* LATEXBuilder: remove underline in anchor for printing use ([#808])
|
21
|
+
* LATEXBuilder: use more abstract name like `\reviewbold` instead of `\textbf` ([#792])
|
22
|
+
* LATEXBuilder: `cover` and `titlepage` in config.yml is independently of each other ([#848])
|
23
|
+
* review-preproc: remove deprecated option --final ([#993])
|
24
|
+
* LATEXBuilder: captionblocks use new environments like `reviewnote`, not `reviewminicolumn` ([#1046])
|
25
|
+
|
26
|
+
## Bug Fixes
|
27
|
+
* Fix redundant log display with Ruby 2.3 or later ([#975])
|
28
|
+
* for backward compatibility, revert `usepackage` parameter which was removed Version 2.5.0 ([#1001])
|
29
|
+
* HTMLBuilder: hide latex log of `@<m>{...}` amd `//texequation{...//}` ([#1027])
|
30
|
+
* LATEXBuilder: fix empty caption for listings ([#1040])
|
31
|
+
* fix load path of MeCab ([#1063])
|
32
|
+
|
33
|
+
## Enhancements
|
34
|
+
* `//graph` now works on Windows ([#1008])
|
35
|
+
* file extensions of image files and font files becomes case insensitive ([#1002])
|
36
|
+
* review-pdfmaker: show executed command and its options ([#962],[#968])
|
37
|
+
* PDFMaker: support `*.psd` files as images ([#879])
|
38
|
+
* PDFMaker: `texoptions` in config.yml is "-interaction=nonstopmode -file-line-error" as default ([#1029])
|
39
|
+
* hide (latex and other commands') log messages ([#1036])
|
40
|
+
* MARKDOWNBuilder: support some commands ([#881])
|
41
|
+
* image_finder.rb: support symlinked directory ([#743])
|
42
|
+
* add files like `catalog.yml` as denendency relation ([#1060])
|
43
|
+
|
44
|
+
## Docs
|
45
|
+
* add description of external tools used in `//graph` ([#1008])
|
46
|
+
* add description of `@<w>` and `@<wb>` ([#1007])
|
47
|
+
* add description of dvipdfmx option for zlib compression level (-z 9) in config.yml ([#935])
|
48
|
+
|
49
|
+
## Contributors
|
50
|
+
* [@TeTiRoss](https://github.com/TeTiRoss)
|
51
|
+
* [@kauplan](https://github.com/kauplan)
|
52
|
+
* [@munepi](https://github.com/munepi)
|
53
|
+
* [@m-shibata](https://github.com/m-shibata)
|
54
|
+
|
55
|
+
[#635]: https://github.com/kmuto/review/issues/635
|
56
|
+
[#655]: https://github.com/kmuto/review/issues/655
|
57
|
+
[#743]: https://github.com/kmuto/review/issues/743
|
58
|
+
[#792]: https://github.com/kmuto/review/issues/792
|
59
|
+
[#808]: https://github.com/kmuto/review/issues/808
|
60
|
+
[#812]: https://github.com/kmuto/review/issues/812
|
61
|
+
[#829]: https://github.com/kmuto/review/issues/829
|
62
|
+
[#848]: https://github.com/kmuto/review/issues/848
|
63
|
+
[#879]: https://github.com/kmuto/review/issues/879
|
64
|
+
[#881]: https://github.com/kmuto/review/issues/881
|
65
|
+
[#916]: https://github.com/kmuto/review/issues/916
|
66
|
+
[#920]: https://github.com/kmuto/review/issues/920
|
67
|
+
[#938]: https://github.com/kmuto/review/issues/938
|
68
|
+
[#935]: https://github.com/kmuto/review/issues/935
|
69
|
+
[#943]: https://github.com/kmuto/review/issues/943
|
70
|
+
[#950]: https://github.com/kmuto/review/issues/950
|
71
|
+
[#957]: https://github.com/kmuto/review/issues/957
|
72
|
+
[#962]: https://github.com/kmuto/review/issues/962
|
73
|
+
[#968]: https://github.com/kmuto/review/issues/968
|
74
|
+
[#975]: https://github.com/kmuto/review/issues/975
|
75
|
+
[#993]: https://github.com/kmuto/review/issues/993
|
76
|
+
[#1001]: https://github.com/kmuto/review/pull/1001
|
77
|
+
[#1002]: https://github.com/kmuto/review/issues/1002
|
78
|
+
[#1006]: https://github.com/kmuto/review/issues/1006
|
79
|
+
[#1007]: https://github.com/kmuto/review/issues/1007
|
80
|
+
[#1008]: https://github.com/kmuto/review/pull/1008
|
81
|
+
[#1016]: https://github.com/kmuto/review/issues/1016
|
82
|
+
[#1022]: https://github.com/kmuto/review/issues/1022
|
83
|
+
[#1027]: https://github.com/kmuto/review/issues/1027
|
84
|
+
[#1029]: https://github.com/kmuto/review/issues/1029
|
85
|
+
[#1036]: https://github.com/kmuto/review/issues/1036
|
86
|
+
[#1040]: https://github.com/kmuto/review/issues/1040
|
87
|
+
[#1045]: https://github.com/kmuto/review/issues/1045
|
88
|
+
[#1046]: https://github.com/kmuto/review/issues/1046
|
89
|
+
[#1059]: https://github.com/kmuto/review/issues/1059
|
90
|
+
[#1063]: https://github.com/kmuto/review/issues/1063
|
91
|
+
|
1
92
|
# Version 2.5.0
|
2
93
|
|
3
94
|
## New Features
|
@@ -11,6 +102,7 @@
|
|
11
102
|
* remove (incomplete) command `//include` ([#887])
|
12
103
|
* LATEXBuilder: use `\footnotemark` implicitly for captions and headings ([#841])
|
13
104
|
* EPUBMaker, WEBMaker: use `pbl` (publisher) instead of `prt` (printer) in titlepage ([#927])
|
105
|
+
* PDFMaker: use `texstyle` parameter instead of `usepackage` in layout.tex.erb. When using your own layout.tex.erb, you need to rewrite it with a new code of texstyle parsing. ([#908])
|
14
106
|
|
15
107
|
## Bug Fixes
|
16
108
|
|
data/README.md
CHANGED
@@ -29,7 +29,7 @@ There are two commands generate files directly.
|
|
29
29
|
|
30
30
|
And some useful commands.
|
31
31
|
|
32
|
-
* review-compile: compile Re:VIEW
|
32
|
+
* review-compile: compile Re:VIEW format files.
|
33
33
|
* review-vol: figure out size of Re:VIEW files.
|
34
34
|
* review-index: generate index with various format.
|
35
35
|
* review-preproc: preprocessor.
|
data/Rakefile
CHANGED
@@ -25,19 +25,6 @@ task :test do
|
|
25
25
|
ruby('test/run_test.rb')
|
26
26
|
end
|
27
27
|
|
28
|
-
begin
|
29
|
-
require 'rcov/rcovtask'
|
30
|
-
Rcov::RcovTask.new do |t|
|
31
|
-
t.rcov_opts << '-x /gems/'
|
32
|
-
t.rcov_opts << '-x /tmp/'
|
33
|
-
t.libs << 'test'
|
34
|
-
t.pattern = 'test/test_*.rb'
|
35
|
-
t.verbose = true
|
36
|
-
end
|
37
|
-
rescue LoadError
|
38
|
-
warn 'rcov not found'
|
39
|
-
end
|
40
|
-
|
41
28
|
begin
|
42
29
|
require 'rdoc/task'
|
43
30
|
Rake::RDocTask.new do |rdoc|
|
@@ -16,6 +16,7 @@ $LOAD_PATH.unshift((bindir + '../lib').realpath)
|
|
16
16
|
require 'review/version'
|
17
17
|
require 'review/extentions'
|
18
18
|
require 'review/logger'
|
19
|
+
require 'review/catalog'
|
19
20
|
|
20
21
|
def main
|
21
22
|
@logger = ReVIEW.logger
|
@@ -39,51 +40,45 @@ def main
|
|
39
40
|
|
40
41
|
# confirmation
|
41
42
|
if File.exist?("#{dir}/catalog.yml")
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
break
|
48
|
-
when /\A[nN]/, /\A\Z/
|
49
|
-
@logger.info 'bye.'
|
50
|
-
exit
|
51
|
-
end
|
43
|
+
if ask_yes?('The catalog.yml already exists. Do you want to overwrite it? [y/n]')
|
44
|
+
@logger.info 'Start writing...'
|
45
|
+
else
|
46
|
+
@logger.info 'bye.'
|
47
|
+
exit
|
52
48
|
end
|
53
49
|
end
|
54
50
|
|
55
|
-
|
56
|
-
#
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
# chaps and parts
|
61
|
-
if File.exist?("#{dir}/CHAPS")
|
62
|
-
if File.exist?("#{dir}/PART")
|
63
|
-
catalog << parse_parts(File.open("#{dir}/PART").read,
|
64
|
-
File.open("#{dir}/CHAPS").read)
|
65
|
-
else
|
66
|
-
catalog << parse_chaps(File.open("#{dir}/CHAPS").read)
|
51
|
+
if exist_old_style_catalog_files?(dir)
|
52
|
+
File.open("#{dir}/catalog.yml", 'w') do |catalog|
|
53
|
+
# predef
|
54
|
+
if File.exist?("#{dir}/PREDEF")
|
55
|
+
catalog << parse_predef(File.read("#{dir}/PREDEF"))
|
67
56
|
end
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
57
|
+
# chaps and parts
|
58
|
+
if File.exist?("#{dir}/CHAPS")
|
59
|
+
if File.exist?("#{dir}/PART")
|
60
|
+
catalog << parse_parts(File.read("#{dir}/PART"),
|
61
|
+
File.read("#{dir}/CHAPS"))
|
62
|
+
else
|
63
|
+
catalog << parse_chaps(File.read("#{dir}/CHAPS"))
|
64
|
+
end
|
65
|
+
end
|
66
|
+
# postdef
|
67
|
+
if File.exist?("#{dir}/POSTDEF")
|
68
|
+
postdef = File.read("#{dir}/POSTDEF")
|
69
|
+
if ask_yes?('Do you want to convert POSTDEF into APPENDIX? [y/n]')
|
76
70
|
catalog << parse_postdef(postdef, true)
|
77
|
-
|
78
|
-
when /\A[nN]/, /\A\Z/
|
71
|
+
else
|
79
72
|
catalog << parse_postdef(postdef)
|
80
|
-
break
|
81
73
|
end
|
82
74
|
end
|
83
75
|
end
|
84
76
|
end
|
85
77
|
|
86
|
-
|
78
|
+
new_catalog = replace_old_style_part(dir)
|
79
|
+
File.write("#{dir}/catalog.yml", new_catalog)
|
80
|
+
|
81
|
+
puts File.read("#{dir}/catalog.yml")
|
87
82
|
end
|
88
83
|
|
89
84
|
def parse_internal(str, header)
|
@@ -114,11 +109,62 @@ def parse_postdef(str, to_appendix = false)
|
|
114
109
|
end
|
115
110
|
|
116
111
|
def parse_parts(parts_str, chaps_str)
|
117
|
-
|
112
|
+
if parts_str.blank? or chaps_str.blank?
|
113
|
+
return "CHAPS:\n\n"
|
114
|
+
end
|
118
115
|
|
119
116
|
parts = parts_str.split("\n")
|
120
117
|
chaps = chaps_str.split("\n\n")
|
121
|
-
"CHAPS:\n" + parts.zip(chaps).map
|
118
|
+
"CHAPS:\n" + parts.zip(chaps).map do |k, vs|
|
119
|
+
" - #{k}:\n" + vs.split("\n").map { |i| " - #{i}\n" }.join
|
120
|
+
end.join + "\n"
|
122
121
|
end
|
123
122
|
|
124
|
-
|
123
|
+
def exist_old_style_catalog_files?(dir)
|
124
|
+
File.exist?("#{dir}/PREDEF") || File.exist?("#{dir}/CHAPS") ||
|
125
|
+
File.exist?("#{dir}/PART") || File.exist?("#{dir}/POSTDEF")
|
126
|
+
end
|
127
|
+
|
128
|
+
def ask_yes?(message)
|
129
|
+
loop do
|
130
|
+
print message
|
131
|
+
case gets
|
132
|
+
when /\A[yY]/
|
133
|
+
return true
|
134
|
+
when /\A[nN]/, /\A\Z/
|
135
|
+
return false
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
def replace_old_style_part(dir)
|
141
|
+
catalog = ReVIEW::Catalog.new(File.open("#{dir}/catalog.yml"))
|
142
|
+
Array.new(catalog.parts.split("\n")).each_with_index do |part, part_idx|
|
143
|
+
next if part.end_with? '.re'
|
144
|
+
|
145
|
+
allow_overwrite = true
|
146
|
+
part_name = sprintf('part%d.re', part_idx + 1)
|
147
|
+
if File.exist?("#{dir}/#{part_name}")
|
148
|
+
loop do
|
149
|
+
print "The #{part_name} already exists. Do you want to overwrite it? [y/n]"
|
150
|
+
case gets
|
151
|
+
when /\A[yY]/
|
152
|
+
break
|
153
|
+
when /\A[nN]/, /\A\Z/
|
154
|
+
allow_overwrite = false
|
155
|
+
break
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
next unless allow_overwrite
|
161
|
+
File.write("#{dir}/#{part_name}", "= #{part}")
|
162
|
+
catalog.replace_part(part, part_name)
|
163
|
+
end
|
164
|
+
|
165
|
+
catalog.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
if File.basename($PROGRAM_NAME) == File.basename(__FILE__)
|
169
|
+
main
|
170
|
+
end
|
data/bin/review-check
CHANGED
@@ -40,13 +40,18 @@ def main
|
|
40
40
|
files = ARGV unless ARGV.empty?
|
41
41
|
opts = OptionParser.new
|
42
42
|
opts.version = ReVIEW::VERSION
|
43
|
-
opts.on('-a', '--all-chapters', 'Check all chapters.')
|
43
|
+
opts.on('-a', '--all-chapters', 'Check all chapters.') do
|
44
|
+
files = @book.chapters.map(&:path)
|
45
|
+
end
|
44
46
|
opts.on('-s', '--section N', 'Check section N. (deprecated)') do |n|
|
45
47
|
ents = @book.parts[Integer(n) - 1] or
|
46
48
|
raise ReVIEW::ApplicationError, "section #{n} not exist"
|
47
49
|
files = ents.map(&:path)
|
48
50
|
end
|
49
|
-
opts.on('--text', 'Check text.')
|
51
|
+
opts.on('--text', 'Check text.') do
|
52
|
+
modes ||= []
|
53
|
+
modes.push :text
|
54
|
+
end
|
50
55
|
opts.on('--help', 'print this message and quit.') do
|
51
56
|
puts opts.help
|
52
57
|
exit 0
|
@@ -93,7 +98,11 @@ end
|
|
93
98
|
|
94
99
|
def find_line(lines, re)
|
95
100
|
# single line?
|
96
|
-
lines.each_with_index
|
101
|
+
lines.each_with_index do |line, idx|
|
102
|
+
if re =~ line
|
103
|
+
return line.gsub(re, '<<<\&>>>'), idx
|
104
|
+
end
|
105
|
+
end
|
97
106
|
|
98
107
|
# multiple lines?
|
99
108
|
i = 0
|
@@ -117,7 +126,8 @@ def words_re(rc)
|
|
117
126
|
end
|
118
127
|
words.push line.strip
|
119
128
|
end
|
120
|
-
|
129
|
+
return Regexp.compile(words.join('|')),
|
130
|
+
nega.empty? ? nil : Regexp.compile(nega.join('|'))
|
121
131
|
end
|
122
132
|
|
123
133
|
def each_paragraph(f)
|
@@ -156,7 +166,9 @@ def each_paragraph(f)
|
|
156
166
|
end
|
157
167
|
|
158
168
|
def each_paragraph_line(f, &block)
|
159
|
-
each_paragraph(f)
|
169
|
+
each_paragraph(f) do |para, *|
|
170
|
+
para.each(&block)
|
171
|
+
end
|
160
172
|
end
|
161
173
|
|
162
174
|
sigmain
|
data/bin/review-compile
CHANGED
@@ -82,7 +82,7 @@ def _main
|
|
82
82
|
book = ReVIEW::Book::Base.load(@basedir)
|
83
83
|
book.config = @config # needs only at the first time
|
84
84
|
ARGV.each do |item|
|
85
|
-
error("file not found: #{item}") unless File.exist?(item)
|
85
|
+
error("file not found: #{item}") unless File.exist?(File.join(book.config['contentdir'], item))
|
86
86
|
chap_name = File.basename(item, '.*')
|
87
87
|
chap = book.chapter(chap_name)
|
88
88
|
compiler = ReVIEW::Compiler.new(load_strategy_class(@target, @check_only))
|
data/bin/review-index
CHANGED
@@ -32,6 +32,7 @@ rescue Errno::EPIPE
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def _main
|
35
|
+
yamlfile = 'config.yml'
|
35
36
|
printer_class = ReVIEW::TextTOCPrinter
|
36
37
|
source = nil
|
37
38
|
upper = ReVIEW::TOCPrinter.default_upper_level
|
@@ -40,6 +41,7 @@ def _main
|
|
40
41
|
|
41
42
|
opts = OptionParser.new
|
42
43
|
opts.version = ReVIEW::VERSION
|
44
|
+
opts.on('--yaml=YAML', 'Read configurations from YAML file.') { |yaml| yamlfile = yaml }
|
43
45
|
opts.on('-a', '--all', 'print all chapters.') { source = book }
|
44
46
|
opts.on('-p', '--part N', 'list only part N.') do |n|
|
45
47
|
source = book.part(Integer(n)) or
|
@@ -72,6 +74,10 @@ def _main
|
|
72
74
|
$stderr.puts opts.help
|
73
75
|
exit 1
|
74
76
|
end
|
77
|
+
|
78
|
+
book.config = ReVIEW::Configure.values
|
79
|
+
book.load_config(yamlfile) if yamlfile
|
80
|
+
|
75
81
|
if source
|
76
82
|
error_exit '-a/-s option and file arguments are exclusive' unless ARGV.empty?
|
77
83
|
else
|