review 3.0.0.preview2 → 3.0.0.preview3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -1
- data/NEWS.ja.md +49 -0
- data/NEWS.md +49 -0
- data/README.md +8 -2
- data/doc/LICENSE +20 -0
- data/doc/config.yml.sample +9 -2
- data/doc/customize_epub.ja.md +23 -0
- data/doc/customize_epub.md +23 -0
- data/doc/format.ja.md +98 -4
- data/doc/format.md +98 -1
- data/doc/makeindex.ja.md +2 -2
- data/doc/pdfmaker.ja.md +12 -3
- data/doc/pdfmaker.md +2 -2
- data/doc/preproc.ja.md +2 -2
- data/doc/quickstart.ja.md +1 -1
- data/doc/quickstart.md +1 -1
- data/lib/review/compiler.rb +1 -1
- data/lib/review/configure.rb +13 -1
- data/lib/review/epubmaker.rb +10 -4
- data/lib/review/htmlbuilder.rb +31 -9
- data/lib/review/init.rb +72 -3
- data/lib/review/makerhelper.rb +180 -1
- data/lib/review/pdfmaker.rb +23 -4
- data/lib/review/version.rb +1 -1
- data/lib/review/webmaker.rb +14 -4
- data/review.gemspec +1 -1
- data/samples/sample-book/src/Rakefile +20 -0
- data/samples/sample-book/src/config.yml +3 -2
- data/samples/sample-book/src/images/cover-a5.ai +5836 -16
- data/samples/sample-book/src/images/cover-b5.ai +5735 -15
- data/samples/syntax-book/config.yml +1 -1
- data/templates/LICENSE +1 -1
- data/templates/latex/config.erb +24 -11
- data/templates/latex/layout.tex.erb +15 -5
- data/templates/latex/review-jlreq/README.md +2 -1
- data/templates/latex/review-jlreq/review-base.sty +165 -22
- data/templates/latex/review-jlreq/review-jlreq.cls +180 -110
- data/templates/latex/review-jlreq/review-style.sty +13 -125
- data/templates/latex/review-jlreq/reviewmacro.sty +7 -0
- data/templates/latex/review-jsbook/README.md +129 -0
- data/templates/latex/review-jsbook/review-base.sty +33 -20
- data/templates/latex/review-jsbook/review-jsbook.cls +545 -0
- data/templates/latex/review-jsbook/reviewmacro.sty +7 -0
- data/test/assets/test_template.tex +27 -8
- data/test/assets/test_template_backmatter.tex +27 -8
- data/test/test_helper.rb +3 -0
- data/test/test_htmlbuilder.rb +3 -1
- data/test/test_pdfmaker.rb +2 -0
- data/vendor/gentombow/.gitignore +163 -0
- data/vendor/gentombow/LICENSE +27 -0
- data/vendor/gentombow/Makefile +36 -0
- data/vendor/gentombow/README.md +49 -0
- data/vendor/gentombow/bounddvi-en.pdf +0 -0
- data/vendor/gentombow/bounddvi-en.tex +135 -0
- data/vendor/gentombow/bounddvi.pdf +0 -0
- data/vendor/gentombow/bounddvi.sty +87 -0
- data/vendor/gentombow/bounddvi.tex +148 -0
- data/vendor/gentombow/create_archive.sh +24 -0
- data/vendor/gentombow/gentombow-ja.pdf +0 -0
- data/vendor/gentombow/gentombow-ja.tex +449 -0
- data/vendor/gentombow/gentombow.pdf +0 -0
- data/vendor/gentombow/gentombow.sty +747 -0
- data/vendor/gentombow/gentombow.tex +298 -0
- data/vendor/gentombow/pxgentombow.pdf +0 -0
- data/vendor/gentombow/pxgentombow.sty +16 -0
- data/vendor/gentombow/pxgentombow.tex +25 -0
- data/vendor/gentombow/tests/bounddvi-01-usage.tex +7 -0
- data/vendor/gentombow/tests/bounddvi-02-jstombow.tex +7 -0
- data/vendor/gentombow/tests/bounddvi-03-grfdvips.tex +9 -0
- data/vendor/gentombow/tests/bounddvi-04-grfdvipdfmx.tex +9 -0
- data/vendor/gentombow/tests/bounddvi-05-geodvips.tex +8 -0
- data/vendor/gentombow/tests/bounddvi-05a-geodvips.tex +9 -0
- data/vendor/gentombow/tests/bounddvi-06-geodvipdfmx.tex +8 -0
- data/vendor/gentombow/tests/bounddvi-06a-geodvipdfmx.tex +9 -0
- data/vendor/gentombow/tests/pxgentombow-01-usage.tex +6 -0
- data/vendor/gentombow/tests/pxgentombow-02-js.tex +6 -0
- data/vendor/gentombow/tests/pxgentombow-02a-js-error.tex +6 -0
- data/vendor/gentombow/tests/pxgentombow-03-notombowdate.tex +8 -0
- data/vendor/gentombow/tests/pxgentombow-04-pkgoption.tex +8 -0
- data/vendor/gentombow/tests/pxgentombow-05-tatecls.tex +6 -0
- metadata +40 -3
data/templates/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2006-
|
1
|
+
Copyright (c) 2006-2018 Minero Aoki, Kenshi Muto, Masayoshi Takahashi, Masanori Kado.
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
of this software and associated documentation files (the "Software"), to deal
|
data/templates/latex/config.erb
CHANGED
@@ -1,17 +1,32 @@
|
|
1
1
|
\makeatletter
|
2
|
+
\def\review@reviewversion{<%= ReVIEW::VERSION %>}
|
2
3
|
\def\review@texcompiler{<%= @texcompiler %>}
|
3
4
|
\def\review@documentclass{<%= @documentclass %>}
|
4
|
-
|
5
|
-
<%-
|
6
|
-
|
5
|
+
|
6
|
+
<%- %w(booktitle subtitle).each do |item| -%>
|
7
|
+
<%- if @config[item] -%>\def\review@<%= item %>name{<%= escape_latex(@config.name_of(item)) %>}
|
8
|
+
<%- end -%>
|
9
|
+
<%- end -%>
|
10
|
+
|
11
|
+
<%- %w(aut adp ann arr art asn aqt aft aui ant bkp clb cmm csl dsr edt ill lyr mdc mus nrt oth pht pbl prt red rev spn ths trc trl).each do |item| %><%- if @config[item] -%>\def\review@<%= item %>names{<%= escape_latex(@config.names_of(item).join(I18n.t('names_splitter'))) %>}
|
12
|
+
<%- end -%>
|
7
13
|
<%- end -%>
|
8
|
-
|
14
|
+
|
9
15
|
\def\review@titlepageauthors{<%= @authors %>}
|
10
16
|
\def\review@date{<%= escape_latex(@config['date'].to_s) %>}
|
11
|
-
|
12
|
-
|
17
|
+
|
18
|
+
<%- %w(bookname language urnid isbn).each do |item| -%><%- if @config[item] -%>\def\review@<%= item %>{<%= escape_latex(@config[item]) %>}
|
19
|
+
<%- end -%>
|
13
20
|
<%- end -%>
|
14
|
-
|
21
|
+
<%- %w(rights description subject type format source relation coverage).each do |item| -%>
|
22
|
+
<%- if @config[item] -%>
|
23
|
+
<%- a = [@config[item]].flatten -%>\def\review@<%= item %>{<%= a.map{|s| escape_latex(s)}.join('\\' + '\\') %>}
|
24
|
+
<%- end -%>
|
25
|
+
<%- end -%>
|
26
|
+
|
27
|
+
<%- if @config['highlight'] && @config['highlight']['latex'] -%>\def\review@highlightlatex{<%= @config['highlight']['latex'] %>}
|
28
|
+
<%- end -%>
|
29
|
+
|
15
30
|
\def\review@intn@list{<%= escape_latex(I18n.t('list')) %>}
|
16
31
|
\def\review@intn@columnhead{<%= escape_latex(I18n.t('column_head')) %>}
|
17
32
|
\def\review@intn@image{<%= escape_latex(I18n.t('image')) %>}
|
@@ -29,6 +44,7 @@
|
|
29
44
|
\def\review@figurename{<%= escape_latex(I18n.t('image')) %>}
|
30
45
|
\def\review@tablename{<%= escape_latex(I18n.t('table')) %>}
|
31
46
|
\def\review@appendixname{<%= escape_latex(@locale_latex['preappendixname']) %>}
|
47
|
+
|
32
48
|
<%- if @config['toc'] -%>
|
33
49
|
\def\review@toc{true}
|
34
50
|
\def\review@tocdepth{<%= @config['toclevel'] - 1 %>}
|
@@ -64,7 +80,7 @@
|
|
64
80
|
\def\reviewbackcovercont{<%= @custom_backcoverpage %>}
|
65
81
|
<%- end -%>
|
66
82
|
|
67
|
-
<%- if @config['colophon']
|
83
|
+
<%- if @config['colophon'] -%>
|
68
84
|
\def\review@colophon{true}
|
69
85
|
<%- if @custom_colophonpage -%>
|
70
86
|
\def\review@colophonfile{<%= @custom_colophonpage %>}
|
@@ -72,9 +88,6 @@
|
|
72
88
|
<%- end -%>
|
73
89
|
\def\review@pubhistories{<%= @config['pubhistory'].to_s.gsub(/\n/){"\n\n\\noindent\n"} %>}
|
74
90
|
\def\review@colophonnames{<%= @okuduke %>}
|
75
|
-
<%- if @config['rights'] -%>
|
76
|
-
\def\review@rights{<%= @config.names_of('rights').map{|s| escape_latex(s)}.join('\\' + '\\') %>}
|
77
|
-
<%- end -%>
|
78
91
|
|
79
92
|
\def\reviewprefacefiles{<%= @input_files['PREDEF'] %>}
|
80
93
|
\def\reviewchapterfiles{<%= @input_files['CHAPS'] %>}
|
@@ -8,21 +8,26 @@
|
|
8
8
|
|
9
9
|
\begin{document}
|
10
10
|
|
11
|
+
%% begindocument hook
|
12
|
+
\ifdefined\reviewbegindocumenthook
|
13
|
+
\reviewbegindocumenthook
|
14
|
+
\fi
|
15
|
+
|
11
16
|
%% coverpage
|
12
17
|
\ifdefined\reviewcoverpagecont
|
13
18
|
\reviewcoverpagecont
|
14
19
|
\fi
|
15
20
|
|
16
|
-
%% title page
|
17
|
-
\ifdefined\reviewtitlepagecont
|
18
|
-
\reviewtitlepagecont
|
19
|
-
\fi
|
20
|
-
|
21
21
|
%% frontmatter hook
|
22
22
|
\ifdefined\reviewfrontmatterhook
|
23
23
|
\reviewfrontmatterhook
|
24
24
|
\fi
|
25
25
|
|
26
|
+
%% title page
|
27
|
+
\ifdefined\reviewtitlepagecont
|
28
|
+
\reviewtitlepagecont
|
29
|
+
\fi
|
30
|
+
|
26
31
|
%% originaltitle
|
27
32
|
\ifdefined\revieworiginaltitlepagecont
|
28
33
|
\revieworiginaltitlepagecont
|
@@ -98,4 +103,9 @@
|
|
98
103
|
\reviewbackcovercont
|
99
104
|
\fi
|
100
105
|
|
106
|
+
%% enddocument hook
|
107
|
+
\ifdefined\reviewenddocumenthook
|
108
|
+
\reviewenddocumenthook
|
109
|
+
\fi
|
110
|
+
|
101
111
|
\end{document}
|
@@ -1,12 +1,14 @@
|
|
1
1
|
% jlreq用基本設定
|
2
|
-
\
|
3
|
-
\
|
4
|
-
\
|
5
|
-
|
6
|
-
\
|
7
|
-
|
8
|
-
\
|
9
|
-
|
2
|
+
\newcommand*\PDFDocumentInformation[1]{%
|
3
|
+
\AtBeginShipoutFirst{\special{pdf:docinfo <<#1>>}}}
|
4
|
+
\@onlypreamble\PDFDocumentInformation
|
5
|
+
|
6
|
+
\PDFDocumentInformation{
|
7
|
+
/Title (\review@booktitlename)
|
8
|
+
/Author (\review@autnames)
|
9
|
+
% /Subject ()
|
10
|
+
% /Keywords (,,)
|
11
|
+
/Creator (Re:VIEW \review@reviewversion, with LaTeX)
|
10
12
|
}
|
11
13
|
|
12
14
|
\RequirePackage{pxrubrica}
|
@@ -16,6 +18,146 @@
|
|
16
18
|
|
17
19
|
\long\def\review@ifempty#1{\expandafter\ifx\expandafter\relax\detokenize{#1}\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
|
18
20
|
|
21
|
+
% コードリスト装飾のデフォルト
|
22
|
+
\newenvironment{reviewemlist}{%
|
23
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!10,colframe=black!10,boxrule=0mm,arc=0mm]\begin{alltt}}%
|
24
|
+
{\end{alltt}\end{tcolorbox}}
|
25
|
+
|
26
|
+
\newenvironment{reviewlist}{%
|
27
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\begin{alltt}}%
|
28
|
+
{\end{alltt}\end{tcolorbox}}
|
29
|
+
|
30
|
+
\newenvironment{reviewsource}{%
|
31
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\begin{alltt}}%
|
32
|
+
{\end{alltt}\end{tcolorbox}}
|
33
|
+
|
34
|
+
\newenvironment{reviewcmd}{%
|
35
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!99,colframe=black!99,boxrule=0mm,arc=0mm]\begin{alltt}\begingroup\color{white}\ignorespaces}%
|
36
|
+
{\endgroup\end{alltt}\end{tcolorbox}}
|
37
|
+
|
38
|
+
% 図
|
39
|
+
\newenvironment{reviewimage}{%
|
40
|
+
\begin{figure}\begin{center}}{\end{center}\end{figure}}
|
41
|
+
|
42
|
+
\newenvironment{reviewdummyimage}{%
|
43
|
+
\begin{figure}
|
44
|
+
\begin{center}\begin{alltt}}{%
|
45
|
+
\end{alltt}\end{center}
|
46
|
+
\end{figure}}
|
47
|
+
|
48
|
+
\newcommand{\reviewindepimagecaption[2]}{\@makecaption{}{#2}}
|
49
|
+
|
50
|
+
% 表
|
51
|
+
\newenvironment{reviewtablesetup}{%
|
52
|
+
}{}
|
53
|
+
|
54
|
+
\newcommand{\reviewth}[1]{\cellcolor{black!70}\textcolor{white}{\bfseries #1}}
|
55
|
+
\newcommand\reviewtablecaption[1]{\caption{#1}\vskip\abovecaptionskip}% アキをより広げる
|
56
|
+
% \reviewtablecaption* を定義する(suffixパッケージ効果)
|
57
|
+
%\WithSuffix\newcommand\reviewtablecaption*[1]{\@makecaption{}{#1}\vskip\abovecaptionskip}% アキをより広げる
|
58
|
+
\newenvironment{reviewtable}[1]{%
|
59
|
+
\begin{reviewtablesetup}\begin{tabular}{#1}}%
|
60
|
+
{\end{tabular}\end{reviewtablesetup}}
|
61
|
+
|
62
|
+
\newcommand*\reviewimgtablecaption[1]{\caption{#1}}
|
63
|
+
|
64
|
+
% コラム
|
65
|
+
\newenvironment{reviewcolumn}[1][COLUMN]{%
|
66
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,boxrule=0.2mm,arc=2mm,colback=white,colframe=black!100!white,title={\sffamily\bfseries #1}]\par}
|
67
|
+
{\end{tcolorbox}}
|
68
|
+
|
69
|
+
\newcommand{\reviewbackslash}[0]{\textbackslash{}}
|
70
|
+
|
71
|
+
\renewcommand{\@makecaption}[2]{{% %本当はl,c,rを[]で指定したい
|
72
|
+
\reset@font\small
|
73
|
+
\vskip\abovecaptionskip
|
74
|
+
\jlreq@ifempty{#1}{%
|
75
|
+
\sbox\@tempboxa{{\jlreq@@makecaption@font #2}}}{%
|
76
|
+
\sbox\@tempboxa{{\jlreq@@makecaption@label@font #1}\review@intn@captionprefix{\jlreq@@makecaption@font #2}}}
|
77
|
+
\ifdim \wd\@tempboxa >\hsize
|
78
|
+
\jlreq@ifempty{#1}{%
|
79
|
+
{\jlreq@@makecaption@font #2}}{%
|
80
|
+
{\jlreq@@makecaption@label@font #1}\review@intn@captionprefix{\jlreq@@makecaption@font #2}}\relax\par
|
81
|
+
\else
|
82
|
+
\global\@minipagefalse
|
83
|
+
\hbox to\hsize{\box\@tempboxa\hfil}% キャプションLeft
|
84
|
+
% \hbox to\hsize{\hfil\box\@tempboxa\hfil}% キャプションCenter
|
85
|
+
% \hbox to\hsize{\hfil\box\@tempboxa}% キャプションRight
|
86
|
+
\fi
|
87
|
+
\vskip\belowcaptionskip}}
|
88
|
+
|
89
|
+
\newcommand{\review@commoncaption}[2]{\@makecaption{#1}{#2}}
|
90
|
+
\newcommand{\reviewlistcaption}[1]{\review@commoncaption{}{#1}}
|
91
|
+
\newcommand{\reviewemlistcaption}[1]{\review@commoncaption{}{#1}}
|
92
|
+
\newcommand{\reviewsourcecaption}[1]{\review@commoncaption{}{#1}}
|
93
|
+
\newcommand{\reviewcmdcaption}[1]{\review@commoncaption{}{#1}}
|
94
|
+
\newenvironment{reviewlistblock}{\list{}{\topsep.5\baselineskip \leftmargin\z@ \itemindent\z@}\item\relax}{\endlist}% 上下アキ0.5
|
95
|
+
|
96
|
+
\newcommand{\reviewimageref}[2]{\review@intn@image #1}
|
97
|
+
\newcommand{\reviewtableref}[2]{\review@intn@table #1}
|
98
|
+
\newcommand{\reviewlistref}[1]{\review@intn@list #1}
|
99
|
+
\newcommand{\reviewbibref}[2]{#1}
|
100
|
+
\newcommand{\reviewcolumnref}[2]{\review@intn@columnname #1}
|
101
|
+
\newcommand{\reviewsecref}[2]{#1}
|
102
|
+
|
103
|
+
\renewcommand{\contentsname}{\review@toctitle}
|
104
|
+
|
105
|
+
% 囲み記事
|
106
|
+
\newenvironment{reviewnote}[1][]{%
|
107
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries NOTE #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
108
|
+
{\end{tcolorbox}}
|
109
|
+
|
110
|
+
\newenvironment{reviewmemo}[1][]{%
|
111
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries MEMO #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
112
|
+
{\end{tcolorbox}}
|
113
|
+
|
114
|
+
\newenvironment{reviewtip}[1][]{%
|
115
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries Tips #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
116
|
+
{\end{tcolorbox}}
|
117
|
+
|
118
|
+
\newenvironment{reviewinfo}[1][]{%
|
119
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries INFORMATION #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
120
|
+
{\end{tcolorbox}}
|
121
|
+
|
122
|
+
\newenvironment{reviewwarning}[1][]{%
|
123
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries WARNING! #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
124
|
+
{\end{tcolorbox}}
|
125
|
+
|
126
|
+
\newenvironment{reviewimportant}[1][]{%
|
127
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries IMPORTANT! #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
128
|
+
{\end{tcolorbox}}
|
129
|
+
|
130
|
+
\newenvironment{reviewcaution}[1][]{%
|
131
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries CAUTION! #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
132
|
+
{\end{tcolorbox}}
|
133
|
+
|
134
|
+
\newenvironment{reviewnotice}[1][]{%
|
135
|
+
\begin{tcolorbox}[skin=enhanced jigsaw,breakable,empty,coltitle=black,title={\sffamily\bfseries NOTICE #1},borderline horizontal={0.5mm}{0pt}{black!50}, left=1mm, right=1mm, left skip=6mm]}
|
136
|
+
{\end{tcolorbox}}
|
137
|
+
|
138
|
+
% 書体
|
139
|
+
\newcommand{\reviewkw}[1]{\textbf{\textgt{#1}}}
|
140
|
+
\newcommand{\reviewami}[1]{#1}% FIXME
|
141
|
+
\newcommand{\reviewballoon}[1]{←{#1}}
|
142
|
+
\newcommand{\reviewem}[1]{\textbf{#1}}
|
143
|
+
\newcommand{\reviewstrong}[1]{\textbf{#1}}
|
144
|
+
\newcommand{\reviewunderline}[1]{\underline{#1}}% ulemかjumolineで上書き。デフォルトはulemにしている
|
145
|
+
\newcommand{\reviewit}[1]{\textit{#1}}
|
146
|
+
\newcommand{\reviewbold}[1]{\textbf{#1}}
|
147
|
+
\newcommand{\reviewcode}[1]{\texttt{#1}}
|
148
|
+
\newcommand{\reviewtt}[1]{\texttt{#1}}
|
149
|
+
\newcommand{\reviewtti}[1]{\texttt{\textit{#1}}}
|
150
|
+
\newcommand{\reviewttb}[1]{\texttt{\textbf{#1}}}
|
151
|
+
|
152
|
+
%% @<del> is ignored in LaTeX with default style
|
153
|
+
\newcommand{\reviewstrike}[1]{#1}
|
154
|
+
|
155
|
+
%%%% for ulem.sty:
|
156
|
+
\renewcommand{\reviewstrike}[1]{\sout{#1}}
|
157
|
+
%%
|
158
|
+
%%%% for jumoline.sty:
|
159
|
+
%%\renewcommand{\reviewstrike}[1]{\Middleline{#1}}
|
160
|
+
|
19
161
|
\newcommand{\reviewtitlefont}[0]{\usefont{T1}{phv}{b}{n}\gtfamily}
|
20
162
|
\newcommand{\reviewmainfont}[0]{}
|
21
163
|
\newcommand{\reviewcolophon}[0]{\clearpage}
|
@@ -51,6 +193,11 @@
|
|
51
193
|
\renewcommand{\appendixname}{\reviewappendixname}
|
52
194
|
\fi
|
53
195
|
|
196
|
+
% hooks
|
197
|
+
\def\reviewbegindocumenthook{}
|
198
|
+
|
199
|
+
\def\reviewenddocumenthook{}
|
200
|
+
|
54
201
|
\def\reviewfrontmatterhook{%
|
55
202
|
\renewcommand{\chaptermark}[1]{{}}
|
56
203
|
\frontmatter
|
@@ -71,20 +218,17 @@
|
|
71
218
|
}
|
72
219
|
|
73
220
|
% cover
|
74
|
-
\
|
75
|
-
\def\reviewcoverpagecont{\review@coverfile}
|
76
|
-
\fi
|
221
|
+
\if@reclscover
|
77
222
|
\ifdefined\review@coverimage
|
78
223
|
\def\reviewcoverpagecont{%
|
79
|
-
\
|
80
|
-
\
|
81
|
-
\centerline{\vbox to 0pt{\vss\hbox to 0pt{\hss
|
82
|
-
\expandafter\includegraphics\expandafter[\review@coverimageoption]{\review@coverimage}% includefullpagegraphicsを導入すべき?
|
83
|
-
\hss}\vss}}
|
84
|
-
\vfill\null
|
85
|
-
\clearpage
|
224
|
+
\expandafter\includefullpagegraphics\expandafter[\review@coverimageoption]{\review@coverimage}
|
225
|
+
\cleardoublepage
|
86
226
|
}
|
87
227
|
\fi
|
228
|
+
\ifdefined\review@coverfile
|
229
|
+
\def\reviewcoverpagecont{\review@coverfile}
|
230
|
+
\fi
|
231
|
+
\fi
|
88
232
|
|
89
233
|
% titlepage
|
90
234
|
\ifdefined\review@titlepage
|
@@ -108,8 +252,8 @@
|
|
108
252
|
\vskip 15em%
|
109
253
|
{\huge
|
110
254
|
\lineskip .75em
|
111
|
-
\begin{tabular}[t]{
|
112
|
-
\review@titlepageauthors
|
255
|
+
\begin{tabular}[t]{p{\textwidth}}%
|
256
|
+
\centering\review@titlepageauthors
|
113
257
|
\end{tabular}\par}%
|
114
258
|
\vfill
|
115
259
|
{\large\review@date \review@intn@edition%
|
@@ -155,7 +299,6 @@
|
|
155
299
|
\reviewcolophon
|
156
300
|
\thispagestyle{empty}
|
157
301
|
\vspace*{\fill}
|
158
|
-
\typeout{\review@booktitlename}
|
159
302
|
{\noindent\reviewtitlefont\Large\review@booktitlename}\\
|
160
303
|
\ifdefined\review@subtitlename
|
161
304
|
{\noindent\reviewtitlefont\large\review@subtitlename} \\
|
@@ -163,7 +306,7 @@
|
|
163
306
|
\rule[8pt]{\textwidth}{1pt} \\
|
164
307
|
{\noindent\review@pubhistories}
|
165
308
|
|
166
|
-
\begin{tabular}{
|
309
|
+
\begin{tabular}{p{3em}p{\dimexpr\textwidth-6em}}
|
167
310
|
\review@colophonnames
|
168
311
|
\end{tabular}
|
169
312
|
\\
|
@@ -1,141 +1,211 @@
|
|
1
|
-
|
2
|
-
% Copyright 2018 Kenshi Muto
|
3
|
-
\NeedsTeXFormat{LaTeX2e}
|
4
|
-
\ProvidesClass{review-jlreq}[2018/4/28]
|
5
|
-
\LoadClassWithOptions{jlreq}
|
6
|
-
|
7
|
-
% クラスオプション
|
8
|
-
% TODO:
|
9
|
-
% hanmen(boolean)→版面表示。便利なので入れたい
|
10
|
-
% draft(boolean)→これはjlreqでいけるはず?
|
11
|
-
% mentuke(boolean)→なくてもよいか
|
12
|
-
% cameraready=pdf/print(string)→設定が難しい
|
13
|
-
% paper=a5+3mm→jlreq-trimmarksのオプションとだいぶ違う
|
14
|
-
% toc:break-before=right, index:break-before=both→完全白ページが問題になる同人誌だと怖そう
|
15
|
-
% 白ページでもノンブルを打つ という設定(とpagestyle)がほしいか
|
16
|
-
% 扉画像の指定はreviewmacroのパラメータのほうでやらせるべきか
|
1
|
+
%#!ptex2pdf -l -u -ot '-synctex=1' test-rejlreqbk
|
2
|
+
% Copyright (c) 2018 Kenshi Muto.
|
17
3
|
%
|
18
|
-
%
|
19
|
-
%
|
20
|
-
%
|
21
|
-
%
|
22
|
-
%
|
23
|
-
%
|
24
|
-
|
25
|
-
%
|
26
|
-
%
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
%
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
% トンボ有効化時設定
|
36
|
-
\newif\if@review@jlreq@tombo
|
37
|
-
\@review@jlreq@tombofalse
|
38
|
-
\DeclareOption{tombo}{\@review@jlreq@tombotrue}
|
39
|
-
% トンボの詳細設定
|
40
|
-
%% パッケージオプション系。初期値は定義しないことにしてundefined評価でオプション追加するかどうかを判定させる
|
41
|
-
%\def\@review@jkreq@tombo@paper{a4}
|
42
|
-
%\def\@review@jkreq@tombo@show{trimmarks,banner,digital}
|
43
|
-
|
44
|
-
%% \jlreqtrimmarkssetup設定系
|
45
|
-
\def\@review@jlreq@tombo@banner{\jobname\space(\number\year-\two@digits\month-\two@digits\day\space\two@digits\hour:\two@digits\minute)}% バナー(動的にはできない)
|
46
|
-
\def\@review@jlreq@tombo@bleed{3mm}% 裁ち落とし幅
|
47
|
-
\def\@review@jlreq@tombo@color{cmyk}% トンボの色。cmykはCMYK全プレートで100%
|
48
|
-
|
49
|
-
% documentoptionからの取り込み
|
50
|
-
\define@key{rjreq}{tombo:paper}{\def\@review@jlreq@tombo@paper{#1}}
|
51
|
-
\define@key{rjreq}{tombo:show}{\def\@review@jlreq@tombo@show{#1}}% FIXME:これは{}を取るのでダメ
|
52
|
-
\define@key{rjreq}{tombo:banner}{\def\@review@jlreq@tombo@banner{#1}}
|
53
|
-
\define@key{rjreq}{tombo:bleed}{\def\@review@jlreq@tombo@bleed{#1}}
|
54
|
-
\define@key{rjreq}{tombo:color}{\def\@review@jlreq@tombo@color{#1}}
|
55
|
-
|
56
|
-
\ExecuteOptions{}% 初期有効化するもの
|
57
|
-
\ProcessOptions\relax
|
58
|
-
% パッケージオプションの適用
|
59
|
-
\ifdefined\@review@jlreq@tombo@paper
|
60
|
-
\PassOptionsToPackage{trimmarks_paper=\@review@jlreq@tombo@paper}{jlreq-trimmarks}
|
61
|
-
\fi
|
62
|
-
\ifdefined\@review@jlreq@tombo@show% FIXME:これは{}を取るのでダメ
|
63
|
-
\PassOptionsToPackage{show=\@review@jlreq@tombo@show}{jlreq-trimmarks}
|
64
|
-
\fi
|
4
|
+
% Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
% of this software and associated documentation files (the "Software"), to deal
|
6
|
+
% in the Software without restriction, including without limitation the rights
|
7
|
+
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
% copies of the Software, and to permit persons to whom the Software is
|
9
|
+
% furnished to do so, subject to the following conditions:
|
10
|
+
%
|
11
|
+
% The above copyright notice and this permission notice shall be included in
|
12
|
+
% all copies or substantial portions of the Software.
|
13
|
+
%
|
14
|
+
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
% THE SOFTWARE.
|
65
21
|
|
66
|
-
|
67
|
-
\
|
22
|
+
\NeedsTeXFormat{LaTeX2e}
|
23
|
+
\ProvidesClass{review-jlreq}[2018/10/05 Re:VIEW pLaTeX class modified for jlreq.
|
24
|
+
cls]
|
25
|
+
|
26
|
+
%% hook at end of reviewmacro
|
27
|
+
\let\@endofreviewmacrohook\@empty
|
28
|
+
\def\AtEndOfReVIEWMacro{%
|
29
|
+
\g@addto@macro\@endofreviewmacrohook}
|
30
|
+
\@onlypreamble\AtEndOfReVIEWMacro
|
31
|
+
|
32
|
+
\RequirePackage{fix-cm}%%\RequirePackage{fix-cm,exscale}
|
68
33
|
\IfFileExists{latexrelease.sty}{}{\RequirePackage{fixltx2e}}
|
69
|
-
\IfFileExists{platexrelease.sty}{%% is bundled in TL16 or higher release version
|
70
34
|
|
35
|
+
%% graphicx: added nosetpagesize
|
36
|
+
\IfFileExists{platexrelease.sty}{%% is bundled in TL16 or higher release version
|
71
37
|
\PassOptionsToPackage{nosetpagesize}{graphicx}%%for TL16 or higher version
|
72
38
|
}{}
|
73
39
|
|
74
|
-
|
75
|
-
\if@review@jlreq@tombo
|
76
|
-
% FIXME:パッケージオプションのtrimmarks_paper, showをどう渡すか
|
77
|
-
\RequirePackage{jlreq-trimmarks}
|
78
|
-
\fi
|
40
|
+
\RequirePackage{xkeyval}
|
79
41
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
42
|
+
%% useful helpers
|
43
|
+
\newcommand\recls@get@p@[2]{%
|
44
|
+
\edef#2{\expandafter\@recls@GET@P@\the#1}}
|
45
|
+
{\catcode`p=12\catcode`t=12\gdef\@recls@GET@P@#1pt{#1}}%
|
46
|
+
|
47
|
+
\long\def\recls@ifempty#1{%
|
48
|
+
\expandafter\ifx\expandafter\relax\detokenize{#1}\relax\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
|
49
|
+
% \long\def\recls@ifempty#1{\recls@xifempty#1@@..\@nil}
|
50
|
+
% \long\def\recls@xifempty#1#2@#3#4#5\@nil{%
|
51
|
+
% \ifx#3#4\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}
|
52
|
+
\long\def\recls@ifnotempty#1{\recls@ifempty{#1}{}}
|
53
|
+
|
54
|
+
\newcommand*{\recls@DeclareOption}[2]{%
|
55
|
+
\DeclareOptionX{#1}{%
|
56
|
+
\recls@ifempty{##1}{}{%
|
57
|
+
\ClassError{recls}{The option #1 should have no value}{\@ehc}}%
|
58
|
+
#2}}
|
59
|
+
|
60
|
+
%% cameraready=print,ebook,preview
|
61
|
+
\newif\if@cameraready \@camerareadyfalse
|
62
|
+
\newif\if@pdfhyperlink \@pdfhyperlinkfalse
|
63
|
+
\newif\if@pdftombo \@pdftombofalse
|
64
|
+
\newif\if@reclscover \@reclscovertrue
|
65
|
+
\newif\ifrecls@serialpage \recls@serialpagefalse
|
66
|
+
\DeclareOptionX{cameraready}[print]{\gdef\recls@cameraready{#1}}
|
67
|
+
\DeclareOptionX{tombopaper}[a4]{\gdef\recls@tombopaper{#1}}
|
68
|
+
\DeclareOptionX{bleed_margin}[3mm]{\gdef\recls@tombobleed{#1}}
|
69
|
+
\DeclareOptionX{cover}[\@empty]{\gdef\recls@forcecover{#1}}
|
70
|
+
\DeclareOptionX{startpage}[1]{\gdef\recls@startpage{\numexpr #1-1\relax}}
|
71
|
+
\DeclareOptionX{serial_pagination}[false]{\csname recls@serialpage#1\endcsname}
|
72
|
+
|
73
|
+
% jlreqのオプションについては https://github.com/abenori/jlreq/blob/master/README-ja.md を参照
|
74
|
+
\PassOptionsToClass{book,paper=a5}{jlreq}% クラスで必ず使うオプションの指定。デフォルトをA5にしておく
|
75
|
+
\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{jlreq}}%
|
76
|
+
\ExecuteOptionsX{cameraready,tombopaper,bleed_margin,cover,startpage,serial_pagination}
|
77
|
+
\ProcessOptionsX\relax
|
78
|
+
|
79
|
+
\def\recls@tmp{preview}\ifx\recls@cameraready\recls@tmp
|
80
|
+
\@camerareadyfalse\@pdfhyperlinktrue\@pdftombofalse\@reclscovertrue
|
81
|
+
\else\def\recls@tmp{print}\ifx\recls@cameraready\recls@tmp
|
82
|
+
\@camerareadytrue\@pdfhyperlinkfalse\@pdftombotrue\@reclscoverfalse
|
83
|
+
\else\def\recls@tmp{ebook}\ifx\recls@cameraready\recls@tmp
|
84
|
+
\@camerareadytrue\@pdfhyperlinktrue\@pdftombofalse\@reclscovertrue
|
85
|
+
\else
|
86
|
+
\recls@error{No such value of cameraready: \recls@cameraready}%
|
87
|
+
\fi\fi\fi
|
88
|
+
|
89
|
+
\LoadClass{jlreq}
|
90
|
+
|
91
|
+
% coverオプションによる表紙判定の上書き
|
92
|
+
\def\recls@tmp{true}\ifx\recls@forcecover\recls@tmp
|
93
|
+
\@reclscovertrue
|
94
|
+
\else\def\recls@tmp{false}\ifx\recls@forcecover\recls@tmp
|
95
|
+
\@reclscoverfalse
|
96
|
+
\else% それ以外の値は単に無視
|
97
|
+
\fi\fi
|
98
|
+
|
99
|
+
% トンボ設定
|
100
|
+
\if@pdftombo
|
101
|
+
\RequirePackage[trimmarks_paper=\recls@tombopaper,bleed_margin=\recls@tombobleed]{jlreq-trimmarks}
|
102
|
+
\fi
|
89
103
|
|
90
104
|
% エンジンとドライバの情報。jlreq-trimmarksが定義されていればそっちから持ってくる。
|
91
105
|
% 定義されていなければjlreqから持ってくる
|
92
|
-
\def\
|
93
|
-
\def\
|
94
|
-
\def\review@jlreq@driver{}
|
106
|
+
\def\recls@engine{}
|
107
|
+
\def\recls@driver{}
|
95
108
|
\ifdefined\jlreq@trimmarks@engine
|
96
|
-
\ifx l\jlreq@trimmarks@engine\def\
|
97
|
-
\ifx u\jlreq@trimmarks@engine\def\
|
98
|
-
\ifx p\jlreq@trimmarks@engine\def\
|
109
|
+
\ifx l\jlreq@trimmarks@engine\def\recls@engine{lualatex}\fi
|
110
|
+
\ifx u\jlreq@trimmarks@engine\def\recls@engine{uplatex}\fi
|
111
|
+
\ifx p\jlreq@trimmarks@engine\def\recls@engine{platex}\fi
|
99
112
|
\else% jlreqから持ってくる
|
100
|
-
\ifx l\jlreq@engine\def\
|
101
|
-
\ifx u\jlreq@engine\def\
|
102
|
-
\ifx p\jlreq@engine\def\
|
113
|
+
\ifx l\jlreq@engine\def\recls@engine{lualatex}\fi
|
114
|
+
\ifx u\jlreq@engine\def\recls@engine{uplatex}\fi
|
115
|
+
\ifx p\jlreq@engine\def\recls@engine{platex}\fi
|
103
116
|
\fi
|
104
117
|
\ifdefined\jlreq@trimmarks@driver
|
105
|
-
\ifx f\jlreq@trimmarks@driver\def\
|
106
|
-
\ifx s\jlreq@trimmarks@driver\def\
|
107
|
-
\ifx o\jlreq@trimmarks@driver\def\
|
118
|
+
\ifx f\jlreq@trimmarks@driver\def\recls@driver{dvipdfmx}\fi
|
119
|
+
\ifx s\jlreq@trimmarks@driver\def\recls@driver{dvips}\fi
|
120
|
+
\ifx o\jlreq@trimmarks@driver\def\recls@driver{dviout}\fi
|
108
121
|
\else% jlreqから持ってくる
|
109
122
|
\ifx l\jlreq@engine
|
110
|
-
\def\
|
123
|
+
\def\recls@driver{luatex}
|
111
124
|
\else
|
112
|
-
\def\
|
125
|
+
\def\recls@driver{dvipdfmx}
|
113
126
|
\fi
|
114
127
|
\fi
|
115
128
|
|
116
|
-
|
117
|
-
\
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
\
|
122
|
-
|
129
|
+
% jlreq-trimmarksを使わないとき(ebook)には紙面サイズを自前で指定する
|
130
|
+
\if@pdftombo
|
131
|
+
\else
|
132
|
+
\ifx luatex\recls@driver\else
|
133
|
+
\newdimen\pdfpaperwidth \pdfpaperwidth\paperwidth
|
134
|
+
\newdimen\pdfpaperheight \pdfpaperheight\paperheight
|
135
|
+
\AtBeginDvi{\special{papersize=\the\pdfpaperwidth,\the\pdfpaperheight}}
|
136
|
+
\fi
|
123
137
|
\fi
|
124
138
|
|
125
|
-
|
126
|
-
\RequirePackage[\
|
127
|
-
|
128
|
-
hidelinks,
|
129
|
-
setpagesize=false]{hyperref}[2016/06/24 v6.83q]
|
139
|
+
\RequirePackage[\recls@driver]{graphicx}
|
140
|
+
\RequirePackage[\recls@driver,table]{xcolor}
|
141
|
+
|
130
142
|
\RequirePackage[T1]{fontenc}
|
131
143
|
\RequirePackage{textcomp}%T1/TS1
|
132
144
|
\RequirePackage{lmodern}%\ttdefault: lmtt
|
133
|
-
\def\review@jlreq@driver@luatex{luatex}
|
134
|
-
\ifx\review@jlreq@driver\review@jlreq@driver@luatex\else
|
135
|
-
\RequirePackage[\review@jlreq@driver]{pxjahyper}[2012/05/27 v0.2]
|
136
|
-
\fi
|
137
145
|
\RequirePackage{tikz}
|
138
146
|
\usetikzlibrary{calc}
|
139
147
|
\RequirePackage{multirow}
|
140
148
|
\RequirePackage{amsmath}
|
141
149
|
\RequirePackage{amssymb}
|
150
|
+
\RequirePackage{needspace}
|
151
|
+
\RequirePackage{alltt}
|
152
|
+
\RequirePackage{float}
|
153
|
+
\RequirePackage{upquote}
|
154
|
+
\RequirePackage{bm}
|
155
|
+
\RequirePackage[table]{xcolor}
|
156
|
+
\RequirePackage{tcolorbox}
|
157
|
+
\tcbuselibrary{xparse,hooks,skins,breakable}
|
158
|
+
\RequirePackage{ulem}
|
159
|
+
|
160
|
+
\RequirePackage[dvipdfmx, \if@pdfhyperlink\else draft,\fi
|
161
|
+
bookmarks=true,
|
162
|
+
bookmarksnumbered=true,
|
163
|
+
hidelinks,
|
164
|
+
setpagesize=false,
|
165
|
+
]{hyperref}
|
166
|
+
\RequirePackage[\recls@driver]{pxjahyper}
|
167
|
+
|
168
|
+
%% include fullpage graphics
|
169
|
+
\edef\grnchry@head{\dimexpr\topmargin+1in+\headheight+\headsep}
|
170
|
+
\edef\grnchry@gutter{\evensidemargin}
|
171
|
+
\newcommand*\includefullpagegraphics{%
|
172
|
+
\clearpage
|
173
|
+
\@ifstar
|
174
|
+
{\@includefullpagegraphics}%
|
175
|
+
{\thispagestyle{empty}\@includefullpagegraphics}
|
176
|
+
}
|
177
|
+
|
178
|
+
\newcommand*\@includefullpagegraphics[2][]{%
|
179
|
+
\vbox to \textheight{%
|
180
|
+
\vskip-\grnchry@head
|
181
|
+
\vbox to \paperheight{\vss
|
182
|
+
\hbox to \textwidth{%
|
183
|
+
\ifodd\c@page
|
184
|
+
\hskip-\dimexpr\oddsidemargin + 1in\relax
|
185
|
+
\else
|
186
|
+
\hskip-\dimexpr\evensidemargin + 1in\relax
|
187
|
+
\fi
|
188
|
+
\hbox to \paperwidth{\hss
|
189
|
+
\includegraphics[#1]{#2}%
|
190
|
+
\hss}%
|
191
|
+
\hss}%
|
192
|
+
\vss}%
|
193
|
+
\vss}%
|
194
|
+
\clearpage
|
195
|
+
}
|
196
|
+
|
197
|
+
% シンプルな通しノンブル
|
198
|
+
\ifrecls@serialpage
|
199
|
+
\renewcommand*{\pagenumbering}[1]{%
|
200
|
+
\gdef\thepage{\@arabic\c@page}}
|
201
|
+
\fi
|
202
|
+
|
203
|
+
% 開始ページを変更
|
204
|
+
\let\recls@frontmatterorg\frontmatter
|
205
|
+
\renewcommand*{\frontmatter}{
|
206
|
+
\recls@frontmatterorg
|
207
|
+
\setcounter{page}{\the\recls@startpage}
|
208
|
+
}
|
209
|
+
|
210
|
+
\listfiles
|
211
|
+
\endinput
|