review-retrovert 0.9.11 → 0.11.3

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 (148) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/Rakefile +15 -0
  5. data/lib/review/retrovert/cli.rb +6 -0
  6. data/lib/review/retrovert/converter.rb +38 -0
  7. data/lib/review/retrovert/version.rb +1 -1
  8. data/lib/review/retrovert/yamlconfig.rb +38 -1
  9. metadata +49 -146
  10. data/.dockerignore +0 -9
  11. data/.editorconfig +0 -16
  12. data/.gitattributes +0 -5
  13. data/.github/FUNDING.yml +0 -4
  14. data/.github/workflows/docker-build.yml +0 -26
  15. data/.github/workflows/release.yml +0 -26
  16. data/.github/workflows/retrovert.yml +0 -91
  17. data/.gitignore +0 -15
  18. data/.rspec +0 -3
  19. data/.ruby-version +0 -1
  20. data/.vscode/launch.json +0 -48
  21. data/Dockerfile +0 -5
  22. data/Gemfile +0 -8
  23. data/Gemfile.lock +0 -118
  24. data/Makefile +0 -31
  25. data/bin/console +0 -14
  26. data/bin/setup +0 -8
  27. data/docker/review.Dockerfile +0 -10
  28. data/hooks/post_push +0 -8
  29. data/package-lock.json +0 -6
  30. data/package.json +0 -1
  31. data/review-retrovert.code-workspace +0 -8
  32. data/review-retrovert.gemspec +0 -37
  33. data/testdata/mybook/.gitignore +0 -13
  34. data/testdata/mybook/.textlintrc +0 -11
  35. data/testdata/mybook/README.md +0 -43
  36. data/testdata/mybook/Rakefile +0 -24
  37. data/testdata/mybook/catalog.yml +0 -60
  38. data/testdata/mybook/config-noretrovert.yml +0 -404
  39. data/testdata/mybook/config-retrovert.yml +0 -16
  40. data/testdata/mybook/config-starter.yml +0 -264
  41. data/testdata/mybook/config.yml +0 -404
  42. data/testdata/mybook/contents/00-preface.re +0 -129
  43. data/testdata/mybook/contents/01-install.re +0 -305
  44. data/testdata/mybook/contents/02-tutorial.re +0 -1228
  45. data/testdata/mybook/contents/03-syntax.re +0 -4610
  46. data/testdata/mybook/contents/04-customize.re +0 -1064
  47. data/testdata/mybook/contents/05-faq.re +0 -606
  48. data/testdata/mybook/contents/06-bestpractice.re +0 -1343
  49. data/testdata/mybook/contents/91-compare.re +0 -418
  50. data/testdata/mybook/contents/92-filelist.re +0 -125
  51. data/testdata/mybook/contents/93-background.re +0 -267
  52. data/testdata/mybook/contents/99-postface.re +0 -39
  53. data/testdata/mybook/contents/r0-inner.re +0 -2
  54. data/testdata/mybook/contents/r0-root.re +0 -49
  55. data/testdata/mybook/contents/table.csv +0 -4
  56. data/testdata/mybook/contents/test.txt +0 -1
  57. data/testdata/mybook/contents/ut.re +0 -5
  58. data/testdata/mybook/css/normalize.css +0 -349
  59. data/testdata/mybook/css/webstyle.css +0 -692
  60. data/testdata/mybook/data/terms.txt +0 -3
  61. data/testdata/mybook/data/words.txt +0 -15
  62. data/testdata/mybook/images/03-syntax/favicon-16x16.png +0 -0
  63. data/testdata/mybook/images/03-syntax/figure_heretop.png +0 -0
  64. data/testdata/mybook/images/03-syntax/index-page.png +0 -0
  65. data/testdata/mybook/images/03-syntax/order-detail.png +0 -0
  66. data/testdata/mybook/images/03-syntax/tw-icon1.jpg +0 -0
  67. data/testdata/mybook/images/03-syntax/tw-icon2.jpg +0 -0
  68. data/testdata/mybook/images/03-syntax/tw-icon3.jpg +0 -0
  69. data/testdata/mybook/images/03-syntax/tw-icon4.jpg +0 -0
  70. data/testdata/mybook/images/04-customize/caption_pagebreak.png +0 -0
  71. data/testdata/mybook/images/04-customize/chaptitlepage_sample.png +0 -0
  72. data/testdata/mybook/images/04-customize/section_decoration_samples.png +0 -0
  73. data/testdata/mybook/images/05-faq/codeblock_rpadding1.png +0 -0
  74. data/testdata/mybook/images/05-faq/codeblock_rpadding2.png +0 -0
  75. data/testdata/mybook/images/05-faq/dummy-image.png +0 -0
  76. data/testdata/mybook/images/06-bestpractice/figure_heretop.png +0 -0
  77. data/testdata/mybook/images/06-bestpractice/font_beramono.png +0 -0
  78. data/testdata/mybook/images/06-bestpractice/heading_design1.png +0 -0
  79. data/testdata/mybook/images/06-bestpractice/heading_design2.png +0 -0
  80. data/testdata/mybook/images/06-bestpractice/margin_book.png +0 -0
  81. data/testdata/mybook/images/06-bestpractice/multiline-title.png +0 -0
  82. data/testdata/mybook/images/06-bestpractice/preface_numbered.png +0 -0
  83. data/testdata/mybook/images/06-bestpractice/program_border.png +0 -0
  84. data/testdata/mybook/images/06-bestpractice/sechead_design_4.png +0 -0
  85. data/testdata/mybook/images/06-bestpractice/section_title_wlines.png +0 -0
  86. data/testdata/mybook/images/06-bestpractice/titlepage-samples.png +0 -0
  87. data/testdata/mybook/images/93-background/bug913.png +0 -0
  88. data/testdata/mybook/images/93-background/slide2.png +0 -0
  89. data/testdata/mybook/images/avatar-b.png +0 -0
  90. data/testdata/mybook/images/avatar-g.png +0 -0
  91. data/testdata/mybook/images/avatar-r.png +0 -0
  92. data/testdata/mybook/images/caution-icon.png +0 -0
  93. data/testdata/mybook/images/cover_a5.pdf +0 -0
  94. data/testdata/mybook/images/cover_b5.pdf +0 -0
  95. data/testdata/mybook/images/info-icon.png +0 -0
  96. data/testdata/mybook/images/tw-icon.jpg +0 -0
  97. data/testdata/mybook/images/warning-icon.png +0 -0
  98. data/testdata/mybook/layouts/layout.epub.erb +0 -29
  99. data/testdata/mybook/layouts/layout.html5.erb +0 -108
  100. data/testdata/mybook/layouts/layout.tex.erb +0 -432
  101. data/testdata/mybook/layouts/layout.tex.erb.orig +0 -386
  102. data/testdata/mybook/lib/hooks/beforetexcompile.rb +0 -55
  103. data/testdata/mybook/lib/ruby/review-book.rb +0 -64
  104. data/testdata/mybook/lib/ruby/review-builder.rb +0 -1342
  105. data/testdata/mybook/lib/ruby/review-cli.rb +0 -58
  106. data/testdata/mybook/lib/ruby/review-compiler.rb +0 -1176
  107. data/testdata/mybook/lib/ruby/review-epubbuilder.rb +0 -33
  108. data/testdata/mybook/lib/ruby/review-epubmaker.rb +0 -609
  109. data/testdata/mybook/lib/ruby/review-htmlbuilder.rb +0 -949
  110. data/testdata/mybook/lib/ruby/review-latexbuilder.rb +0 -1065
  111. data/testdata/mybook/lib/ruby/review-maker.rb +0 -346
  112. data/testdata/mybook/lib/ruby/review-markdownbuilder.rb +0 -945
  113. data/testdata/mybook/lib/ruby/review-markdownmaker.rb +0 -91
  114. data/testdata/mybook/lib/ruby/review-monkeypatch.rb +0 -93
  115. data/testdata/mybook/lib/ruby/review-pdfmaker.rb +0 -546
  116. data/testdata/mybook/lib/ruby/review-textbuilder.rb +0 -36
  117. data/testdata/mybook/lib/ruby/review-tocparser.rb +0 -285
  118. data/testdata/mybook/lib/ruby/review-webmaker.rb +0 -448
  119. data/testdata/mybook/lib/tasks/mytasks.rake +0 -31
  120. data/testdata/mybook/lib/tasks/review.rake +0 -156
  121. data/testdata/mybook/lib/tasks/review.rake.orig +0 -72
  122. data/testdata/mybook/lib/tasks/starter.rake +0 -470
  123. data/testdata/mybook/locale.yml +0 -6
  124. data/testdata/mybook/review-ext.rb +0 -206
  125. data/testdata/mybook/sty/indexstyle.ist +0 -25
  126. data/testdata/mybook/sty/jumoline.sty +0 -310
  127. data/testdata/mybook/sty/mycolophon.sty +0 -81
  128. data/testdata/mybook/sty/mystyle.sty +0 -8
  129. data/testdata/mybook/sty/mytextsize.sty +0 -94
  130. data/testdata/mybook/sty/mytitlepage.sty +0 -126
  131. data/testdata/mybook/sty/review-base.sty +0 -276
  132. data/testdata/mybook/sty/reviewmacro.sty +0 -60
  133. data/testdata/mybook/sty/starter-codeblock.sty +0 -463
  134. data/testdata/mybook/sty/starter-color.sty +0 -134
  135. data/testdata/mybook/sty/starter-font.sty +0 -112
  136. data/testdata/mybook/sty/starter-heading.sty +0 -561
  137. data/testdata/mybook/sty/starter-misc.sty +0 -894
  138. data/testdata/mybook/sty/starter-note.sty +0 -180
  139. data/testdata/mybook/sty/starter-section.sty +0 -262
  140. data/testdata/mybook/sty/starter-talklist.sty +0 -105
  141. data/testdata/mybook/sty/starter-toc.sty +0 -72
  142. data/testdata/mybook/sty/starter-util.sty +0 -39
  143. data/testdata/mybook/sty/starter.sty +0 -36
  144. data/testdata/mybook/sty/ut.sty +0 -26
  145. data/testdata/mybook/style.css +0 -597
  146. data/testdata/mybook/ut-catalog.yml +0 -61
  147. data/testdata/mybook/ut-config-starter.yml +0 -3
  148. data/testdata/mybook/ut-config.yml +0 -404
@@ -1,180 +0,0 @@
1
- %%% -*- coding: utf-8 -*-
2
-
3
- %%%
4
- %%% ノート(//note)のブロックコマンド
5
- %%%
6
-
7
-
8
- %%% ノート
9
- \newenvironment{starternote}[2][]{%
10
- \addvspace{\bigskipamount}% % \bigskipと違い、直前の余白の高さも考慮してくれる
11
- \@starter@notetrue%
12
- \begin{starter@note}[#1]{#2}%
13
- }{%
14
- \end{starter@note}%
15
- \@starter@notefalse%
16
- \medskip%
17
- \addvspace{\bigskipamount}%
18
- }
19
- %%% ノート内かどうか?
20
- \newif\if@starter@note
21
- \@starter@notefalse
22
- %%% itemize環境やenumerate環境で使われる\listコマンドを保存
23
- \let\original@list=\list
24
- %%% ノートブロック
25
- \newenvironment{starter@note}[2][]{%
26
- %% ノートの左右に余白を空ける
27
- \advance\rightskip\starter@note@sidemargin%
28
- \advance\leftskip\starter@note@sidemargin%
29
- %% プログラムやターミナルや引用の左右に余白を空ける
30
- \setlength{\starter@quote@sidemargin}{\starter@note@sidemargin}%
31
- %% プログラムやターミナルの前後の余白を少し小さくする
32
- \renewcommand{\starter@codeblock@vspace}{\addvspace{\smallskipamount}}%
33
- %% 箇条書きの左右のスペースを調整
34
- \def\list##1##2{%
35
- \ifnum\@listdepth=0%
36
- \advance\linewidth-\starter@note@sidemargin% % 右側の余白分だけ行を短く
37
- \advance\linewidth-2zw% % インデント分だけ行を短く
38
- \advance\@totalleftmargin 2zw% % 左側のインデント
39
- \fi%
40
- \original@list{##1}{##2}%
41
- }%
42
- %
43
- \needvspace{2.5\Cvs}% % 2.5行分のスペースがなければ改行
44
- \starter@note@font% % 文字を小さく、フォントをゴシック体に
45
- %
46
- \noindent\starter@note@line% % 点線
47
- \smallskip%
48
- \ifempty{#1}\else% % ノートに参照用ラベルがあれば
49
- \phantomsection% % hyperref用
50
- \hypertarget{#1}{}% % hyperref用
51
- \label{#1}%
52
- \fi%
53
- \ifempty{#2}\else% % ノートにタイトルがあれば
54
- \par\noindent%
55
- \starter@note@title{#2}% % ノートのタイトルを表示
56
- \smallskip%
57
- \fi%
58
- \par%
59
- %
60
- }{%
61
- \vspace{-\lastskip}% % ノートの最後がプログラムやターミナルのときの空きを削除
62
- \vspace{-0.2\baselineskip}% % 空きを少し減らす
63
- \noindent\starter@note@line% % 点線
64
- \par%
65
- }
66
- %%% ノートの左右のマージン幅
67
- \newlength{\starter@note@sidemargin}
68
- \setlength{\starter@note@sidemargin}{3\Cwd} % 左右に全角3文字分ずつ
69
- %%% ノートの上下に入る点線
70
- \newcommand{\starter@note@line}[1][-0.3zw]{{%
71
- \rmfamily% % 点線の点を丸くする(ゴシック体だと四角になる)
72
- \bfseries\large % 点線の点を少し太くする
73
- %% 横幅いっぱいの点線を \dotfill で引く
74
- %% (\dotfill だけだと左右に少しすき間ができてしまうので、
75
- %% それを埋めるために左右を少し伸ばしている)
76
- \textcolor{starter@notecolor}{%
77
- \hspace{#1}\dotfill\hspace{#1}\mbox{}%
78
- }%
79
- }}
80
- %%% ノートのフォント
81
- \newcommand{\starter@note@font}{%
82
- \gtfamily\sffamily % ゴシック体
83
- \small % フォントを小さめに
84
- }
85
- %%% ノートのタイトル
86
- \newcommand{\starter@note@title}[1]{{%
87
- \gtfamily\sffamily\bfseries % 太字のゴシック体
88
- \normalsize % 文字を通常の大きさにする(\smallにしない)
89
- #1 % タイトルを表示
90
- }}
91
- %%% ノートタイトルの接頭辞をカスタマイズする
92
- %\renewcommand{\starter@note@title}[1]{{%
93
- % \gtfamily\sffamily\bfseries\normalsize ■ノート:#1
94
- %}}
95
-
96
-
97
- %%% @<noteref>{lable} でノートを参照する
98
- \newcommand{\starternoteref}[2]{%
99
- ノート「\hyperlink{#1}{#2}」(p.\pageref{#1})%
100
- }
101
-
102
-
103
-
104
- %%%
105
- %%% ノート以外のブロック
106
- %%%
107
- \newenvironment{startermemo}[1]{\begin{starter@miniblock}{#1}}{\end{starter@miniblock}}
108
- \newenvironment{startertip}[1]{\begin{starter@miniblock}{#1}}{\end{starter@miniblock}}
109
- %\newenvironment{starterinfo}[1]{\begin{starter@miniblock}{#1}}{\end{starter@miniblock}}
110
- %\newenvironment{starterwarning}[1]{\begin{starter@miniblock}{#1}}{\end{starter@miniblock}}
111
- \newenvironment{starterimportant}[1]{\begin{starter@miniblock}{#1}}{\end{starter@miniblock}}
112
- %\newenvironment{startercaution}[1]{\begin{starter@miniblock}{#1}}{\end{starter@miniblock}}
113
- \newenvironment{starternotice}[1]{\begin{starter@miniblock}{#1}}{\end{starter@miniblock}}
114
- \newenvironment{starterinfo}[1]{%
115
- \begin{starter@miniblock}[\starter@miniblock@info@imagefile]{#1}%
116
- }{%
117
- \end{starter@miniblock}%
118
- }
119
- \newenvironment{starterwarning}[1]{%
120
- \begin{starter@miniblock}[\starter@miniblock@warning@imagefile]{#1}%
121
- }{%
122
- \end{starter@miniblock}%
123
- }
124
- \newenvironment{startercaution}[1]{%
125
- \begin{starter@miniblock}[\starter@miniblock@caution@imagefile]{#1}%
126
- }{%
127
- \end{starter@miniblock}%
128
- }
129
-
130
- \def\starter@miniblock@info@imagefile{./images/info-icon.png} % 情報のアイコン画像
131
- \def\starter@miniblock@warning@imagefile{./images/warning-icon.png}% 警告のアイコン画像
132
- \def\starter@miniblock@caution@imagefile{./images/caution-icon.png}% 警告のアイコン画像
133
-
134
- \def\starter@miniblock@imagewidth{3zw} % アイコン画像の表示幅
135
- \def\starter@miniblock@indent{4zw} % ページ左端からの本文のインデント幅
136
- \def\starter@miniblock@font{\small} % 本文のフォント
137
-
138
- \newenvironment{starter@miniblock}[2][]{% #1: アイコン画像、#2: タイトル
139
- \starter@miniblock@topmargin% 1行分空ける
140
- \begin{oframed}% % 枠線で囲む
141
- \ifempty{#1}\else% % アイコン画像が指定されれば、
142
- \starter@miniblock@icon{#1}% それを表示
143
- \fi%
144
- \ifempty{#2}\else% % タイトルがあれば、
145
- \starter@miniblock@title{#2}% タイトルを表示
146
- \fi%
147
- \starter@miniblock@font% % 本文のフォントを少し小さく
148
- }{%
149
- \end{oframed}% % 枠線による囲みの終わり
150
- \starter@miniblock@bottommargin% 1行分空ける
151
- }
152
-
153
- \newcommand{\starter@miniblock@topmargin}{%
154
- \addvspace{1.0\baselineskip}% 1行分空ける
155
- }
156
-
157
- \newcommand{\starter@miniblock@bottommargin}{%
158
- \addvspace{1.0\baselineskip}% 1行分空ける
159
- }
160
-
161
- \newcommand{\starter@miniblock@title}[1]{% #1: タイトル
162
- \noindent% % 字下げせずに
163
- {\headfont #1}% % 太字のゴシック体で表示
164
- \par% % 改行がわりの改段落
165
- \smallskip% % 縦方向に少しスペースを空ける
166
- }
167
-
168
- \newcommand{\starter@miniblock@icon}[1]{% #1: アイコン画像
169
- %\vspace{-\intextsep}% % 参考:美文書第8版p.159
170
- \vbox to -0.7zw{% % 画像の上部を本文と揃える
171
- \noindent% % 画像を字下げさせない
172
- %\textcolor{gray}{\fbox{% % グレーの枠線をつける場合
173
- \includegraphics[width=\starter@miniblock@imagewidth]{#1}% 画像を表示
174
- %}}%
175
- }%
176
- \setlength{\leftskip}{\starter@miniblock@indent}% 左側の空きを設定
177
- %% 箇条書き(itemize, enumerate)に対応
178
- \addtolength{\@totalleftmargin}{\starter@miniblock@indent}% 左の空きを増やす
179
- \addtolength{\linewidth}{-\starter@miniblock@indent}% % 本文幅を短くする
180
- }
@@ -1,262 +0,0 @@
1
- %%% -*- coding: utf-8 -*-
2
-
3
- %%% 章 (Chapter) の番号とタイトルと上下の余白を表示する
4
- %\def\@makechapterhead#1{% (jsbook.clsでのオリジナル定義)
5
- % \vspace*{2\Cvs}% 欧文は50pt
6
- % {\parindent \z@ \raggedright \normalfont
7
- % \ifnum \c@secnumdepth >\m@ne
8
- % \if@mainmatter
9
- % \huge\headfont \@chapapp\thechapter\@chappos
10
- % \par\nobreak
11
- % \vskip \Cvs % 欧文は20pt
12
- % \fi
13
- % \fi
14
- % \interlinepenalty\@M
15
- % \Huge \headfont #1\par\nobreak
16
- % \vskip 3\Cvs}} % 欧文は40pt
17
- %
18
- \renewcommand{\@makechapterhead}[1]{%
19
- \vspace*{-3zw}% % 章タイトル上部の余白を詰める
20
- \starter@chapterhead{#1}% % 章タイトルを組み立てる
21
- \addvspace{2\baselineskip}% % 章タイトルのあとに2行空ける
22
- }
23
- %%% 装飾する・しないを判断して、章の番号とタイトルを表示(上下の余白は除く)
24
- \newcommand{\starter@chapterhead}[1]{%
25
- {% % フォント変更などの影響範囲を限定する。
26
- \setlength{\parindent}{0pt}% % 段落の最初のインデントをなしに。
27
- \starter@chapterhead@align% % 左寄せ/右寄せ/中央揃え
28
- \ifnum \c@secnumdepth >\m@ne%
29
- \if@mainmatter% % まえがきや目次ではないなら
30
- \starter@chapterhead@decorated{\thechapter}{#1}% 装飾つきで表示
31
- \else% % まえがきや目次なら
32
- \starter@chapterhead@plain{#1}% % 装飾なしで表示
33
- \fi%
34
- \else%
35
- \starter@chapterhead@plain{#1}% % 装飾なしで表示
36
- \fi%
37
- \par% % 段落を改める
38
- }%
39
- }
40
- \newcommand{\starter@chapterhead@align}{%
41
- \edef\@align{\starter@chapter@align}% % left, right, or center
42
- \ifstreq{\@align}{left}%
43
- \raggedright% % 左寄せ
44
- \else\ifstreq{\@align}{right}%
45
- \raggedleft% % 右寄せ
46
- \else\ifstreq{\@align}{center}%
47
- \centering% % 中央寄せ
48
- \fi%
49
- }
50
- %%% 装飾つきで章番号とタイトルを表示
51
- \ifstreq{\starter@chapter@decoration}{underline}
52
- \newcommand{\starter@chapterhead@decorated}[2]{% % #1: 章番号、#2: 章タイトル
53
- \starter@chaphead{#1}{#2}% % 章番号と章タイトルを出力
54
- \par\vspace{0pt}% % 余白
55
- \textcolor{starter@chaptercolor}{\rule{\textwidth}{0.2pt}}% 章タイトルに細い下線
56
- }
57
- \else\ifstreq{\starter@chapter@decoration}{boldlines}
58
- \newcommand{\starter@chapterhead@decorated}[2]{% % #1: 章番号、#2: 章タイトル
59
- \textcolor{starter@chaptercolor}{\rule{\textwidth}{0.9zw}}% 章タイトル上部に太い横線
60
- \par\vspace{1.7zw}% % 余白
61
- \starter@chaphead{#1}{#2}% % 章番号と章タイトルを出力
62
- \par\vspace{1.5zw}% % 余白
63
- \textcolor{starter@chaptercolor}{\rule{\textwidth}{0.9zw}}% 章タイトル下部に太い横線
64
- }
65
- \else
66
- \newcommand{\starter@chapterhead@decorated}[2]{% % #1: 章番号、#2: 章タイトル
67
- \starter@chaphead{#1}{#2}% % 章番号と章タイトルを出力
68
- }
69
- \fi
70
- %%% 装飾なしで章番号とタイトルを表示(まえがきや目次用)
71
- \newcommand{\starter@chapterhead@plain}[1]{% % #1: 章タイトル
72
- \starter@chaphead{}{#1}% % 章タイトルだけを出力
73
- \ifstreq{\starter@chapter@decoration}{underline}%
74
- \par\vspace{0pt}% % 余白
75
- \textcolor{starter@chaptercolor}{\rule{\textwidth}{0.2pt}}% 章タイトルに細い下線
76
- \fi%
77
- }
78
- %%% 章番号と章タイトルを表示
79
- \newcommand{\starter@chaphead}[2]{% % #1: 章番号、#2: 章タイトル
80
- \ifempty{#1}\else%
81
- \starter@chaphead@number{#1}% % 章番号
82
- \starter@chaphead@spacer% % 余白
83
- \fi%
84
- \starter@chaphead@title{#2}% % 章タイトル
85
- }
86
- %%% 章番号を表示
87
- \newcommand{\starter@chaphead@number}[1]{% % #1: 章番号
88
- %{\huge\headfont \@chapapp #1\@chappos}% % jsbook.clsのデフォルト
89
- {\headfont\LARGE\@chapapp{\HUGE #1}\@chappos}% 番号を大きくして出力
90
- }
91
- %%% 章タイトルを表示
92
- \newcommand{\starter@chaphead@title}[1]{% % #1: 章タイトル
93
- {\Huge\headfont #1}% % 大きいサイズ、ゴシック体で出力
94
- }
95
- %%% 章番号と章タイトルの間のスペース
96
- \newcommand{\starter@chaphead@spacer}{%
97
- \ifx\starter@chapter@oneline\empty% % 章番号とタイトルで2行のとき
98
- \par\vspace{1.5zw}% % 縦方向に余白を空ける
99
- \else% % 章番号とタイトルで1行のとき
100
- \hspace{1zw}% % 横方向に1文字空ける
101
- \fi%
102
- }
103
-
104
-
105
-
106
- %%% 節 (Section) タイトルの上下のスペースを調整(jsbook.clsからコピーして変更)
107
- \renewcommand{\section}{%
108
- \edef\@newpage{\starter@section@newpage}% % Yなら節ごとに改ページする、空ならしない
109
- \def\@beforeSkip{1.3\Cvs \@plus.5\Cdp \@minus.2\Cdp}% % 節タイトル直前の空白
110
- \def\@afterSkip{0.9\Cvs \@plus.3\Cdp}% % 節タイトル直後の空白
111
- \ifx\@newpage\empty\else% % 節ごとに改ページするときは
112
- \def\@beforeSkip{0pt}% % 節タイトル直前の空白をゼロにする
113
- \ifnum\value{section}>0% % 章の最初の節でなければ
114
- \clearpage% % 改ページする
115
- \fi%
116
- \fi%
117
- %% 節タイトルを開始
118
- \@startsection{section}{1}{\z@}%
119
- {\@beforeSkip}% % 前アキ
120
- {\@afterSkip}% % 後アキ
121
- {%
122
- %% 節ごとに改ページする場合
123
- \ifx\@newpage\empty\else% % 節ごとに改ページするときは
124
- \ifnum\value{section}=1% % 章の最初の節なら
125
- \vskip 0.5\Cvs \@plus.5\Cdp \@minus.2\Cdp\relax% スペースを空ける
126
- \fi%
127
- \fi%
128
- %% 節タイトルの表示設定
129
- \normalfont\Large\headfont\raggedright%
130
- }%
131
- }
132
- %%% 節 (Section) 番号の表示をカスタマイズ
133
- \let\original@seccntformat=\@seccntformat
134
- \renewcommand\@seccntformat[1]{%
135
- \@ifundefined{starter@#1@formatnumber}%
136
- {\original@seccntformat{#1}}%
137
- {\csname starter@#1@formatnumber\endcsname}%
138
- }
139
- %%% 節タイトルに下線を引く
140
- \ifstreq{\starter@section@decoration}{underline}
141
- \newcommand{\starter@section@formatnumber}{%
142
- \textcolor{starter@sectioncolor}{% % 色を変える
143
- \rule[-0.35zw]{\textwidth}{0.2pt}% % 横幅いっぱいの細い下線
144
- \hspace{-\textwidth}% % もとの位置に戻る
145
- \rule[-0.35zw]{0.7zw}{1.7zw}% % 行頭に縦長の「■」を追加
146
- }%
147
- \hspace{0.7zw}% % 節番号のまえにスペースを少し空ける
148
- \thesection% % 節番号
149
- \hspace{1.0zw}% % 節番号のあとに全角1文字分のスペース
150
- }
151
- \fi
152
- %%% 節番号を白抜き、節タイトル背景を薄いグレーにする
153
- \ifstreq{\starter@section@decoration}{grayback}
154
- \newcommand{\starter@section@formatnumber}{%
155
- \starter@section@background{starter@palecolor}{\textwidth}% % 幅いっぱいに灰色背景
156
- \starter@section@background{starter@deepcolor}{3.5zw}% % 3.5文字分の黒色背景
157
- \makebox[3.5zw][c]{\textcolor{white}{\thesection}}% % 白文字で節番号
158
- \hspace{0.7zw}% % タイトル前のスペース
159
- }
160
- \fi
161
- \newcommand{\starter@section@background}[2]{%
162
- \makebox[0pt][l]{% % 幅をゼロ扱いにする
163
- \textcolor{#1}{\rule[-0.6zw]{#2}{2zw}}% % 指定幅の背景を描く
164
- }%
165
- }
166
- %%% 節タイトルの左側に縦線を引く(タイトルが二行になっても表示が崩れない)
167
- \ifstreq{\starter@section@decoration}{leftline}
168
- \newcommand{\starter@section@formatnumber}{%
169
- \starter@section@background{starter@deepcolor}{0.5zw}% % 0.5文字幅の線
170
- \hspace{1.1zw}\thesection\hspace{0.8zw}% % 節番号
171
- }
172
- \fi
173
- %%% 節番号を黒い背景で白抜きにする(タイトルが二行になっても表示が崩れない)
174
- \ifstreq{\starter@section@decoration}{numbox}
175
- \newcommand{\starter@section@formatnumber}{%
176
- \starter@section@background{starter@deepcolor}{3.2zw}% % 3.2文字分の黒色背景
177
- \makebox[3.2zw][c]{\textcolor{white}{\thesection}}% % 白文字で節番号
178
- \hspace{0.9zw}% % タイトル前のスペース
179
- }
180
- \fi
181
-
182
-
183
-
184
- %%% 項 (Subsection) のデザインを変更(jsbook.clsからコピーして変更)
185
- \renewcommand{\subsection}{%
186
- \edef\@decoration{\starter@subsection@decoration}% % 'none' or 'symbol'
187
- \@startsection{subsection}{2}{\z@}%
188
- %{\Cvs \@plus.5\Cdp \@minus.2\Cdp}% % 前アキ(オリジナル)
189
- %{.5\Cvs \@plus.3\Cdp}% % 後アキ(オリジナル)
190
- {.7\Cvs \@plus.5\Cdp \@minus.2\Cdp}% % 前アキ(少し狭める)
191
- {.3\Cvs \@plus.3\Cdp}% % 後アキ(少し狭める)
192
- {%
193
- \normalfont\large\headfont% % フォントを本文より少し大きめに
194
- \def\@tempa{symbol}%
195
- \ifx\@decoration\@tempa%
196
- \textcolor{starter@subsectioncolor}{\startersubsectionsymbol}% 頭にクローバー
197
- \fi%
198
- }%
199
- }
200
- \newcommand{\starter@subsection@symbol}{$\clubsuit$}% クローバー
201
- \ifstreq{\starter@subsection@decoration}{symbol}
202
- \newcommand{\startersubsectionsymbol}{\starter@subsection@symbol{} }
203
- \else
204
- \newcommand{\startersubsectionsymbol}{}
205
- \fi
206
-
207
-
208
- %%% ページ先頭なら節や項のタイトル前にスペースを入れない
209
- \ifx\starter@section@notopmargin\empty\else
210
- %% ハック:スライドモードをonにするとページ先頭でのスペースが入らない
211
- \let\original@startsection=\@startsection % コマンドを保存
212
- \def\@startsection#1#2#3#4#5#6{% % コマンドを上書き
213
- \@slidetrue% % スライドモードをonにする
214
- \original@startsection{#1}{#2}{#3}{#4}{#5}{#6}% 元のコマンドを実行
215
- }
216
- %% \@startsection の最後で実行されるマクロ(その1)を上書き
217
- \let\original@sect=\@sect % コマンドを保存
218
- \def\@sect#1#2#3#4#5#6[#7]#8{% % コマンドを上書き
219
- \@slidefalse% % スライドモードをoffに戻す
220
- \original@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}% % 元のコマンドを実行
221
- }
222
- %% \@startsection の最後で実行されるマクロ(その2)を上書き
223
- \let\original@ssect=\@ssect % コマンドを保存
224
- \def\@ssect#1#2#3#4#5{% % コマンドを上書き
225
- \@slidefalse% % スライドモードをoffに戻す
226
- \original@ssect{#1}{#2}{#3}{#4}{#5}% % 元のコマンドを実行
227
- }
228
- \fi
229
-
230
-
231
-
232
- %%% LaTeXのデフォルトでは、ページ最下部の段落が最初の1行だけになるのを嫌う。
233
- %%% そのため、節(Section)のタイトル直後が1行だけで改ページされるくらいなら
234
- %%% 節タイトルの直前で改ページすることをLaTeXは選ぶ。
235
- %%% このせいで、十分な空きがあるのに節タイトル前で改ページされることがある。
236
- %%% これを避けるには、config-starter.ymlで「page_clubline: true」を設定する。
237
- \ifempty{\starter@page@clubline}\else
238
- %% jsbook.styからコピーして変更
239
- \def\@afterheading{%
240
- \@nobreaktrue
241
- \everypar{%
242
- \if@nobreak
243
- \@nobreakfalse
244
- %\clubpenalty \@M % original: \@Mは100万
245
- \clubpenalty \z@ % modified: \z@は0
246
- \if@afterindent \else
247
- {\setbox\z@\lastbox}%
248
- \fi
249
- \else
250
- \clubpenalty \@clubpenalty
251
- \everypar{\everyparhook}%
252
- \fi\everyparhook}}
253
- \fi
254
-
255
-
256
- %%% 「//paragraphend」ブロック命令用
257
- \newcommand\ParagraphEnd{%
258
- \vspace{0.5\Cvs}%
259
- }
260
- \newcommand\SubparagraphEnd{%
261
- \vspace{0.0\Cvs}%
262
- }
@@ -1,105 +0,0 @@
1
- %%% -*- coding: utf-8 -*-
2
-
3
- %%%
4
- %%% 会話形式
5
- %%%
6
-
7
- %%% 会話リスト
8
- \newenvironment{startertalklist}{%
9
- \addvspace{\starter@talklist@listmargin}% % 空きを入れる
10
- \vspace{\starter@talklist@itemmargin}% % 空きを調整
11
- }{%
12
- \vspace{-\starter@talklist@itemmargin}% % 空きを調整
13
- \addvspace{\starter@talklist@listmargin}% % 空きを入れる
14
- }
15
-
16
- %%% 会話項目
17
- \newcommand\startertalk[3]{{%
18
- \edef\@image{#1}% % 画像ファイル
19
- \edef\@chara{#2}% % 名前(発言者名)
20
- \ifx\@image\@empty% % 画像が指定されなければ、
21
- \rlap{% % 表示はするけど位置を移動しない
22
- \starter@talklist@character{\@chara}% 名前を表示
23
- }%
24
- \settowidth{\@tempdima}{% % 名前と ':「' を表示したときの幅
25
- \starter@talklist@character{\@chara}% 名前と ':'
26
- \starter@talklist@itemstart% % '「'
27
- }%
28
- \addtolength{\@tempdima}{% % 名前と ':「' の表示幅から、
29
- -\starter@talklist@indent% % 会話文左の空き幅を引く
30
- }%
31
- \vspace{-\baselineskip}% % なぜか1行下がるので戻す
32
- \else% % 画像が指定されれば、
33
- \needvspace{\starter@talklist@needvspace}% 縦方向の空きがなければ改ページ
34
- %\vspace{-\intextsep}% % 参考:美文書第8版p.159
35
- \vspace{-\baselineskip}% % 画像上部の空きを調整
36
- \vbox to -0.2zw{% % 画像の上部を本文と揃える
37
- \noindent% % 画像を字下げさせない
38
- \starter@talklist@itemimage{\@image}% 画像を表示
39
- }%
40
- \setlength{\@tempdima}{0pt}% % 画像の場合は名前が長すぎるようなことは起こらない
41
- \fi%
42
- {%
43
- \setlength{\leftskip}{\starter@talklist@indent}% 会話文の左側の空きを設定
44
- \noindent% % 最初の段落だけ字下げしない
45
- \ifdim\@tempdima>0pt% % 左側の空きより名前のほうが長ければ、
46
- \hspace{\@tempdima}% % 会話文の開始位置をずらす
47
- \fi%
48
- \llap{\starter@talklist@itemstart}% '「' を表示
49
- #3% % 会話文を表示
50
- \rlap{\starter@talklist@itemend}% % '」' を表示
51
- \par% % 改行がわり
52
- \ifx\@image\@empty% % 画像を使うとき、
53
- \else%
54
- \starter@talklist@adjustheight{#3}% 会話文が短い場合は画像高さと揃える
55
- \fi%
56
- }%
57
- \vspace{\starter@talklist@itemmargin}% 会話項目間に空きを入れる
58
- }}%
59
-
60
- %%% 名前を表示
61
- \newcommand{\starter@talklist@character}[1]{%
62
- {%
63
- {\starter@talklist@namefont #1}% % ゴシック体で表示
64
- \starter@talklist@separator% % 「:」を表示
65
- }%
66
- }
67
- \def\starter@talklist@namefont{\gtfamily\sffamily} % ゴシック体
68
-
69
- %%% 会話文が少ないとき、会話文の高さを画像と揃える
70
- \newcommand{\starter@talklist@adjustheight}[1]{%
71
- {%
72
- \edef\imgw{\starter@talklist@imagewidth}% % 画像幅
73
- \edef\imgh{\starter@talklist@imageheight}% % 画像高さ
74
- \ifx\imgh\empty% % 画像高さが無指定なら
75
- \edef\imgh{\starter@talklist@imagewidth}% 画像幅と同じにする
76
- \fi%
77
- \setlength{\@tempdima}{% % 画像を除いた、会話文の本文幅
78
- \dimexpr \textwidth-\starter@talklist@indent%
79
- }
80
- \sbox{0}{\parbox{\@tempdima}{#1}}%% 会話文の表示サイズを調べる
81
- \setlength{\@tempdimb}{\ht0+\dp0}%% 会話文の表示上の高さが
82
- \ifdim\@tempdimb<\imgh% % 画像より低ければ
83
- \setlength{\@tempdimc}{\imgh-\@tempdimb}
84
- \vspace{\@tempdimc}% % その分の空きを入れる
85
- \fi%
86
- }%
87
- }
88
-
89
- %%% 会話の画像を表示
90
- \newcommand\starter@talklist@itemimage[1]{%
91
- \ifx\starter@talklist@imageborder\empty% 画像に枠線をつけない場合
92
- \starter@talklist@image{#1}%
93
- \else% % 画像に枠線をつける場合
94
- \textcolor{gray}{% % グレーの枠線
95
- \fbox{\starter@talklist@image{#1}}%
96
- }%
97
- \fi%
98
- }
99
- \newcommand{\starter@talklist@image}[1]{%
100
- \if\starter@talklist@imageheight\empty% 画像の高さが指定されている場合
101
- \includegraphics[width=\starter@talklist@imagewidth]{#1}%
102
- \else% % 画像の高さが指定されてない場合
103
- \includegraphics[width=\starter@talklist@imagewidth,height=\starter@talklist@imageheight]{#1}%
104
- \fi%
105
- }
@@ -1,72 +0,0 @@
1
- %%% -*- coding: utf-8 -*-
2
-
3
- %%%
4
- %%% 目次
5
- %%%
6
-
7
-
8
- %%% 目次の上余白を狭める(jsbook.clsからコピー)
9
- \renewcommand{\tableofcontents}{%
10
- \settowidth\jsc@tocl@width{\headfont\prechaptername\postchaptername}%
11
- \settowidth\@tempdima{\headfont\appendixname}%
12
- \ifdim\jsc@tocl@width<\@tempdima \setlength\jsc@tocl@width{\@tempdima}\fi
13
- \ifdim\jsc@tocl@width<2zw \divide\jsc@tocl@width by 2 \advance\jsc@tocl@width 1zw\fi
14
- \if@twocolumn
15
- \@restonecoltrue\onecolumn
16
- \else
17
- \@restonecolfalse
18
- \fi
19
- %
20
- %\chapter*{\contentsname}%
21
- %% 章も目次も右起こしにする or しない
22
- \if@openleft\cleardoublepage\else
23
- \if@openright\cleardoublepage\else\clearpage\fi\fi
24
- %% 章が右起こしでも、目次は右起こしにしない
25
- %\clearpage
26
- %
27
- \plainifnotempty
28
- \@ifundefined{Chapter}{% % starter-section.sty を使っているとき
29
- \@makechapterhead{\contentsname}%
30
- }{% % starter-heading.sty を使っているとき
31
- \Chapter*[]{\contentsname}%
32
- }%
33
- %
34
- \@mkboth{\contentsname}{}%
35
- \@starttoc{toc}%
36
- \if@restonecol\twocolumn\fi
37
- }
38
-
39
- %%% 目次のページ番号にもリンクをつける
40
- %\@ifundefined{@hyperref}{}{%
41
- % \let\original@contentsline=\contentsline
42
- % \renewcommand{\contentsline}[4]{%
43
- % \original@contentsline{#1}{#2}{\hyperlink{#4}{#3}}{#4}
44
- % }
45
- %}
46
-
47
- %%% 目次での章 (Chapter) 直後での改ページを防ぐ
48
- \let\original@l@chapter=\l@chapter % もとの定義を保存
49
- \renewcommand*{\l@chapter}[2]{{%
50
- \needvspace{2.5zw}% % スペースがなければ改ページ
51
- \original@l@chapter{#1}{#2}% % もとの定義を呼び出す
52
- }}
53
-
54
- %%% 目次での節 (Section) をゴシック体に変更
55
- \let\original@l@section=\l@section % もとの定義を保存
56
- \renewcommand*{\l@section}[2]{{%
57
- \original@l@section{\gtfamily\sffamily #1}{#2}% % ゴシック体に変更
58
- }}
59
-
60
- %%% 目次での項 (Subsection) を少し小さくして行間を狭める
61
- \let\original@l@subsection=\l@subsection % もとの定義を保存
62
- \renewcommand*{\l@subsection}[2]{{%
63
- \baselineskip=0.90\baselineskip% % 行間を狭める
64
- \original@l@subsection{\hspace{2zw}\small #1}{\small #2}% 少し小さく、2文字分字下げ
65
- }}
66
-
67
- %%% 目次での目 (Subsubsection) を小さくして行間を狭める
68
- \let\original@l@subsubsection=\l@subsubsection % もとの定義を保存
69
- \renewcommand*{\l@subsubsection}[2]{{%
70
- \baselineskip=0.85\baselineskip% % 行間を狭める
71
- \original@l@subsection{\footnotesize #1}{\footnotesize #2}% フォントを小さく
72
- }}
@@ -1,39 +0,0 @@
1
- %%% -*- coding: utf-8 -*-
2
-
3
-
4
- %%% 引数が空かどうか調べるマクロ
5
- \newcommand{\ifempty}[1]{%
6
- \edef\temp{#1}% % \ifx#1\empty とはできないので、一時マクロを定義
7
- \ifx\temp\empty% % \empty は他の言語でいえば空文字列に相当
8
- }
9
-
10
- %%% 文字列比較をするマクロ
11
- \newcommand\ifstreq[2]{
12
- \edef\@tempa{#1}%
13
- \edef\@tempb{#2}%
14
- \ifx\@tempa\@tempb% % \ifx#1#2 とはできないことに注意(TeXの仕様)
15
- }
16
-
17
- %%% 例:「\@eval{section}{blabla}」は「\section{blabla}」と同等
18
- \newcommand{\@eval}[1]{%
19
- \csname#1\endcsname%
20
- }
21
-
22
- %%% \lastskip を保存するための一時変数
23
- \newcommand{\keeplastskip}[1]{%
24
- \@tempskipa=\lastskip%
25
- \vskip -\lastskip\relax%
26
- #1%
27
- \vskip \@tempskipa\relax%
28
- \@tempskipa=0pt%
29
- }
30
-
31
- %%% 縦方向のスペースがあるか調べる。なければ改ページする。
32
- \newcommand{\needvspace}[1]{%
33
- \rule[#1]{0pt}{0pt}% % 幅のない縦線を引く。引くスペースがなければ改ページされる。
34
- \vspace{-#1}\par% % もとの位置に戻る
35
- }
36
-
37
- \ifdefined\rensuji\else
38
- \newcommand\rensuji[1]{#1}
39
- \fi