@mitsuharu/vivliostyle-theme-iosdc-pamphlet 0.2.0 → 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 >= 9.3.1
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@mitsuharu/vivliostyle-theme-iosdc-pamphlet",
3
3
  "description": "It is vivliostyle theme for iOSDC Japan pamphlet",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "author": "Mitsuharu Emoto <mthr1982@gmail.com>",
6
6
  "main": "theme.css",
7
7
  "scripts": {
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "registry": "https://registry.npmjs.org/"
62
62
  },
63
- "packageManager": "yarn@4.9.2"
63
+ "packageManager": "yarn@4.16.0"
64
64
  }
package/theme.css CHANGED
@@ -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
 
@@ -216,14 +268,14 @@ pre {
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: "";
@@ -243,8 +295,9 @@ pre {
243
295
  @media print {
244
296
  :root {
245
297
  /* フォントの基本サイズ */
246
- /* 2023 14px を設定したが、書籍上では少し大きく感じた */
247
- font-size: 12px;
298
+ /* おすすめサイズはヒラギノ角ゴシック8.5ptだが、Noto Sans JP を利用するので少し大きく設定する */
299
+ font-size: 10pt;
300
+ line-height: 1.8;
248
301
  }
249
302
  .token {
250
303
  /* ソースコードの文字サイズ */
@@ -255,9 +308,10 @@ pre {
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
+ }