review 2.0.0 → 2.1.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +43 -1
  3. data/.rubocop_todo.yml +0 -5
  4. data/.travis.yml +2 -1
  5. data/README.md +2 -1
  6. data/appveyor.yml +10 -1
  7. data/bin/review-init +12 -0
  8. data/bin/review-validate +5 -4
  9. data/doc/NEWS.ja.md +82 -0
  10. data/doc/NEWS.md +84 -0
  11. data/doc/config.yml.sample +1 -0
  12. data/doc/config.yml.sample-simple +77 -0
  13. data/doc/customize_epub.md +47 -0
  14. data/doc/preproc.ja.md +153 -0
  15. data/doc/preproc.md +160 -0
  16. data/lib/epubmaker/producer.rb +6 -3
  17. data/lib/lineinput.rb +4 -4
  18. data/lib/review/book/base.rb +4 -0
  19. data/lib/review/book/compilable.rb +3 -3
  20. data/lib/review/book/index.rb +3 -24
  21. data/lib/review/book/part.rb +6 -2
  22. data/lib/review/configure.rb +4 -2
  23. data/lib/review/htmlbuilder.rb +17 -10
  24. data/lib/review/htmlutils.rb +4 -5
  25. data/lib/review/i18n.rb +17 -11
  26. data/lib/review/i18n.yml +6 -0
  27. data/lib/review/idgxmlbuilder.rb +2 -2
  28. data/lib/review/makerhelper.rb +1 -1
  29. data/lib/review/markdownbuilder.rb +12 -1
  30. data/lib/review/md2inaobuilder.rb +66 -0
  31. data/lib/review/pdfmaker.rb +20 -7
  32. data/lib/review/preprocessor.rb +2 -2
  33. data/lib/review/topbuilder.rb +18 -0
  34. data/lib/review/version.rb +1 -1
  35. data/lib/review/webtocprinter.rb +9 -2
  36. data/templates/LICENSE +20 -0
  37. data/templates/README.md +8 -0
  38. data/templates/latex/layout.tex.erb +58 -36
  39. data/templates/web/html/layout-html5.html.erb +1 -1
  40. data/test/assets/test_template.tex +44 -8
  41. data/test/book_test_helper.rb +10 -7
  42. data/test/sample-book/src/Rakefile +7 -0
  43. data/test/test_book.rb +1 -4
  44. data/test/test_epub3maker.rb +1 -3
  45. data/test/test_htmlbuilder.rb +30 -8
  46. data/test/test_i18n.rb +28 -0
  47. data/test/test_idgxmlbuilder.rb +2 -2
  48. data/test/test_index.rb +10 -0
  49. data/test/test_location.rb +30 -0
  50. data/test/test_markdownbuilder.rb +6 -0
  51. data/test/test_md2inaobuilder.rb +75 -0
  52. data/test/test_pdfmaker.rb +1 -0
  53. data/test/test_review_ext.rb +3 -2
  54. data/test/test_topbuilder.rb +11 -0
  55. data/test/test_webtocprinter.rb +164 -0
  56. data/test/test_yamlloader.rb +6 -7
  57. metadata +14 -1
@@ -107,7 +107,7 @@ module ReVIEW
107
107
 
108
108
  private
109
109
 
110
- TYPES = %w( file range )
110
+ TYPES = %w(file range)
111
111
 
112
112
  def preproc(f)
113
113
  init_vars
@@ -161,7 +161,7 @@ module ReVIEW
161
161
  end
162
162
  end
163
163
 
164
- KNOWN_DIRECTIVES = %w( require provide warn ok )
164
+ KNOWN_DIRECTIVES = %w(require provide warn ok)
165
165
 
166
166
  def known_directive?(op)
167
167
  KNOWN_DIRECTIVES.index(op)
@@ -503,10 +503,28 @@ module ReVIEW
503
503
  [str.to_i(16)].pack("U")
504
504
  end
505
505
 
506
+ def inline_comment(str)
507
+ if @book.config["draft"]
508
+ %Q[◆→DTP連絡:#{str}←◆]
509
+ else
510
+ ""
511
+ end
512
+ end
513
+
506
514
  def inline_m(str)
507
515
  %Q[◆→TeX式ここから←◆#{str}◆→TeX式ここまで←◆]
508
516
  end
509
517
 
518
+ def inline_hd_chap(chap, id)
519
+ if chap.number
520
+ n = chap.headline_index.number(id)
521
+ if @book.config["secnolevel"] >= n.split('.').size
522
+ return I18n.t("chapter_quote", "#{n} #{compile_inline(chap.headline(id).caption)}")
523
+ end
524
+ end
525
+ I18n.t("chapter_quote", compile_inline(chap.headline(id).caption))
526
+ end
527
+
510
528
  def noindent
511
529
  puts "◆→DTP連絡:次の1行インデントなし←◆"
512
530
  end
@@ -1,3 +1,3 @@
1
1
  module ReVIEW
2
- VERSION = "2.0.0"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require 'review/tocprinter'
2
+ require 'review/i18n'
2
3
 
3
4
  module ReVIEW
4
5
  class WEBTOCPrinter < TOCPrinter
@@ -22,7 +23,13 @@ module ReVIEW
22
23
 
23
24
  def print_part(part)
24
25
  if part.number
25
- @out.puts "<li>#{h(part.title)}\n<ul>\n"
26
+ if part.file?
27
+ ext = part.book.config["htmlext"] || "html"
28
+ path = part.path.sub(/\.re/, "."+ext)
29
+ @out.puts "<li><a href=\"#{path}\">#{h(I18n.t("part_short", part.number) + " " + part.title)}</a>\n<ul>\n"
30
+ else
31
+ @out.puts "<li>#{h(I18n.t("part_short", part.number) + " " + part.title)}\n<ul>\n"
32
+ end
26
33
  end
27
34
  part.each_chapter do |chap|
28
35
  print_chapter(chap)
@@ -37,7 +44,7 @@ module ReVIEW
37
44
  ext = chap.book.config["htmlext"] || "html"
38
45
  path = chap.path.sub(/\.re/, "."+ext)
39
46
  if chap_node.number && chap.on_CHAPS?
40
- label = "#{chap.number} #{chap.title}"
47
+ label = "#{I18n.t("chapter_short", chap.number)} #{chap.title}"
41
48
  else
42
49
  label = chap.title
43
50
  end
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2006-2016 Minero Aoki, Kenshi Muto, Masayoshi Takahashi, Masanori Kado.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
20
+
@@ -0,0 +1,8 @@
1
+ # template files for Re:VIEW
2
+
3
+ This directory is for template files of Re:VIEW.
4
+
5
+ ## License
6
+
7
+ The license of files in this directory is MIT. See [LICENSE](./LICENSE) file.
8
+
@@ -1,11 +1,17 @@
1
- \documentclass[<%= @documentclassoption %>]{<%= @documentclass %>}
1
+ \documentclass[dvipdfmx,<%= @documentclassoption %>]{<%= @documentclass %>}
2
+ % %% fixes to LaTeX2e
3
+ % \usepackage{fix-cm}[2006/09/13 v1.1m]
4
+ % \usepackage{fixltx2e}[2006/09/13 v1.1m]
5
+
2
6
  <%- if @texcompiler == "uplatex" -%>
3
7
  \usepackage[deluxe,uplatex]{otf}
4
8
  <%- else -%>
5
9
  \usepackage[deluxe]{otf}
6
10
  <%- end -%>
7
- \usepackage[dvipdfmx]{color}
11
+ \usepackage[T1]{fontenc}\usepackage{textcomp}%T1/TS1
12
+ % \usepackage{lmodern}
8
13
  \usepackage[dvipdfmx]{graphicx}
14
+ \usepackage[dvipdfmx,table]{xcolor}%requires colortbl, array
9
15
  \usepackage{framed}
10
16
  \usepackage{wrapfig}
11
17
  \definecolor{shadecolor}{gray}{0.9}
@@ -36,28 +42,11 @@
36
42
  \newcommand{\parasep}{\vspace*{3zh}}
37
43
  \setlength{\footskip}{30pt}
38
44
 
39
- <%- if @texcompiler == "uplatex" -%>
45
+ %% Bookmarkの文字化け対策(日本語向け)
40
46
  \usepackage[dvipdfmx,bookmarks=true,bookmarksnumbered=true,colorlinks=true,%
41
- pdftitle={<%= @config.name_of("booktitle") %>},%
42
- pdfauthor={<%= @config.names_of("aut").join(I18n.t("names_splitter")) %>}]{hyperref}
43
- % uplatexでのBookmarkの文字化け対策(日本語向け)
47
+ pdftitle={<%= escape_latex(@config.name_of("booktitle")) %>},%
48
+ pdfauthor={<%= escape_latex(@config.names_of("aut").join(I18n.t("names_splitter"))) %>}]{hyperref}
44
49
  \usepackage[dvipdfmx]{pxjahyper}
45
- <%- else -%>
46
- %% Bookmarkの文字化け対策(日本語向け)
47
- \ifnum 46273=\euc"B4C1 % 46273 == 0xB4C1 == 漢(EUC-JP)
48
- \usepackage{atbegshi}%
49
- \AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}}%
50
- %%\AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}%
51
- \else
52
- \usepackage{atbegshi}%
53
- \AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}}%
54
- %%\AtBeginDvi{\special{pdf:tounicode 90ms-RKSJ-UCS2}}%
55
- \fi
56
-
57
- \usepackage[dvipdfm,bookmarks=true,bookmarksnumbered=true,colorlinks=true,%
58
- pdftitle={<%= @config.name_of("booktitle") %>},%
59
- pdfauthor={<%= @config.names_of("aut").join(I18n.t("names_splitter")) %>}]{hyperref}
60
- <%- end -%>
61
50
 
62
51
  <%- if ["utbook", "tbook"].include?(@documentclass) -%>
63
52
  \newcommand{\headfont}{\gtfamily\sffamily\bfseries}
@@ -70,7 +59,7 @@
70
59
  <%- else -%>
71
60
  \usepackage{listings}
72
61
  <%- end -%>
73
- \renewcommand{\lstlistingname}{<%= I18n.t("list")%>}
62
+ \renewcommand{\lstlistingname}{<%= escape_latex(I18n.t("list")) %>}
74
63
  \lstset{%
75
64
  breaklines=true,%
76
65
  breakautoindent=false,%
@@ -134,7 +123,7 @@
134
123
  \vspace{2zw}}
135
124
 
136
125
  \newcommand{\reviewcolumnhead}[2]{%
137
- {\noindent\large <%= I18n.t("column_head")%>: #2}}
126
+ {\noindent\large <%= escape_latex(I18n.t("column_head"))%>: #2}}
138
127
 
139
128
  \newcommand{\reviewtablecaption}[1]{%
140
129
  \caption{#1}}
@@ -160,18 +149,20 @@
160
149
  \newcommand{\reviewboxcaption}[1]{%
161
150
  \medskip{\small\noindent #1}\vspace*{-1.3zw}}
162
151
 
163
- \newcommand{\reviewimageref}[2]{<%= I18n.t("image")%> #1}
164
- \newcommand{\reviewtableref}[2]{<%= I18n.t("table")%> #1}
165
- \newcommand{\reviewlistref}[1]{<%= I18n.t("list")%> #1}
152
+ \newcommand{\reviewimageref}[2]{<%= escape_latex(I18n.t("image"))%> #1}
153
+ \newcommand{\reviewtableref}[2]{<%= escape_latex(I18n.t("table"))%> #1}
154
+ \newcommand{\reviewlistref}[1]{<%= escape_latex(I18n.t("list"))%> #1}
166
155
  \newcommand{\reviewbibref}[2]{#1}
167
- \newcommand{\reviewcolumnref}[2]{<%= I18n.t("columnname")%> #1}
156
+ \newcommand{\reviewcolumnref}[2]{<%= escape_latex(I18n.t("columnname"))%> #1}
168
157
  \newcommand{\reviewsecref}[2]{#1}
169
158
 
170
159
  \newcommand{\reviewminicolumntitle}[1]{%
171
- {\large <%= I18n.t("memo_head")%>: #1}\\}
160
+ {\large <%= escape_latex(I18n.t("memo_head"))%>: #1}\\}
172
161
 
173
162
  <%- if @config["toctitle"].present? -%>
174
- \renewcommand{\contentsname}{<%= @config["toctitle"]%>}
163
+ \renewcommand{\contentsname}{<%= escape_latex(@config["toctitle"]) %>}
164
+ <%- elsif I18n.t("toctitle") -%>
165
+ \renewcommand{\contentsname}{<%= escape_latex(I18n.t("toctitle")) %>}
175
166
  <%- end -%>
176
167
 
177
168
  \newenvironment{reviewminicolumn}{%
@@ -199,6 +190,37 @@
199
190
  \newcommand{\reviewcolophon}[0]{\clearpage}
200
191
  \newcommand{\reviewappendix}[0]{\appendix}
201
192
 
193
+ \newcommand{\reviewprepartname}{<%= escape_latex(@locale_latex["prepartname"]) %>}
194
+ \newcommand{\reviewpostpartname}{<%= escape_latex(@locale_latex["postpartname"]) %>}
195
+ \newcommand{\reviewprechaptername}{<%= escape_latex(@locale_latex["prechaptername"]) %>}
196
+ \newcommand{\reviewpostchaptername}{<%= escape_latex(@locale_latex["postchaptername"]) %>}
197
+ \newcommand{\reviewfigurename}{<%= escape_latex(I18n.t("image")) %>}
198
+ \newcommand{\reviewtablename}{<%= escape_latex(I18n.t("table")) %>}
199
+ \newcommand{\reviewappendixname}{<%= escape_latex(@locale_latex["preappendixname"]) %>}
200
+
201
+ \ifdefined\prepartname
202
+ \renewcommand{\prepartname}{\reviewprepartname}
203
+ \fi
204
+ \ifdefined\postpartname
205
+ \renewcommand{\postpartname}{\reviewpostpartname}
206
+ \fi
207
+ \ifdefined\prechaptername
208
+ \renewcommand{\prechaptername}{\reviewprechaptername}
209
+ \fi
210
+ \ifdefined\postchaptername
211
+ \renewcommand{\postchaptername}{\reviewpostchaptername}
212
+ \fi
213
+ \ifdefined\figurename
214
+ \renewcommand{\figurename}{\reviewfigurename}
215
+ \fi
216
+ \ifdefined\tablename
217
+ \renewcommand{\tablename}{\reviewtablename}
218
+ \fi
219
+ \ifdefined\appendixname
220
+ \renewcommand{\appendixname}{\reviewappendixname}
221
+ \fi
222
+
223
+
202
224
  \makeatletter
203
225
  %% maxwidth is the original width if it is less than linewidth
204
226
  %% otherwise use linewidth (to make sure the graphics do not exceed the margin)
@@ -215,8 +237,6 @@
215
237
  <%= @config["usepackage"] %>
216
238
  <%- end -%>
217
239
 
218
- \usepackage[T1]{fontenc}
219
-
220
240
  \begin{document}
221
241
 
222
242
  \reviewmainfont
@@ -236,7 +256,7 @@
236
256
  \begin{center}%
237
257
  \mbox{} \vskip5zw
238
258
  \reviewtitlefont%
239
- {\Huge <%= @config.name_of("booktitle") %> \par}%
259
+ {\Huge <%= escape_latex(@config.name_of("booktitle")) %> \par}%
240
260
  \vskip 15em%
241
261
  {\huge
242
262
  \lineskip .75em
@@ -244,7 +264,7 @@
244
264
  <%= @authors %>
245
265
  \end{tabular}\par}%
246
266
  \vfill
247
- {\large <%= @config["date"] %> <%= I18n.t("edition")%>\hspace{2zw}<%= I18n.t("published_by", @config.names_of("prt").join(I18n.t("names_splitter")))%>\par}%
267
+ {\large <%= escape_latex(@config["date"].to_s) %> <%= escape_latex(I18n.t("edition")) %>\hspace{2zw}<%= escape_latex(I18n.t("published_by", @config.names_of("pbl").join(I18n.t("names_splitter"))))%>\par}%
248
268
  \vskip4zw\mbox{}
249
269
  \end{center}%
250
270
  \end{titlepage}
@@ -309,7 +329,7 @@
309
329
 
310
330
  \vspace*{\fill}
311
331
 
312
- {\noindent\reviewtitlefont\Large <%= @config.name_of("booktitle") %>} \\
332
+ {\noindent\reviewtitlefont\Large <%= escape_latex(@config.name_of("booktitle")) %>} \\
313
333
  \rule[8pt]{14cm}{1pt} \\
314
334
  {\noindent
315
335
  <%= @config["pubhistory"].to_s.gsub(/\n/){"\n\n\\noindent\n"} %>
@@ -320,7 +340,9 @@
320
340
  \end{tabular}
321
341
   \\
322
342
  \rule[0pt]{14cm}{1pt} \\
323
- <%= @config.names_of("rights").join('\\' + '\\') %> \\
343
+ <%- if @config["rights"] -%>
344
+ <%= @config.names_of("rights").map{|s| escape_latex(s)}.join('\\' + '\\') %> \\
345
+ <%- end -%>
324
346
  <%- end -%>
325
347
  <%- end -%>
326
348
 
@@ -18,7 +18,7 @@
18
18
  <nav class="side-content">
19
19
  <h1><%=h @book.config["booktitle"] %></h1>
20
20
  <%= @toc %>
21
- <p class="review-signature">powered by <a href="http://reviewml.com">Re:VIEW</a></p>
21
+ <p class="review-signature">powered by <a href="http://reviewml.org/">Re:VIEW</a></p>
22
22
  </nav>
23
23
  <div class="book-body">
24
24
  <header>
@@ -1,7 +1,13 @@
1
- \documentclass[uplatex,oneside]{jsbook}
1
+ \documentclass[dvipdfmx,uplatex,oneside]{jsbook}
2
+ % %% fixes to LaTeX2e
3
+ % \usepackage{fix-cm}[2006/09/13 v1.1m]
4
+ % \usepackage{fixltx2e}[2006/09/13 v1.1m]
5
+
2
6
  \usepackage[deluxe,uplatex]{otf}
3
- \usepackage[dvipdfmx]{color}
7
+ \usepackage[T1]{fontenc}\usepackage{textcomp}%T1/TS1
8
+ % \usepackage{lmodern}
4
9
  \usepackage[dvipdfmx]{graphicx}
10
+ \usepackage[dvipdfmx,table]{xcolor}%requires colortbl, array
5
11
  \usepackage{framed}
6
12
  \usepackage{wrapfig}
7
13
  \definecolor{shadecolor}{gray}{0.9}
@@ -30,10 +36,10 @@
30
36
  \newcommand{\parasep}{\vspace*{3zh}}
31
37
  \setlength{\footskip}{30pt}
32
38
 
39
+ %% Bookmarkの文字化け対策(日本語向け)
33
40
  \usepackage[dvipdfmx,bookmarks=true,bookmarksnumbered=true,colorlinks=true,%
34
- pdftitle={Re:VIEW Sample Book},%
35
- pdfauthor={}]{hyperref}
36
- % uplatexでのBookmarkの文字化け対策(日本語向け)
41
+ pdftitle={Re:VIEW Sample Book},%
42
+ pdfauthor={}]{hyperref}
37
43
  \usepackage[dvipdfmx]{pxjahyper}
38
44
 
39
45
 
@@ -115,6 +121,7 @@
115
121
  \newcommand{\reviewminicolumntitle}[1]{%
116
122
  {\large ■メモ: #1}\\}
117
123
 
124
+ \renewcommand{\contentsname}{目次}
118
125
 
119
126
  \newenvironment{reviewminicolumn}{%
120
127
  \vspace{1.5zw}\begin{screen}}{%
@@ -141,6 +148,37 @@
141
148
  \newcommand{\reviewcolophon}[0]{\clearpage}
142
149
  \newcommand{\reviewappendix}[0]{\appendix}
143
150
 
151
+ \newcommand{\reviewprepartname}{第}
152
+ \newcommand{\reviewpostpartname}{部}
153
+ \newcommand{\reviewprechaptername}{第}
154
+ \newcommand{\reviewpostchaptername}{章}
155
+ \newcommand{\reviewfigurename}{図}
156
+ \newcommand{\reviewtablename}{表}
157
+ \newcommand{\reviewappendixname}{付録}
158
+
159
+ \ifdefined\prepartname
160
+ \renewcommand{\prepartname}{\reviewprepartname}
161
+ \fi
162
+ \ifdefined\postpartname
163
+ \renewcommand{\postpartname}{\reviewpostpartname}
164
+ \fi
165
+ \ifdefined\prechaptername
166
+ \renewcommand{\prechaptername}{\reviewprechaptername}
167
+ \fi
168
+ \ifdefined\postchaptername
169
+ \renewcommand{\postchaptername}{\reviewpostchaptername}
170
+ \fi
171
+ \ifdefined\figurename
172
+ \renewcommand{\figurename}{\reviewfigurename}
173
+ \fi
174
+ \ifdefined\tablename
175
+ \renewcommand{\tablename}{\reviewtablename}
176
+ \fi
177
+ \ifdefined\appendixname
178
+ \renewcommand{\appendixname}{\reviewappendixname}
179
+ \fi
180
+
181
+
144
182
  \makeatletter
145
183
  %% maxwidth is the original width if it is less than linewidth
146
184
  %% otherwise use linewidth (to make sure the graphics do not exceed the margin)
@@ -154,8 +192,6 @@
154
192
  \makeatother
155
193
 
156
194
 
157
- \usepackage[T1]{fontenc}
158
-
159
195
  \begin{document}
160
196
 
161
197
  \reviewmainfont
@@ -173,7 +209,7 @@
173
209
 
174
210
  \end{tabular}\par}%
175
211
  \vfill
176
- {\large 2011-01-01 版\hspace{2zw} 発行\par}%
212
+ {\large 2011{-}01{-}01 版\hspace{2zw} 発行\par}%
177
213
  \vskip4zw\mbox{}
178
214
  \end{center}%
179
215
  \end{titlepage}
@@ -10,14 +10,17 @@ include ReVIEW
10
10
  module BookTestHelper
11
11
  def mktmpbookdir(files = {})
12
12
  created_files = {}
13
- Dir.mktmpdir do |dir|
14
- files.each_pair do |basename, content|
15
- path = File.join(dir, basename)
16
- File.open(path, 'w') {|o| o.print content }
17
- created_files[basename] = path
13
+ Dir.mktmpdir do |tmpdir|
14
+ Dir.chdir(tmpdir) do
15
+ dir = "."
16
+ files.each_pair do |basename, content|
17
+ path = File.join(dir, basename)
18
+ File.open(path, 'w') {|o| o.print content }
19
+ created_files[basename] = path
20
+ end
21
+ book = Book::Base.load(dir)
22
+ yield(dir, book, created_files)
18
23
  end
19
- book = Book::Base.load(dir)
20
- yield(dir, book, created_files)
21
24
  end
22
25
  end
23
26
 
@@ -34,6 +34,13 @@ task :html_all do
34
34
  build_all("html")
35
35
  end
36
36
 
37
+ desc 'preproc all'
38
+ task :preproc do
39
+ Dir.glob("*.re").each do |file|
40
+ sh "review-preproc --replace #{file}"
41
+ end
42
+ end
43
+
37
44
  desc 'generate PDF and EPUB file'
38
45
  task :all => [:pdf, :epub]
39
46
 
@@ -154,7 +154,7 @@ class BookTest < Test::Unit::TestCase
154
154
  end
155
155
  end
156
156
 
157
- # backword compatible
157
+ # backward compatible
158
158
  def test_setParameter
159
159
  book = Book::Base.new(File.dirname(__FILE__))
160
160
  book.config = :test
@@ -506,9 +506,6 @@ EOC
506
506
  end
507
507
 
508
508
  mktmpbookdir 'preface.re' => '12345' do |dir, book, files|
509
- assert_raises(Errno::ENOENT, Errno::EINVAL) do # XXX: OK?
510
- book.volume
511
- end
512
509
 
513
510
  Dir.chdir(dir) do
514
511
  book2 = Book::Base.new('.')