review 2.5.0 → 3.0.0.preview1

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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +28 -10
  3. data/.travis.yml +11 -2
  4. data/NEWS.ja.md +89 -17
  5. data/NEWS.md +92 -0
  6. data/README.md +1 -1
  7. data/Rakefile +0 -13
  8. data/bin/review-catalog-converter +83 -37
  9. data/bin/review-check +17 -5
  10. data/bin/review-compile +1 -1
  11. data/bin/review-index +6 -0
  12. data/bin/review-init +3 -155
  13. data/bin/review-preproc +0 -5
  14. data/bin/review-validate +21 -7
  15. data/bin/review-vol +13 -5
  16. data/doc/config.yml.sample +12 -7
  17. data/doc/config.yml.sample-simple +1 -1
  18. data/doc/format.ja.md +39 -3
  19. data/doc/format.md +39 -3
  20. data/doc/format_idg.ja.md +0 -4
  21. data/doc/pdfmaker.ja.md +1 -1
  22. data/doc/pdfmaker.md +1 -1
  23. data/doc/sample.css +7 -0
  24. data/lib/epubmaker/content.rb +31 -12
  25. data/lib/epubmaker/epubcommon.rb +10 -3
  26. data/lib/epubmaker/epubv2.rb +11 -3
  27. data/lib/epubmaker/epubv3.rb +11 -3
  28. data/lib/epubmaker/producer.rb +55 -20
  29. data/lib/review/book/base.rb +63 -48
  30. data/lib/review/book/chapter.rb +19 -7
  31. data/lib/review/book/compilable.rb +5 -20
  32. data/lib/review/book/image_finder.rb +10 -3
  33. data/lib/review/book/index.rb +30 -9
  34. data/lib/review/book/part.rb +9 -6
  35. data/lib/review/book.rb +0 -14
  36. data/lib/review/builder.rb +110 -18
  37. data/lib/review/catalog.rb +24 -4
  38. data/lib/review/compiler.rb +3 -1
  39. data/lib/review/configure.rb +43 -9
  40. data/lib/review/epubmaker/reviewheaderlistener.rb +57 -0
  41. data/lib/review/epubmaker.rb +129 -85
  42. data/lib/review/htmlbuilder.rb +76 -58
  43. data/lib/review/htmlutils.rb +20 -13
  44. data/lib/review/i18n.rb +6 -2
  45. data/lib/review/idgxmlbuilder.rb +52 -41
  46. data/lib/review/init.rb +194 -0
  47. data/lib/review/latexbuilder.rb +118 -34
  48. data/lib/review/latexutils.rb +5 -5
  49. data/lib/review/logger.rb +2 -1
  50. data/lib/review/makerhelper.rb +1 -1
  51. data/lib/review/markdownbuilder.rb +66 -6
  52. data/lib/review/md2inaobuilder.rb +2 -2
  53. data/lib/review/pdfmaker.rb +74 -22
  54. data/lib/review/plaintextbuilder.rb +8 -4
  55. data/lib/review/preprocessor.rb +14 -17
  56. data/lib/review/sec_counter.rb +8 -2
  57. data/lib/review/textmaker.rb +2 -2
  58. data/lib/review/textutils.rb +9 -2
  59. data/lib/review/tocparser.rb +7 -4
  60. data/lib/review/tocprinter.rb +3 -1
  61. data/lib/review/version.rb +1 -1
  62. data/lib/review/webmaker.rb +19 -7
  63. data/lib/review/webtocprinter.rb +8 -4
  64. data/review.gemspec +4 -3
  65. data/templates/latex/config.erb +84 -0
  66. data/templates/latex/layout.tex.erb +76 -361
  67. data/templates/latex/review-jlreq/README.md +22 -0
  68. data/templates/latex/review-jlreq/review-base.sty +178 -0
  69. data/templates/latex/review-jlreq/review-custom.sty +1 -0
  70. data/templates/latex/review-jlreq/review-jlreq.cls +141 -0
  71. data/templates/latex/review-jlreq/review-style.sty +149 -0
  72. data/templates/latex/review-jlreq/reviewmacro.sty +8 -0
  73. data/templates/latex/review-jsbook/jumoline.sty +310 -0
  74. data/templates/latex/review-jsbook/plistings.sty +326 -0
  75. data/templates/latex/review-jsbook/review-base.sty +405 -0
  76. data/templates/latex/review-jsbook/review-custom.sty +1 -0
  77. data/templates/latex/review-jsbook/review-style.sty +38 -0
  78. data/templates/latex/review-jsbook/reviewmacro.sty +8 -0
  79. data/templates/latex-compat2/layout.tex.erb +387 -0
  80. data/test/assets/test_template.tex +105 -235
  81. data/test/assets/test_template_backmatter.tex +133 -14
  82. data/test/book_test_helper.rb +1 -1
  83. data/test/run_test.rb +2 -0
  84. data/test/sample-book/src/Rakefile +11 -6
  85. data/test/sample-book/src/config.yml +2 -2
  86. data/test/sample-book/src/sty/reviewmacro.sty +1 -39
  87. data/test/sample-book/src/style.css +6 -0
  88. data/test/syntax-book/config.yml +1 -1
  89. data/test/test_book.rb +13 -16
  90. data/test/test_book_chapter.rb +4 -10
  91. data/test/test_book_part.rb +4 -3
  92. data/test/test_catalog.rb +15 -4
  93. data/test/test_helper.rb +2 -2
  94. data/test/test_htmlbuilder.rb +78 -10
  95. data/test/test_htmlutils.rb +12 -5
  96. data/test/test_idgxmlbuilder.rb +1 -1
  97. data/test/test_latexbuilder.rb +94 -49
  98. data/test/test_latexbuilder_v2.rb +1077 -0
  99. data/test/test_logger.rb +20 -0
  100. data/test/test_markdownbuilder.rb +10 -0
  101. data/test/test_pdfmaker.rb +6 -7
  102. data/test/test_plaintextbuilder.rb +1 -1
  103. data/test/test_review_ext.rb +0 -1
  104. data/test/test_rstbuilder.rb +1 -1
  105. data/test/test_topbuilder.rb +19 -7
  106. data/test/test_webtocprinter.rb +14 -14
  107. data/{test/sample-book/src/vendor → vendor}/jumoline/README +0 -0
  108. data/{test/sample-book/src/vendor → vendor}/jumoline/jumoline.dtx +0 -0
  109. data/{test/sample-book/src/vendor → vendor}/jumoline/jumoline.ins +0 -0
  110. data/{test/sample-book/src/vendor → vendor}/jumoline/lppl.txt +0 -0
  111. data/vendor/plistings/.gitignore +9 -0
  112. data/vendor/plistings/LICENSE +21 -0
  113. data/vendor/plistings/README.md +18 -0
  114. data/vendor/plistings/plistings.sty +326 -0
  115. data/vendor/plistings/test1.tex +174 -0
  116. data/vendor/plistings/test2.tex +54 -0
  117. metadata +48 -19
  118. data/lib/review/unfold.rb +0 -129
  119. data/test/CHAPS +0 -2
  120. data/test/bib.re +0 -13
  121. data/test/test.re +0 -43
@@ -0,0 +1,141 @@
1
+ % Re:VIEW + jlreq
2
+ % Copyright 2018 Kenshi Muto <kmuto@debian.org>
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のパラメータのほうでやらせるべきか
17
+ %
18
+ % <<review-jlreq独自>>
19
+ % tombo:bleed(数値+単位) : 裁ち落とし幅。デフォルト3mm
20
+ % tombo:color(\colorの色またはcmykの組み合わせ) : トンボの色。デフォルトcmyk(全プレート)
21
+ % tombo:paper(トンボ入り紙面サイズ) : トンボを付けたときのサイズ。デフォルトは現在のサイズ+2インチ。a4, b5(ここでのbはJISサイズ)などを指定可能。{width, height}も指定可能…だが今はダメ(FIXME)
22
+ % tombo:show({}指定) : {trimmarks,banner,digital}からの組み合わせ。trimmarksはトンボマーク表示、bannerはファイル名+日付、digitalはデジタルトンボ情報を入れる (FIXME、{}がまだとれない)
23
+ % hyperrefの設定もやったほうがよさそう
24
+
25
+ % FIXME: Unused global option [book] が出るの嫌だ(実際はchapterに必要)
26
+ % \setkeyしたら別の影響が出る
27
+ \DeclareOption{book}{\OptionNotUsed}
28
+ \DeclareOption{dvipdfmx}{\OptionNotUsed}
29
+
30
+ % documentclassでのkeyval使用定義
31
+ \DeclareOption*{\rjreq@setkey}
32
+ \def\rjreq@setkey{\expandafter\@rjreq@setkey\expandafter{\CurrentOption}}
33
+ \def\@rjreq@setkey{\setkeys{rjreq}}
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
65
+
66
+ %% fixes to LaTeX2e
67
+ \RequirePackage{fix-cm,exscale}
68
+ \IfFileExists{latexrelease.sty}{}{\RequirePackage{fixltx2e}}
69
+ \IfFileExists{platexrelease.sty}{%% is bundled in TL16 or higher release version
70
+
71
+ \PassOptionsToPackage{nosetpagesize}{graphicx}%%for TL16 or higher version
72
+ }{}
73
+
74
+ % トンボ指定
75
+ \if@review@jlreq@tombo
76
+ % FIXME:パッケージオプションのtrimmarks_paper, showをどう渡すか
77
+ \RequirePackage{jlreq-trimmarks}
78
+ \fi
79
+
80
+ \def\maxwidth{%
81
+ \ifdim\Gin@nat@width>\linewidth
82
+ % \linewidth
83
+ \dimexpr\linewidth - 1\p@ - 3mm\relax
84
+ \else
85
+ % \Gin@nat@width
86
+ \dimexpr\Gin@nat@width - 1\p@ - 3mm\relax
87
+ \fi
88
+ }
89
+
90
+ % エンジンとドライバの情報。jlreq-trimmarksが定義されていればそっちから持ってくる。
91
+ % 定義されていなければjlreqから持ってくる
92
+ \def\review@jlreq@driver@luatex{luatex}
93
+ \def\review@jlreq@engine{}
94
+ \def\review@jlreq@driver{}
95
+ \ifdefined\jlreq@trimmarks@engine
96
+ \ifx l\jlreq@trimmarks@engine\def\review@jlreq@engine{lualatex}\fi
97
+ \ifx u\jlreq@trimmarks@engine\def\review@jlreq@engine{uplatex}\fi
98
+ \ifx p\jlreq@trimmarks@engine\def\review@jlreq@engine{platex}\fi
99
+ \else% jlreqから持ってくる
100
+ \ifx l\jlreq@engine\def\review@jlreq@engine{lualatex}\fi
101
+ \ifx u\jlreq@engine\def\review@jlreq@engine{uplatex}\fi
102
+ \ifx p\jlreq@engine\def\review@jlreq@engine{platex}\fi
103
+ \fi
104
+ \ifdefined\jlreq@trimmarks@driver
105
+ \ifx f\jlreq@trimmarks@driver\def\review@jlreq@driver{dvipdfmx}\fi
106
+ \ifx s\jlreq@trimmarks@driver\def\review@jlreq@driver{dvips}\fi
107
+ \ifx o\jlreq@trimmarks@driver\def\review@jlreq@driver{dviout}\fi
108
+ \else% jlreqから持ってくる
109
+ \ifx l\jlreq@engine
110
+ \def\review@jlreq@driver{luatex}
111
+ \else
112
+ \def\review@jlreq@driver{dvipdfmx}
113
+ \fi
114
+ \fi
115
+
116
+ \RequirePackage[\review@jlreq@driver]{graphicx}
117
+ \RequirePackage[\review@jlreq@driver,table]{xcolor}
118
+
119
+ % jlreq-trimmarksへ追加オプション渡し(事前にxcolorが必要)
120
+ % trimmarks_widthを指定したくなるケースはまずないとしてよいか…bannerもどうするか
121
+ \if@review@jlreq@tombo
122
+ \jlreqtrimmarkssetup{bleed_margin=\@review@jlreq@tombo@bleed,color=\@review@jlreq@tombo@color,banner=\@review@jlreq@tombo@banner}% デフォルトは3mm, cmyk
123
+ \fi
124
+
125
+ % TODO:documentoptionである程度指定したい
126
+ \RequirePackage[\review@jlreq@driver, bookmarks=true, bookmarksnumbered=true,
127
+ % colorlinks=true,
128
+ hidelinks,
129
+ setpagesize=false]{hyperref}[2016/06/24 v6.83q]
130
+ \RequirePackage[T1]{fontenc}
131
+ \RequirePackage{textcomp}%T1/TS1
132
+ \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
+ \RequirePackage{tikz}
138
+ \usetikzlibrary{calc}
139
+ \RequirePackage{multirow}
140
+ \RequirePackage{amsmath}
141
+ \RequirePackage{amssymb}
@@ -0,0 +1,149 @@
1
+ % コードリスト装飾のデフォルト
2
+ \RequirePackage{tcolorbox}
3
+ \tcbuselibrary{xparse,hooks,skins,breakable}
4
+
5
+ \newenvironment{reviewemlist}{%
6
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!10,colframe=black!10,boxrule=0mm,arc=0mm]\begin{alltt}}%
7
+ {\end{alltt}\end{tcolorbox}}
8
+
9
+ \newenvironment{reviewlist}{%
10
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\begin{alltt}}%
11
+ {\end{alltt}\end{tcolorbox}}
12
+
13
+ \newenvironment{reviewsource}{%
14
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=white,colframe=black,boxrule=0.15mm,arc=0mm]\begin{alltt}}%
15
+ {\end{alltt}\end{tcolorbox}}
16
+
17
+ \newenvironment{reviewcmd}{%
18
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,colback=black!99,colframe=black!99,boxrule=0mm,arc=0mm]\begin{alltt}\begingroup\color{white}\ignorespaces}%
19
+ {\endgroup\end{alltt}\end{tcolorbox}}
20
+
21
+ % 囲み記事
22
+ \newenvironment{reviewnote}[1][]{%
23
+ \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]}
24
+ {\end{tcolorbox}}
25
+
26
+ \newenvironment{reviewmemo}[1][]{%
27
+ \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]}
28
+ {\end{tcolorbox}}
29
+
30
+ \newenvironment{reviewtip}[1][]{%
31
+ \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]}
32
+ {\end{tcolorbox}}
33
+
34
+ \newenvironment{reviewinfo}[1][]{%
35
+ \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]}
36
+ {\end{tcolorbox}}
37
+
38
+ \newenvironment{reviewwarning}[1][]{%
39
+ \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]}
40
+ {\end{tcolorbox}}
41
+
42
+ \newenvironment{reviewimportant}[1][]{%
43
+ \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]}
44
+ {\end{tcolorbox}}
45
+
46
+ \newenvironment{reviewcaution}[1][]{%
47
+ \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]}
48
+ {\end{tcolorbox}}
49
+
50
+ \newenvironment{reviewnotice}[1][]{%
51
+ \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]}
52
+ {\end{tcolorbox}}
53
+
54
+ % コラム
55
+ \newenvironment{reviewcolumn}[1][COLUMN]{%
56
+ \begin{tcolorbox}[skin=enhanced jigsaw,breakable,boxrule=0.2mm,arc=2mm,colback=white,colframe=black!100!white,title={\sffamily\bfseries #1}]\par}
57
+ {\end{tcolorbox}}
58
+
59
+ \renewcommand{\@makecaption}[2]{{% %本当はl,c,rを[]で指定したい
60
+ \reset@font\small
61
+ \vskip\abovecaptionskip
62
+ \jlreq@ifempty{#1}{%
63
+ \sbox\@tempboxa{{\jlreq@@makecaption@font #2}}}{%
64
+ \sbox\@tempboxa{{\jlreq@@makecaption@label@font #1}\review@intn@captionprefix{\jlreq@@makecaption@font #2}}}
65
+ \ifdim \wd\@tempboxa >\hsize
66
+ \jlreq@ifempty{#1}{%
67
+ {\jlreq@@makecaption@font #2}}{%
68
+ {\jlreq@@makecaption@label@font #1}\review@intn@captionprefix{\jlreq@@makecaption@font #2}}\relax\par
69
+ \else
70
+ \global\@minipagefalse
71
+ \hbox to\hsize{\box\@tempboxa\hfil}% キャプションLeft
72
+ % \hbox to\hsize{\hfil\box\@tempboxa\hfil}% キャプションCenter
73
+ % \hbox to\hsize{\hfil\box\@tempboxa}% キャプションRight
74
+ \fi
75
+ \vskip\belowcaptionskip}}
76
+
77
+ \newcommand{\review@commoncaption}[2]{\@makecaption{#1}{#2}}
78
+ \newcommand{\reviewlistcaption}[1]{\review@commoncaption{}{#1}}
79
+ \newcommand{\reviewemlistcaption}[1]{\review@commoncaption{}{#1}}
80
+ \newcommand{\reviewsourcecaption}[1]{\review@commoncaption{}{#1}}
81
+ \newcommand{\reviewcmdcaption}[1]{\review@commoncaption{}{#1}}
82
+ \newenvironment{reviewlistblock}{\list{}{\topsep.5\baselineskip \leftmargin\z@ \itemindent\z@}\item\relax}{\endlist}% 上下アキ0.5
83
+
84
+ \newenvironment{reviewimage}[1][H]{%
85
+ \begin{figure}[#1]\begin{center}}{\end{center}\end{figure}}
86
+
87
+ \newenvironment{reviewdummyimage}[1][ht]{%
88
+ \begin{reviewimage}[#1]}{\end{reviewimage}}
89
+
90
+ \newcommand{\reviewindepimagecaption[2]}{\@makecaption{}{#2}}
91
+
92
+ % 表
93
+ \newenvironment{reviewtablesetup}{%
94
+ }{}
95
+ \newcommand{\reviewth}[1]{\cellcolor{black!70}\textcolor{white}{\bfseries #1}}
96
+ \newcommand\reviewtablecaption[1]{\caption{#1}\vskip\abovecaptionskip}% アキをより広げる
97
+ % \reviewtablecaption* を定義する(suffixパッケージ効果)
98
+ %\WithSuffix\newcommand\reviewtablecaption*[1]{\@makecaption{}{#1}\vskip\abovecaptionskip}% アキをより広げる
99
+ \newenvironment{reviewtable}[1]{%
100
+ \begin{reviewtablesetup}\begin{tabular}{#1}}%
101
+ {\end{tabular}\end{reviewtablesetup}}
102
+
103
+ \newcommand*\reviewimgtablecaption[1]{\caption{#1}}
104
+
105
+ \newcommand{\reviewimageref}[2]{\review@intn@image #1}
106
+ \newcommand{\reviewtableref}[2]{\review@intn@table #1}
107
+ \newcommand{\reviewlistref}[1]{\review@intn@list #1}
108
+ \newcommand{\reviewbibref}[2]{#1}
109
+ \newcommand{\reviewcolumnref}[2]{\review@intn@columnname #1}
110
+ \newcommand{\reviewsecref}[2]{#1}
111
+
112
+ % 書体
113
+ \newcommand{\reviewkw}[1]{\textbf{\textgt{#1}}}
114
+ \newcommand{\reviewami}[1]{#1}% FIXME
115
+ \newcommand{\reviewballoon}[1]{←{#1}}
116
+ \newcommand{\reviewem}[1]{\textbf{#1}}
117
+ \newcommand{\reviewstrong}[1]{\textbf{#1}}
118
+ \newcommand{\reviewunderline}[1]{\underline{#1}}% FIXME
119
+ \newcommand{\reviewit}[1]{\textit{#1}}
120
+ \newcommand{\reviewbold}[1]{\textbf{#1}}
121
+ \newcommand{\reviewcode}[1]{\texttt{#1}}
122
+ \newcommand{\reviewtt}[1]{\texttt{#1}}
123
+ \newcommand{\reviewtti}[1]{\texttt{\textit{#1}}}
124
+ \newcommand{\reviewttb}[1]{\texttt{\textbf{#1}}}
125
+
126
+ \newcommand{\reviewbackslash}[0]{\textbackslash{}}
127
+
128
+ % コードリスト用色
129
+ \definecolor{shadecolor}{gray}{0.9}
130
+ \definecolor{shadecolorb}{gray}{0.1}
131
+ \definecolor{reviewgreen}{rgb}{0,0.4,0}
132
+ \definecolor{reviewblue}{rgb}{0.2,0.2,0.4}
133
+ \definecolor{reviewred}{rgb}{0.7,0,0}
134
+ \definecolor{reviewdarkred}{rgb}{0.3,0,0}
135
+
136
+ % ハイフネーション禁止。@M=10000。@m=1000
137
+ % latexdef 〜 で確認
138
+ \hyphenpenalty\@M\relax
139
+ \exhyphenpenalty\@M\relax
140
+
141
+ % 上下アキ
142
+ % 引用
143
+ \jlreqsetup{quote_beforeafter_space=\baselineskip}
144
+ % 箇条書き
145
+ \jlreqsetup{itemization_beforeafter_space=\baselineskip}
146
+
147
+ % ヘッダスタイル
148
+ \ModifyPageStyle{headings}{nombre_position={top-fore_edge},running_head_position={top-fore_edge}}
149
+ \pagestyle{headings}
@@ -0,0 +1,8 @@
1
+ % 基本定義
2
+ \usepackage{review-base}
3
+
4
+ % スタイル装飾
5
+ \usepackage{review-style}
6
+
7
+ % ユーザー固有の定義
8
+ \usepackage{review-custom}
@@ -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'.