aboutsummaryrefslogtreecommitdiffhomepage
path: root/slides.typ
blob: ae0747e5b4d466f37120ffd888ebf1e2de7ae9f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#import "@preview/touying:0.6.1": *
#import "@preview/codly:1.3.0": *
#import "@preview/cjk-unbreak:0.2.0": remove-cjk-break-space, transform-childs
#import "setoka.typ": *

#show: codly-init.with()

#show: remove-cjk-break-space

#let plugin_tokenize_ja_uninitialized = plugin("plugins/tokenize-ja/tokenize-ja.wasm")
#let plugin_tokenize_ja = plugin.transition(plugin_tokenize_ja_uninitialized.init)

#let tokenize(s) = {
  cbor(plugin_tokenize_ja.tokenize(bytes(s)))
}

#let get-inner-str(e) = {
  if e.func() == text {
    if e.has("text") {
      e.text
    } else if e.has("body") {
      e.body
    } else {
      none
    }
  } else {
    none
  }
}

#let make-助詞-small(rest) = {
  rest = transform-childs(rest, make-助詞-small)
  if utils.is-sequence(rest) {
    for child in rest.children {
      let s = get-inner-str(child)
      if s != none {
        for t in tokenize(s) {
          if t.at(1) == "助詞" {
            [#set text(size: 0.9em);#t.at(0)]
          } else {
            t.at(0)
          }
        }
      } else {
        child
      }
    }
  } else {
    rest
  }
}

#show: make-助詞-small

#show: setoka-theme.with(
  aspect-ratio: "16-9",
  config-info(
    title: [
      TODO
    ],
    subtitle: [PHP 勉強会\@東京 第 TODO 回],
    author: [nsfisis (いまむら)],
    date: datetime(year: TODO, month: TODO, day: TODO),
  ),
  config-common(preamble: {
    codly(
      fill: rgb("#eee"),
      lang-format: none,
      number-format: none,
      zebra-fill: none,
    )
  })
)

#set text(font: "Noto Sans CJK JP", lang: "ja")

#title-slide()

#about-slide()

TODO

---

#[
  #set align(center + horizon)

  ご静聴 \
  ありがとうございました
]