review-peg 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +36 -0
  3. data/.rubocop.yml +47 -0
  4. data/.rubocop_todo.yml +605 -0
  5. data/.travis.yml +18 -0
  6. data/COPYING +515 -0
  7. data/ChangeLog +2449 -0
  8. data/Dockerfile +22 -0
  9. data/Gemfile +6 -0
  10. data/README.rdoc +81 -0
  11. data/Rakefile +51 -0
  12. data/bin/review-catalog-converter-peg +129 -0
  13. data/bin/review-check-peg +169 -0
  14. data/bin/review-checkdep-peg +63 -0
  15. data/bin/review-compile-peg +202 -0
  16. data/bin/review-epubmaker-legacy-peg +1024 -0
  17. data/bin/review-epubmaker-peg +44 -0
  18. data/bin/review-index-peg +110 -0
  19. data/bin/review-init-peg +151 -0
  20. data/bin/review-pdfmaker-peg +18 -0
  21. data/bin/review-preproc-peg +131 -0
  22. data/bin/review-validate-peg +51 -0
  23. data/bin/review-vol-peg +100 -0
  24. data/debian/README.Debian +12 -0
  25. data/debian/README.source +5 -0
  26. data/debian/changelog +5 -0
  27. data/debian/compat +1 -0
  28. data/debian/control +22 -0
  29. data/debian/copyright +62 -0
  30. data/debian/docs +6 -0
  31. data/debian/manpage.1.ex +59 -0
  32. data/debian/patches/path.diff +91 -0
  33. data/debian/patches/series +1 -0
  34. data/debian/review.install +13 -0
  35. data/debian/review.links +4 -0
  36. data/debian/rules +13 -0
  37. data/debian/source/format +1 -0
  38. data/doc/NEWS.ja.md +350 -0
  39. data/doc/NEWS.md +354 -0
  40. data/doc/catalog.ja.md +53 -0
  41. data/doc/catalog.md +52 -0
  42. data/doc/format.ja.md +734 -0
  43. data/doc/format.md +746 -0
  44. data/doc/format_idg.ja.md +203 -0
  45. data/doc/quickstart.ja.md +222 -0
  46. data/doc/quickstart.md +252 -0
  47. data/doc/ruby-uuid/README +11 -0
  48. data/doc/ruby-uuid/README.ja +34 -0
  49. data/doc/sample.css +108 -0
  50. data/doc/sample.yml +238 -0
  51. data/lib/epubmaker.rb +24 -0
  52. data/lib/epubmaker/content.rb +93 -0
  53. data/lib/epubmaker/epubcommon.rb +424 -0
  54. data/lib/epubmaker/epubv2.rb +139 -0
  55. data/lib/epubmaker/epubv3.rb +222 -0
  56. data/lib/epubmaker/producer.rb +330 -0
  57. data/lib/lineinput.rb +107 -0
  58. data/lib/review.rb +3 -0
  59. data/lib/review/book.rb +43 -0
  60. data/lib/review/book/base.rb +401 -0
  61. data/lib/review/book/chapter.rb +100 -0
  62. data/lib/review/book/compilable.rb +184 -0
  63. data/lib/review/book/image_finder.rb +71 -0
  64. data/lib/review/book/index.rb +413 -0
  65. data/lib/review/book/page_metric.rb +47 -0
  66. data/lib/review/book/part.rb +54 -0
  67. data/lib/review/book/volume.rb +67 -0
  68. data/lib/review/builder.rb +452 -0
  69. data/lib/review/catalog.rb +52 -0
  70. data/lib/review/compiler.rb +5183 -0
  71. data/lib/review/compiler/literals_1_9.kpeg +22 -0
  72. data/lib/review/compiler/literals_1_9.rb +435 -0
  73. data/lib/review/configure.rb +64 -0
  74. data/lib/review/epubbuilder.rb +18 -0
  75. data/lib/review/epubmaker.rb +480 -0
  76. data/lib/review/ewbbuilder.rb +381 -0
  77. data/lib/review/exception.rb +21 -0
  78. data/lib/review/extentions.rb +4 -0
  79. data/lib/review/extentions/array.rb +25 -0
  80. data/lib/review/extentions/object.rb +9 -0
  81. data/lib/review/extentions/string.rb +33 -0
  82. data/lib/review/htmlbuilder.rb +1166 -0
  83. data/lib/review/htmllayout.rb +41 -0
  84. data/lib/review/htmltoc.rb +45 -0
  85. data/lib/review/htmlutils.rb +90 -0
  86. data/lib/review/i18n.rb +96 -0
  87. data/lib/review/i18n.yml +169 -0
  88. data/lib/review/idgxmlbuilder.rb +1233 -0
  89. data/lib/review/inaobuilder.rb +357 -0
  90. data/lib/review/latexbuilder.rb +941 -0
  91. data/lib/review/latexindex.rb +35 -0
  92. data/lib/review/latexutils.rb +95 -0
  93. data/lib/review/layout.tex.erb +340 -0
  94. data/lib/review/lineinput.rb +17 -0
  95. data/lib/review/location.rb +24 -0
  96. data/lib/review/makerhelper.rb +67 -0
  97. data/lib/review/markdownbuilder.rb +339 -0
  98. data/lib/review/node.rb +288 -0
  99. data/lib/review/pdfmaker.rb +332 -0
  100. data/lib/review/preprocessor.rb +530 -0
  101. data/lib/review/review.kpeg +745 -0
  102. data/lib/review/sec_counter.rb +69 -0
  103. data/lib/review/template.rb +21 -0
  104. data/lib/review/textbuilder.rb +17 -0
  105. data/lib/review/textutils.rb +16 -0
  106. data/lib/review/tocparser.rb +348 -0
  107. data/lib/review/tocprinter.rb +205 -0
  108. data/lib/review/topbuilder.rb +796 -0
  109. data/lib/review/unfold.rb +138 -0
  110. data/lib/review/version.rb +3 -0
  111. data/lib/uuid.rb +312 -0
  112. data/review.gemspec +32 -0
  113. data/templates/html/layout-html5.html.erb +17 -0
  114. data/templates/html/layout-xhtml1.html.erb +20 -0
  115. data/templates/ncx/epubv2.ncx.erb +11 -0
  116. data/templates/opf/epubv2.opf.erb +21 -0
  117. data/templates/opf/epubv3.opf.erb +18 -0
  118. data/templates/xml/container.xml.erb +6 -0
  119. data/test/CHAPS +2 -0
  120. data/test/assets/test.xml.erb +3 -0
  121. data/test/assets/test_template.tex +255 -0
  122. data/test/assets/test_template_backmatter.tex +32 -0
  123. data/test/bib.re +13 -0
  124. data/test/book_test_helper.rb +35 -0
  125. data/test/sample-book/README.md +7 -0
  126. data/test/sample-book/src/Rakefile +58 -0
  127. data/test/sample-book/src/_cover.html +3 -0
  128. data/test/sample-book/src/catalog.yml +10 -0
  129. data/test/sample-book/src/ch01.re +71 -0
  130. data/test/sample-book/src/ch02.re +3 -0
  131. data/test/sample-book/src/config.yml +186 -0
  132. data/test/sample-book/src/images/ch01-imgsample.jpg +0 -0
  133. data/test/sample-book/src/images/cover.jpg +0 -0
  134. data/test/sample-book/src/preface.re +15 -0
  135. data/test/sample-book/src/sty/jumoline.sty +310 -0
  136. data/test/sample-book/src/sty/reviewmacro.sty +39 -0
  137. data/test/sample-book/src/style.css +251 -0
  138. data/test/sample-book/src/vendor/jumoline/README +29 -0
  139. data/test/sample-book/src/vendor/jumoline/jumoline.dtx +2988 -0
  140. data/test/sample-book/src/vendor/jumoline/jumoline.ins +6 -0
  141. data/test/test.re +43 -0
  142. data/test/test_book.rb +556 -0
  143. data/test/test_book_chapter.rb +280 -0
  144. data/test/test_book_part.rb +54 -0
  145. data/test/test_builder.rb +80 -0
  146. data/test/test_catalog.rb +119 -0
  147. data/test/test_catalog_converter_cmd.rb +73 -0
  148. data/test/test_compiler.rb +92 -0
  149. data/test/test_configure.rb +50 -0
  150. data/test/test_epub3maker.rb +529 -0
  151. data/test/test_epubmaker.rb +569 -0
  152. data/test/test_epubmaker_cmd.rb +40 -0
  153. data/test/test_helper.rb +92 -0
  154. data/test/test_htmlbuilder.rb +1114 -0
  155. data/test/test_htmltoc.rb +32 -0
  156. data/test/test_htmlutils.rb +50 -0
  157. data/test/test_i18n.rb +180 -0
  158. data/test/test_idgxmlbuilder.rb +608 -0
  159. data/test/test_image_finder.rb +82 -0
  160. data/test/test_inaobuilder.rb +245 -0
  161. data/test/test_index.rb +174 -0
  162. data/test/test_latexbuilder.rb +732 -0
  163. data/test/test_lineinput.rb +182 -0
  164. data/test/test_makerhelper.rb +66 -0
  165. data/test/test_markdownbuilder.rb +125 -0
  166. data/test/test_pdfmaker.rb +171 -0
  167. data/test/test_pdfmaker_cmd.rb +40 -0
  168. data/test/test_preprocessor.rb +23 -0
  169. data/test/test_review_ext.rb +31 -0
  170. data/test/test_template.rb +26 -0
  171. data/test/test_textutils.rb +32 -0
  172. data/test/test_topbuilder.rb +291 -0
  173. data/test/test_uuid.rb +157 -0
  174. metadata +357 -0
@@ -0,0 +1,35 @@
1
+ #
2
+ # $Id: latexindex.rb 2204 2006-03-18 06:10:26Z aamine $
3
+ #
4
+ # Copyright (c) 2002-2006 Minero Aoki
5
+ #
6
+ # This program is free software.
7
+ # You can distribute or modify this program under the terms of
8
+ # the GNU LGPL, Lesser General Public License version 2.1.
9
+ # For details of the GNU LGPL, see the file "COPYING".
10
+ #
11
+
12
+ module ReVIEW
13
+
14
+ class LaTeXIndex
15
+
16
+ def load(path)
17
+ table = {}
18
+ File.foreach(path) do |line|
19
+ key, value = *line.strip.split(/\t+/, 2)
20
+ table[key.sub(/\A%/, '')] = value
21
+ end
22
+ new(table)
23
+ end
24
+
25
+ def initialize(table)
26
+ @table = table
27
+ end
28
+
29
+ def [](key)
30
+ @table.fetch(key)
31
+ end
32
+
33
+ end
34
+
35
+ end
@@ -0,0 +1,95 @@
1
+ # encoding: utf-8
2
+ #
3
+ # $Id: latexutils.rb 2204 2006-03-18 06:10:26Z aamine $
4
+ #
5
+ # Copyright (c) 2002-2006 Minero Aoki
6
+ #
7
+ # This program is free software.
8
+ # You can distribute or modify this program under the terms of
9
+ # the GNU LGPL, Lesser General Public License version 2.1.
10
+ # For details of the GNU LGPL, see the file "COPYING".
11
+ #
12
+
13
+ require 'nkf'
14
+
15
+ module ReVIEW
16
+
17
+ module LaTeXUtils
18
+
19
+ METACHARS = {
20
+ '#' => '\#',
21
+ "$" => '\textdollar{}',
22
+ '%' => '\%',
23
+ '&' => '\&',
24
+ '{' => '\{',
25
+ '}' => '\}',
26
+ '_' => '\textunderscore{}',
27
+ '^' => '\textasciicircum{}',
28
+ '~' => '\textasciitilde{}',
29
+ '|' => '\textbar{}',
30
+ '<' => '\textless{}',
31
+ '>' => '\textgreater{}',
32
+ "\\" => '\reviewbackslash{}',
33
+ "-" => '{-}',
34
+
35
+ '⓪' => '\UTF{24EA}',
36
+ '①' => '\UTF{2460}',
37
+ '②' => '\UTF{2461}',
38
+ '③' => '\UTF{2462}',
39
+ '④' => '\UTF{2463}',
40
+ '⑤' => '\UTF{2464}',
41
+ '⑥' => '\UTF{2465}',
42
+ '⑦' => '\UTF{2466}',
43
+ '⑧' => '\UTF{2467}',
44
+ '⑨' => '\UTF{2468}',
45
+ '⑩' => '\UTF{2469}',
46
+ '⑪' => '\UTF{246A}',
47
+ '⑫' => '\UTF{246B}',
48
+ '⑬' => '\UTF{246C}',
49
+ '⑭' => '\UTF{246D}',
50
+ '⑮' => '\UTF{246E}',
51
+ '⑯' => '\UTF{246F}',
52
+ }
53
+
54
+ kanalist = %w{。 「 」 、 ・ ヲ ァ ィ ゥ ェ ォ ャ ュ ョ ッ ー ア イ ウ エ オ カ キ ク ケ コ サ シ ス セ ソ タ チ ツ テ ト ナ ニ ヌ ネ ノ ハ ヒ フ ヘ ホ マ ミ ム メ モ ヤ ユ ヨ ラ リ ル レ ロ ワ ン ゙ ゚}
55
+ kanalist.each do |char|
56
+ char_jisx0208 = NKF::nkf('-WwX',char)
57
+ METACHARS[char] = "\\aj半角{#{char_jisx0208}}"
58
+ end
59
+
60
+ METACHARS_RE = /[#{Regexp.escape(METACHARS.keys.join(''))}]/u
61
+
62
+ METACHARS_INVERT = METACHARS.invert
63
+
64
+ def escape_latex(str)
65
+ str.gsub(METACHARS_RE) {|s|
66
+ METACHARS[s] or raise "unknown trans char: #{s}"
67
+ }
68
+ end
69
+
70
+ alias_method :escape, :escape_latex
71
+
72
+ def unescape_latex(str)
73
+ metachars_invert_re = Regexp.new(METACHARS_INVERT.keys.collect{|key| Regexp.escape(key)}.join('|'))
74
+ str.gsub(metachars_invert_re) {|s|
75
+ METACHARS_INVERT[s] or raise "unknown trans char: #{s}"
76
+ }
77
+ end
78
+
79
+ alias_method :unescape, :unescape_latex
80
+
81
+ def escape_index(str)
82
+ str.gsub(/[@!|"]/) {|s| '"' + s }
83
+ end
84
+
85
+ def escape_url(str)
86
+ str.gsub(/[\#%]/) {|s| '\\'+s }
87
+ end
88
+
89
+ def macro(name, *args)
90
+ "\\#{name}" + args.map {|a| "{#{a}}" }.join('')
91
+ end
92
+
93
+ end
94
+
95
+ end
@@ -0,0 +1,340 @@
1
+ \documentclass[<%= documentclassoption %>]{<%= documentclass %>}
2
+ \usepackage[deluxe]{otf}
3
+ \usepackage[dvipdfmx]{color}
4
+ \usepackage[dvipdfmx]{graphicx}
5
+ \usepackage{framed}
6
+ \usepackage{wrapfig}
7
+ \definecolor{shadecolor}{gray}{0.9}
8
+ \definecolor{shadecolorb}{gray}{0.1}
9
+ \definecolor{reviewgreen}{rgb}{0,0.4,0}
10
+ \definecolor{reviewblue}{rgb}{0.2,0.2,0.4}
11
+ \definecolor{reviewred}{rgb}{0.7,0,0}
12
+ \definecolor{reviewdarkred}{rgb}{0.3,0,0}
13
+ \usepackage[utf8]{inputenc}
14
+ \usepackage{ascmac}
15
+ \usepackage{float}
16
+ \usepackage{alltt}
17
+ \usepackage{amsmath}
18
+
19
+ %% if you use @<u>{} (underline), use jumoline.sty
20
+ %%\usepackage{jumoline}
21
+
22
+ \newenvironment{shadedb}{%
23
+ \def\FrameCommand{\fboxsep=\FrameSep \colorbox{shadecolorb}}%
24
+ \MakeFramed {\FrameRestore}}%
25
+ {\endMakeFramed}
26
+
27
+ \usepackage[top=10zw,bottom=12zw,left=10zw,right=10zw]{geometry}
28
+ %\usepackage[top=5zw,bottom=5zw,left=1zw,right=1zw]{geometry}
29
+
30
+
31
+ \newcommand{\parasep}{\vspace*{3zh}}
32
+ \setlength{\footskip}{30pt}
33
+
34
+ %% Bookmarkの文字化け対策(日本語向け)
35
+ \ifnum 46273=\euc"B4C1 % 46273 == 0xB4C1 == 漢(EUC-JP)
36
+ \usepackage{atbegshi}%
37
+ \AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}}%
38
+ %%\AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}%
39
+ \else
40
+ \usepackage{atbegshi}%
41
+ \AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}}%
42
+ %%\AtBeginDvi{\special{pdf:tounicode 90ms-RKSJ-UCS2}}%
43
+ \fi
44
+
45
+ \usepackage[dvipdfm,bookmarks=true,bookmarksnumbered=true,colorlinks=true,%
46
+ pdftitle={<%= values["booktitle"] %>},%
47
+ pdfauthor={<%= values["aut"] %>}]{hyperref}
48
+
49
+ <% if config["highlight"] && config["highlight"]["latex"] == "listings" %>
50
+ <% if config["language"] == "ja" %>
51
+ \usepackage{listings,jlisting}
52
+ <% else %>
53
+ \usepackage{listings}
54
+ <% end %>
55
+ \renewcommand{\lstlistingname}{<%= I18n.t("list")%>}
56
+ \lstset{%
57
+ breaklines=true,%
58
+ breakautoindent=false,%
59
+ breakindent=0pt,%
60
+ fontadjust=true,%
61
+ backgroundcolor=\color{shadecolor},%
62
+ frame=single,%
63
+ framerule=0pt,%
64
+ basicstyle=\ttfamily\scriptsize,%
65
+ commentstyle=\color{reviewgreen},%
66
+ identifierstyle=\color{reviewblue},%
67
+ stringstyle=\color{reviewred},%
68
+ keywordstyle=\bfseries\color{reviewdarkred},%
69
+ }
70
+ \lstnewenvironment{reviewemlistlst}[1][]{%
71
+ \lstset{#1}}{}
72
+
73
+ \lstnewenvironment{reviewemlistnumlst}[1][]{%
74
+ \lstset{numbers=left, #1}}{}
75
+
76
+ \lstnewenvironment{reviewlistlst}[1][]{%
77
+ \lstset{#1}}{}
78
+
79
+ \lstnewenvironment{reviewlistnumlst}[1][]{%
80
+ \lstset{numbers=left, #1}}{}
81
+
82
+ \lstnewenvironment{reviewcmdlst}[1][]{%
83
+ \lstset{backgroundcolor=\color{white}, frameround=tttt, frame=trbl, #1}}{}
84
+ <% end %>
85
+
86
+ \newenvironment{reviewimage}{%
87
+ \begin{figure}[H]
88
+ \begin{center}}{%
89
+ \end{center}
90
+ \end{figure}}
91
+
92
+ \newenvironment{reviewdummyimage}{%
93
+ \begin{figure}[H]
94
+ \begin{center}\begin{alltt}}{%
95
+ \end{alltt}\end{center}
96
+ \end{figure}}
97
+
98
+ \newenvironment{reviewemlist}{%
99
+ \medskip\small\begin{shaded}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
100
+ \end{alltt}\end{shaded}}
101
+
102
+ \newenvironment{reviewlist}{%
103
+ \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
104
+ \end{alltt}\end{shaded}\par\vspace*{0.5zw}}
105
+
106
+ \newenvironment{reviewcmd}{%
107
+ \color{white}\medskip\small\begin{shadedb}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
108
+ \end{alltt}\end{shadedb}}
109
+
110
+ \newenvironment{reviewbox}{%
111
+ \medskip\small\begin{framed}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
112
+ \end{alltt}\end{framed}}
113
+
114
+ \newenvironment{reviewtable}[1]{%
115
+ \begin{center}\small\setlength{\baselineskip}{1.2zw}
116
+ \begin{tabular}{#1}}{%
117
+ \end{tabular}
118
+ \end{center}}
119
+
120
+ \newenvironment{reviewcolumn}{%
121
+ \begin{framed}
122
+ }{%
123
+ \end{framed}
124
+ \vspace{2zw}}
125
+
126
+ \newcommand{\reviewcolumnhead}[2]{%
127
+ {\noindent\large <%= I18n.t("column_head")%>: #2}}
128
+
129
+ \newcommand{\reviewtablecaption}[1]{%
130
+ \caption{#1}}
131
+
132
+ \newcommand{\reviewbackslash}[0]{%
133
+ \textbackslash{}}
134
+
135
+ \newcommand{\reviewlistcaption}[1]{%
136
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
137
+
138
+ \newcommand{\reviewemlistcaption}[1]{%
139
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
140
+
141
+ \newcommand{\reviewcmdcaption}[1]{%
142
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
143
+
144
+ \newcommand{\reviewindepimagecaption}[1]{%
145
+ \begin{center}#1\end{center}}
146
+
147
+ \newcommand{\reviewboxcaption}[1]{%
148
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
149
+
150
+ \newcommand{\reviewimageref}[2]{%
151
+ <%= I18n.t("image")%> #1}
152
+ \newcommand{\reviewtableref}[2]{%
153
+ <%= I18n.t("table")%> #1}
154
+ \newcommand{\reviewlistref}[1]{%
155
+ <%= I18n.t("list")%> #1}
156
+ \newcommand{\reviewbibref}[2]{%
157
+ #1}
158
+ \newcommand{\reviewcolumnref}[2]{%
159
+ <%= I18n.t("columnname")%> #1}
160
+ \newcommand{\reviewsecref}[2]{%
161
+ #1}
162
+
163
+ \newcommand{\reviewminicolumntitle}[1]{%
164
+ {\large <%= I18n.t("memo_head")%>: #1}\\}
165
+
166
+ <% if values["toctitle"].present? %>
167
+ \renewcommand{\contentsname}{<%= values["toctitle"]%>}
168
+ <% end %>
169
+
170
+ \newenvironment{reviewminicolumn}{%
171
+ \vspace{1.5zw}\begin{screen}}{%
172
+ \end{screen}\vspace{2zw}}
173
+
174
+ \newcommand{\reviewkw}[1]{%
175
+ \textbf{\textgt{#1}}}
176
+
177
+ \newcommand{\reviewami}[1]{%
178
+ \mask{#1}{A}}
179
+
180
+ \newcommand{\reviewem}[1]{%
181
+ \textbf{#1}}
182
+
183
+ \newcommand{\reviewstrong}[1]{%
184
+ \textbf{#1}}
185
+
186
+ %% @<del> is ignored in LaTeX with default style
187
+ \newcommand{\reviewstrike}[1]{#1}
188
+
189
+ %%%% for ulem.sty:
190
+ %%\renewcommand{\reviewstrike}[1]{\sout{#1}}
191
+ %%
192
+ %%%% for jumoline.sty:
193
+ %%\renewcommand{\reviewstrike}[1]{\Middleline{#1}}
194
+
195
+ \newcommand{\reviewth}[1]{%
196
+ \textgt{#1}}
197
+
198
+ \newcommand{\reviewtitlefont}[0]{%
199
+ \usefont{T1}{phv}{b}{n}\gtfamily}
200
+
201
+ \newcommand{\reviewmainfont}[0]{%
202
+ }
203
+
204
+ \newcommand{\reviewcolophon}[0]{%
205
+ \clearpage}
206
+ \newcommand{\reviewappendix}[0]{%
207
+ \appendix}
208
+
209
+ \makeatletter
210
+ %% maxwidth is the original width if it is less than linewidth
211
+ %% otherwise use linewidth (to make sure the graphics do not exceed the margin)
212
+ \def\maxwidth{%
213
+ \ifdim\Gin@nat@width>\linewidth
214
+ \linewidth
215
+ \else
216
+ \Gin@nat@width
217
+ \fi
218
+ }
219
+ \makeatother
220
+
221
+ <%= values["usepackage"] %>
222
+
223
+ \usepackage[T1]{fontenc}
224
+
225
+ \begin{document}
226
+
227
+ \reviewmainfont
228
+
229
+ <% if values["titlepage"] %>
230
+ <% if custom_titlepage %>
231
+ <%= custom_titlepage %>
232
+ <% else %>
233
+ \begin{titlepage}
234
+ <% if values["coverimage"] %>
235
+ \begin{center}
236
+ %%%\mbox{}\vskip5zw%
237
+ \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{./images/<%= values["coverimage"] %>}
238
+ \end{center}
239
+ \clearpage
240
+ <% end %>
241
+ \thispagestyle{empty}
242
+ \begin{center}%
243
+ \mbox{} \vskip5zw
244
+ \reviewtitlefont%
245
+ {\Huge <%= values["booktitle"] %> \par}%
246
+ \vskip 15em%
247
+ {\huge
248
+ \lineskip .75em
249
+ \begin{tabular}[t]{c}%
250
+ <%= authors %>
251
+ \end{tabular}\par}%
252
+ \vfill
253
+ {\large <%= values["date"] %> <%= I18n.t("edition")%>\hspace{2zw}<%= I18n.t("published_by", values["prt"])%>\par}%
254
+ \vskip4zw\mbox{}
255
+ \end{center}%
256
+ \end{titlepage}
257
+ <% end %>
258
+ <% end %>
259
+
260
+ \renewcommand{\chaptermark}[1]{{}}
261
+ \frontmatter
262
+
263
+ %%% originaltitle
264
+ <% if values["originaltitlefile"] %>
265
+ <%= custom_originaltitlepage %>
266
+ <% end %>
267
+
268
+ %%% credit
269
+ <% if values["creditfile"] %>
270
+ <%= custom_creditpage %>
271
+ <% end %>
272
+
273
+
274
+ %% preface
275
+ <%= values["pre_str"] %>
276
+
277
+ <% if values["toc"] %>
278
+ \setcounter{tocdepth}{<%= values["toclevel"] %>}
279
+ \tableofcontents
280
+ <% end %>
281
+
282
+ \renewcommand{\chaptermark}[1]{\markboth{\prechaptername\thechapter\postchaptername~#1}{}}
283
+ \mainmatter
284
+ <%= values["chap_str"] %>
285
+ \renewcommand{\chaptermark}[1]{\markboth{\appendixname\thechapter~#1}{}}
286
+ \reviewappendix
287
+ <%= values["appendix_str"] %>
288
+
289
+ %% backmatter begins
290
+ <% if values["post_str"] or values["colophon"] %>
291
+ \backmatter
292
+ <% end %>
293
+
294
+ <% if values["post_str"] %>
295
+ <%= values["post_str"] %>
296
+ <% end %>
297
+
298
+
299
+ %%% profile
300
+ <% if values["profile"] %>
301
+ <%= custom_profilepage %>
302
+ <% end %>
303
+
304
+ %%% advfile
305
+ <% if values["advfile"] %>
306
+ <%= custom_advfilepage %>
307
+ <% end %>
308
+
309
+ %%% colophon
310
+ <% if values["colophon"] %>
311
+ <% if custom_colophonpage %>
312
+ <%= custom_colophonpage %>
313
+ <% else %>
314
+ %% okuduke
315
+ \reviewcolophon
316
+ \thispagestyle{empty}
317
+
318
+ \vspace*{\fill}
319
+
320
+ {\noindent\reviewtitlefont\Large <%= values["booktitle"] %>} \\
321
+ \rule[8pt]{14cm}{1pt} \\
322
+ {\noindent
323
+ <%= values["pubhistory"].to_s.gsub(/\n/){"\n\n\\noindent"} %>
324
+ }
325
+
326
+ \begin{tabular}{ll}
327
+ <%= okuduke %>
328
+ \end{tabular}
329
+  \\
330
+ \rule[0pt]{14cm}{1pt} \\
331
+ <%= values["rights"] %> \\
332
+ <% end %>
333
+ <% end %>
334
+
335
+ %%% backcover
336
+ <% if values["backcover"] %>
337
+ <%= custom_backcoverpage %>
338
+ <% end %>
339
+
340
+ \end{document}