180 lines
3.8 KiB
Typst
180 lines
3.8 KiB
Typst
#import "PageTemplate.typ": *
|
|
|
|
#set document(
|
|
title: "เครื่องยืนยันตัวตนด้วย NFC",
|
|
author: (
|
|
"ประภากร ศรีวรสาร",
|
|
"พีรดา แสงแป้",
|
|
"ศตคุณ อุตมะ",
|
|
),
|
|
)
|
|
|
|
#[
|
|
#show raw.where(block: false): set text(font: "Laksaman", size: 10.5pt)
|
|
#show raw.where(block: true): set block(fill: rgb("#282A36"), inset: 1.5em)
|
|
#show raw.where(block: true): set raw(theme: "Dracula.tmTheme")
|
|
#show raw.where(block: true): set text(
|
|
fill: rgb("#F8F8F2"),
|
|
font: "Cascadia Code",
|
|
size: 10pt,
|
|
)
|
|
|
|
#include "Cover.typ"
|
|
|
|
#counter(page).update(1)
|
|
#show: page-theme
|
|
#include "Abstract.typ"
|
|
#pagebreak()
|
|
#include "Acknowledgements.typ"
|
|
#pagebreak()
|
|
|
|
#show outline: set heading(outlined: true)
|
|
#show outline.entry: it => {
|
|
show linebreak: [ ]
|
|
link(
|
|
it.element.location(),
|
|
grid(
|
|
columns: 3,
|
|
column-gutter: 1fr,
|
|
[#h(3.25em * (it.level - 1)) #it.prefix() #it.body()],
|
|
h(1em),
|
|
context page-numbering(counter(page).at(it.element.location()).first()),
|
|
),
|
|
)
|
|
}
|
|
|
|
#[
|
|
#set page(header: none)
|
|
#show outline.entry: it => {
|
|
it
|
|
|
|
context {
|
|
let outline-pages = counter(page).at(it.location()).first()
|
|
let current-page = counter(page).get().first()
|
|
|
|
if current-page > outline-pages {
|
|
fake-h1("สารบัญ (ต่อ)")
|
|
v(1em)
|
|
h(1fr)
|
|
[หน้า]
|
|
}
|
|
}
|
|
}
|
|
#place(center, heading()[สารบัญ])
|
|
#linebreak()
|
|
#linebreak()
|
|
#h(1fr)
|
|
หน้า
|
|
#outline(title: none, depth: 2, indent: 3.75em)
|
|
]
|
|
|
|
#pagebreak()
|
|
|
|
#import "@preview/i-figured:0.2.4"
|
|
|
|
#[
|
|
#show outline.entry: it => {
|
|
show linebreak: [ ]
|
|
link(
|
|
it.element.location(),
|
|
grid(
|
|
columns: 3,
|
|
column-gutter: 1fr,
|
|
[#h(3.25em * (it.level - 1)) #it.prefix().children.at(2) #it.body()],
|
|
h(1em),
|
|
context page-numbering(
|
|
counter(page).at(it.element.location()).first(),
|
|
),
|
|
),
|
|
)
|
|
}
|
|
|
|
#place(center, heading[สารบัญตาราง])
|
|
#linebreak()
|
|
#linebreak()
|
|
ตารางที่
|
|
#h(1fr)
|
|
หน้า
|
|
|
|
#i-figured.outline(target-kind: table, title: none)
|
|
|
|
#pagebreak()
|
|
|
|
#place(center, heading[สารบัญรูป])
|
|
#linebreak()
|
|
#linebreak()
|
|
รูปที่
|
|
#h(1fr)
|
|
หน้า
|
|
|
|
#i-figured.outline(
|
|
title: none,
|
|
)
|
|
]
|
|
|
|
#show heading: i-figured.reset-counters
|
|
#show figure: i-figured.show-figure
|
|
|
|
#[
|
|
#show figure.caption.where(position: bottom): it => place(
|
|
center,
|
|
it,
|
|
dy: 2em,
|
|
)
|
|
#include "Chapter1.typ"
|
|
#include "Chapter2/Chapter2.typ"
|
|
#include "Chapter3/Chapter3.typ"
|
|
#include "Chapter4.typ"
|
|
#include "Chapter5.typ"
|
|
]
|
|
|
|
#bibliography(
|
|
"References.yaml",
|
|
title: "บรรณานุกรม",
|
|
full: true,
|
|
style: "nktc-style.csl",
|
|
)
|
|
|
|
#pagebreak()
|
|
|
|
= บรรณานุกรมภาพ
|
|
|
|
#let image-credits() = context {
|
|
let figures = query(figure.where(kind: "i-figured-image"))
|
|
let attributions = query(<afig>)
|
|
let offset = 0
|
|
|
|
for (idx, f) in figures.enumerate() {
|
|
if idx >= attributions.len() {
|
|
return
|
|
}
|
|
|
|
if attributions.at(idx).body.body == [] {
|
|
offset += 1
|
|
|
|
if idx + offset >= attributions.len() {
|
|
return
|
|
}
|
|
|
|
if attributions.at(idx + offset).body.body == [] {
|
|
continue
|
|
}
|
|
}
|
|
|
|
f.caption
|
|
h(3.8em)
|
|
|
|
if (idx + offset >= 9) {
|
|
h(0.5em)
|
|
}
|
|
|
|
attributions.at(idx + offset).body.body
|
|
linebreak()
|
|
}
|
|
}
|
|
|
|
#image-credits()
|
|
]
|
|
|
|
#include "ภาคผนวก/ภาคผนวก.typ"
|