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
data/review.gemspec ADDED
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "review/version"
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = "review-peg"
7
+ gem.version = ReVIEW::VERSION
8
+ gem.platform = Gem::Platform::RUBY
9
+ gem.license = "LGPL"
10
+ gem.authors = ["kmuto", "takahashim"]
11
+ gem.email = "kmuto@debian.org"
12
+ gem.homepage = "http://github.com/kmuto/review"
13
+ gem.summary = "Re:VIEW peg: a easy-to-use digital publishing system (PEG version)"
14
+ gem.description = "Re:VIEW is a digital publishing system for books and ebooks. It supports InDesign, EPUB and LaTeX."
15
+ gem.required_rubygems_version = Gem::Requirement.new(">= 0") if gem.respond_to? :required_rubygems_version=
16
+
17
+ gem.files = `git ls-files`.split("\n")
18
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ gem.extra_rdoc_files = [
21
+ "ChangeLog",
22
+ "README.rdoc"
23
+ ]
24
+ gem.require_paths = ["lib"]
25
+
26
+ gem.add_development_dependency("rake")
27
+ gem.add_development_dependency("test-unit")
28
+ gem.add_development_dependency("kpeg")
29
+ gem.add_development_dependency("pygments.rb")
30
+ gem.add_development_dependency("rubocop")
31
+ end
32
+
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html>
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:ops="http://www.idpf.org/2007/ops" xml:lang="<%= @language %>">
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <% if @stylesheets.present? %>
7
+ <% @stylesheets.each do |style| %>
8
+ <link rel="stylesheet" type="text/css" href="<%= style %>" />
9
+ <% end %>
10
+ <% end%>
11
+ <meta name="generator" content="Re:VIEW" />
12
+ <title><%= @title %></title>
13
+ </head>
14
+ <body<%= @body_ext %>>
15
+ <%= @body %>
16
+ </body>
17
+ </html>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ops="http://www.idpf.org/2007/ops" xml:lang="<%= @language %>">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
6
+ <meta http-equiv="Content-Style-Type" content="text/css"/>
7
+ <% if @stylesheets.present? %>
8
+ <% @stylesheets.each do |style| %>
9
+ <link rel="stylesheet" type="text/css" href="<%= style %>" />
10
+ <% end %>
11
+ <% end%>
12
+ <meta name="generator" content="Re:VIEW"/>
13
+ <title><%= @title %></title>
14
+ </head>
15
+ <body<%= @body_ext %>>
16
+ <% if @error_messages %><%= @error_messages %><% end %>
17
+ <% if @warning_messages %><%= @warning_messages %><% end %>
18
+ <%= @body %>
19
+ </body>
20
+ </html>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
3
+ <head>
4
+ <meta name="dtb:depth" content="1"/>
5
+ <meta name="dtb:totalPageCount" content="0"/>
6
+ <meta name="dtb:maxPageNumber" content="0"/>
7
+ <%= @ncx_isbn %>
8
+ </head>
9
+ <%= @ncx_doctitle %>
10
+ <%= @ncx_navmap %>
11
+ </ncx>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId">
3
+ <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
4
+ <%= @opf_metainfo %>
5
+ <%= @opf_coverimage %>
6
+ </metadata>
7
+ <%= @opf_manifest %>
8
+ <%= @opf_toc %>
9
+ <guide>
10
+ <reference type="cover" title="<%= @producer.res.v("covertitle") %>" href="<%= @producer.params["cover"] %>"/>
11
+ <% if @producer.params["titlepage"].present? %>
12
+ <reference type="title-page" title="<%= @producer.res.v("titlepagetitle") %>" href="titlepage.<%= @producer.params["htmlext"] %>"/>
13
+ <% end %>
14
+ <% if @producer.params["mytoc"].present? %>
15
+ <reference type="toc" title="<%= @producer.res.v("toctitle") %>" href="<%= @producer.params["bookname"] %>-toc.<%= @producer.params["htmlext"] %>"/>
16
+ <% end %>
17
+ <% if @producer.params["colophon"].present? %>
18
+ <reference type="colophon" title="<%= @producer.res.v("colophontitle") %>" href="colophon.<%= @producer.params["htmlext"] %>"/>
19
+ <% end %>
20
+ </guide>
21
+ </package>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" xml:lang="<%= @producer.params["language"] %>">
3
+ <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
4
+ <%= @opf_metainfo %>
5
+ </metadata>
6
+ <%= @opf_manifest %>
7
+ <%= @opf_toc %>
8
+ <guide>
9
+ <reference type="cover" title="<%= @producer.res.v("covertitle") %>" href="<%= @producer.params["cover"] %>"/>
10
+ <% if @producer.params["titlepage"].present? %>
11
+ <reference type="title-page" title="<%= @producer.res.v("titlepagetitle") %>" href="titlepage.<%= @producer.params["htmlext"] %>"/>
12
+ <% end %>
13
+ <reference type="toc" title="<%= @producer.res.v("toctitle") %>" href="<%= @producer.params["bookname"] %>-toc.<%= @producer.params["htmlext"] %>"/>
14
+ <% if @producer.params["colophon"].present? %>
15
+ <reference type="colophon" title="<%= @producer.res.v("colophontitle") %>" href="colophon.<%= @producer.params["htmlext"] %>"/>
16
+ <% end %>
17
+ </guide>
18
+ </package>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
3
+ <rootfiles>
4
+ <rootfile full-path="<%= @opf_path %>" media-type="application/oebps-package+xml" />
5
+ </rootfiles>
6
+ </container>
data/test/CHAPS ADDED
@@ -0,0 +1,2 @@
1
+ test.re
2
+ bib.re
@@ -0,0 +1,3 @@
1
+ <test>
2
+ <name><%= @name %></name>
3
+ </test>
@@ -0,0 +1,255 @@
1
+ \documentclass[oneside]{jsbook}
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={Re:VIEW Sample Book},%
47
+ pdfauthor={}]{hyperref}
48
+
49
+
50
+
51
+ \newenvironment{reviewimage}{%
52
+ \begin{figure}[H]
53
+ \begin{center}}{%
54
+ \end{center}
55
+ \end{figure}}
56
+
57
+ \newenvironment{reviewdummyimage}{%
58
+ \begin{figure}[H]
59
+ \begin{center}\begin{alltt}}{%
60
+ \end{alltt}\end{center}
61
+ \end{figure}}
62
+
63
+ \newenvironment{reviewemlist}{%
64
+ \medskip\small\begin{shaded}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
65
+ \end{alltt}\end{shaded}}
66
+
67
+ \newenvironment{reviewlist}{%
68
+ \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
69
+ \end{alltt}\end{shaded}\par\vspace*{0.5zw}}
70
+
71
+ \newenvironment{reviewcmd}{%
72
+ \color{white}\medskip\small\begin{shadedb}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
73
+ \end{alltt}\end{shadedb}}
74
+
75
+ \newenvironment{reviewbox}{%
76
+ \medskip\small\begin{framed}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
77
+ \end{alltt}\end{framed}}
78
+
79
+ \newenvironment{reviewtable}[1]{%
80
+ \begin{center}\small\setlength{\baselineskip}{1.2zw}
81
+ \begin{tabular}{#1}}{%
82
+ \end{tabular}
83
+ \end{center}}
84
+
85
+ \newenvironment{reviewcolumn}{%
86
+ \begin{framed}
87
+ }{%
88
+ \end{framed}
89
+ \vspace{2zw}}
90
+
91
+ \newcommand{\reviewcolumnhead}[2]{%
92
+ {\noindent\large ■コラム: #2}}
93
+
94
+ \newcommand{\reviewtablecaption}[1]{%
95
+ \caption{#1}}
96
+
97
+ \newcommand{\reviewbackslash}[0]{%
98
+ \textbackslash{}}
99
+
100
+ \newcommand{\reviewlistcaption}[1]{%
101
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
102
+
103
+ \newcommand{\reviewemlistcaption}[1]{%
104
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
105
+
106
+ \newcommand{\reviewcmdcaption}[1]{%
107
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
108
+
109
+ \newcommand{\reviewindepimagecaption}[1]{%
110
+ \begin{center}#1\end{center}}
111
+
112
+ \newcommand{\reviewboxcaption}[1]{%
113
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
114
+
115
+ \newcommand{\reviewimageref}[2]{%
116
+ 図 #1}
117
+ \newcommand{\reviewtableref}[2]{%
118
+ 表 #1}
119
+ \newcommand{\reviewlistref}[1]{%
120
+ リスト #1}
121
+ \newcommand{\reviewbibref}[2]{%
122
+ #1}
123
+ \newcommand{\reviewcolumnref}[2]{%
124
+ コラム #1}
125
+ \newcommand{\reviewsecref}[2]{%
126
+ #1}
127
+
128
+ \newcommand{\reviewminicolumntitle}[1]{%
129
+ {\large ■メモ: #1}\\}
130
+
131
+
132
+
133
+ \newenvironment{reviewminicolumn}{%
134
+ \vspace{1.5zw}\begin{screen}}{%
135
+ \end{screen}\vspace{2zw}}
136
+
137
+ \newcommand{\reviewkw}[1]{%
138
+ \textbf{\textgt{#1}}}
139
+
140
+ \newcommand{\reviewami}[1]{%
141
+ \mask{#1}{A}}
142
+
143
+ \newcommand{\reviewem}[1]{%
144
+ \textbf{#1}}
145
+
146
+ \newcommand{\reviewstrong}[1]{%
147
+ \textbf{#1}}
148
+
149
+ %% @<del> is ignored in LaTeX with default style
150
+ \newcommand{\reviewstrike}[1]{#1}
151
+
152
+ %%%% for ulem.sty:
153
+ %%\renewcommand{\reviewstrike}[1]{\sout{#1}}
154
+ %%
155
+ %%%% for jumoline.sty:
156
+ %%\renewcommand{\reviewstrike}[1]{\Middleline{#1}}
157
+
158
+ \newcommand{\reviewth}[1]{%
159
+ \textgt{#1}}
160
+
161
+ \newcommand{\reviewtitlefont}[0]{%
162
+ \usefont{T1}{phv}{b}{n}\gtfamily}
163
+
164
+ \newcommand{\reviewmainfont}[0]{%
165
+ }
166
+
167
+ \newcommand{\reviewcolophon}[0]{%
168
+ \clearpage}
169
+ \newcommand{\reviewappendix}[0]{%
170
+ \appendix}
171
+
172
+ \makeatletter
173
+ %% maxwidth is the original width if it is less than linewidth
174
+ %% otherwise use linewidth (to make sure the graphics do not exceed the margin)
175
+ \def\maxwidth{%
176
+ \ifdim\Gin@nat@width>\linewidth
177
+ \linewidth
178
+ \else
179
+ \Gin@nat@width
180
+ \fi
181
+ }
182
+ \makeatother
183
+
184
+
185
+
186
+ \usepackage[T1]{fontenc}
187
+
188
+ \begin{document}
189
+
190
+ \reviewmainfont
191
+
192
+
193
+
194
+ \begin{titlepage}
195
+
196
+ \thispagestyle{empty}
197
+ \begin{center}%
198
+ \mbox{} \vskip5zw
199
+ \reviewtitlefont%
200
+ {\Huge Re:VIEW Sample Book \par}%
201
+ \vskip 15em%
202
+ {\huge
203
+ \lineskip .75em
204
+ \begin{tabular}[t]{c}%
205
+
206
+ \end{tabular}\par}%
207
+ \vfill
208
+ {\large 2011-01-01 版\hspace{2zw} 発行\par}%
209
+ \vskip4zw\mbox{}
210
+ \end{center}%
211
+ \end{titlepage}
212
+
213
+
214
+
215
+ \renewcommand{\chaptermark}[1]{{}}
216
+ \frontmatter
217
+
218
+ %%% originaltitle
219
+
220
+
221
+ %%% credit
222
+
223
+
224
+
225
+ %% preface
226
+
227
+
228
+
229
+
230
+ \renewcommand{\chaptermark}[1]{\markboth{\prechaptername\thechapter\postchaptername~#1}{}}
231
+ \mainmatter
232
+
233
+ \renewcommand{\chaptermark}[1]{\markboth{\appendixname\thechapter~#1}{}}
234
+ \reviewappendix
235
+
236
+
237
+ %% backmatter begins
238
+
239
+
240
+
241
+
242
+
243
+ %%% profile
244
+
245
+
246
+ %%% advfile
247
+
248
+
249
+ %%% colophon
250
+
251
+
252
+ %%% backcover
253
+
254
+
255
+ \end{document}
@@ -0,0 +1,32 @@
1
+
2
+
3
+
4
+
5
+
6
+ %%% profile
7
+
8
+ \thispagestyle{empty}\chapter*{Profile}
9
+ some profile
10
+
11
+
12
+
13
+ %%% advfile
14
+
15
+ \thispagestyle{empty}\chapter*{Ad}
16
+ some ad content
17
+
18
+
19
+
20
+ %%% colophon
21
+
22
+
23
+ %%% backcover
24
+
25
+ \clearpage
26
+ \thispagestyle{empty}\AddToShipoutPictureBG{%
27
+ \AtPageLowerLeft{\includegraphics[width=\paperwidth,height=\paperheight]{images/backcover.png}}
28
+ }
29
+ \null
30
+
31
+
32
+ \end{document}
data/test/bib.re ADDED
@@ -0,0 +1,13 @@
1
+
2
+ //bibpaper[lins][Lins, 1991]{
3
+ Refael D. Lins. A shared memory architecture for parallel study of
4
+ algorithums for cyclic reference_counting. Technical Report 92,
5
+ Computing Laboratory, The University of Kent at Canterbury , August
6
+ 1991
7
+ //}
8
+
9
+ //bibpaper[nari][nari, 1991]{
10
+ nari paper
11
+ //}
12
+
13
+ //bibpaper[nari][Hogefuge]