review 3.0.0.preview2 → 3.0.0.preview3

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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +7 -1
  3. data/NEWS.ja.md +49 -0
  4. data/NEWS.md +49 -0
  5. data/README.md +8 -2
  6. data/doc/LICENSE +20 -0
  7. data/doc/config.yml.sample +9 -2
  8. data/doc/customize_epub.ja.md +23 -0
  9. data/doc/customize_epub.md +23 -0
  10. data/doc/format.ja.md +98 -4
  11. data/doc/format.md +98 -1
  12. data/doc/makeindex.ja.md +2 -2
  13. data/doc/pdfmaker.ja.md +12 -3
  14. data/doc/pdfmaker.md +2 -2
  15. data/doc/preproc.ja.md +2 -2
  16. data/doc/quickstart.ja.md +1 -1
  17. data/doc/quickstart.md +1 -1
  18. data/lib/review/compiler.rb +1 -1
  19. data/lib/review/configure.rb +13 -1
  20. data/lib/review/epubmaker.rb +10 -4
  21. data/lib/review/htmlbuilder.rb +31 -9
  22. data/lib/review/init.rb +72 -3
  23. data/lib/review/makerhelper.rb +180 -1
  24. data/lib/review/pdfmaker.rb +23 -4
  25. data/lib/review/version.rb +1 -1
  26. data/lib/review/webmaker.rb +14 -4
  27. data/review.gemspec +1 -1
  28. data/samples/sample-book/src/Rakefile +20 -0
  29. data/samples/sample-book/src/config.yml +3 -2
  30. data/samples/sample-book/src/images/cover-a5.ai +5836 -16
  31. data/samples/sample-book/src/images/cover-b5.ai +5735 -15
  32. data/samples/syntax-book/config.yml +1 -1
  33. data/templates/LICENSE +1 -1
  34. data/templates/latex/config.erb +24 -11
  35. data/templates/latex/layout.tex.erb +15 -5
  36. data/templates/latex/review-jlreq/README.md +2 -1
  37. data/templates/latex/review-jlreq/review-base.sty +165 -22
  38. data/templates/latex/review-jlreq/review-jlreq.cls +180 -110
  39. data/templates/latex/review-jlreq/review-style.sty +13 -125
  40. data/templates/latex/review-jlreq/reviewmacro.sty +7 -0
  41. data/templates/latex/review-jsbook/README.md +129 -0
  42. data/templates/latex/review-jsbook/review-base.sty +33 -20
  43. data/templates/latex/review-jsbook/review-jsbook.cls +545 -0
  44. data/templates/latex/review-jsbook/reviewmacro.sty +7 -0
  45. data/test/assets/test_template.tex +27 -8
  46. data/test/assets/test_template_backmatter.tex +27 -8
  47. data/test/test_helper.rb +3 -0
  48. data/test/test_htmlbuilder.rb +3 -1
  49. data/test/test_pdfmaker.rb +2 -0
  50. data/vendor/gentombow/.gitignore +163 -0
  51. data/vendor/gentombow/LICENSE +27 -0
  52. data/vendor/gentombow/Makefile +36 -0
  53. data/vendor/gentombow/README.md +49 -0
  54. data/vendor/gentombow/bounddvi-en.pdf +0 -0
  55. data/vendor/gentombow/bounddvi-en.tex +135 -0
  56. data/vendor/gentombow/bounddvi.pdf +0 -0
  57. data/vendor/gentombow/bounddvi.sty +87 -0
  58. data/vendor/gentombow/bounddvi.tex +148 -0
  59. data/vendor/gentombow/create_archive.sh +24 -0
  60. data/vendor/gentombow/gentombow-ja.pdf +0 -0
  61. data/vendor/gentombow/gentombow-ja.tex +449 -0
  62. data/vendor/gentombow/gentombow.pdf +0 -0
  63. data/vendor/gentombow/gentombow.sty +747 -0
  64. data/vendor/gentombow/gentombow.tex +298 -0
  65. data/vendor/gentombow/pxgentombow.pdf +0 -0
  66. data/vendor/gentombow/pxgentombow.sty +16 -0
  67. data/vendor/gentombow/pxgentombow.tex +25 -0
  68. data/vendor/gentombow/tests/bounddvi-01-usage.tex +7 -0
  69. data/vendor/gentombow/tests/bounddvi-02-jstombow.tex +7 -0
  70. data/vendor/gentombow/tests/bounddvi-03-grfdvips.tex +9 -0
  71. data/vendor/gentombow/tests/bounddvi-04-grfdvipdfmx.tex +9 -0
  72. data/vendor/gentombow/tests/bounddvi-05-geodvips.tex +8 -0
  73. data/vendor/gentombow/tests/bounddvi-05a-geodvips.tex +9 -0
  74. data/vendor/gentombow/tests/bounddvi-06-geodvipdfmx.tex +8 -0
  75. data/vendor/gentombow/tests/bounddvi-06a-geodvipdfmx.tex +9 -0
  76. data/vendor/gentombow/tests/pxgentombow-01-usage.tex +6 -0
  77. data/vendor/gentombow/tests/pxgentombow-02-js.tex +6 -0
  78. data/vendor/gentombow/tests/pxgentombow-02a-js-error.tex +6 -0
  79. data/vendor/gentombow/tests/pxgentombow-03-notombowdate.tex +8 -0
  80. data/vendor/gentombow/tests/pxgentombow-04-pkgoption.tex +8 -0
  81. data/vendor/gentombow/tests/pxgentombow-05-tatecls.tex +6 -0
  82. metadata +40 -3
@@ -0,0 +1,298 @@
1
+ %# -*- ascii characters only -*-
2
+
3
+ \documentclass[a4paper]{article}
4
+ \usepackage{doc}
5
+ \makeatletter
6
+ %%% dangerous bend
7
+ \font\man=manfnt at 10pt
8
+ \def\dbend{\leavevmode\raise0pt\hbox{\man\char'177}}
9
+ \newenvironment{dangerous}{%
10
+ \ifnum\@listdepth>\z@
11
+ \GenericError{}{Do not use `dangerous' environment inside any list}{}{}
12
+ \fi
13
+ \par\addvspace\medskipamount
14
+ \@tempdima=\dimexpr\textwidth-2zw\relax\small
15
+ \divide\@tempdima by\dimexpr1zw\relax\@tempcnta=\@tempdima
16
+ \leftskip=\dimexpr\textwidth-\@tempcnta zw\relax
17
+ \@totalleftmargin\dimexpr\leftskip+0zw
18
+ \linewidth=\dimexpr\@tempcnta zw-0zw
19
+ \parindent1zw\noindent\kern-\leftskip\hbox to\leftskip{\dbend\hss}%
20
+ \everypar{\everypar{}}\ignorespaces
21
+ }{\par\addvspace\medskipamount}
22
+ %%% misc
23
+ \newcommand{\Meta}[1]{$\langle$\mbox{}\textit{#1}\mbox{}$\rangle$}
24
+ %%%
25
+ \makeatother
26
+ \usepackage{longtable}
27
+ \usepackage[pdfbox]{gentombow}
28
+ %\usepackage{bxpapersize}
29
+ \GetFileInfo{gentombow.sty}
30
+ \title{Package \textsf{gentombow} \fileversion}
31
+ \author{Hironobu Yamashita}
32
+ \date{\filedate}
33
+ \begin{document}
34
+
35
+ \maketitle
36
+
37
+ It is convenient to print documents for final smaller paper sizes
38
+ on paper of the printer's standard physical paper size;
39
+ it allows printing close to the logical paper edge
40
+ and even outside the logical page.
41
+
42
+ This package \textsf{gentombow} provides a Japanese-style
43
+ crop marks (called `tombow' in Japanese) for trimming paper stacks,
44
+ and place the document page at the center of a larger physical
45
+ paper sheet. It automatically detects the page size
46
+ (\verb+\paperwidth+, \verb+\paperheight+) which is
47
+ going to be set by document class.
48
+ This document itself is a demonstration of this package,
49
+ with final A4 paper printed on B4 (JIS B4; not ISO B4!) paper.
50
+
51
+ A basic usage:
52
+ \begin{verbatim}
53
+ \documentclass[a4paper]{article}
54
+ \usepackage{gentombow}
55
+ \usepackage{graphicx}
56
+ \begin{document}
57
+ The content
58
+ \end{document}
59
+ \end{verbatim}
60
+
61
+ Note that this package does nothing about output paper size
62
+ specification; use one of the followings to do it.
63
+ \begin{itemize}
64
+ \item \textsf{graphicx} package
65
+ with \texttt{setpagesize} feature added in 2016
66
+ (supports all engines)
67
+ \item \textsf{bxpapersize} package
68
+ (supports all engines; by Takayuki YATO)
69
+ \item \textsf{bounddvi} package
70
+ (supports only DVI output mode; part of \textsf{gentombow} bundle)
71
+ \end{itemize}
72
+
73
+ This package is part of \textsf{gentombow} bundle:
74
+ \begin{verbatim}
75
+ https://github.com/aminophen/gentombow
76
+ \end{verbatim}
77
+ Originally it was part of \textsf{platex-tools} bundle,
78
+ but it has been moved since March 2018.
79
+
80
+ \section{Basic Functions}
81
+
82
+ First, I introduce some basic functions of \textsf{gentombow} package.
83
+
84
+ \subsection{Automatic Determination of Output Size}
85
+
86
+ In this package,
87
+ the following printer's standard physical paper sizes are predefined;
88
+ A series (\texttt{a0}--\texttt{a10}),
89
+ B series (\texttt{b0}--\texttt{b10}),
90
+ C series (\texttt{c0}--\texttt{c10}),
91
+ \texttt{letter}, \texttt{legal} and \texttt{executive}.
92
+ In the current release, `B series' is JIS standard,
93
+ not ISO standard (this might be changed in the near future).
94
+ Also, some variations \texttt{a4var} and \texttt{b5var} are predefined.
95
+
96
+ When one of the above sizes (except \texttt{a0}, \texttt{b0}
97
+ and \texttt{c0}) is detected, the output size is
98
+ automatically determined along with the following rule:
99
+ \begin{itemize}
100
+ \item When A series detected:
101
+ the output is going to be larger B series
102
+ \item When B/C series or
103
+ \texttt{letter}, \texttt{legal}, \texttt{executive} detected:
104
+ the output is going to be larger A series
105
+ \end{itemize}
106
+ The crop marks are automatically added.
107
+ The orientation (landscape/portrait) of the input paper is
108
+ also preserved.
109
+
110
+ The following list shows common examples:
111
+ \begin{longtable}[c]{cc}
112
+ \hline
113
+ Detected page size & Output size \\
114
+ \hline
115
+ a6 & b6 \\
116
+ b6 & a5 \\
117
+ a5 & b5 \\
118
+ b5 & a4 \\
119
+ a4 & b4 \\
120
+ b4 & a3 \\
121
+ a3 & b3 \\
122
+ b3 & a2 \\
123
+ \hline
124
+ c6 & a5 \\
125
+ c5 & a4 \\
126
+ c4 & a3 \\
127
+ c3 & a2 \\
128
+ \hline
129
+ letter & a3 \\
130
+ legal & a3 \\
131
+ executive & a4 \\
132
+ \hline
133
+ \end{longtable}
134
+
135
+ \subsection*{When Automatic Determination Failed}
136
+
137
+ When the page size is different from any of the predefined sizes,
138
+ the page is placed with the surrounding 1~inch margins.
139
+ For example, when the page has $100\,\mathrm{mm}$ width and
140
+ $200\,\mathrm{mm}$ height, the output size is going to be
141
+ $100\,\mathrm{mm}+2\,\mathrm{in}$ width and
142
+ $200\,\mathrm{mm}+2\,\mathrm{in}$ height.
143
+
144
+ \subsection{Job Info Printing}
145
+
146
+ By default, the crop marks are printed with a banner, which shows
147
+ a job info like \makeatletter\texttt{\the\@bannertoken}\makeatother.
148
+ The format is similar to \verb+tombow+ option, which is
149
+ available in most of the common Japanese classes.
150
+ The default also reacts to \verb+tombo+ (without a job info) or
151
+ \verb+mentuke+ (do not print actual crop marks) class options.
152
+
153
+ \section{Package Options}
154
+
155
+ You can specify output size and/or disable job info printing
156
+ using package options.
157
+
158
+ \subsection{Explicit Specification of Output Size}
159
+
160
+ You can also force the output size using package option.
161
+ For example,
162
+ \begin{verbatim}
163
+ \documentclass[a4paper]{article}
164
+ \usepackage[tombow-a4]{gentombow}
165
+ \begin{document}
166
+ The content
167
+ \end{document}
168
+ \end{verbatim}
169
+ forces the output size to be a3 (the automatic determination
170
+ `b4' is discarded). Available sizes are the same as
171
+ the predefined sizes, that is,
172
+ A series (\texttt{a0}--\texttt{a10}),
173
+ B series (\texttt{b0}--\texttt{b10}),
174
+ C series (\texttt{c0}--\texttt{c10}) and
175
+ \texttt{a4var}, \texttt{b5var},
176
+ \texttt{letter}, \texttt{legal}, \texttt{executive}.
177
+ The orientation (landscape/portrait) of the input paper is
178
+ also preserved again.
179
+
180
+ The option format is:
181
+ \Meta{crop mark format}\texttt{-}\Meta{output size}.
182
+ The crop mark format is one of the following:
183
+ \verb+tombow+ (default), \verb+tombo+ (without a job info),
184
+ \verb+mentuke+ (do not print actual crop marks).
185
+
186
+ \subsection{Disabling Job Info Printing}
187
+
188
+ When you specify the output size explicitly, the crop mark format
189
+ can be given at the same time, as described previously.
190
+ When the output size is automatically determined, you can disable
191
+ job info printing by \verb+notombowbanner+ option.
192
+
193
+ \section{Customization of Crop Mark}
194
+
195
+ The \textsf{pxgentombow} package provides some commands to
196
+ customize crop mark format.
197
+
198
+ \subsection{Banner content}
199
+
200
+ Using \verb+\settombowbanner+, you can set the banner content.
201
+ An example using \verb+\pdfcreationdate+ (pdf\TeX\ primitive)
202
+ \begin{verbatim}
203
+ \documentclass[a4paper]{article}
204
+ \usepackage{gentombow}
205
+ \settombowbanner{\jobname\space (\pdfcreationdate)}
206
+ \begin{document}
207
+ The content
208
+ \end{document}
209
+ \end{verbatim}
210
+ will result in
211
+ {\settombowbanner{\jobname\space (\pdfcreationdate)}%
212
+ \makeatletter\texttt{\the\@bannertoken}\makeatother}.
213
+ The argument is an arbitrary token list.
214
+
215
+ \subsection{Banner font}
216
+
217
+ Using \verb+\settombowbannerfont+, you can change the font
218
+ with which the banner is printed.
219
+ \begin{verbatim}
220
+ \settombowbannerfont{cmss10 at 9pt}
221
+ \end{verbatim}
222
+ This feature internally calls the \TeX\ primitive \verb+\font+,
223
+ and accepts all fonts supported by the engine. When Lua\TeX\ or
224
+ Xe\TeX\ is used, a native OpenType font can also be given.
225
+
226
+ \subsection{Crop mark line width}
227
+
228
+ By default, the line width of crop marks is 0.1~pt.
229
+ This can be change to 1~pt by \verb+\settombowwidth{1pt}+.
230
+ The argument is an arbitrary dimension.
231
+
232
+ \subsection{Bleed margin width}
233
+
234
+ By default, the bleed margin width is 3~mm.
235
+ This can be change to 5~mm by \verb+\settombowwidth{5mm}+.
236
+ The argument is an arbitrary dimension.
237
+
238
+ \subsection{Crop mark color}
239
+
240
+ Set the color of crop marks. Package \textsf{xcolor} (recommended) or
241
+ \textsf{xcolor} is required.
242
+ For example, \verb+\settombowcolor{\color[cmyk]{0,1,0,0}}+ sets magenta.
243
+
244
+ \section{Setting PDF page box (``digital tombow'')}
245
+
246
+ This is an optional driver-dependent feature.
247
+ When \textsf{gentombow} is required with the option \verb+pdfbox+,
248
+ following page boxes are emitted to the output PDF file.
249
+ The paper size (\verb+/MediaBox+) is also corrected.
250
+ \begin{itemize}
251
+ \item \verb+/TrimBox+: final paper size.
252
+ \item \verb+/BleedBox+: paper size plus bleed margin.
253
+ \item \verb+/CropBox+ and \verb+/ArtBox+ are not set.
254
+ \end{itemize}
255
+
256
+ \section{Additional Notes}
257
+
258
+ Here is some additional notes for use with several classes/packages.
259
+
260
+ \subsection{Note for \textsf{BXjscls} users}
261
+
262
+ When using \textsf{BXjscls} (by Takayuki YATO) with size option
263
+ other than 10pt, please add \verb+nomag+ or \verb+nomag*+ to the
264
+ class option. For example,
265
+ \begin{verbatim}
266
+ \documentclass[a4paper,14pt]{bxjsarticle}
267
+ \usepackage{gentombow}
268
+ \end{verbatim}
269
+ will not work as expected (\textsf{gentombow} throws an error
270
+ for safety).
271
+
272
+ \subsection{Note about Layout Settings}
273
+
274
+ You should not change \verb+\hoffset+ or \verb+\voffset+ to non-zero
275
+ value, for the purpose of layout settings. Such settings will
276
+ conflict with the feature of \textsf{gentombow} package.
277
+ To set page layout correctly, you should adjust \verb+\oddsidemargin+
278
+ or \verb+\topmargin+, or leave it to \textsf{geometry} package.
279
+
280
+ \section*{Change History}
281
+
282
+ \begin{itemize}
283
+ \item 2017/12/17 v0.9 First CTAN release
284
+ \item 2018/03/16 v0.9e Add \verb+\settombowbanner+,
285
+ \verb+\settombowbannerfont+ and
286
+ \verb+\settombowwidth+.
287
+ \item 2018/05/17 v0.9g Add \verb+pdfbox+ option,
288
+ \verb+\settombowbleed+ and
289
+ \verb+\settombowcolor+.
290
+ \item 2018/08/20 v0.9h Add \texttt{hagaki} size for paper detection,
291
+ improve patches for \textsf{pdfpages}.
292
+ \item 2018/08/30 v0.9j Support \textsf{jsclasses}-style \verb+\mag+ employment
293
+ also with \verb+pdfbox+ option.
294
+ Fix a bug that \verb+\settombowbleed+ is not
295
+ considered by \verb+/TrimBox+.
296
+ \end{itemize}
297
+
298
+ \end{document}
Binary file
@@ -0,0 +1,16 @@
1
+ %
2
+ % pxgentombow.sty
3
+ % written by Hironobu Yamashita (@aminophen)
4
+ %
5
+ % This package is part of the gentombow bundle.
6
+ % https://github.com/aminophen/gentombow
7
+ %
8
+
9
+ \NeedsTeXFormat{LaTeX2e}
10
+ \ProvidesPackage{pxgentombow}
11
+ [2018/05/17 v0.9g Generate crop mark 'tombow']
12
+ \PackageWarningNoLine{pxgentombow}{%
13
+ Package `pxgentombow' is now superseded by\MessageBreak
14
+ `gentombow', use `gentombow' instead}
15
+ \RequirePackageWithOptions{gentombow}% load it
16
+ \endinput
@@ -0,0 +1,25 @@
1
+ %# -*- coding: utf-8 -*-
2
+ \ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016)
3
+ \epTeXinputencoding utf8 % ensure utf-8 encoding for platex
4
+ \fi
5
+
6
+ \documentclass[a4paper]{jsarticle}
7
+ \usepackage{doc}
8
+ \usepackage{pxgentombow}
9
+ \usepackage{bounddvi}
10
+ \GetFileInfo{pxgentombow.sty}
11
+ \title{Package \textsf{pxgentombow}}
12
+ \author{Hironobu Yamashita}
13
+ \date{2018年5月17日}
14
+ \begin{document}
15
+
16
+ \maketitle
17
+
18
+ \begin{center}
19
+ The package \textsf{pxgentombow} is now superseded by \textsf{gentombow}!
20
+ \end{center}
21
+
22
+ \textsf{pxgentombow}パッケージは、上位版である\textsf{gentombow}パッケージに
23
+ 統一されました。代わりに\textsf{gentombow}パッケージを使用してください。
24
+
25
+ \end{document}
@@ -0,0 +1,7 @@
1
+ \documentclass[b5paper]{tarticle}
2
+ \usepackage{bounddvi}
3
+ \title{\textsf{bounddvi}のテスト}
4
+ \author{Hironobu Yamashita}
5
+ \begin{document}
6
+ 縦書き、B5用紙
7
+ \end{document}
@@ -0,0 +1,7 @@
1
+ \documentclass[a5paper,tombow]{jsarticle}
2
+ \usepackage{bounddvi}
3
+ \title{\textsf{bounddvi}のテスト}
4
+ \author{Hironobu Yamashita}
5
+ \begin{document}
6
+ 横書き(jsarticle)、A5用紙、トンボあり
7
+ \end{document}
@@ -0,0 +1,9 @@
1
+ % platex + dvips + ps2pdf
2
+ \documentclass[a5paper,tombow]{jarticle}
3
+ \usepackage[dvips]{graphicx}
4
+ \usepackage{bounddvi}
5
+ \title{\textsf{bounddvi}のテスト}
6
+ \author{Hironobu Yamashita}
7
+ \begin{document}
8
+ 横書き、A5用紙、graphicsあり(dvips)
9
+ \end{document}
@@ -0,0 +1,9 @@
1
+ % platex + dvipdfmx
2
+ \documentclass[a5paper,tombow]{tarticle}
3
+ \usepackage{bounddvi}
4
+ \usepackage[dvipdfmx]{graphicx}
5
+ \title{\textsf{bounddvi}のテスト}
6
+ \author{Hironobu Yamashita}
7
+ \begin{document}
8
+ 縦書き、A5用紙、graphicsあり(dvipdfmx)
9
+ \end{document}
@@ -0,0 +1,8 @@
1
+ \documentclass[b5paper,tombow]{jarticle}
2
+ \usepackage[dvips]{geometry}
3
+ \usepackage{bounddvi}
4
+ \title{\textsf{bounddvi}のテスト}
5
+ \author{Hironobu Yamashita}
6
+ \begin{document}
7
+ 横書き、B5用紙、トンボ、geometryあり
8
+ \end{document}
@@ -0,0 +1,9 @@
1
+ \documentclass[b5paper,tombow]{jarticle}
2
+ \usepackage{bounddvi}
3
+ \usepackage[dvips]{geometry}
4
+ \title{\textsf{bounddvi}のテスト}
5
+ \author{Hironobu Yamashita}
6
+ \begin{document}
7
+ 横書き、B5用紙、トンボ、geometryあり
8
+ (これは少しだけうまくいかない)
9
+ \end{document}
@@ -0,0 +1,8 @@
1
+ \documentclass[b5paper,tombow]{jarticle}
2
+ \usepackage[dvipdfm]{geometry}
3
+ \usepackage{bounddvi}
4
+ \title{\textsf{bounddvi}のテスト}
5
+ \author{Hironobu Yamashita}
6
+ \begin{document}
7
+ 横書き、B5用紙、トンボ、geometryあり
8
+ \end{document}
@@ -0,0 +1,9 @@
1
+ \documentclass[b5paper,tombow]{jarticle}
2
+ \usepackage{bounddvi}
3
+ \usepackage[dvipdfm]{geometry}
4
+ \title{\textsf{bounddvi}のテスト}
5
+ \author{Hironobu Yamashita}
6
+ \begin{document}
7
+ 横書き、B5用紙、トンボ、geometryあり
8
+ (これはうまくいかない)
9
+ \end{document}
@@ -0,0 +1,6 @@
1
+ \documentclass[a4paper]{jbook}
2
+ \usepackage{pxgentombow}
3
+ \usepackage{bounddvi}
4
+ \begin{document}
5
+ トンボのテストです。
6
+ \end{document}
@@ -0,0 +1,6 @@
1
+ \documentclass[a5paper,14pt,tombow]{jsarticle}
2
+ \usepackage{pxgentombow}
3
+ \usepackage{bounddvi}
4
+ \begin{document}
5
+ トンボのテストです。
6
+ \end{document}
@@ -0,0 +1,6 @@
1
+ \documentclass[a5paper,14pt]{jsarticle}
2
+ \usepackage{pxgentombow}% should be an error!
3
+ \usepackage{bounddvi}
4
+ \begin{document}
5
+ トンボのテストです。
6
+ \end{document}