review 5.0.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby-tex.yml +31 -0
  3. data/.github/workflows/ruby-win.yml +3 -3
  4. data/.github/workflows/ruby.yml +1 -1
  5. data/.rubocop.yml +15 -7
  6. data/NEWS.ja.md +108 -0
  7. data/NEWS.md +108 -0
  8. data/README.md +7 -6
  9. data/Rakefile +7 -2
  10. data/bin/review +2 -4
  11. data/bin/review-catalog-converter +3 -3
  12. data/bin/review-check +6 -8
  13. data/bin/review-checkdep +1 -4
  14. data/bin/review-compile +2 -5
  15. data/bin/review-epub2html +1 -4
  16. data/bin/review-epubmaker +3 -4
  17. data/bin/review-idgxmlmaker +1 -3
  18. data/bin/review-index +11 -5
  19. data/bin/review-init +1 -4
  20. data/bin/review-pdfmaker +1 -3
  21. data/bin/review-preproc +2 -4
  22. data/bin/review-textmaker +1 -3
  23. data/bin/review-update +1 -4
  24. data/bin/review-validate +3 -3
  25. data/bin/review-vol +1 -4
  26. data/bin/review-webmaker +1 -3
  27. data/doc/config.yml.sample +21 -5
  28. data/doc/config.yml.sample-simple +1 -1
  29. data/doc/format.ja.md +21 -10
  30. data/doc/format.md +21 -10
  31. data/doc/quickstart.ja.md +11 -1
  32. data/doc/quickstart.md +11 -2
  33. data/lib/review.rb +1 -1
  34. data/lib/review/book/base.rb +4 -0
  35. data/lib/review/book/book_unit.rb +3 -0
  36. data/lib/review/book/chapter.rb +3 -0
  37. data/lib/review/book/index.rb +1 -0
  38. data/lib/review/book/volume.rb +1 -0
  39. data/lib/review/builder.rb +8 -1
  40. data/lib/review/call_hook.rb +20 -0
  41. data/lib/review/catalog.rb +1 -0
  42. data/lib/review/compiler.rb +27 -10
  43. data/lib/review/configure.rb +64 -7
  44. data/lib/review/epubmaker.rb +93 -96
  45. data/lib/review/epubmaker/content.rb +113 -0
  46. data/lib/review/epubmaker/epubcommon.rb +372 -0
  47. data/lib/review/epubmaker/epubv2.rb +178 -0
  48. data/lib/review/epubmaker/epubv3.rb +231 -0
  49. data/lib/review/epubmaker/producer.rb +168 -0
  50. data/lib/review/epubmaker/reviewheaderlistener.rb +12 -2
  51. data/lib/review/epubmaker/zip_exporter.rb +84 -0
  52. data/lib/review/exception.rb +6 -0
  53. data/lib/review/htmlbuilder.rb +36 -49
  54. data/lib/review/htmlutils.rb +1 -1
  55. data/lib/review/i18n.rb +1 -0
  56. data/lib/review/idgxmlbuilder.rb +33 -30
  57. data/lib/review/idgxmlmaker.rb +3 -1
  58. data/lib/review/img_math.rb +245 -0
  59. data/lib/review/index_builder.rb +1 -0
  60. data/lib/review/init.rb +4 -4
  61. data/lib/review/latexbox.rb +58 -0
  62. data/lib/review/latexbuilder.rb +30 -19
  63. data/lib/review/latexutils.rb +9 -1
  64. data/lib/review/lineinput.rb +112 -2
  65. data/lib/review/logger.rb +41 -2
  66. data/lib/review/makerhelper.rb +2 -205
  67. data/lib/review/markdownbuilder.rb +32 -1
  68. data/lib/review/pdfmaker.rb +31 -29
  69. data/lib/review/plaintextbuilder.rb +9 -1
  70. data/lib/review/preprocessor.rb +12 -6
  71. data/lib/review/rstbuilder.rb +1 -1
  72. data/lib/review/sec_counter.rb +1 -0
  73. data/lib/review/template.rb +6 -0
  74. data/lib/review/textmaker.rb +11 -7
  75. data/lib/review/textutils.rb +2 -10
  76. data/lib/review/tocprinter.rb +85 -68
  77. data/lib/review/topbuilder.rb +18 -11
  78. data/lib/review/update.rb +5 -6
  79. data/lib/review/version.rb +1 -1
  80. data/lib/review/volumeprinter.rb +4 -5
  81. data/lib/review/webmaker.rb +18 -13
  82. data/lib/review/webtocprinter.rb +10 -9
  83. data/lib/review/yamlloader.rb +2 -1
  84. data/review.gemspec +5 -3
  85. data/samples/sample-book/src/config-epub2.yml +1 -1
  86. data/samples/sample-book/src/config.yml +1 -1
  87. data/samples/sample-book/src/lib/tasks/review.rake +17 -1
  88. data/samples/syntax-book/ch01.re +1 -1
  89. data/samples/syntax-book/ch02.re +21 -6
  90. data/samples/syntax-book/ch03.re +1 -1
  91. data/samples/syntax-book/images/img3-2.png +0 -0
  92. data/templates/html/_colophon.html.erb +23 -0
  93. data/templates/html/_colophon_history.html.erb +9 -0
  94. data/templates/html/_cover.html.erb +10 -0
  95. data/templates/html/_part_body.html.erb +6 -0
  96. data/templates/html/_titlepage.html.erb +20 -0
  97. data/templates/html/layout-html5.html.erb +6 -0
  98. data/templates/html/layout-xhtml1.html.erb +6 -0
  99. data/templates/latex/config.erb +8 -0
  100. data/templates/latex/review-jlreq/review-base.sty +4 -5
  101. data/templates/latex/review-jlreq/review-jlreq.cls +10 -2
  102. data/templates/latex/review-jlreq/review-style.sty +6 -1
  103. data/templates/latex/review-jlreq/review-tcbox.sty +348 -0
  104. data/templates/latex/review-jlreq/reviewmacro.sty +5 -0
  105. data/templates/latex/review-jsbook/review-base.sty +5 -7
  106. data/templates/latex/review-jsbook/review-jsbook.cls +10 -2
  107. data/templates/latex/review-jsbook/review-style.sty +6 -1
  108. data/templates/latex/review-jsbook/review-tcbox.sty +348 -0
  109. data/templates/latex/review-jsbook/reviewmacro.sty +5 -0
  110. data/templates/opf/epubv2.opf.erb +7 -7
  111. data/templates/opf/epubv3.opf.erb +7 -7
  112. data/templates/opf/opf_manifest_epubv2.opf.erb +10 -0
  113. data/templates/opf/opf_manifest_epubv3.opf.erb +10 -0
  114. data/templates/opf/opf_metainfo_epubv2.opf.erb +17 -0
  115. data/templates/opf/opf_metainfo_epubv3.opf.erb +49 -0
  116. data/templates/opf/opf_tocx_epubv2.opf.erb +9 -0
  117. data/templates/opf/opf_tocx_epubv3.opf.erb +17 -0
  118. data/templates/web/html/layout-html5.html.erb +6 -5
  119. data/templates/web/html/layout-xhtml1.html.erb +6 -0
  120. data/test/assets/header_listener.html +35 -0
  121. data/test/assets/img_math/img1.png +0 -0
  122. data/test/assets/img_math/img2.png +0 -0
  123. data/test/assets/img_math/img3.png +0 -0
  124. data/test/assets/syntax_book_index_detail.txt +58 -0
  125. data/test/assets/test_template.tex +4 -1
  126. data/test/assets/test_template_backmatter.tex +4 -1
  127. data/test/run_test.rb +1 -1
  128. data/test/test_book_chapter.rb +2 -2
  129. data/test/test_catalog_converter_cmd.rb +1 -1
  130. data/test/test_epub3maker.rb +168 -124
  131. data/test/test_epubmaker.rb +243 -131
  132. data/test/test_epubmaker_cmd.rb +2 -2
  133. data/test/test_helper.rb +5 -4
  134. data/test/test_htmlbuilder.rb +64 -6
  135. data/test/test_idgxmlbuilder.rb +13 -0
  136. data/test/test_idgxmlmaker_cmd.rb +7 -3
  137. data/test/test_img_math.rb +111 -0
  138. data/test/test_indexbuilder.rb +5 -5
  139. data/test/test_latexbuilder.rb +107 -4
  140. data/test/test_lineinput.rb +20 -93
  141. data/test/test_markdownbuilder.rb +29 -0
  142. data/test/test_pdfmaker.rb +71 -0
  143. data/test/test_pdfmaker_cmd.rb +2 -2
  144. data/test/test_plaintextbuilder.rb +10 -18
  145. data/test/test_reviewheaderlistener.rb +49 -0
  146. data/test/test_template.rb +12 -2
  147. data/test/test_textmaker_cmd.rb +5 -1
  148. data/test/test_tocprinter.rb +46 -0
  149. data/test/test_topbuilder.rb +6 -1
  150. data/test/test_update.rb +34 -34
  151. data/test/test_zip_exporter.rb +5 -6
  152. metadata +91 -17
  153. data/lib/epubmaker.rb +0 -23
  154. data/lib/epubmaker/content.rb +0 -111
  155. data/lib/epubmaker/epubcommon.rb +0 -449
  156. data/lib/epubmaker/epubv2.rb +0 -142
  157. data/lib/epubmaker/epubv3.rb +0 -235
  158. data/lib/epubmaker/producer.rb +0 -375
  159. data/lib/epubmaker/zip_exporter.rb +0 -81
  160. data/lib/lineinput.rb +0 -155
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a64963e856714bc3b342e5b436d5a78f310785cfcad7216afa8a1676ea8b22b1
4
- data.tar.gz: a43be15aee421f6e864d7ba2007981717786ee359bb70d358cb9e4794827a47c
3
+ metadata.gz: a76cbf5a17c5281505bab9a925226a41d8294eefd6f27300951f901795ce435b
4
+ data.tar.gz: 4dcc1e929cb88187655b576b9cd06f0b17c52e598cb4cd622464f16921b6a871
5
5
  SHA512:
6
- metadata.gz: 12d7b001415a9e5f1b38f652ec4b3e89d8ad55661eb20fd911e0e626e1f8b3651844816ed209fa6f015524dcf2ff6f2c604ad5427ebbed91d21187e62f8629d5
7
- data.tar.gz: 95a137a10cf78f204a3ee1d94d078f4ebe24b9b5a710c43cd41fee30d04c40ce9d350d121cd76952df5a2f01bcb9166588e287399a71cd308ff4bae31cae128e
6
+ metadata.gz: 572f178fee41b59b2a76c3959460faec1b4123e5606ed749ba419c62dd08a5aa34ebe8db7c640e9d112fe6bee509ea76107f01e49a03a4cf16ef7322f1792a94
7
+ data.tar.gz: b6904c7bf4d5bc77c6affaed7a11f2dd019018f01cd98e5853680346add595aa8ba956a0918ce4f8e20f16703d4e752ae3a86ab101c81834414b7705f12cc7a6
@@ -0,0 +1,31 @@
1
+ name: Test with TeXLive
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ${{ matrix.os }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby: [2.5, 3.0]
13
+ os: [ubuntu-20.04]
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Install TeXLive 2020 in ubuntu
17
+ if: runner.os == 'Linux'
18
+ run: |
19
+ sudo apt-get update -y -qq && sudo apt-get install -y -qq texlive-lang-japanese texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-extra-utils texlive-latex-extra dvipng poppler-utils
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 rake
@@ -9,12 +9,12 @@ jobs:
9
9
  strategy:
10
10
  fail-fast: false
11
11
  matrix:
12
- ruby: [ '2.6.x', '2.5.x', '2.4.x' ]
12
+ ruby: [ '3.0', '2.6', '2.5', '2.4' ]
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v1
15
+ - uses: actions/checkout@v2
16
16
  - name: Set up Ruby
17
- uses: actions/setup-ruby@v1
17
+ uses: ruby/setup-ruby@v1
18
18
  with:
19
19
  ruby-version: ${{ matrix.ruby }}
20
20
  - name: Build and test with Rake
@@ -9,7 +9,7 @@ jobs:
9
9
  strategy:
10
10
  fail-fast: false
11
11
  matrix:
12
- ruby: [2.4, 2.5, 2.6, 2.7]
12
+ ruby: [2.4, 2.5, 2.6, 2.7, 3.0]
13
13
  os: [ubuntu-latest, macOS-latest]
14
14
  steps:
15
15
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  AllCops:
2
2
  Exclude:
3
- - lib/lineinput.rb
4
3
  - lib/uuid.rb
5
4
  - test/syntax-book/*
6
5
  - tmp/*
@@ -52,6 +51,10 @@ Lint/RaiseException:
52
51
  Lint/StructNewOverride:
53
52
  Enabled: true
54
53
 
54
+ # make it enable when supporting only Ruby 3.0 and higher.
55
+ Lint/RedundantDirGlobSort:
56
+ Enabled: false
57
+
55
58
  #### Performance
56
59
 
57
60
  Performance/RegexpMatch:
@@ -62,7 +65,7 @@ Performance/ReverseEach:
62
65
 
63
66
  # Use tr instead of gsub.
64
67
  Performance/StringReplacement:
65
- Enabled: false
68
+ Enabled: true
66
69
 
67
70
  Performance/RangeInclude:
68
71
  Enabled: true
@@ -135,6 +138,9 @@ Style/ClassMethods:
135
138
  Style/CommentedKeyword:
136
139
  Enabled: false
137
140
 
141
+ Style/DocumentDynamicEvalDefinition:
142
+ Enabled: false
143
+
138
144
  Style/FloatDivision:
139
145
  Enabled: false
140
146
 
@@ -420,7 +426,7 @@ Layout/EmptyLines:
420
426
  Enabled: true
421
427
 
422
428
  Layout/EmptyLineAfterGuardClause:
423
- Enabled: false
429
+ Enabled: true
424
430
 
425
431
  Layout/EmptyLinesAroundAccessModifier:
426
432
  Enabled: true
@@ -435,7 +441,7 @@ Layout/EmptyLinesAroundModuleBody:
435
441
  Enabled: true
436
442
 
437
443
  Layout/EndOfLine:
438
- Enabled: false
444
+ Enabled: true
439
445
 
440
446
  Layout/ExtraSpacing:
441
447
  Enabled: true
@@ -456,7 +462,7 @@ Layout/LeadingCommentSpace:
456
462
  Enabled: true
457
463
 
458
464
  Layout/MultilineOperationIndentation:
459
- Enabled: false
465
+ Enabled: true
460
466
 
461
467
  Layout/SpaceAroundBlockParameters:
462
468
  EnforcedStyleInsidePipes: no_space
@@ -478,7 +484,7 @@ Layout/SpaceAroundOperators:
478
484
  Enabled: true
479
485
 
480
486
  Layout/SpaceBeforeBlockBraces:
481
- Enabled: false
487
+ Enabled: true
482
488
 
483
489
  Layout/SpaceBeforeComma:
484
490
  Enabled: true
@@ -543,7 +549,7 @@ Metrics/MethodLength:
543
549
 
544
550
  ### should be < 20
545
551
  Metrics/CyclomaticComplexity:
546
- Max: 32
552
+ Max: 25
547
553
 
548
554
  ### should be < 60
549
555
  Metrics/AbcSize:
@@ -592,6 +598,8 @@ Naming/VariableName:
592
598
  Naming/VariableNumber:
593
599
  EnforcedStyle: normalcase
594
600
  Enabled: true
601
+ Exclude:
602
+ - test/*
595
603
 
596
604
  #### Security
597
605
 
data/NEWS.ja.md CHANGED
@@ -1,3 +1,111 @@
1
+ # Version 5.1.0
2
+ ## 新機能
3
+ * CSS 組版ソフトウェア [Vivliostyle-CLI](https://github.com/vivliostyle/vivliostyle-cli) を呼び出す Rake ルールを追加しました。Vivliostyle-CLI をインストールした環境において、`rake vivliostyle:build` または `rake vivliostyle` で PDF を作成、`rake vivliostyle:preview` でブラウザのプレビューが開きます ([#1663])
4
+ * PDFMaker: `config.yml` に `boxsetting` パラメータを新設し、column・note・memo・tip・info・warning・important・caution・notice の囲み飾りを事前定義のものや独自に作成したものから選択およびカスタマイズできるようにしました ([#1637])
5
+ * 挿入箇所を示す `@<ins>`、削除箇所を示す `@<del>` の2つのインライン命令を追加しました ([#1630])
6
+ * EPUBMaker, WebMaker: 数式表現手法として MathJax をサポートし、数式表現手法を `math_format` パラメータで選択するようにしました ([#1587], [#1614])
7
+
8
+ ## 非互換の変更
9
+ * EPUBMaker: `urnid` パラメータのデフォルト値のプレフィクスを、`urn:uid` から `urn:uuid` に変更しました ([#1658])
10
+ * PDFMaker: 長い脚注がページ分断されないようにしました ([#1607])
11
+
12
+ ## バグ修正
13
+ * `contentdir` を設定しているときに WebMaker, review-vol, review-index がエラーになるのを修正しました ([#1633])
14
+ * WebMaker: `images/html` 図版フォルダが見つけられないのを修正しました ([#1623])
15
+ * PDFMaker: 用語リストの見出しで chapterlink がおかしな結果になるのを修正しました ([#1619])
16
+ * PDFMaker: 索引に `{`, `}`, `|` が含まれているときにエラーや奇妙な文字に変換されるのを修正しました ([#1611])
17
+ * review-vol: 不正な見出しがあったときに妥当なエラーメッセージを出力するようにしました ([#1604])
18
+ * PDFMaker: `after_makeindex` フックを LaTeX コンパイル後ではなく `mendex` 実行後に実行するように修正しました ([#1605])
19
+ * PDFMaker: `//image` のキャプションが空だったときに内部エラーではなく図番号が出力されるように修正しました ([#1666])
20
+ * review-vol, review-index が不正なファイルを受け取ったときのエラー処理を修正しました ([#1671])
21
+ * EPUBMaker: author などの静的ファイルを指示したときに、ファイルが存在しないと内部エラーを起こしていたのを修正しました ([#1670])
22
+
23
+ ## 機能強化
24
+ * tty-loger gem パッケージがインストールされている場合、Re:VIEW の各 Maker コマンドの進行状態をアイコンおよびカラーで示すようにしました ([#1660])
25
+ * PDFMaker: クラスファイルで `\RequirePackage{plautopatch}` を最初に評価するようにしました ([#1644])
26
+ * MARKDOWNBuilder: `@<hd>` をサポートしました ([#1629])
27
+ * Re:VIEW ドキュメントファイルに不正なエスケープシーケンス文字が含まれているときにエラーを出すようにしました ([#1596], [#1602])
28
+ * `=` の数が6を超える見出し扱いの行があるときにエラーを出すようにしました ([#1591])
29
+
30
+ ## ドキュメント
31
+ * 画像探索の際に各 Maker が参照するサブフォルダ名について記載しました ([#1626])
32
+
33
+ ## その他
34
+ * EPUBMaker: EPUB ライブラリ一式を `lib/epubmaker` から `lib/review/epubmaker` に移動し、リファクタリングしました ([#1575], [#1617], [#1635], [#1640], [#1641], [#1650], [#1653], [#1655])
35
+ * EPUBMaker: テストを追加しました ([#1656])
36
+ * PDFMaker: いくつかの処理をリファクタリングしました ([#1664])
37
+ * 数式画像生成処理を `ReVIEW::ImgMath` クラスにまとめました ([#1642], [#1649], [#1659], [#1662])
38
+ * IDGXMLMaker: いくつかの処理をリファクタリングしました ([#1654])
39
+ * MakerHelper: いくつかの処理をリファクタリングしました ([#1652])
40
+ * テンプレート処理を `ReVIEW::Template.generate` メソッドに統一しました ([#1648])
41
+ * GitHub Actions で TeX コンパイルのテストも行うようにしました ([#1643])
42
+ * Rubocop 1.10 に対応しました ([#1593], [#1598], [#1613], [#1636], [#1647], [#1669])
43
+ * サンプル syntax-book の重複 ID を修正しました ([#1646])
44
+ * ライブラリの相対パスの参照方法をリファクタリングしました ([#1639])
45
+ * `ReVIEW::LineInput` クラスをリファタクタリングしました ([#1638])
46
+ * Copyright を2021年に更新しました ([#1632])
47
+ * Ruby 3.0 でのテストを実行するようにしました ([#1622])
48
+ * 不安定な Pygments のテストを抑制しました ([#1610], [#1618])
49
+ * WebTocPrinter: テストのエラーを修正しました ([#1606])
50
+ * テストのターゲットを指定しやすいようにしました ([#1594])
51
+
52
+ [#1671]: https://github.com/kmuto/review/issues/1671
53
+ [#1670]: https://github.com/kmuto/review/pull/1670
54
+ [#1669]: https://github.com/kmuto/review/pull/1669
55
+ [#1666]: https://github.com/kmuto/review/issues/1666
56
+ [#1664]: https://github.com/kmuto/review/pull/1664
57
+ [#1663]: https://github.com/kmuto/review/pull/1663
58
+ [#1662]: https://github.com/kmuto/review/issues/1662
59
+ [#1660]: https://github.com/kmuto/review/issues/1660
60
+ [#1659]: https://github.com/kmuto/review/pull/1659
61
+ [#1658]: https://github.com/kmuto/review/pull/1658
62
+ [#1656]: https://github.com/kmuto/review/pull/1656
63
+ [#1655]: https://github.com/kmuto/review/pull/1655
64
+ [#1654]: https://github.com/kmuto/review/pull/1654
65
+ [#1653]: https://github.com/kmuto/review/pull/1653
66
+ [#1652]: https://github.com/kmuto/review/pull/1652
67
+ [#1650]: https://github.com/kmuto/review/pull/1650
68
+ [#1649]: https://github.com/kmuto/review/pull/1649
69
+ [#1648]: https://github.com/kmuto/review/pull/1648
70
+ [#1647]: https://github.com/kmuto/review/pull/1647
71
+ [#1646]: https://github.com/kmuto/review/pull/1646
72
+ [#1644]: https://github.com/kmuto/review/issues/1644
73
+ [#1643]: https://github.com/kmuto/review/pull/1643
74
+ [#1642]: https://github.com/kmuto/review/pull/1642
75
+ [#1641]: https://github.com/kmuto/review/pull/1641
76
+ [#1640]: https://github.com/kmuto/review/pull/1640
77
+ [#1639]: https://github.com/kmuto/review/pull/1639
78
+ [#1638]: https://github.com/kmuto/review/pull/1638
79
+ [#1637]: https://github.com/kmuto/review/pull/1637
80
+ [#1636]: https://github.com/kmuto/review/pull/1636
81
+ [#1635]: https://github.com/kmuto/review/pull/1635
82
+ [#1633]: https://github.com/kmuto/review/issues/1633
83
+ [#1632]: https://github.com/kmuto/review/issues/1632
84
+ [#1630]: https://github.com/kmuto/review/issues/1630
85
+ [#1629]: https://github.com/kmuto/review/pull/1629
86
+ [#1626]: https://github.com/kmuto/review/pull/1626
87
+ [#1623]: https://github.com/kmuto/review/issues/1623
88
+ [#1622]: https://github.com/kmuto/review/pull/1622
89
+ [#1619]: https://github.com/kmuto/review/issues/1619
90
+ [#1618]: https://github.com/kmuto/review/pull/1618
91
+ [#1617]: https://github.com/kmuto/review/pull/1617
92
+ [#1614]: https://github.com/kmuto/review/pull/1614
93
+ [#1613]: https://github.com/kmuto/review/pull/1613
94
+ [#1611]: https://github.com/kmuto/review/issues/1611
95
+ [#1610]: https://github.com/kmuto/review/pull/1610
96
+ [#1607]: https://github.com/kmuto/review/issues/1607
97
+ [#1606]: https://github.com/kmuto/review/issues/1606
98
+ [#1605]: https://github.com/kmuto/review/issues/1605
99
+ [#1604]: https://github.com/kmuto/review/issues/1604
100
+ [#1602]: https://github.com/kmuto/review/pull/1602
101
+ [#1598]: https://github.com/kmuto/review/pull/1598
102
+ [#1596]: https://github.com/kmuto/review/issues/1596
103
+ [#1594]: https://github.com/kmuto/review/pull/1594
104
+ [#1593]: https://github.com/kmuto/review/pull/1593
105
+ [#1591]: https://github.com/kmuto/review/issues/1591
106
+ [#1587]: https://github.com/kmuto/review/issues/1587
107
+ [#1575]: https://github.com/kmuto/review/issues/1575
108
+
1
109
  # Version 5.0.0
2
110
  ## 新機能
3
111
  * review-jsbook / review-jlreq クラスに、`cover_fit_page` オプションを追加しました。`texdocumentclass` パラメータに `cover_fit_page=true` を付けると、画像サイズがどのようなものであっても仕上がりサイズに拡縮して表紙に貼り込みます。なお、制作において図版は実寸で作成することを推奨します ([#1534])
data/NEWS.md CHANGED
@@ -1,3 +1,111 @@
1
+ # Version 5.1.0
2
+ ## New Features
3
+ * added Rake rule to call [Vivliostyle-CLI](https://github.com/vivliostyle/vivliostyle-cli), CSS typesetting formatter. Create a PDF with `rake vivliostyle:build` or `rake vivliostyle`, and open a preview with `rake vivliostyle:preview` ([#1663])
4
+ * PDFMaker: introduced `boxsetting` parameter to choose and customize the decorations for column, note, memo, tip, info, warning, important, caution and notice ([#1637])
5
+ * added inline op, `@<ins>` (indicates an insertion) and `@<del>` (indicates a deletion) ([#1630])
6
+ * EPUBMaker, WebMaker: MathJax is now supported. Added `math_format` parameter to choose the mathematical expression method ([#1587], [#1614])
7
+
8
+ ## Breaking Changes
9
+ * EPUBMaker: changed the default value of the `urnid` parameter from `urn:uid` to `urn:uuid` ([#1658])
10
+ * PDFMaker: footnotes are no longer broken up by a page ([#1607])
11
+
12
+ ## Bug Fixes
13
+ * fixed WebMaker, review-vol and review-index errors when `contentdir` is defined ([#1633])
14
+ * WebMaker: fixed `images/html` foder not being found ([#1623])
15
+ * PDFMaker: fixed chapterlink in term list ([#1619])
16
+ * PDFMaker: fixed errors when index contains `{`, `}`, or `|` ([#1611])
17
+ * review-vol: valid error messages will be displayed when invalid headings are found ([#1604])
18
+ * PDFMaker: `after_makeindex` hook to be executed after `mendex` execution, not after LaTeX compilation ([#1605])
19
+ * PDFMaker: if the caption of `//image` is empty, the figure number will be printed instead of an internal error ([#1666])
20
+ * fixed review-vol and review-index errors when a file is invalid ([#1671])
21
+ * EPUBMaker: fixed an error when static file is missing ([#1670])
22
+
23
+ ## Enhancements
24
+ * Maker commands now display with nice colors and icons for their progress status when tty-logger gem is installed ([#1660])
25
+ * PDFMaker: added `\RequirePackage{plautopatch}` definition to class files ([#1644])
26
+ * MARKDOWNBuilder: supported `@<hd>` ([#1629])
27
+ * Re:VIEW now reports an error when a document file contains invalid escape sequence characters ([#1596], [#1602])
28
+ * an error is raised when there are more than 6 `=` in a heading ([#1591])
29
+
30
+ ## Docs
31
+ * documented the name of the image folder referenced by Makers ([#1626])
32
+
33
+ ## Others
34
+ * EPUBMaker: moved EPUB library from `lib/epubmaker` to `lib/review/epubmaker` and refactored it ([#1575], [#1617], [#1635], [#1640], [#1641], [#1650], [#1653], [#1655])
35
+ * EPUBMaker: added tests ([#1656])
36
+ * PDFMaker: refactored some ([#1664])
37
+ * introduced `ReVIEW::ImgMath` class to handle mathematic images ([#1642], [#1649], [#1659], [#1662])
38
+ * IDGXMLMaker: refactored some ([#1654])
39
+ * MakerHelper: refactored some ([#1652])
40
+ * introduced `ReVIEW::Template.generate` class to handle the templates ([#1648])
41
+ * added a test of TeX compilation to GitHub Actions ([#1643])
42
+ * refactored codes according to Rubocop 1.10 ([#1593], [#1598], [#1613], [#1636], [#1647], [#1669])
43
+ * fixed duplicate IDs of syntax-book sample ([#1646])
44
+ * refactored the way to reference relative pathes ([#1639])
45
+ * refactored `ReVIEW::LineInput` class ([#1638])
46
+ * update Copyright to 2021 ([#1632])
47
+ * added Ruby 3.0 to the test platform ([#1622])
48
+ * suppressed tests for Pygments ([#1610], [#1618])
49
+ * WebTocPrinter: fixed an error of test ([#1606])
50
+ * improved to make it easier to specify the target of the test ([#1594])
51
+
52
+ [#1671]: https://github.com/kmuto/review/issues/1671
53
+ [#1670]: https://github.com/kmuto/review/pull/1670
54
+ [#1669]: https://github.com/kmuto/review/pull/1669
55
+ [#1666]: https://github.com/kmuto/review/issues/1666
56
+ [#1664]: https://github.com/kmuto/review/pull/1664
57
+ [#1663]: https://github.com/kmuto/review/pull/1663
58
+ [#1662]: https://github.com/kmuto/review/issues/1662
59
+ [#1660]: https://github.com/kmuto/review/issues/1660
60
+ [#1659]: https://github.com/kmuto/review/pull/1659
61
+ [#1658]: https://github.com/kmuto/review/pull/1658
62
+ [#1656]: https://github.com/kmuto/review/pull/1656
63
+ [#1655]: https://github.com/kmuto/review/pull/1655
64
+ [#1654]: https://github.com/kmuto/review/pull/1654
65
+ [#1653]: https://github.com/kmuto/review/pull/1653
66
+ [#1652]: https://github.com/kmuto/review/pull/1652
67
+ [#1650]: https://github.com/kmuto/review/pull/1650
68
+ [#1649]: https://github.com/kmuto/review/pull/1649
69
+ [#1648]: https://github.com/kmuto/review/pull/1648
70
+ [#1647]: https://github.com/kmuto/review/pull/1647
71
+ [#1646]: https://github.com/kmuto/review/pull/1646
72
+ [#1644]: https://github.com/kmuto/review/issues/1644
73
+ [#1643]: https://github.com/kmuto/review/pull/1643
74
+ [#1642]: https://github.com/kmuto/review/pull/1642
75
+ [#1641]: https://github.com/kmuto/review/pull/1641
76
+ [#1640]: https://github.com/kmuto/review/pull/1640
77
+ [#1639]: https://github.com/kmuto/review/pull/1639
78
+ [#1638]: https://github.com/kmuto/review/pull/1638
79
+ [#1637]: https://github.com/kmuto/review/pull/1637
80
+ [#1636]: https://github.com/kmuto/review/pull/1636
81
+ [#1635]: https://github.com/kmuto/review/pull/1635
82
+ [#1633]: https://github.com/kmuto/review/issues/1633
83
+ [#1632]: https://github.com/kmuto/review/issues/1632
84
+ [#1630]: https://github.com/kmuto/review/issues/1630
85
+ [#1629]: https://github.com/kmuto/review/pull/1629
86
+ [#1626]: https://github.com/kmuto/review/pull/1626
87
+ [#1623]: https://github.com/kmuto/review/issues/1623
88
+ [#1622]: https://github.com/kmuto/review/pull/1622
89
+ [#1619]: https://github.com/kmuto/review/issues/1619
90
+ [#1618]: https://github.com/kmuto/review/pull/1618
91
+ [#1617]: https://github.com/kmuto/review/pull/1617
92
+ [#1614]: https://github.com/kmuto/review/pull/1614
93
+ [#1613]: https://github.com/kmuto/review/pull/1613
94
+ [#1611]: https://github.com/kmuto/review/issues/1611
95
+ [#1610]: https://github.com/kmuto/review/pull/1610
96
+ [#1607]: https://github.com/kmuto/review/issues/1607
97
+ [#1606]: https://github.com/kmuto/review/issues/1606
98
+ [#1605]: https://github.com/kmuto/review/issues/1605
99
+ [#1604]: https://github.com/kmuto/review/issues/1604
100
+ [#1602]: https://github.com/kmuto/review/pull/1602
101
+ [#1598]: https://github.com/kmuto/review/pull/1598
102
+ [#1596]: https://github.com/kmuto/review/issues/1596
103
+ [#1594]: https://github.com/kmuto/review/pull/1594
104
+ [#1593]: https://github.com/kmuto/review/pull/1593
105
+ [#1591]: https://github.com/kmuto/review/issues/1591
106
+ [#1587]: https://github.com/kmuto/review/issues/1587
107
+ [#1575]: https://github.com/kmuto/review/issues/1575
108
+
1
109
  # Version 5.0.0
2
110
  ## New Features
3
111
  * added `cover_fit_page` option to review-jsbook / review-jlreq classes. When `cover_fit_page=true` is specified in the `texdocumentclass` parameter, the cover image is scaled to paper size. Note: it is recommended that the images should be created at actual size ([#1534])
data/README.md CHANGED
@@ -62,11 +62,12 @@ $ echo "export PATH=PATH_OF_REVIEW/bin:$PATH" >> ~/.profile
62
62
  $ review-init hello
63
63
  $ cd hello
64
64
  $ (... add and edit *.re file, config.yml and catalog.yml ...)
65
- $ rake epub ## generating EPUB
66
- $ rake pdf ## generating PDF (Requirement TeXLive)
67
- $ rake text ## generating texts
68
- $ rake web ## generating Web pages
69
- $ rake idgxml ## generating InDesign XML files
65
+ $ rake epub ## generating EPUB
66
+ $ rake pdf ## generating PDF (Requirement TeXLive)
67
+ $ rake text ## generating texts
68
+ $ rake web ## generating Web pages
69
+ $ rake idgxml ## generating InDesign XML files
70
+ $ rake vivliostyle ## generating PDF using Vivliostyle-CLI (Requirement Vivliostyle-CLI)
70
71
  ```
71
72
 
72
73
  For further information, see [doc/quickstart.md](https://github.com/kmuto/review/blob/master/doc/quickstart.md)
@@ -115,4 +116,4 @@ Exception:
115
116
 
116
117
  ## Copyright
117
118
 
118
- Copyright (c) 2006-2020 Minero Aoki, Kenshi Muto, Masayoshi Takahashi, Masanori Kado.
119
+ Copyright (c) 2006-2021 Minero Aoki, Kenshi Muto, Masayoshi Takahashi, Masanori Kado.
data/Rakefile CHANGED
@@ -21,8 +21,13 @@ task :rubocop do
21
21
  end
22
22
  end
23
23
 
24
- task :test do
25
- ruby('test/run_test.rb')
24
+ desc 'Run tests'
25
+ task :test, :target do |_, argv|
26
+ if argv[:target].nil?
27
+ ruby('test/run_test.rb')
28
+ else
29
+ ruby('test/run_test.rb', "--pattern=#{argv[:target]}")
30
+ end
26
31
  end
27
32
 
28
33
  begin
data/bin/review CHANGED
@@ -13,9 +13,7 @@
13
13
  # the GNU LGPL, Lesser General Public License version 2.1.
14
14
  # For details of the GNU LGPL, see the file "COPYING".
15
15
 
16
- require 'pathname'
17
- bindir = Pathname.new(__FILE__).realpath.dirname
18
- $LOAD_PATH.unshift((bindir + '../lib').realpath)
16
+ $LOAD_PATH.unshift(File.realpath('../lib', __dir__))
19
17
 
20
18
  require 'review'
21
19
 
@@ -52,7 +50,7 @@ if ARGV[0] == 'version'
52
50
  end
53
51
 
54
52
  command = "review-#{ARGV.shift}"
55
- bindir = Pathname.new(__FILE__).realpath.dirname
53
+ bindir = File.realpath(__dir__)
56
54
  command_path = File.join(bindir, command)
57
55
 
58
56
  unless File.exist?(command_path)
@@ -9,10 +9,9 @@
9
9
  #
10
10
  # Convert old PREDEF/CHAPS/PART/POSTDEF files into catalog.yml.
11
11
 
12
- require 'pathname'
12
+ $LOAD_PATH.unshift(File.realpath('../lib', __dir__))
13
+
13
14
  require 'optparse'
14
- bindir = Pathname.new(__FILE__).realpath.dirname
15
- $LOAD_PATH.unshift((bindir + '../lib').realpath)
16
15
  require 'review/version'
17
16
  require 'review/extentions'
18
17
  require 'review/logger'
@@ -158,6 +157,7 @@ def replace_old_style_part(dir)
158
157
  end
159
158
 
160
159
  next unless allow_overwrite
160
+
161
161
  File.write("#{dir}/#{part_name}", "= #{part}")
162
162
  catalog.replace_part(part, part_name)
163
163
  end