@mitsuharu/vivliostyle-theme-iosdc-pamphlet 0.2.0 → 0.3.1

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.1",
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,70 @@ 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
+ /* 最初のページの左段の先頭に空白ができるのを防ぐ */
158
+ p {
159
+ margin-break: discard;
160
+ }
161
+
162
+ /* 著者の所属など */
163
+ .affiliation {
164
+ float: block-end;
165
+ float-reference: column;
166
+ border-block-start: thin solid currentcolor;
167
+ }
168
+
169
+ header {
170
+ float: block-start;
171
+ float-reference: page;
172
+ text-align: center;
173
+ margin-bottom: 10mm;
174
+ }
175
+
176
+ .column-top {
177
+ float: block-start;
178
+ float-reference: page;
179
+ }
180
+
181
+ .column-bottom {
182
+ float: block-end;
183
+ float-reference: page;
184
+ }
185
+
186
+ /* 図のキャプション */
187
+ figure.fig,
188
+ figure:has(> img.fig) {
189
+ counter-increment: figure;
190
+ }
191
+ figure.fig figcaption::before,
192
+ figure:has(> img.fig) figcaption::before {
193
+ content: "図" counter(figure);
194
+ }
195
+
196
+ /* 表のキャプション */
197
+ figure.table {
198
+ counter-increment: table;
199
+ }
200
+ figure.table figcaption::before {
201
+ content: "表" counter(table);
202
+ }
203
+ figure.fig figcaption::before,
204
+ figure:has(> img.fig) figcaption::before,
205
+ figure.table figcaption::before {
206
+ font-weight: bold;
207
+ font-family: sans-serif;
208
+ margin-inline-end: 1rem;
209
+ }
210
+ figure.fig img:not(:first-of-type) {
211
+ margin-inline-start: 1rem; /* 画像と画像の間隔 */
212
+ }
213
+ table {
214
+ border-collapse: collapse;
152
215
  }
153
216
 
154
217
  h1,
@@ -159,16 +222,17 @@ h3 {
159
222
 
160
223
  h1 {
161
224
  font-size: 2.3rem;
162
- line-height: 1.2;
225
+ line-height: 1.3;
226
+ text-align: center;
163
227
  }
164
228
 
165
229
  h2 {
166
- font-size: 1.8rem;
230
+ font-size: 1.5rem;
167
231
  line-height: 1.2;
168
232
  }
169
233
 
170
234
  h3 {
171
- font-size: 1.4rem;
235
+ font-size: 1.2rem;
172
236
  line-height: 1.2;
173
237
  }
174
238
 
@@ -216,14 +280,14 @@ pre {
216
280
 
217
281
  @page {
218
282
  size: 210mm 297mm;
219
- margin-top: 25mm;
220
- margin-bottom: 21mm;
283
+ margin-top: 20mm;
284
+ margin-bottom: 23mm;
221
285
  }
222
286
 
223
287
  @page :left {
224
288
  /* 偶数ページの設定 */
225
- margin-left: 30mm;
226
- margin-right: 25mm;
289
+ margin-left: 22mm;
290
+ margin-right: 20mm;
227
291
 
228
292
  /* 下部のページ数と上部の表示を削除する */
229
293
  --vs-page--mbox-content-top-left: "";
@@ -232,8 +296,8 @@ pre {
232
296
 
233
297
  @page :right {
234
298
  /* 奇数ページの設定 */
235
- margin-left: 25mm;
236
- margin-right: 30mm;
299
+ margin-left: 20mm;
300
+ margin-right: 22mm;
237
301
 
238
302
  /* 下部のページ数と上部の表示を削除する */
239
303
  --vs-page--mbox-content-top-right: "";
@@ -243,8 +307,9 @@ pre {
243
307
  @media print {
244
308
  :root {
245
309
  /* フォントの基本サイズ */
246
- /* 2023 14px を設定したが、書籍上では少し大きく感じた */
247
- font-size: 12px;
310
+ /* おすすめサイズはヒラギノ角ゴシック8.5ptだが、Noto Sans JP を利用するので少し大きく設定する */
311
+ font-size: 10pt;
312
+ line-height: 1.8;
248
313
  }
249
314
  .token {
250
315
  /* ソースコードの文字サイズ */
@@ -255,9 +320,10 @@ pre {
255
320
 
256
321
  /* 著者紹介のブロック */
257
322
  .author-info {
258
- display: flex;
259
- justify-content: flex-end;
260
- text-align: left;
323
+ font-size: 1.5rem;
324
+ line-height: 1.4;
325
+ font-weight: 500;
326
+ text-align: center;
261
327
  }
262
328
 
263
329
  /* 改行しない */
@@ -265,3 +331,9 @@ pre {
265
331
  word-wrap: break-word;
266
332
  white-space: nowrap;
267
333
  }
334
+
335
+ /* 改行しない */
336
+ .nowrap {
337
+ word-wrap: break-word;
338
+ white-space: nowrap;
339
+ }