review 2.3.0 → 2.4.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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +90 -66
  3. data/.travis.yml +1 -1
  4. data/Gemfile +0 -1
  5. data/NEWS.ja.md +82 -0
  6. data/NEWS.md +83 -0
  7. data/README.md +5 -3
  8. data/Rakefile +8 -8
  9. data/bin/review +1 -5
  10. data/bin/review-catalog-converter +22 -27
  11. data/bin/review-check +36 -43
  12. data/bin/review-checkdep +10 -15
  13. data/bin/review-compile +37 -55
  14. data/bin/review-epubmaker +4 -5
  15. data/bin/review-index +21 -29
  16. data/bin/review-init +26 -37
  17. data/bin/review-pdfmaker +0 -2
  18. data/bin/review-preproc +25 -45
  19. data/bin/review-validate +19 -18
  20. data/bin/review-vol +15 -27
  21. data/doc/config.yml.sample +5 -2
  22. data/doc/format.ja.md +20 -1
  23. data/doc/format.md +21 -5
  24. data/doc/images/review-generate.png +0 -0
  25. data/lib/epubmaker.rb +1 -3
  26. data/lib/epubmaker/content.rb +24 -27
  27. data/lib/epubmaker/epubcommon.rb +135 -148
  28. data/lib/epubmaker/epubv2.rb +39 -46
  29. data/lib/epubmaker/epubv3.rb +93 -103
  30. data/lib/epubmaker/producer.rb +138 -151
  31. data/lib/epubmaker/zip_exporter.rb +21 -26
  32. data/lib/review/book.rb +3 -6
  33. data/lib/review/book/base.rb +78 -103
  34. data/lib/review/book/chapter.rb +36 -40
  35. data/lib/review/book/compilable.rb +28 -31
  36. data/lib/review/book/image_finder.rb +6 -13
  37. data/lib/review/book/index.rb +100 -121
  38. data/lib/review/book/page_metric.rb +2 -7
  39. data/lib/review/book/part.rb +18 -20
  40. data/lib/review/book/volume.rb +9 -13
  41. data/lib/review/builder.rb +81 -116
  42. data/lib/review/catalog.rb +15 -19
  43. data/lib/review/compiler.rb +64 -83
  44. data/lib/review/configure.rb +87 -97
  45. data/lib/review/converter.rb +2 -7
  46. data/lib/review/epubbuilder.rb +1 -3
  47. data/lib/review/epubmaker.rb +213 -205
  48. data/lib/review/exception.rb +2 -4
  49. data/lib/review/extentions.rb +0 -1
  50. data/lib/review/extentions/hash.rb +2 -2
  51. data/lib/review/extentions/string.rb +5 -30
  52. data/lib/review/htmlbuilder.rb +320 -375
  53. data/lib/review/htmltoc.rb +4 -7
  54. data/lib/review/htmlutils.rb +29 -32
  55. data/lib/review/i18n.rb +33 -44
  56. data/lib/review/i18n.yml +3 -3
  57. data/lib/review/idgxmlbuilder.rb +309 -345
  58. data/lib/review/latexbuilder.rb +175 -212
  59. data/lib/review/latexindex.rb +2 -8
  60. data/lib/review/latexutils.rb +33 -43
  61. data/lib/review/lineinput.rb +1 -1
  62. data/lib/review/logger.rb +21 -0
  63. data/lib/review/makerhelper.rb +1 -4
  64. data/lib/review/markdownbuilder.rb +44 -53
  65. data/lib/review/md2inaobuilder.rb +6 -12
  66. data/lib/review/pdfmaker.rb +143 -173
  67. data/lib/review/preprocessor.rb +64 -101
  68. data/lib/review/rstbuilder.rb +126 -158
  69. data/lib/review/sec_counter.rb +18 -34
  70. data/lib/review/template.rb +4 -5
  71. data/lib/review/textbuilder.rb +2 -3
  72. data/lib/review/textutils.rb +7 -13
  73. data/lib/review/tocparser.rb +31 -56
  74. data/lib/review/tocprinter.rb +26 -52
  75. data/lib/review/topbuilder.rb +219 -247
  76. data/lib/review/unfold.rb +15 -24
  77. data/lib/review/version.rb +1 -1
  78. data/lib/review/webmaker.rb +75 -99
  79. data/lib/review/webtocprinter.rb +15 -20
  80. data/lib/review/yamlloader.rb +13 -15
  81. data/review.gemspec +20 -22
  82. data/templates/latex/layout.tex.erb +2 -2
  83. data/templates/opf/epubv2.opf.erb +7 -7
  84. data/templates/opf/epubv3.opf.erb +7 -7
  85. data/templates/web/html/layout-html5.html.erb +2 -2
  86. data/test/assets/black.eps +280 -0
  87. data/test/assets/fit.png +0 -0
  88. data/test/assets/large.gif +0 -0
  89. data/test/assets/large.jpg +0 -0
  90. data/test/assets/large.png +0 -0
  91. data/test/assets/large.svg +65 -0
  92. data/test/assets/test_template.tex +1 -1
  93. data/test/book_test_helper.rb +2 -2
  94. data/test/run_test.rb +4 -4
  95. data/test/sample-book/src/Rakefile +21 -22
  96. data/test/syntax-book/Gemfile +4 -0
  97. data/test/syntax-book/Rakefile +72 -0
  98. data/test/syntax-book/appA.re +22 -0
  99. data/test/syntax-book/bib.re +6 -0
  100. data/test/syntax-book/catalog.yml +15 -0
  101. data/test/syntax-book/ch01.re +136 -0
  102. data/test/syntax-book/ch02.re +351 -0
  103. data/test/syntax-book/ch03.re +82 -0
  104. data/test/syntax-book/config.yml +35 -0
  105. data/test/syntax-book/images/ball.png +0 -0
  106. data/test/syntax-book/images/cover.jpg +0 -0
  107. data/test/syntax-book/images/fractal.png +0 -0
  108. data/test/syntax-book/images/img3-1.png +0 -0
  109. data/test/syntax-book/images/inlineicon.jpg +0 -0
  110. data/test/syntax-book/images/logic.png +0 -0
  111. data/test/syntax-book/images/logic2.png +0 -0
  112. data/test/syntax-book/images/puzzle.jpg +0 -0
  113. data/test/syntax-book/images/table.jpg +0 -0
  114. data/test/syntax-book/part2.re +6 -0
  115. data/test/syntax-book/pre01.re +26 -0
  116. data/test/syntax-book/review-ext.rb +14 -0
  117. data/test/syntax-book/sty/jumoline.sty +310 -0
  118. data/test/syntax-book/sty/reviewmacro.sty +39 -0
  119. data/test/syntax-book/style.css +494 -0
  120. data/test/syntax-book/syntax.dic +2 -0
  121. data/test/test_book.rb +106 -111
  122. data/test/test_book_chapter.rb +21 -22
  123. data/test/test_book_part.rb +3 -5
  124. data/test/test_builder.rb +11 -22
  125. data/test/test_catalog.rb +17 -18
  126. data/test/test_catalog_converter_cmd.rb +5 -5
  127. data/test/test_compiler.rb +18 -16
  128. data/test/test_configure.rb +35 -38
  129. data/test/test_converter.rb +3 -4
  130. data/test/test_epub3maker.rb +136 -117
  131. data/test/test_epubmaker.rb +107 -114
  132. data/test/test_epubmaker_cmd.rb +2 -4
  133. data/test/test_extentions_hash.rb +32 -33
  134. data/test/test_helper.rb +9 -11
  135. data/test/test_htmlbuilder.rb +454 -420
  136. data/test/test_htmltoc.rb +8 -12
  137. data/test/test_htmlutils.rb +0 -2
  138. data/test/test_i18n.rb +159 -150
  139. data/test/test_idgxmlbuilder.rb +190 -197
  140. data/test/test_image_finder.rb +21 -22
  141. data/test/test_index.rb +24 -29
  142. data/test/test_latexbuilder.rb +274 -264
  143. data/test/test_lineinput.rb +7 -10
  144. data/test/test_location.rb +7 -7
  145. data/test/test_makerhelper.rb +13 -25
  146. data/test/test_markdownbuilder.rb +23 -26
  147. data/test/test_md2inaobuilder.rb +8 -11
  148. data/test/test_pdfmaker.rb +114 -123
  149. data/test/test_pdfmaker_cmd.rb +1 -3
  150. data/test/test_review_ext.rb +3 -5
  151. data/test/test_rstbuilder.rb +92 -97
  152. data/test/test_template.rb +3 -7
  153. data/test/test_textutils.rb +27 -27
  154. data/test/test_tocparser.rb +2 -2
  155. data/test/test_topbuilder.rb +98 -103
  156. data/test/test_webtocprinter.rb +5 -6
  157. data/test/test_yamlloader.rb +42 -42
  158. data/test/test_zip_exporter.rb +12 -18
  159. metadata +86 -9
  160. data/lib/review/ewbbuilder.rb +0 -382
@@ -0,0 +1,6 @@
1
+ = 部見出し■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□
2
+ //lead{
3
+ 部のリード。部はcatalog.ymlで直接指定することもできるし(その場合は見出しのみとなる)、reファイルで内容を記述することもできるようにしています。部の番号表記をIにしたり1にしたりするのはi18n.yml/locale.ymlの定義です。
4
+ //}
5
+
6
+ #@# どこまで対処するかですが、部にさらに本文やリードが入る、というパターンの本はあります。
@@ -0,0 +1,26 @@
1
+ = 前書き
2
+ PREDEF内に列挙したものは前付として章採番なしです。後付のPOSTDEFも同様。
3
+
4
+ PREDEF内/POSTDEFのリストの採番表記は「リスト1」のようになります: @<list>{main1}
5
+
6
+ (正確にはi18n.yml/locale.ymlのformat_number_header_without_chapterが使われます)
7
+
8
+ //list[main1][main()]{
9
+ int
10
+ main(int argc, char **argv)
11
+ {
12
+ puts("OK");
13
+ return 0;
14
+ }
15
+ //}
16
+
17
+ 図(@<img>{fractal})、表(@<table>{tbl1})も同様に章番号なしです。
18
+
19
+ //image[fractal][フラクタル][latex::width=80mm]{
20
+ //}
21
+
22
+ //table[tbl1][前付表]{
23
+ A B
24
+ -----------------
25
+ C D
26
+ //}
@@ -0,0 +1,14 @@
1
+ require 'review'
2
+
3
+ module ReVIEW
4
+ class HTMLBuilder
5
+ def inline_balloon(str)
6
+ %Q(<span class="balloon">#{escape_html(str)}</span>)
7
+ end
8
+ end
9
+ class LATEXBuilder
10
+ def inline_balloon(str)
11
+ %Q(←#{escape(str)})
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,310 @@
1
+ %%
2
+ %% This is file `jumoline.sty',
3
+ %% generated with the docstrip utility.
4
+ %%
5
+ %% The original source files were:
6
+ %%
7
+ %% jumoline.dtx (with options: `package')
8
+ %%
9
+ %% IMPORTANT NOTICE:
10
+ %%
11
+ %% For the copyright see the source file.
12
+ %%
13
+ %% Any modified versions of this file must be renamed
14
+ %% with new filenames distinct from jumoline.sty.
15
+ %%
16
+ %% For distribution of the original source see the terms
17
+ %% for copying and modification in the file jumoline.dtx.
18
+ %%
19
+ %% This generated file may be distributed as long as the
20
+ %% original source files, as listed above, are part of the
21
+ %% same distribution. (The sources need not necessarily be
22
+ %% in the same archive or directory.)
23
+ %% Style file `jumoline'.
24
+ %% Copyright (C) 1999-2001 Hiroshi Nakashima
25
+ %% (Toyohashi Univ. of Tech.)
26
+ %%
27
+ %% This program can be redistributed and/or modified under the terms
28
+ %% of the LaTeX Project Public License distributed from CTAN
29
+ %% archives in directory macros/latex/base/lppl.txt; either
30
+ %% version 1 of the License, or any later version.
31
+ %%
32
+ %% \CharacterTable
33
+ %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
34
+ %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
35
+ %% Digits \0\1\2\3\4\5\6\7\8\9
36
+ %% Exclamation \! Double quote \" Hash (number) \#
37
+ %% Dollar \$ Percent \% Ampersand \&
38
+ %% Acute accent \' Left paren \( Right paren \)
39
+ %% Asterisk \* Plus \+ Comma \,
40
+ %% Minus \- Point \. Solidus \/
41
+ %% Colon \: Semicolon \; Less than \<
42
+ %% Equals \= Greater than \> Question mark \?
43
+ %% Commercial at \@ Left bracket \[ Backslash \\
44
+ %% Right bracket \] Circumflex \^ Underscore \_
45
+ %% Grave accent \` Left brace \{ Vertical bar \|
46
+ %% Right brace \} Tilde \~}
47
+ %%
48
+ %%
49
+ \def\next{LaTeX2e}
50
+ \ifx\fmtname\next
51
+ \def\next{
52
+ \NeedsTeXFormat{LaTeX2e}[1994/12/01]
53
+ \ProvidesPackage{jumoline}}
54
+ \else\def\next[#1]{}\fi
55
+ \next
56
+ [2001/05/31 v1.2 ]
57
+
58
+ \ifx\PackageError\undefined
59
+ \def\PackageError#1#2#3{\@latexerr{#1:#2}{#3^^J\@ehc}}
60
+ \fi
61
+
62
+ %%^L
63
+
64
+ %% Register Declaration
65
+
66
+ \newdimen\UnderlineDepth \UnderlineDepth-\maxdimen
67
+ \newdimen\MidlineHeight \MidlineHeight-\maxdimen
68
+ \newdimen\OverlineHeight \OverlineHeight-\maxdimen
69
+ \newdimen\UMOlineThickness \UMOlineThickness.4pt
70
+
71
+ \newdimen\UMO@height \newdimen\UMO@depth
72
+ \newdimen\UMO@dqspace \newdimen\UMO@tempdim
73
+
74
+ \newskip\UMO@prejfmglue \newskip\UMO@postjfmglue
75
+
76
+ \newcount\UMO@mode
77
+ \let\UMO@afterblock\z@
78
+ \let\UMO@afterword\@ne
79
+ \let\UMO@afterchar\tw@
80
+
81
+ \newcount\UMO@spacefactor
82
+ \newcount\UMO@firstxspcode
83
+ \newcount\UMO@lastxspcode
84
+ \newcount\UMO@inhibitxspcode
85
+ \newcount\UMO@prebreakpenalty
86
+ \newcount\UMO@postbreakpenalty
87
+ \newcount\UMO@kpostbreakpenalty
88
+
89
+ \newif\ifUMO@nospace \newif\ifUMO@firstelem
90
+
91
+ %%^L
92
+
93
+ %% User Interface and Initialization
94
+
95
+ \def\Underline{\UMO@line\UnderlineDepth{-\UnderlineDepth}{-\dp\strutbox}}
96
+ \def\Midline{\setbox\@tempboxa\hbox{あ}%
97
+ \UMO@line\MidlineHeight\MidlineHeight{.5\ht\@tempboxa}}
98
+ \def\Overline{\UMO@line\OverlineHeight\OverlineHeight{\ht\strutbox}}
99
+ \def\UMOline{\UMO@line{-\maxdimen}\z@}
100
+
101
+ \def\UMO@line#1#2#3#4{\begingroup \let\\\UMOnewline
102
+ \relax\ifdim#1<\z@ \UMO@height#3\relax
103
+ \else \UMO@height#2\relax \fi
104
+ \UMO@depth-\UMO@height
105
+ \ifdim\UMO@height<\z@ \advance\UMO@depth\UMOlineThickness
106
+ \else \advance\UMO@height\UMOlineThickness \fi
107
+ \settowidth\UMO@dqspace{“}\advance\UMO@dqspace-1zw
108
+ \UMO@dqspace-\UMO@dqspace \divide\UMO@dqspace\tw@
109
+ \UMO@nospacetrue \UMO@firstelemtrue
110
+ \UMO@mode\UMO@afterblock
111
+ \ifvmode\leavevmode\fi
112
+ \def\@tempa{#4 }\edef\@tempb{\noexpand\@nil\space}%
113
+ \expandafter\expandafter\expandafter\UMO@wordloop
114
+ \expandafter\@tempa\@tempb
115
+ \endgroup \UMO@aftergroup}
116
+
117
+ %%^L
118
+
119
+ %% Processing Word Elements
120
+
121
+ \def\UMO@wordloop{\UMO@ifbgroup\UMO@wordblock\UMO@iwordloop}
122
+ \def\UMO@ifbgroup#1#2{\let\@tempa#1\let\@tempb#2\futurelet\@tempc\UMO@ifnc}
123
+ \def\UMO@ifnc{\ifx\@tempc\bgroup \let\next\@tempa \else\let\next\@tempb \fi
124
+ \next}
125
+ \def\UMO@wordblock#1{\UMO@spaceskip
126
+ \UMO@putbox\relax{#1}\UMO@nospacetrue \UMO@mode\UMO@afterblock
127
+ \UMO@spacefactor\@m \UMO@wordloop}
128
+ \def\UMO@iwordloop#1 {\def\@tempa{#1}\ifx\@tempa\@nnil \let\next\UMO@end
129
+ \else
130
+ \ifx\@tempa\empty \UMO@nospacefalse
131
+ \else
132
+ \UMO@spaceskip \UMO@mode\UMO@afterblock
133
+ \def\UMO@theword{}\UMO@firstxspcode\m@ne
134
+ \UMO@charloop#1\@nil \fi
135
+ \let\next\UMO@wordloop \fi
136
+ \next}
137
+
138
+ %%^L
139
+
140
+ %% Interword Spacing
141
+
142
+ \def\UMO@spaceskip{\ifUMO@nospace \UMO@nospacefalse \else
143
+ \ifdim\spaceskip=\z@
144
+ \@tempdima\fontdimen3\font\relax
145
+ \multiply\@tempdima\UMO@spacefactor \divide\@tempdima\@m
146
+ \@tempdimb\fontdimen4\font\relax \multiply\@tempdimb\@m
147
+ \divide\@tempdimb\UMO@spacefactor
148
+ \@tempskipa\fontdimen2\font plus\@tempdima minus\@tempdimb\relax
149
+ \else
150
+ \edef\@tempa{\the\spaceskip\space @ @ @ @ }%
151
+ \expandafter\UMO@setspaceskip\@tempa\@nil
152
+ \fi
153
+ \ifnum\UMO@spacefactor<2000\else
154
+ \ifdim\xspaceskip=\z@ \advance\@tempskipa\fontdimen7\font
155
+ \else \@tempskipa\xspaceskip
156
+ \fi\fi
157
+ \UMO@skip\@tempskipa \fi}
158
+ \def\UMO@setspaceskip#1 #2 #3 #4 #5 #6\@nil{\@tempdima\z@ \@tempdimb\z@
159
+ \def\@tempa{#2}\def\@tempb{#3}%
160
+ \ifx\@tempa\UMO@plus \@tempdima#3\def\@tempa{#4}\def\@tempb{#5}\fi
161
+ \ifx\@tempa\UMO@minus \@tempdimb\@tempb\relax\fi
162
+ \multiply\@tempdima\UMO@specefactor \divide\@tempdima\@m
163
+ \multiply\@tempdimb\@m \divide\UMO@spacefactor
164
+ \@tempskipa#1 plus\@tempdima minus\@tempdimb\relax}
165
+ \def\@tempa#1 #2 #3 #4 #5\@nil{\def\UMO@plus{#2}\def\UMO@minus{#4}}
166
+ \@tempskipa1pt plus 2pt minus 3pt
167
+ \expandafter\@tempa\the\@tempskipa\@nil
168
+
169
+ %%^L
170
+
171
+ %% Processing Characters
172
+
173
+ \def\UMO@charloop{\UMO@ifbgroup\UMO@charblock\UMO@icharloop}
174
+ \def\UMO@charblock#1{\UMO@putword
175
+ \UMO@putbox\relax{#1}\UMO@mode\UMO@afterblock \UMO@spacefactor\@m
176
+ \UMO@charloop}
177
+ \def\UMO@icharloop#1{\def\@tempa{#1}%
178
+ \ifx\@tempa\@nnil \UMO@putword \let\next\relax
179
+ \else\ifx\UMOspace#1\relax \UMO@putword \let\next\UMO@space
180
+ \else\ifx\UMOnewline#1\relax \UMO@putword \let\next\UMO@newline
181
+ \else
182
+ \ifnum`#1<256\relax \edef\UMO@theword{\UMO@theword#1}%
183
+ \ifnum\UMO@firstxspcode<\z@
184
+ \UMO@firstxspcode\xspcode`#1\relax
185
+ \UMO@prebreakpenalty\prebreakpenalty`#1\relax
186
+ \fi
187
+ \UMO@lastxspcode\xspcode`#1\relax
188
+ \UMO@postbreakpenalty\postbreakpenalty`#1\relax
189
+ \else \UMO@putword \UMO@putchar{#1}\UMO@spacefactor\@m\fi
190
+ \let\next\UMO@charloop \fi\fi\fi \next}
191
+ \def\UMOspace{\PackageError{jumoline}%
192
+ {\string\UMOspace\space cannot be used here.}%
193
+ {\string\UMOspace\space can be used only in the argument of
194
+ \string\Underline\space and its relatives.}}
195
+ \def\UMOnewline{\PackageError{jumoline}%
196
+ {\string\UMOnewline\space cannot be used here.}%
197
+ {\string\UMOnewline\space can be used only in the argument of
198
+ \string\Underline\space and its relatives.}}
199
+
200
+ %%^L
201
+
202
+ %% Put ASCII String
203
+
204
+ \def\UMO@putword{\ifx\UMO@theword\empty\else
205
+ \ifnum\UMO@mode=\UMO@afterchar
206
+ \advance\UMO@kpostbreakpenalty\UMO@prebreakpenalty
207
+ \penalty\UMO@kpostbreakpenalty
208
+ \ifdim\UMO@postjfmglue>\z@ \UMO@skip\UMO@postjfmglue
209
+ \else\ifodd\UMO@inhibitxspcode \ifodd\UMO@firstxspcode
210
+ \UMO@skip\xkanjiskip \fi\fi\fi\fi
211
+ \setbox\@tempboxa\hbox{%
212
+ \UMO@theword\global\UMO@spacefactor\spacefactor}%
213
+ \UMO@putbox\relax\UMO@theword \UMO@mode\UMO@afterword
214
+ \def\UMO@theword{}\fi \UMO@firstxspcode\m@ne}
215
+
216
+ %%^L
217
+
218
+ %% Put Kanji Letter
219
+
220
+ \def\UMO@putchar#1{%
221
+ \ifnum\UMO@mode=\UMO@afterchar \UMO@prejfmglue\UMO@postjfmglue
222
+ \else \UMO@prejfmglue\z@ \fi
223
+ \UMO@postjfmglue\z@
224
+ \ifnum`#1<\kuten"1001\relax\UMO@setjfmglue{#1}\fi
225
+ \@tempskipa\UMO@prejfmglue
226
+ \UMO@inhibitxspcode\inhibitxspcode`#1\relax
227
+ \@tempcnta\prebreakpenalty`#1\relax
228
+ \ifnum\UMO@mode=\UMO@afterchar
229
+ \advance\@tempcnta\UMO@kpostbreakpenalty
230
+ \ifdim\UMO@prejfmglue=\z@ \@tempskipa\kanjiskip \fi
231
+ \else\ifnum\UMO@mode=\UMO@afterword
232
+ \advance\@tempcnta\UMO@postbreakpenalty
233
+ \ifdim\UMO@prejfmglue=\z@
234
+ \ifnum\UMO@lastxspcode>\@ne \ifnum\UMO@inhibitxspcode>\@ne
235
+ \@tempskipa\xkanjiskip \fi\fi\fi\fi\fi
236
+ \penalty\@tempcnta
237
+ \edef\@tempa{\the\@tempskipa}\ifx\@tempa\UMO@zskip\else
238
+ \UMO@skip\@tempskipa \fi
239
+ \UMO@putbox\inhibitglue{#1}%
240
+ \UMO@kpostbreakpenalty\postbreakpenalty`#1\relax
241
+ \UMO@mode\UMO@afterchar}
242
+ \@tempskipa\z@
243
+ \edef\UMO@zskip{\the\@tempskipa}
244
+ \def\UMO@setjfmglue#1{%
245
+ \settowidth\@tempdima{あ#1}\settowidth\@tempdimb{あ\inhibitglue#1}%
246
+ \advance\@tempdima-\@tempdimb
247
+ \settowidth\UMO@tempdim{#1あ}\settowidth\@tempdimb{#1\inhibitglue あ}%
248
+ \advance\UMO@tempdim-\@tempdimb
249
+ \ifdim\@tempdima>\z@
250
+ \ifdim\UMO@tempdim>\z@
251
+ \@tempskipa\@tempdima minus\@tempdima\relax
252
+ \UMO@postjfmglue\UMO@tempdim minus\UMO@tempdim\relax
253
+ \else \@tempskipa\@tempdima minus\UMO@dqspace\relax \fi
254
+ \advance\UMO@prejfmglue\@tempskipa
255
+ \else \UMO@postjfmglue\UMO@tempdim minus\UMO@dqspace \fi}
256
+
257
+ %%^L
258
+
259
+ %% Draw Under/Mid/Overline
260
+
261
+ \def\UMO@putbox#1#2{\setbox\@tempboxa\hbox{#1#2#1}\@tempdima\wd\@tempboxa
262
+ \ifUMO@firstelem\else
263
+ \rlap{\vrule\@height\UMO@height\@depth\UMO@depth\@width\@tempdima}\fi
264
+ \box\@tempboxa
265
+ \ifUMO@firstelem \UMO@firstelemfalse
266
+ \llap{\vrule\@height\UMO@height\@depth\UMO@depth\@width\@tempdima}\fi}
267
+ \def\UMO@skip#1{%
268
+ \leaders\hrule\@height\UMO@height\@depth\UMO@depth\hskip#1\relax}
269
+
270
+ %%^L
271
+
272
+ %% Explicit Spacing and Line Breaking
273
+
274
+ \def\UMO@space{\UMO@mode\UMO@afterblock
275
+ \@ifstar\UMO@sspace\UMO@ispace}
276
+ \def\UMO@sspace#1{\vrule width\z@\nobreak\UMO@skip{#1}\UMO@charloop}
277
+ \def\UMO@ispace#1{\@tempskipa#1\relax
278
+ \@ifstar{\@tempswafalse\UMO@iispace}{\@tempswatrue\UMO@iispace}}
279
+ \def\UMO@iispace{\@ifnextchar[%]
280
+ {\UMO@penalty}%
281
+ {\UMO@skip\@tempskipa \UMO@charloop}}
282
+ \def\UMO@penalty[#1]{\@tempcnta#1\relax
283
+ \if@tempswa
284
+ \ifnum\@tempcnta<\z@ \@tempcnta-\@tempcnta \fi
285
+ \ifcase\@tempcnta \or
286
+ \@tempcnta\@lowpenalty \or
287
+ \@tempcnta\@medpenalty \or
288
+ \@tempcnta\@highpenalty \else
289
+ \@tempcnta\@M \fi
290
+ \ifnum#1<\z@ \@tempcnta-\@tempcnta \fi \fi
291
+ \penalty\@tempcnta \UMO@skip\@tempskipa \UMO@charloop}
292
+
293
+ \def\UMO@newline{\UMO@mode\UMO@afterblock
294
+ \@ifstar{\UMO@skip{0pt plus1fil}\break \UMO@charloop}%
295
+ {\hfil \break \UMO@charloop}}
296
+
297
+ %%^L
298
+
299
+ %% Finalization
300
+
301
+ \def\UMO@end{\ifnum\UMO@mode=\UMO@afterchar
302
+ \ifnum\UMO@kpostbreakpenalty>\z@
303
+ \penalty\UMO@kpostbreakpenalty \fi
304
+ \ifdim\UMO@postjfmglue>\z@
305
+ \UMO@skip\UMO@postjfmglue\fi \fi
306
+ \xdef\UMO@aftergroup{\ifnum\UMO@mode=\UMO@afterword
307
+ \spacefactor\number\UMO@spacefactor\fi}}
308
+ \endinput
309
+ %%
310
+ %% End of file `jumoline.sty'.
@@ -0,0 +1,39 @@
1
+ %% from review-pdfmaker
2
+ \usepackage{fancyhdr}
3
+ \pagestyle{fancy}
4
+ \lhead{\gtfamily\sffamily\bfseries\upshape \leftmark}
5
+ \chead{}
6
+ \rhead{\gtfamily\sffamily\bfseries\upshape \rightmark}
7
+ \renewcommand{\sectionmark}[1]{\markright{\thesection~#1}{}}
8
+ \renewcommand{\chaptermark}[1]{\markboth{\prechaptername\ \thechapter\ \postchaptername~#1}{}}
9
+ \renewcommand{\headfont}{\gtfamily\sffamily\bfseries}
10
+
11
+ \fancypagestyle{plainhead}{%
12
+ \fancyhead{}
13
+ \fancyfoot{} % clear all header and footer fields
14
+ \fancyfoot[CE,CO]{\thepage}
15
+ \renewcommand{\headrulewidth}{0pt}
16
+ \renewcommand{\footrulewidth}{0pt}}
17
+
18
+ %% using Helvetica as sans-serif
19
+ \renewcommand{\sfdefault}{phv}
20
+
21
+ %% for listings
22
+ %\renewcommand{\lstlistingname}{List}
23
+ %\lstset{%
24
+ % breaklines=true,%
25
+ % breakautoindent=false,%
26
+ % breakindent=0pt,%
27
+ % fontadjust=true,%
28
+ % backgroundcolor=\color{shadecolor},%
29
+ % frame=single,%
30
+ % framerule=0pt,%
31
+ % basicstyle=\ttfamily\scriptsize,%
32
+ % commentstyle=\color{reviewgreen},%
33
+ % identifierstyle=\color{reviewblue},%
34
+ % stringstyle=\color{reviewred},%
35
+ % keywordstyle=\bfseries\color{reviewdarkred},%
36
+ %}
37
+
38
+
39
+ \sloppy
@@ -0,0 +1,494 @@
1
+ @charset "utf-8";
2
+ /* Tatujin-Publishing */
3
+ /* Style sheet for epub */
4
+ /* Ver.0.8b1 */
5
+
6
+ /*
7
+ Scale & Rhythm
8
+ line-height 1.6
9
+ 16px = 1em
10
+ x:p:h1:h2:h3 = 12px:14px:16px:24px:30px
11
+ */
12
+ * {
13
+ }
14
+ body {
15
+ margin: 0;
16
+ padding: 0;
17
+ font-size: 1em;
18
+ line-height:1.6;
19
+ font-family: "ShinGoPro-Regular","ShinGo-Regular", sans-serif;
20
+ /*
21
+ word-break: normal;
22
+ -webkit-line-break: after-white-space;
23
+ */
24
+ }
25
+ p, ul, ol, dl, pre, table {
26
+ font-family: "ShinGo Regular","ShinGo R","新ゴR","新ゴ R", sans-serif;
27
+ font-size: 0.875em;
28
+ }
29
+ /* Heading */
30
+ h1 {
31
+ margin: 0 0 3em;
32
+ padding: 0.5em 0 0;
33
+ border-top: 14px #326450 solid;
34
+ text-align: left;
35
+ font-size: 1.875em;
36
+ font-weight: bold;
37
+ }
38
+ h2 {
39
+ margin: 3em 0 0.5em;
40
+ padding: 0.5em 0 0;
41
+ border-top: 2px #326450 solid;
42
+ text-align: left;
43
+ font-size: 1.5em;
44
+ font-weight: bold;
45
+ }
46
+ h3 {
47
+ margin: 3em 0 0.5em;
48
+ padding: 0;
49
+ text-align: left;
50
+ font-size: 1em;
51
+ font-weight: bold;
52
+ }
53
+ h4, h5, h6 {
54
+ margin:0.7em 0;
55
+ padding: 0;
56
+ text-align: left;
57
+ line-height: 1.6;
58
+ font-weight: bold;
59
+ }
60
+ /* Paragraph */
61
+ p {
62
+ margin:0.7em 0;
63
+ padding: 0;
64
+ text-align: left;
65
+ text-indent: 1em;
66
+ line-height: 1.6;
67
+ }
68
+ div.lead p {
69
+ color: #666;
70
+ line-height: 1.6;
71
+ font-size: 0.75em;
72
+ }
73
+ /* List */
74
+ ul, ol {
75
+ margin: 2em 0 2em 2em;
76
+ padding: 0;
77
+ list-style-position: outside;
78
+ }
79
+ ul > li,
80
+ ol > li {
81
+ margin: 0 0 0.7em 0;
82
+ padding: 0;
83
+ line-height: 1.6;
84
+ }
85
+ dl {
86
+ margin: 2em 0;
87
+ padding: 0;
88
+ }
89
+ dt {
90
+ margin: 0;
91
+ padding: 0;
92
+ font-weight: bold;
93
+ }
94
+ dd {
95
+ margin: 0 0 1em 2em;
96
+ padding: 0;
97
+ line-height: 1.6;
98
+ }
99
+ /* Table
100
+ p.tablecaptionではなく
101
+ table caption {}を使う方が良いかも?
102
+ */
103
+ table {
104
+ margin: 0 auto 2em auto;
105
+ border-collapse: collapse;
106
+ }
107
+ table tr th {
108
+ background-color: #eee;
109
+ border:1px #aaa solid;
110
+ font-size: 0.75em;
111
+ font-weight: normal;
112
+ }
113
+ table tr td {
114
+ padding: 0.3em;
115
+ border:1px #aaa solid;
116
+ font-size: 0.75em;
117
+ }
118
+ p.tablecaption, table caption {
119
+ margin: 0;
120
+ color: #666;
121
+ font-size: 0.75em;
122
+ font-weight: bold;
123
+ text-indent: 0;
124
+ }
125
+ /* Quote */
126
+ blockquote {
127
+ margin: 2em 0 2em 2em;
128
+ padding: 0.3em 1em;
129
+ border: 1px #aaa solid;
130
+ }
131
+ /* Column Block */
132
+ div.column {
133
+ margin: 2em 0 2em 2em;
134
+ padding: 0.3em 1em;
135
+ background-color: #eee;
136
+ -webkit-border-radius: 0.7em;
137
+ }
138
+ div.column *{
139
+ margin:0.7em 0;
140
+ }
141
+ div.column ul,
142
+ div.column ol {
143
+ list-style-position: inside;
144
+ }
145
+ /* Code Block */
146
+ /*
147
+ ※シンプルにできるかも
148
+ div.code {}
149
+ div.code pre.list,
150
+ div.code pre.cmd {}
151
+ div.code p.caption {}
152
+ */
153
+ div.code, div.caption-code, div.source-code, div.emlist-code, div.emlistnum-code {
154
+ margin: 1em 0 2em 2em;
155
+ padding: 0;
156
+ }
157
+ pre.emlist, pre.source, pre.list {
158
+ margin: 0;
159
+ padding: 5px;
160
+ border: 1px #aaa solid;
161
+ }
162
+ div p.caption {
163
+ margin: 0;
164
+ color: #666;
165
+ font-size: 0.75em;
166
+ font-weight: bold;
167
+ }
168
+ div.cmd-code pre.cmd {
169
+ margin: 0;
170
+ padding: 5px;
171
+ color: #ccc;
172
+ font-weight: bold;
173
+ background-color: #444;
174
+ -webkit-border-radius: 0.5em;
175
+ }
176
+ pre.cmd, pre.emlist, pre.list, pre.source {
177
+ white-space: pre-wrap;
178
+ }
179
+
180
+ /* Image Block */
181
+ /* div.image p.caption {}
182
+ ※captionをそろえた方が良いかも?*/
183
+ div.image {
184
+ margin: 2em auto;
185
+ padding: 0;
186
+ }
187
+ div.image img {
188
+ margin: 0 auto;
189
+ padding: 0;
190
+ display: block;
191
+ }
192
+ div.image p.caption {
193
+ margin: 0 auto;
194
+ text-align: center;
195
+ color: #666;
196
+ font-size: 0.75em;
197
+ font-weight: bold;
198
+ text-indent: 0;
199
+ }
200
+ /* Footnote Block */
201
+ /* p.footnoteはいらないかも? */
202
+ div.footnote {
203
+ }
204
+ div.footnote p.footnote {
205
+ color: #666;
206
+ line-height: 1.6;
207
+ font-size: 0.75em;
208
+ text-indent: 0;
209
+ }
210
+ /* Colophon */
211
+ div.colophon {
212
+ margin: 3em auto;
213
+ }
214
+ div.colophon p {
215
+ text-indent: 0;
216
+ }
217
+ div.colophon p.title {
218
+ font-size: 1.5em;
219
+ }
220
+ div.colophon table {
221
+ margin: 1em 0 2em;
222
+ border: none;
223
+ }
224
+ div.colophon table tr th {
225
+ background-color: #fff;
226
+ font-size: 1.2em;
227
+ font-weight: normal;
228
+ border: none;
229
+ }
230
+ div.colophon table tr td {
231
+ font-size: 1.2em;
232
+ font-weight: normal;
233
+ border: none;
234
+ }
235
+
236
+ /* Inline */
237
+ a[href],
238
+ a:link,
239
+ a:visited {
240
+ border-bottom: 1px dotted #531084;
241
+ text-decoration: none;
242
+ }
243
+ b {
244
+ font-weight: bold;
245
+ }
246
+ strong{
247
+ font-weight: bold;
248
+ }
249
+ em {
250
+ font-style: italic;
251
+ }
252
+ span.balloon {
253
+ font-size: 0.9em;
254
+ }
255
+ span.balloon:before {
256
+ content: "←";
257
+ }
258
+
259
+ /**
260
+ * from Rouge
261
+ */
262
+ .highlight table td { padding: 5px; }
263
+ .highlight table pre { margin: 0; }
264
+ .highlight .cm {
265
+ color: #999988;
266
+ font-style: italic;
267
+ }
268
+ .highlight .cp {
269
+ color: #999999;
270
+ font-weight: bold;
271
+ }
272
+ .highlight .c1 {
273
+ color: #999988;
274
+ font-style: italic;
275
+ }
276
+ .highlight .cs {
277
+ color: #999999;
278
+ font-weight: bold;
279
+ font-style: italic;
280
+ }
281
+ .highlight .c, .highlight .cd {
282
+ color: #999988;
283
+ font-style: italic;
284
+ }
285
+ .highlight .err {
286
+ color: #a61717;
287
+ background-color: #e3d2d2;
288
+ }
289
+ .highlight .gd {
290
+ color: #000000;
291
+ background-color: #ffdddd;
292
+ }
293
+ .highlight .ge {
294
+ color: #000000;
295
+ font-style: italic;
296
+ }
297
+ .highlight .gr {
298
+ color: #aa0000;
299
+ }
300
+ .highlight .gh {
301
+ color: #999999;
302
+ }
303
+ .highlight .gi {
304
+ color: #000000;
305
+ background-color: #ddffdd;
306
+ }
307
+ .highlight .go {
308
+ color: #888888;
309
+ }
310
+ .highlight .gp {
311
+ color: #555555;
312
+ }
313
+ .highlight .gs {
314
+ font-weight: bold;
315
+ }
316
+ .highlight .gu {
317
+ color: #aaaaaa;
318
+ }
319
+ .highlight .gt {
320
+ color: #aa0000;
321
+ }
322
+ .highlight .kc {
323
+ color: #000000;
324
+ font-weight: bold;
325
+ }
326
+ .highlight .kd {
327
+ color: #000000;
328
+ font-weight: bold;
329
+ }
330
+ .highlight .kn {
331
+ color: #000000;
332
+ font-weight: bold;
333
+ }
334
+ .highlight .kp {
335
+ color: #000000;
336
+ font-weight: bold;
337
+ }
338
+ .highlight .kr {
339
+ color: #000000;
340
+ font-weight: bold;
341
+ }
342
+ .highlight .kt {
343
+ color: #445588;
344
+ font-weight: bold;
345
+ }
346
+ .highlight .k, .highlight .kv {
347
+ color: #000000;
348
+ font-weight: bold;
349
+ }
350
+ .highlight .mf {
351
+ color: #009999;
352
+ }
353
+ .highlight .mh {
354
+ color: #009999;
355
+ }
356
+ .highlight .il {
357
+ color: #009999;
358
+ }
359
+ .highlight .mi {
360
+ color: #009999;
361
+ }
362
+ .highlight .mo {
363
+ color: #009999;
364
+ }
365
+ .highlight .m, .highlight .mb, .highlight .mx {
366
+ color: #009999;
367
+ }
368
+ .highlight .sb {
369
+ color: #d14;
370
+ }
371
+ .highlight .sc {
372
+ color: #d14;
373
+ }
374
+ .highlight .sd {
375
+ color: #d14;
376
+ }
377
+ .highlight .s2 {
378
+ color: #d14;
379
+ }
380
+ .highlight .se {
381
+ color: #d14;
382
+ }
383
+ .highlight .sh {
384
+ color: #d14;
385
+ }
386
+ .highlight .si {
387
+ color: #d14;
388
+ }
389
+ .highlight .sx {
390
+ color: #d14;
391
+ }
392
+ .highlight .sr {
393
+ color: #009926;
394
+ }
395
+ .highlight .s1 {
396
+ color: #d14;
397
+ }
398
+ .highlight .ss {
399
+ color: #990073;
400
+ }
401
+ .highlight .s {
402
+ color: #d14;
403
+ }
404
+ .highlight .na {
405
+ color: #008080;
406
+ }
407
+ .highlight .bp {
408
+ color: #999999;
409
+ }
410
+ .highlight .nb {
411
+ color: #0086B3;
412
+ }
413
+ .highlight .nc {
414
+ color: #445588;
415
+ font-weight: bold;
416
+ }
417
+ .highlight .no {
418
+ color: #008080;
419
+ }
420
+ .highlight .nd {
421
+ color: #3c5d5d;
422
+ font-weight: bold;
423
+ }
424
+ .highlight .ni {
425
+ color: #800080;
426
+ }
427
+ .highlight .ne {
428
+ color: #990000;
429
+ font-weight: bold;
430
+ }
431
+ .highlight .nf {
432
+ color: #990000;
433
+ font-weight: bold;
434
+ }
435
+ .highlight .nl {
436
+ color: #990000;
437
+ font-weight: bold;
438
+ }
439
+ .highlight .nn {
440
+ color: #555555;
441
+ }
442
+ .highlight .nt {
443
+ color: #000080;
444
+ }
445
+ .highlight .vc {
446
+ color: #008080;
447
+ }
448
+ .highlight .vg {
449
+ color: #008080;
450
+ }
451
+ .highlight .vi {
452
+ color: #008080;
453
+ }
454
+ .highlight .nv {
455
+ color: #008080;
456
+ }
457
+ .highlight .ow {
458
+ color: #000000;
459
+ font-weight: bold;
460
+ }
461
+ .highlight .o {
462
+ color: #000000;
463
+ font-weight: bold;
464
+ }
465
+ .highlight .w {
466
+ color: #bbbbbb;
467
+ }
468
+ .highlight {
469
+ background-color: #f8f8f8;
470
+ }
471
+ .rouge-table { border-spacing: 0 }
472
+ .rouge-gutter { text-align: right }
473
+
474
+ /**
475
+ * from EBPAJ EPUB 3 File Creation Guide sample style
476
+ *
477
+ * cf. http://ebpaj.jp/counsel/guide
478
+ */
479
+
480
+ /* image width definition(pacentage) */
481
+ .width-010per { width: 10%; }
482
+ .width-020per { width: 20%; }
483
+ .width-025per { width: 25%; }
484
+ .width-030per { width: 30%; }
485
+ .width-033per { width: 33%; }
486
+ .width-040per { width: 40%; }
487
+ .width-050per { width: 50%; }
488
+ .width-060per { width: 60%; }
489
+ .width-067per { width: 67%; }
490
+ .width-070per { width: 70%; }
491
+ .width-075per { width: 75%; }
492
+ .width-080per { width: 80%; }
493
+ .width-090per { width: 90%; }
494
+ .width-100per { width: 100%; }