@mitsuharu/vivliostyle-theme-iosdc-pamphlet 0.1.5 → 0.3.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.
package/README.md CHANGED
@@ -6,7 +6,7 @@ This is a Vivliostyle theme for techbook of iOSDC Japan pamphlet.
6
6
 
7
7
  ## Required
8
8
 
9
- - @vivliostyle/cli >= 8.16.0
9
+ - @vivliostyle/cli >= 9.3.2
10
10
 
11
11
  ## Use
12
12
 
@@ -1,11 +1,14 @@
1
- # バブルソートの説明
1
+ <header>
2
+
3
+ # サンプルのタイトルですサンプルのタイトルですサンプルのタイトルです
2
4
 
3
5
  <div class="author-info">
4
- サンプルたろう(株式会社????)<BR />
5
- 𝕏: @????<BR />
6
- Bluesky: @????.bsky.social
6
+ サンプルたろう<br>
7
+ 株式会社????
7
8
  </div>
8
9
 
10
+ </header>
11
+
9
12
  バブルソートは、隣接する要素を比較して並べ替える簡単なソートアルゴリズムです。初学者にも分かりやすいように、Swift のコードと一緒にイラストと表を使って説明します。[^ChatGPT]
10
13
 
11
14
  [^ChatGPT]: この文章と画像は ChatGPT で書きました
@@ -16,6 +19,16 @@ Bluesky: @????.bsky.social
16
19
 
17
20
  ![バブルソートの過程](./images/bubble-sort.png){width=300}
18
21
 
22
+ <!-- <figure class="column-top">
23
+ <img src="./images/bubble-sort.png">
24
+ <figcaption>キャプション</figcaption>
25
+ </figure> -->
26
+
27
+ <!-- <figure>
28
+ <img src="./images/bubble-sort.png">
29
+ <figcaption>キャプション</figcaption>
30
+ </figure> -->
31
+
19
32
  1. **初期状態**: ソートされていない配列が並んでいる
20
33
  2. **比較と交換**: 隣接する要素を比較し、必要に応じて交換する
21
34
  3. **最終状態**: 配列がソートされた状態になる
@@ -50,6 +63,9 @@ print("Sorted array: \(numbers)")
50
63
 
51
64
  ## バブルソートの過程を示す表
52
65
 
66
+ <figure class="column-top">
67
+ <figcaption>Markdownの表のキャプション</figcaption>
68
+
53
69
  | イテレーション | 配列の状態 | 比較された要素 | 交換された要素 |
54
70
  |--------------|--------------------|-------------------|-------------|
55
71
  | 初期状態 | [64, 34, 25, 12, 22, 11, 90] | - | - |
@@ -59,6 +75,8 @@ print("Sorted array: \(numbers)")
59
75
  | ... | ... | ... | ... |
60
76
  | 最終状態 | [11, 12, 22, 25, 34, 64, 90] | - | - |
61
77
 
78
+ </figure>
79
+
62
80
  この表は、各イテレーションごとに配列の状態がどのように変化するかを示しています。各ステップで、隣接する要素を比較し、必要に応じて交換することで、配列が徐々にソートされていきます。
63
81
 
64
82
  バブルソートは、シンプルなアルゴリズムですが、大規模なデータセットには効率的ではないため、学習目的や小規模なデータセットでの使用に適しています。
package/package.json CHANGED
@@ -1,26 +1,29 @@
1
1
  {
2
2
  "name": "@mitsuharu/vivliostyle-theme-iosdc-pamphlet",
3
3
  "description": "It is vivliostyle theme for iOSDC Japan pamphlet",
4
- "version": "0.1.5",
4
+ "version": "0.3.0",
5
5
  "author": "Mitsuharu Emoto <mthr1982@gmail.com>",
6
6
  "main": "theme.css",
7
7
  "scripts": {
8
- "start": "vivliostyle build && open ./book.pdf",
9
- "build": "vivliostyle build",
10
- "open": "open ./book.pdf",
8
+ "start": "vivliostyle build && open ./dist/book.pdf",
9
+ "pdf": "vivliostyle build",
10
+ "open": "open ./dist/book.pdf",
11
11
  "preview": "vivliostyle preview",
12
- "validate": "vivliostyle-theme-scripts validate"
12
+ "validate": "vivliostyle-theme-scripts validate",
13
+ "check": "biome check",
14
+ "check-write": "biome check --write"
13
15
  },
14
16
  "dependencies": {
15
- "@vivliostyle/theme-base": "1.0.1",
16
- "@vivliostyle/theme-techbook": "1.0.1"
17
+ "@vivliostyle/theme-base": "2.0.0",
18
+ "@vivliostyle/theme-techbook": "2.0.0"
17
19
  },
18
20
  "devDependencies": {
19
- "@vivliostyle/cli": "^8.16.0",
20
- "vivliostyle-theme-scripts": "^0.3.5"
21
+ "@biomejs/biome": "^2.0.5",
22
+ "@vivliostyle/cli": "^9.3.2",
23
+ "vivliostyle-theme-scripts": "^0.3.6"
21
24
  },
22
25
  "peerDependencies": {
23
- "@vivliostyle/cli": ">=8.16.0"
26
+ "@vivliostyle/cli": ">=9.3.2"
24
27
  },
25
28
  "peerDependenciesMeta": {
26
29
  "@vivliostyle/cli": {
@@ -57,5 +60,5 @@
57
60
  "publishConfig": {
58
61
  "registry": "https://registry.npmjs.org/"
59
62
  },
60
- "packageManager": "yarn@4.5.3"
63
+ "packageManager": "yarn@4.16.0"
61
64
  }
package/theme.css CHANGED
@@ -3,9 +3,9 @@
3
3
  @import url(../../@vivliostyle/theme-base/css/lib/prism/theme-okaidia.css);
4
4
  @import url(../../@vivliostyle/theme-techbook/theme.css);
5
5
 
6
- code[class*=language-],
7
- pre[class*=language-] {
8
- color: #25292E;
6
+ code[class*="language-"],
7
+ pre[class*="language-"] {
8
+ color: #25292e;
9
9
  background: none;
10
10
  text-shadow: 0 1px rgba(0, 0, 0, 0.3);
11
11
  font-weight: 500;
@@ -26,7 +26,7 @@ pre[class*=language-] {
26
26
  }
27
27
 
28
28
  /* Code blocks */
29
- pre[class*=language-] {
29
+ pre[class*="language-"] {
30
30
  padding: 1em;
31
31
  margin: 0.5em 0;
32
32
  overflow: auto;
@@ -35,16 +35,16 @@ pre[class*=language-] {
35
35
  border-bottom: 0.5px solid;
36
36
  border-right: 0.5px solid;
37
37
  border-left: 0.5px solid;
38
- border-color: #1F2430;
38
+ border-color: #1f2430;
39
39
  }
40
40
 
41
- :not(pre) > code[class*=language-],
42
- pre[class*=language-] {
43
- background: #F8F8F8;
41
+ :not(pre) > code[class*="language-"],
42
+ pre[class*="language-"] {
43
+ background: #f8f8f8;
44
44
  }
45
45
 
46
46
  /* Inline code */
47
- :not(pre) > code[class*=language-] {
47
+ :not(pre) > code[class*="language-"] {
48
48
  padding: 0.1em;
49
49
  border-radius: 0.3em;
50
50
  white-space: normal;
@@ -54,11 +54,11 @@ pre[class*=language-] {
54
54
  .token.prolog,
55
55
  .token.doctype,
56
56
  .token.cdata {
57
- color: #76A363;
57
+ color: #76a363;
58
58
  }
59
59
 
60
60
  .token.punctuation {
61
- color: #25292E;
61
+ color: #25292e;
62
62
  }
63
63
 
64
64
  .namespace {
@@ -75,7 +75,7 @@ pre[class*=language-] {
75
75
 
76
76
  .token.boolean,
77
77
  .token.number {
78
- color: #C4494A;
78
+ color: #c4494a;
79
79
  }
80
80
 
81
81
  .token.selector,
@@ -84,7 +84,7 @@ pre[class*=language-] {
84
84
  .token.char,
85
85
  .token.builtin,
86
86
  .token.inserted {
87
- color: #C13E2A;
87
+ color: #c13e2a;
88
88
  }
89
89
 
90
90
  .token.operator,
@@ -93,24 +93,24 @@ pre[class*=language-] {
93
93
  .language-css .token.string,
94
94
  .style .token.string,
95
95
  .token.variable {
96
- color: #25292E;
96
+ color: #25292e;
97
97
  }
98
98
 
99
99
  .token.atrule,
100
100
  .token.attr-value {
101
- color: #C4494A;
101
+ color: #c4494a;
102
102
  }
103
103
 
104
104
  .token.function {
105
- color: #7C53D8;
105
+ color: #7c53d8;
106
106
  }
107
107
 
108
108
  .token.class-name {
109
- color: #32565B;
109
+ color: #32565b;
110
110
  }
111
111
 
112
112
  .token.keyword {
113
- color: #C4494A;
113
+ color: #c4494a;
114
114
  }
115
115
 
116
116
  .token.regex,
@@ -131,8 +131,8 @@ pre[class*=language-] {
131
131
  cursor: help;
132
132
  }
133
133
 
134
- code[class*=language-],
135
- pre[class*=language-] {
134
+ code[class*="language-"],
135
+ pre[class*="language-"] {
136
136
  margin: 1.5em 0;
137
137
  line-height: 1.2 !important;
138
138
  letter-spacing: 0.03rem !important;
@@ -148,7 +148,58 @@ pre[class*=language-] {
148
148
 
149
149
  :root {
150
150
  font-weight: 400;
151
- line-height: 1.7;
151
+ line-height: 1.8;
152
+ column-count: 1; /* 段組の設定 */
153
+ column-fill: auto;
154
+ column-gap: 10mm;
155
+ }
156
+
157
+ header {
158
+ float: block-start;
159
+ float-reference: page;
160
+ text-align: center;
161
+ margin-bottom: 10mm;
162
+ }
163
+
164
+ .column-top {
165
+ float: block-start;
166
+ float-reference: page;
167
+ }
168
+
169
+ .column-bottom {
170
+ float: block-end;
171
+ float-reference: page;
172
+ }
173
+
174
+ /* 図のキャプション */
175
+ figure.fig,
176
+ figure:has(> img.fig) {
177
+ counter-increment: figure;
178
+ }
179
+ figure.fig figcaption::before,
180
+ figure:has(> img.fig) figcaption::before {
181
+ content: "図" counter(figure);
182
+ }
183
+
184
+ /* 表のキャプション */
185
+ figure.table {
186
+ counter-increment: table;
187
+ }
188
+ figure.table figcaption::before {
189
+ content: "表" counter(table);
190
+ }
191
+ figure.fig figcaption::before,
192
+ figure:has(> img.fig) figcaption::before,
193
+ figure.table figcaption::before {
194
+ font-weight: bold;
195
+ font-family: sans-serif;
196
+ margin-inline-end: 1rem;
197
+ }
198
+ figure.fig img:not(:first-of-type) {
199
+ margin-inline-start: 1rem; /* 画像と画像の間隔 */
200
+ }
201
+ table {
202
+ border-collapse: collapse;
152
203
  }
153
204
 
154
205
  h1,
@@ -159,16 +210,17 @@ h3 {
159
210
 
160
211
  h1 {
161
212
  font-size: 2.3rem;
162
- line-height: 1.2;
213
+ line-height: 1.3;
214
+ text-align: center;
163
215
  }
164
216
 
165
217
  h2 {
166
- font-size: 1.8rem;
218
+ font-size: 1.5rem;
167
219
  line-height: 1.2;
168
220
  }
169
221
 
170
222
  h3 {
171
- font-size: 1.4rem;
223
+ font-size: 1.2rem;
172
224
  line-height: 1.2;
173
225
  }
174
226
 
@@ -206,24 +258,24 @@ pre {
206
258
  .token {
207
259
  font-size: 100%;
208
260
  }
209
- :not(.footnote) > a[href^='http']::before {
261
+ :not(.footnote) > a[href^="http"]::before {
210
262
  display: none;
211
263
  }
212
- :not(.footnote) > a[href^='http']::after {
264
+ :not(.footnote) > a[href^="http"]::after {
213
265
  display: none;
214
266
  }
215
267
  }
216
268
 
217
269
  @page {
218
270
  size: 210mm 297mm;
219
- margin-top: 25mm;
220
- margin-bottom: 21mm;
271
+ margin-top: 20mm;
272
+ margin-bottom: 23mm;
221
273
  }
222
274
 
223
275
  @page :left {
224
276
  /* 偶数ページの設定 */
225
- margin-left: 30mm;
226
- margin-right: 25mm;
277
+ margin-left: 22mm;
278
+ margin-right: 20mm;
227
279
 
228
280
  /* 下部のページ数と上部の表示を削除する */
229
281
  --vs-page--mbox-content-top-left: "";
@@ -232,8 +284,8 @@ pre {
232
284
 
233
285
  @page :right {
234
286
  /* 奇数ページの設定 */
235
- margin-left: 25mm;
236
- margin-right: 30mm;
287
+ margin-left: 20mm;
288
+ margin-right: 22mm;
237
289
 
238
290
  /* 下部のページ数と上部の表示を削除する */
239
291
  --vs-page--mbox-content-top-right: "";
@@ -242,22 +294,24 @@ pre {
242
294
 
243
295
  @media print {
244
296
  :root {
245
- /* フォントの基本サイズ */
246
- /* 2023 14px を設定したが、書籍上では少し大きく感じた */
247
- font-size: 12px;
297
+ /* フォントの基本サイズ */
298
+ /* おすすめサイズはヒラギノ角ゴシック8.5ptだが、Noto Sans JP を利用するので少し大きく設定する */
299
+ font-size: 10pt;
300
+ line-height: 1.8;
248
301
  }
249
302
  .token {
250
- /* ソースコードの文字サイズ */
251
- /* 100% ならば基本サイズと同じ大きさになります */
252
- font-size: 100%;
253
- }
303
+ /* ソースコードの文字サイズ */
304
+ /* 100% ならば基本サイズと同じ大きさになります */
305
+ font-size: 100%;
306
+ }
254
307
  }
255
308
 
256
309
  /* 著者紹介のブロック */
257
310
  .author-info {
258
- display: flex;
259
- justify-content: flex-end;
260
- text-align: left;
311
+ font-size: 1.5rem;
312
+ line-height: 1.4;
313
+ font-weight: 500;
314
+ text-align: center;
261
315
  }
262
316
 
263
317
  /* 改行しない */
@@ -265,3 +319,9 @@ pre {
265
319
  word-wrap: break-word;
266
320
  white-space: nowrap;
267
321
  }
322
+
323
+ /* 改行しない */
324
+ .nowrap {
325
+ word-wrap: break-word;
326
+ white-space: nowrap;
327
+ }
@@ -7,7 +7,5 @@ module.exports = {
7
7
  ],
8
8
  entry: ['example/default.md'],
9
9
  workspaceDir: '.vivliostyle',
10
- output: [
11
- 'book.pdf'
12
- ],
13
- };
10
+ output: ['dist/book.pdf'],
11
+ }