diff --git a/packages/preview/ncku-later/0.1.0/LICENSE b/packages/preview/ncku-later/0.1.0/LICENSE
new file mode 100644
index 0000000000..558f552325
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 CHUN-HAO CHANG
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/preview/ncku-later/0.1.0/Makefile b/packages/preview/ncku-later/0.1.0/Makefile
new file mode 100644
index 0000000000..5a93a754b7
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/Makefile
@@ -0,0 +1,9 @@
+ROOT_DIR = .
+FONT_DIR = fonts
+
+all: compile
+
+compile:
+ typst compile --root $(ROOT_DIR) --font-path $(FONT_DIR) template/main.typ
+watch:
+ typst watch --root $(ROOT_DIR) --font-path $(FONT_DIR) template/main.typ
diff --git a/packages/preview/ncku-later/0.1.0/README.md b/packages/preview/ncku-later/0.1.0/README.md
new file mode 100644
index 0000000000..95dfcf6317
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/README.md
@@ -0,0 +1,51 @@
+# 國立成功大學 碩博士論文模板 NCKU Thesis/Dissertation Template in Typst
+
+## Introduction
+
+This is a typst template which can be used to write thesis/dissertation in National Cheng Kung University.
+
+這個模板是基於 Typst 排版語言所撰寫的,主要作為[國立成功大學](https://www.ncku.edu.tw/)的碩博士畢業論文撰寫使用。
+
+### What is Typst?
+
+> Typst is a good choice for writing any long form text such as essays, articles, scientific papers, books, reports, and homework assignments.
+> Moreover, Typst is a great fit for any documents containing mathematical notation, such as papers in the math, physics, and engineering fields.
+> Finally, due to its strong styling and automation features, it is an excellent choice for any set of documents that share a common style, such as a book series.
+>
+> [Typst Docs](https://typst.app/docs/tutorial/)
+
+Many of you may have heard of or even used LaTeX, the powerful and classic typesetting language. However, its complexity often discourages many from diving deeper into it.
+
+For those who feel overwhelmed by LaTeX's intricate syntax, Typst might be a perfect alternative for you.
+As a relatively young language, Typst offers a clean and concise syntax, fast compilation speed, and comprehensive documentation.
+Despite its simplicity, Typst retains powerful and flexible typesetting capabilities, enabling users to achieve more than 90% of what they could typically do with LaTeX.
+
+大家應該或多或少都有聽過或甚至是接觸過 LaTex 這個強大且經典的排版語言,但或許也有很多人被其複雜的語法所勸退。
+針對這類人來說,或許你非常適合接觸 Typst。Typst 作為一門非常年輕的語言,有簡潔的語法、快速的編譯速度還有詳實的文件可以查閱。
+即使語法非常簡潔,Typst 卻不失其強大且具有彈性的排版能力,利用 Typst 可以做到接近 90% 以上本來可以在 LaTex 中做到的事情。
+
+If you’ve never worked with any markup language before, starting with Markdown might be a good idea.
+It serves as an excellent introduction and will make transitioning to Typst much smoother.
+For those already familiar with LaTeX, you can check out the [Typst - Guide for LaTeX Users](https://typst.app/docs/guides/guide-for-latex-users/).
+If you’ve written LaTeX before, picking up Typst will feel like a piece of cake!
+
+對於完全沒有接觸過任合標記式語言(Markup Language)的人,可以先參考看看 Markdown 這門語言,再來接觸 Typst 應該會容易很多!
+而對於那些本來就會寫 LaTeX 的人,可以閱讀 [Typst - Guide for LaTeX users](https://typst.app/docs/guides/guide-for-latex-users/),相信上手相信上手 Typst 對於寫過 LaTeX 的人來說根本就是 piece of cake。
+
+## Acknowledgements
+
+The completion of this template owes great gratitude to the following three projects:
+
+本模板的完成極力感謝以下三個專案
+
+1. [canonical-nthu-thesis](https://github.com/kotatsuyaki/canonical-nthu-thesis)
+2. [ncku-thesis-template-latex](https://github.com/wengan-li/ncku-thesis-template-latex)
+3. [modern-nju-thesis](https://github.com/nju-lug/modern-nju-thesis)
+
+which provided extensive references in terms of ideas and formatting.
+
+在想法上及格式上給予非常多參考
+
+## How to use?
+
+Please refer to the GitHub repository: [Haouo/NCKU-Thesis-Typst](https://github.com/Haouo/NCKU-Thesis-Typst)
diff --git a/packages/preview/ncku-later/0.1.0/assets/watermark-20160509_v2-a4.svg b/packages/preview/ncku-later/0.1.0/assets/watermark-20160509_v2-a4.svg
new file mode 100644
index 0000000000..e9bb57fc5d
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/assets/watermark-20160509_v2-a4.svg
@@ -0,0 +1,132 @@
+
+
diff --git a/packages/preview/ncku-later/0.1.0/layouts/extended-abstract-en.typ b/packages/preview/ncku-later/0.1.0/layouts/extended-abstract-en.typ
new file mode 100644
index 0000000000..29c8bb3324
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/layouts/extended-abstract-en.typ
@@ -0,0 +1,43 @@
+#let extended-abstract-en(
+ title-en: "A Thesis/Dissertation Template written in Typst for National Cheng Kung University",
+ institute: "Department of Electrical Engineering",
+ student-en: "Chun-Hao Chang",
+ advisor-en: "Chia-Chi Tsai",
+ summary: none,
+ keywords: (),
+ doc,
+) = {
+ // show thesis/dissertation title
+ set text(size: 14pt)
+ set align(center)
+ strong(title-en)
+ v(0.15cm)
+ // student and advisor names
+ set text(size: 12pt)
+ student-en
+ linebreak()
+ advisor-en
+ v(0.25em)
+ institute
+ v(0.5cm)
+
+ set align(left)
+ [= 英文延伸摘要 ]
+ set heading(outlined: false)
+ show heading.where(level: 1): it => {
+ set text(12pt)
+ set align(center)
+ smallcaps(it)
+ v(0.5em)
+ }
+
+ rect(inset: 1em)[
+ = SUMMARY
+
+ #summary
+
+ *Keyword*: #keywords.join(", ")
+ ]
+
+ doc
+}
diff --git a/packages/preview/ncku-later/0.1.0/layouts/mainmatter-or-appendix.typ b/packages/preview/ncku-later/0.1.0/layouts/mainmatter-or-appendix.typ
new file mode 100644
index 0000000000..de51f8c5af
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/layouts/mainmatter-or-appendix.typ
@@ -0,0 +1,183 @@
+// Helper function: check whether the current heading is lavel-1 heading
+#let is-chapter-start-page() = {
+ // find chapter headings on the current page.
+ let all-level-one-heading = query(heading.where(level: 1))
+ let current-page = here().page()
+ return (
+ all-level-one-heading
+ .filter(it => {
+ it.location().page() == current-page
+ })
+ .len()
+ > 0
+ )
+}
+
+// define custom numbering function
+#let custom-numbering-mainmatter(..args) = {
+ if args.pos().len() == 1 {
+ "Chapter " + str(args.pos().at(0)) + "."
+ } else {
+ numbering("1.1.1.", ..args)
+ }
+}
+#let custom-numbering-appendix(..args) = {
+ if args.pos().len() == 1 {
+ "Appendix " + numbering("A", args.pos().at(0)) + "."
+ } else {
+ numbering("A.1.1.", ..args)
+ }
+}
+
+/*
+ * NOTE: this should be applied to the mainmatter of the thesis/dissertation which excludes the appendix part
+ */
+#let mainmatter-or-appendix(mode: (mainmatter: true, appendix: false), doc) = {
+ // check mode
+ assert(
+ (
+ (mode.mainmatter and (not mode.appendix))
+ or (mode.appendix and (not mode.mainmatter))
+ ),
+ message: "You should only chose one mode! mainmatter or appendix",
+ )
+
+ // chose custom numbering function type according to mode
+ let custom-numbering(..args) = if mode.mainmatter {
+ custom-numbering-mainmatter(..args)
+ } else { custom-numbering-appendix(..args) }
+
+ // reset heading counter
+ counter(heading).update(0)
+
+ // Set the page numbering to arabic numerals.
+ //
+ // Although we use custom headers and footers to display the page numbers in the body part,
+ // this is still required to show the page numbers in arabic numerals in the outlines.
+ set page(
+ margin: (top: 23mm, bottom: 35mm, left: 30mm, right: 25mm),
+ numbering: "1",
+ header: context {
+ if not is-chapter-start-page() {
+ let level-1-heading-so-far = query(
+ heading.where(level: 1).before(here()),
+ )
+ let current-chapter-heading = level-1-heading-so-far.last()
+
+ // smallcaps([Chapter ] + str(current-chapter-number) + ".")
+ // h(0.75em)
+ // smallcaps(current-chapter-heading.body)
+ // display chapter info on the left
+ smallcaps(
+ custom-numbering(counter(heading).get().at(0))
+ + " "
+ + current-chapter-heading.body,
+ )
+ // display page number on the right
+ h(1fr)
+ counter(page).display() // page number
+ }
+ },
+ footer: context {
+ if is-chapter-start-page() {
+ h(1fr)
+ counter(page).display() // page number
+ }
+ },
+ )
+
+ // set paragraph
+ set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+
+ set heading(numbering: custom-numbering)
+
+ // NOTE: heading rule 1 -> apply to all headings except for level-1 heading
+ show heading: it => {
+ if (it.level > 1) {
+ set text(size: 14pt)
+ v(0.75cm)
+ block(
+ width: 100%,
+ {
+ let all-prev-headings = query(
+ selector(heading).before(here(), inclusive: false),
+ )
+ if all-prev-headings.len() > 1 {
+ let pre-heading = all-prev-headings.last()
+ let is-same-page = (
+ pre-heading.location().page() == it.location().page()
+ )
+ let is-colse = (
+ pre-heading.location().position().y + 65pt
+ >= it.location().position().y
+ )
+ if (is-same-page and is-colse) {
+ v(-30pt)
+ }
+ }
+ set par(justify: false)
+ grid(
+ columns: 2,
+ gutter: 1em,
+ counter(heading).display(it.numbering), it.body,
+ )
+ v(1em)
+ },
+ )
+ }
+ }
+
+ // NOTE: heading rule 2 -> apply to all level-1 headings
+ show heading.where(level: 1): it => {
+ // Start a chapter on a new page unless it's the 1st chapter,
+ // in which case it is already on a new page.
+ if counter(heading).get().at(0) != 1 {
+ pagebreak()
+ }
+
+ // Do not justify top-level headings, which have a large font.
+ set par(justify: false)
+
+ if it.numbering == none {
+ // Show the body of the heading.
+ block(
+ width: 100%,
+ {
+ set text(size: 24pt)
+ v(1.5em)
+ it.body
+ v(1em)
+ },
+ )
+ } else {
+ // Show "Chapter n" and the body of the heading on 2 separate lines.
+ align(
+ center,
+ block(
+ width: 100%,
+ {
+ set text(size: 21pt)
+ text(counter(heading).display(it.numbering))
+ linebreak()
+ it.body
+ v(1.2cm)
+ },
+ ),
+ )
+ }
+ }
+
+ // WARN: the order of heading-rule-1 and heading-rule-2 is important
+ // WARN: this is because that the first rule only redering all heading except for level-1
+ // WARN: then the seoncd rule renders the level-1 headings
+ // WARN: swaping of the order will make the rendering rule of level-1 headings be overwritten
+ // WARN: which makes level-1 headings disapper
+
+ // display contents
+ doc
+}
+
diff --git a/packages/preview/ncku-later/0.1.0/layouts/whole.typ b/packages/preview/ncku-later/0.1.0/layouts/whole.typ
new file mode 100644
index 0000000000..e80496f30f
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/layouts/whole.typ
@@ -0,0 +1,38 @@
+/*
+ * NOTE: this is the global settings which applys to the whole documents
+ * NOTE: includes cover, abstract, acknowledge, mainmatter, reference and appendix
+ *
+ * @param main-lang: the main language to writting the thesis/dissertation
+ * @param doc: contents of the following documents which the show rule apply to
+ */
+#let whole(
+ main-lang: (en: true, zh-tw: false),
+ doc,
+) = {
+ // check the lang type setting
+ assert(
+ (
+ (main-lang.at("en") and (not main-lang.at("zh-tw")))
+ or (main-lang.at("zh-tw") and (not main-lang.at("en")))
+ ), // XOR logic
+ message: "You should chose only one main language type!",
+ )
+
+ // apply the the whole thesis/dissertation
+ set page(paper: "a4")
+
+ // set the fonts of whole document
+ set text(
+ // NOTE: "Times New Roman" as main english font
+ // NOTE: "TW-MOE-Std-Kai" as main zh-tw font
+ font: ("Times New Roman", "TW-MOE-Std-Kai"),
+ lang: if main-lang.at("zh-tw") { "zh" } else { "en" },
+ region: if main-lang.at("zh-tw") { "tw" } else { none },
+ )
+
+ // make objects with "invisible" lebel be hidden
+ show label("invisible"): it => { }
+
+ // display the content
+ doc
+}
diff --git a/packages/preview/ncku-later/0.1.0/lib.typ b/packages/preview/ncku-later/0.1.0/lib.typ
new file mode 100644
index 0000000000..b9a1641052
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/lib.typ
@@ -0,0 +1,100 @@
+#import "layouts/whole.typ": whole
+#import "layouts/mainmatter-or-appendix.typ": mainmatter-or-appendix
+#import "layouts/extended-abstract-en.typ": extended-abstract-en
+#import "pages/cover.typ": *
+// #import "pages/approved-by.typ": *
+#import "pages/abstract.typ": *
+#import "pages/acknowledge.typ": make-acknowledge-en, make-acknowledge-zh-tw
+#import "pages/outline.typ": make-outline
+#import "pages/ref.typ": make-ref
+#import "utils/page-numb.typ": begin-of-roman-page-num, begin-of-arabic-page-num
+
+#let setup(
+ in-degree: (master: false, doctor: false),
+ in-institute: "",
+ in-student: (en: "", zh-tw: ""),
+ in-advisor: (en: "", zh-tw: ""),
+ in-coadvisor: (), // it should be a list with one or many two-key dicts which is (en: "", zh-tw: "")
+ in-title: (en: "", zh-tw: ""),
+ in-main-lang: (en: false, zh-tw: false),
+ in-date: (en: "", zh-tw: ""),
+) = {
+ // assertions
+ assert(
+ in-degree.master or in-degree.doctor,
+ message: "You should set degree correctly!",
+ )
+ assert(in-institute != "", message: "You should set institute correctly!")
+ assert(
+ in-student.en != "" and in-student.zh-tw != "",
+ message: "You should set student name correctly!",
+ )
+ assert(
+ in-advisor.en != "" and in-advisor.zh-tw != "",
+ message: "You should set advisor name correctly!",
+ )
+ assert(
+ in-title.en != "" and in-title.zh-tw != "",
+ message: "You should set title of the thesis/dissertation correctly!",
+ )
+ assert(
+ in-main-lang.en or in-main-lang.zh-tw,
+ message: "You should set the main language type correctly!",
+ )
+ // return functions the author need
+ return (
+ // NOTE: pages
+ make-cover: () => {
+ make-cover(
+ degree: in-degree,
+ institute: in-institute,
+ title: in-title,
+ student: in-student,
+ advisor: in-advisor,
+ coadvisor: in-coadvisor,
+ )
+ },
+ make-abstract-en: (keywords: (), doc) => {
+ make-abstract-en(keywords: keywords, doc)
+ },
+ make-abstract-zh-tw: (keywords: (), doc) => {
+ make-abstract-zh-tw(keywords: keywords, doc)
+ },
+ make-acknowledge-en: doc => {
+ make-acknowledge-en(doc)
+ },
+ make-acknowledge-zh-tw: doc => {
+ make-acknowledge-zh-tw(doc)
+ },
+ make-outline: () => {
+ make-outline()
+ },
+ make-ref: ref => {
+ make-ref(ref: ref)
+ },
+ // NOTE: layouts
+ whole: doc => {
+ whole(main-lang: in-main-lang, doc)
+ },
+ extended-abstract-en: (summary: [], keywords: (), doc) => {
+ extended-abstract-en(
+ title-en: in-title.en,
+ institute: in-institute,
+ student-en: in-student.en,
+ advisor-en: in-advisor.en,
+ summary: summary,
+ keywords: keywords,
+ doc,
+ )
+ },
+ mainmatter-or-appendix: (mode: (:), doc) => {
+ mainmatter-or-appendix(mode: mode, doc)
+ },
+ begin-of-roman-page-num: doc => {
+ begin-of-roman-page-num(doc)
+ },
+ begin-of-arabic-page-num: doc => {
+ begin-of-arabic-page-num(doc)
+ },
+ )
+}
diff --git a/packages/preview/ncku-later/0.1.0/pages/abstract.typ b/packages/preview/ncku-later/0.1.0/pages/abstract.typ
new file mode 100644
index 0000000000..4bf7e21f3b
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/pages/abstract.typ
@@ -0,0 +1,50 @@
+#let make-abstract-en(keywords: (), it) = [
+ #set text(12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(21pt)
+
+ #align(center)[
+ #heading(
+ level: 1,
+ numbering: none,
+ outlined: true,
+ )[Abstract]]
+
+
+ #v(0.5cm)
+
+ #h(1em) // first-line-indent for first par.
+ #it
+
+ #v(0.5cm)
+ #h(-1em)
+ Keywords: #keywords.join(", ")
+
+ #pagebreak()
+]
+
+#let make-abstract-zh-tw(keywords: (), it) = [
+ #set text(size: 12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(size: 21pt)
+
+ #align(center)[#heading(level: 1, numbering: none, outlined: true)[摘要]]
+
+ #v(0.5cm)
+ #h(1em) // first-line-indent for first par.
+ #it
+
+ #v(0.5cm)
+ #h(-1em)
+ 關鍵字:#keywords.join("、")
+
+ #pagebreak()
+]
diff --git a/packages/preview/ncku-later/0.1.0/pages/acknowledge.typ b/packages/preview/ncku-later/0.1.0/pages/acknowledge.typ
new file mode 100644
index 0000000000..95557c49fc
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/pages/acknowledge.typ
@@ -0,0 +1,38 @@
+#let make-acknowledge-en(it) = [
+ #set text(12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(21pt)
+
+ #align(center)[
+ #heading(
+ level: 1,
+ numbering: none,
+ outlined: true,
+ )[Acknowledgements]]
+
+ #v(0.5cm)
+ #h(1em) // first-line-indent for first par.
+ #it
+ #pagebreak()
+]
+
+#let make-acknowledge-zh-tw(keywords: (), it) = [
+ #set text(size: 12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(size: 21pt)
+
+ #align(center)[#heading(level: 1, numbering: none, outlined: true)[致謝]]
+
+ #v(0.5cm)
+ #h(1em) // first-line-indent for first par.
+ #it
+ #pagebreak()
+]
diff --git a/packages/preview/ncku-later/0.1.0/pages/approved-by.typ b/packages/preview/ncku-later/0.1.0/pages/approved-by.typ
new file mode 100644
index 0000000000..5467c8f417
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/pages/approved-by.typ
@@ -0,0 +1,40 @@
+#let make-approved-by(
+ degree: "doctor",
+ title-zh-tw: "以 Typst 撰寫之國立成功大學碩博士論文模板",
+ title-en: "A Thesis/Dissertation Template written in Typst\nfor National Cheng Kung University",
+ student-zh-tw: "張峻豪",
+ date: "",
+) = {
+ set page(
+ paper: "a4",
+ numbering: none,
+ margin: (top: 23mm, bottom: 30mm, left: 20mm, right: 20mm),
+ )
+
+ let degree_show = if degree == "doctor" [博士論文] else [碩士論文]
+
+ set align(top + center)
+ stack(
+ text(size: 25pt)[國立成功大學],
+ v(1cm),
+ text(size: 25pt, degree_show),
+ v(2cm),
+ text(size: 17pt, title-zh-tw),
+ v(0.5cm),
+ text(size: 17pt, title-en),
+ v(1cm),
+ text(size: 17pt)[研究生:#student-zh-tw \ 本論文業經審查及口試合格特此證明],
+ v(1cm),
+ place(left, dx: 0.75cm, text(size: 17pt)[論文考試委員:]),
+ v(1cm),
+ )
+
+ grid(
+ columns: (45%, 45%),
+ align: (left, right),
+ rows: (2cm, 2cm, 2cm),
+ line(length: 50%), line(length: 50%),
+ line(length: 100%), line(length: 100%),
+ line(length: 100%),
+ )
+}
diff --git a/packages/preview/ncku-later/0.1.0/pages/cover.typ b/packages/preview/ncku-later/0.1.0/pages/cover.typ
new file mode 100644
index 0000000000..c320e0b385
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/pages/cover.typ
@@ -0,0 +1,141 @@
+#let make-cover(
+ degree: (master: true, doctor: false),
+ institute: "Department of Computer Science and Informantion Engineering",
+ title: (
+ en: "A Thesis/Dissertation Template written in Typst for National Cheng Kung University",
+ zh-tw: "以 Typst 撰寫之國立成功大學碩博士論文模板論文模板",
+ ),
+ student: (en: "Chun-Hao Chang", zh-tw: "張峻豪"),
+ advisor: (en: "Dr. Chia-Chi Tsai", zh-tw: "蔡家齊 博士"),
+ coadvisor: (
+ (en: "Dr. Ha Ha Lin", zh-tw: "林哈哈 博士"),
+ (en: "Dr. Ha Ha Wang", zh-tw: "王哈哈 博士"),
+ ),
+) = {
+ // checking degree
+ assert(
+ (
+ (degree.master and (not degree.doctor))
+ or (degree.doctor and (not degree.master))
+ ), // XOR logic
+ message: "Wrong degree configuration!",
+ )
+
+ // set page margin
+ set page(
+ numbering: none,
+ margin: (top: 23mm, bottom: 30mm, left: 20mm, right: 20mm),
+ background: image("../assets/watermark-20160509_v2-a4.svg"),
+ )
+
+
+ // top of the cover
+ align(
+ top + center,
+ stack(
+ text(size: 25pt)[National Cheng Kung University],
+ v(1cm),
+ text(size: 25pt)[#institute],
+ v(1cm),
+ text(size: 25pt)[
+ #if degree.master {
+ [Master Thesis]
+ } else {
+ [Doctoral Dissertation]
+ }
+ ],
+ ),
+ )
+
+ // title of the cover
+ place(
+ center + horizon,
+ stack(
+ text(size: 17pt)[#title.zh-tw],
+ v(1.5em),
+ text(size: 17pt)[#title.en],
+ ),
+ )
+
+ // author info and date
+ // check whether there is any co-advisor
+ let has_coadvisor = (coadvisor.len() > 0)
+ let coadvisor_en = ()
+ let coadvisor_zh-tw = ()
+ if has_coadvisor {
+ for element in coadvisor {
+ coadvisor_en.push(element.en)
+ coadvisor_zh-tw.push(element.zh-tw)
+ }
+ }
+ align(bottom + center)[
+ // author (2 columns, zh-tw and en)
+ // first column: zh-tw ver.
+ #grid(
+ columns: (50%, 50%),
+ align: (top, top),
+ stack(
+ grid(
+ columns: (45%, 10%, 45%),
+ align: (right, center, left),
+ text(size: 17pt)[學生],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#student.zh-tw],
+ ),
+ v(1cm),
+ grid(
+ columns: (45%, 10%, 45%),
+ align: (right, center, left),
+ text(size: 17pt)[指導教授],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#advisor.zh-tw],
+ ),
+ if has_coadvisor { v(0.75cm) } else { none },
+ if has_coadvisor {
+ grid(
+ columns: (45%, 10%, 45%),
+ align: (right, center, left),
+ text(size: 17pt)[共同指導教授],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#coadvisor_zh-tw.join("\n")],
+ )
+ } else { none },
+ ),
+ // second column: english ver.
+ stack(
+ grid(
+ columns: (35%, 10%, 55%),
+ align: (right, center, left),
+ text(size: 17pt)[Student],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#student.en],
+ ),
+ v(1cm),
+ grid(
+ columns: (35%, 10%, 55%),
+ align: (right, center, left),
+ text(size: 17pt)[Advisor],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#advisor.en],
+ ),
+ if has_coadvisor { v(0.75cm) } else { none },
+ if has_coadvisor {
+ grid(
+ columns: (35%, 10%, 55%),
+ align: (right, center, left),
+ text(size: 17pt)[Co-Advisor],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#coadvisor_en.join("\n")],
+ )
+ } else { none },
+ ),
+ )
+ // intentionally left vertical space
+ #v(5em)
+ // date
+ #text(size: 17pt)[#datetime.today().display()]
+ ]
+
+ // ensure page-break
+ pagebreak()
+}
diff --git a/packages/preview/ncku-later/0.1.0/pages/outline.typ b/packages/preview/ncku-later/0.1.0/pages/outline.typ
new file mode 100644
index 0000000000..ef70714252
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/pages/outline.typ
@@ -0,0 +1,51 @@
+#let make-outline() = {
+ // text size except for outline title
+ set text(size: 12pt)
+
+ // set leading of outline (spaceing between lines)
+ set par(leading: 1.2em)
+
+ // outline heading style
+ show outline: it => {
+ // change the title style of outline
+ show heading: it => {
+ set text(size: 21pt)
+ set align(center)
+ it
+ v(0.8cm)
+ }
+ it
+ }
+
+ // the intention of the invisible level 1 heading is to
+ // make the outline itself appear on the outline
+ [
+ #show heading: none
+ = Table of Contents
+ ]
+ outline(title: [Table of Contents], indent: auto)
+ pagebreak()
+
+ [
+ #show heading: none
+ = List of Table
+ ]
+ outline(
+ indent: auto,
+ title: [List of Tables],
+ target: figure.where(kind: table),
+ )
+ pagebreak()
+
+ [
+ #show heading: none
+ = List of Figures
+ ]
+ outline(
+ indent: auto,
+ title: [List of Figures],
+ target: figure.where(kind: image),
+ )
+ pagebreak()
+}
+
diff --git a/packages/preview/ncku-later/0.1.0/pages/ref.typ b/packages/preview/ncku-later/0.1.0/pages/ref.typ
new file mode 100644
index 0000000000..6e51f26e5d
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/pages/ref.typ
@@ -0,0 +1,10 @@
+#let make-ref(ref: none) = {
+ show heading.where(level: 1): it => {
+ set align(center)
+ set text(size: 21pt)
+ it
+ v(1cm)
+ }
+ ref
+ pagebreak()
+}
diff --git a/packages/preview/ncku-later/0.1.0/template/contents/abstract.typ b/packages/preview/ncku-later/0.1.0/template/contents/abstract.typ
new file mode 100644
index 0000000000..b2ee9151b0
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/contents/abstract.typ
@@ -0,0 +1,27 @@
+#import "../setup.typ": make-abstract-en, make-abstract-zh-tw
+
+#make-abstract-zh-tw(keywords: ("關鍵字一", "關鍵字二", "關鍵字三"))[
+ // NOTE: type your abstract (chinese ver.) here...
+
+ 哥又昔高昌禾兌辛收衣由抱人乍對裝弓昌姊貫,竹麼八送呀告鴨方草抄,白馬示扒習母升吧把個杯欠澡是法相起。
+
+ 丟員跳前加色實着前王隻,遠許卜辛兌寺而飽用麻昔爪六婆安海爸:外斗片室園很明害沒送回英每上旦放首菜,反夕白細升晚借夏壯小春肉住開正路寸室免抓品。
+
+ 聽尾荷點師蝴連千。聲雄加果笑時開活流學子方二室,筆河右停反六斗登禾麼花買樹世北再村,經少福犬香國;媽新晚遠媽九個即門巾「着亮什媽入」竹子。
+
+ 東具耳穴朋以朱花辛哥布地泉美占游回,手想走婆。清朵枝送叫。占蛋葉食借母百千「很前頭哪鼻畫太合良新」叫愛休您語正山陽澡刀出院聽珠尼品奶亭出,春每今口員很師晚游唱、兆長固海棵花片節聽右葉王因立,草知足。
+
+ 日公枝香,澡物愛荷鴨。好您尾葉常古燈幾怎尺耍話消氣我加七免冬斤:三自對那同友昔歌了去屋肉穿耳風「害手斤兒問美里室木北」活且是兄飯習開事這步身旦;見至兒樹福沒定田九海。學枝假。
+
+ 又雄連放做?木公書第良扒:口豆米兩直太多主有。視視高目邊年面鳥面占吹同士,汁假朱未今東雞走很夕者牠。白抄比雪公裝一毛汁音卜耳就,裏屋室朋何亭南珠細兔忍主泉麼?助游登新西讀甲條高七或新食扒種風黑法祖空。
+
+ 娘唱卜夕字爸次黃。神坡犬功!象吹里母,象干包頭。
+]
+
+#make-abstract-en(keywords: ("key 1", "key 2", "key 3"))[
+ // NOTE: type your abstract (english ver.) here...
+
+ #lorem(200)
+
+ #lorem(100)
+]
diff --git a/packages/preview/ncku-later/0.1.0/template/contents/acknowledgement.typ b/packages/preview/ncku-later/0.1.0/template/contents/acknowledgement.typ
new file mode 100644
index 0000000000..e6a726f6ba
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/contents/acknowledgement.typ
@@ -0,0 +1,9 @@
+#import "../setup.typ": make-acknowledge-en, make-acknowledge-zh-tw
+
+#make-acknowledge-zh-tw[
+ #lorem(250)
+]
+
+#make-acknowledge-en[
+ #lorem(250)
+]
diff --git a/packages/preview/ncku-later/0.1.0/template/contents/appendix.typ b/packages/preview/ncku-later/0.1.0/template/contents/appendix.typ
new file mode 100644
index 0000000000..9e4d873d23
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/contents/appendix.typ
@@ -0,0 +1,11 @@
+#import "../setup.typ": mainmatter-or-appendix
+
+#show: mainmatter-or-appendix.with(mode: (mainmatter: false, appendix: true))
+
+= this is a appendix
+
+#lorem(100)
+
+== test test test
+
+#lorem(100)
diff --git a/packages/preview/ncku-later/0.1.0/template/contents/extended-abstract-en.typ b/packages/preview/ncku-later/0.1.0/template/contents/extended-abstract-en.typ
new file mode 100644
index 0000000000..398c004093
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/contents/extended-abstract-en.typ
@@ -0,0 +1,21 @@
+#import "../setup.typ": extended-abstract-en
+
+#show: extended-abstract-en.with(
+ summary: [
+ #lorem(100)
+
+ #lorem(100)
+ ],
+ keywords: ("key1", "key2"),
+)
+
+= INTRODUCTION
+
+#lorem(50)
+
+= MATERIALS AND METHODS
+
+#lorem(50)
+
+#pagebreak()
+
diff --git a/packages/preview/ncku-later/0.1.0/template/contents/mainmatter.typ b/packages/preview/ncku-later/0.1.0/template/contents/mainmatter.typ
new file mode 100644
index 0000000000..16edf3c4ff
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/contents/mainmatter.typ
@@ -0,0 +1,81 @@
+#import "../setup.typ": mainmatter-or-appendix
+
+#show: mainmatter-or-appendix.with(mode: (mainmatter: true, appendix: false))
+
+= #lorem(5)
+
+#lorem(50)
+
+== #lorem(4) #context here().position()
+
+== asdasd #context here().position()
+
+#lorem(100)
+
+=== #lorem(3)
+
+#lorem(5)
+
+#figure(
+ rotate(90deg, image("../images/image1.png", height: 20%)),
+ caption: [This is a simple image],
+)
+
+#figure(
+ table(
+ columns: 3,
+ [1], [2], [3],
+ [4], [5], [6],
+ ),
+ caption: [This is a simple table],
+)
+
+#lorem(100)
+
+#lorem(100)
+
+#lorem(100)
+
+// traditional chinese lorem
+
+十讀娘河交節買音雨幫昌背巾片圓己象,但光央斗勿文雄犬坡兌;示夕筆且做長冒呢弟貫讀步「燈就說菜文爪也」片再現封。力安葉采就。斥天休加弓寸。雞常語。
+
+詞民兄很家久英花院鼻門姐安,象雪直久假馬土反里林止空詞亭。合立動爪喜文春麼,活刀南怪免前高七棵綠澡房語水福?去拍我,請金河衣彩故斤抓問請。爸朋燈公生旁送道申原校聽歌不也法老朵門十!入公外巾。
+
+七哥人消功波穿穴習抱快反物朱瓜「奶白收正間貝」夕西千斤平斤上發自皮面爸嗎發再,東直入虎衣行,合面沒圓河央圓寺「你兌兔」走您條馬清空。
+
+位乍羽沒服;魚乙聽飛,媽經上沒草走且,視示怕細看怪住停才未皮住京光實布後年十多,後打念巴巾乾娘多裝波出沒英清消。
+
+肖知節福假吹竹元借兄爪服,消尾游入怎紅玉畫員牙學古房跳荷來采叫哥?草人訴珠問院游已而不愛很多刃申、園新朱兩工書司月定馬怪的首和屋太、草卜條至聽。
+
+前娘愛?呀加送歌貝良把拉筆百亮布!入戶害冬拉個不雪重比生眼別「田」片您苗古日。昌杯做家現占陽常怪回外肖日京光嗎;上蝴活寫鳥細品背玉拍,果實田刀愛,雪火巴:兆月百流歡立書面小游未!耍你雪。
+
+田馬媽木何民他和打息黃帽七字會拍幫帽婆泉。吹祖何年條未壯找跑條游昌助師飽片知?去杯朵雨,田南帽快次澡免尼女穿坡怎八蛋,寫青衣同。
+
+給躲綠穴穴道胡今二時不記鳥筆念中不菜、星唱蝸冒下山房海手呀晚了示請牙前帽母收學,里干也頭完南課游路肖「別洋怕巴害」開北來,很話斥元呢。
+
+着葉只書鴨甲太怎,幼肉又品辛秋發彩親鴨,跟幾目火!刀給勿回前候訴急青東秋幸火戶羊二未唱母告,明加荷交午月羊友言功六神?語它洋白言下往實或這,忍牛布又比買竹林背反禾直字。
+
+幾得或丁聲請合京姊牛,牠而者喜飽呢麻追坡燈同古路干早食去。美兒寺丁化但田那支汗告乞馬草說聲裝具我。南天戶點香右的地入平消「馬會雄她以很止八房誰」怎給遠錯新消裝記太三美。民几拉。
+
+首綠高春常背蛋飛,上陽央爪干條星戊爬聲的尺員昌,冰會圓相家和拉跑?員品但好歡八古再乞珠半羽經點幸第弟。
+
+文香學寺力蝴手功吉功,苗隻棵食虎外免冬起?真休聲娘,歌文誰七她尾意黑喝天故更棵買園,色候帶尼。寺家魚尺原亭白字中天都的金會借升吉,葉家和馬植。
+
+活直找氣遠大公小麼司雨干抱各要園冒,的心者尺飯只美貓。早別聲六家又燈:過洋采目姐苗火只象抄:乾開借很枝錯犬蝴向汗呢結院王!扒司主抓放辛朵服汁。
+
+足干丁頁清成助幾:因吉頁水合跟至知棵母羊念丁虎百母荷,告去愛怎點,棵力巾頁怕問皮活立到尾叫,麻主出。
+
+== testsetest
+
+#lorem(50)
+
+= another chapter
+
+#lorem(100)
+
+== test test test
+
+#lorem(1000)
+
+#pagebreak()
diff --git a/packages/preview/ncku-later/0.1.0/template/images/image1.png b/packages/preview/ncku-later/0.1.0/template/images/image1.png
new file mode 100644
index 0000000000..29c9855dd9
Binary files /dev/null and b/packages/preview/ncku-later/0.1.0/template/images/image1.png differ
diff --git a/packages/preview/ncku-later/0.1.0/template/main.typ b/packages/preview/ncku-later/0.1.0/template/main.typ
new file mode 100644
index 0000000000..ab0ec10364
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/main.typ
@@ -0,0 +1,33 @@
+#import "setup.typ": *
+
+#show: whole // rules and styles which applys to the whole document
+
+// NOTE: generate cover page
+#make-cover()
+
+// NOTE: set page number (using roman numb.)
+#show: begin-of-roman-page-num
+
+// NOTE: include abstracts (english and zh-tw)
+#include "contents/abstract.typ"
+
+// NOTE: include extended abstract (english ver.)
+#include "contents/extended-abstract-en.typ"
+
+// NOTE: include acknowledgements (english and zh-tw)
+#include "contents/acknowledgement.typ"
+
+// NOTE: generate outline (includes list-of-table and list-of-figure)
+#make-outline()
+
+// NOTE: set page number (using arabic numb.)
+#show: begin-of-arabic-page-num
+
+// NOTE: imclude mainmatter part
+#include "contents/mainmatter.typ"
+
+// NOTE: generate reference section
+#make-ref(bibliography(title: "Reference", full: true, "ref.bib"))
+
+// NOTE: include appendices
+#include "contents/appendix.typ"
diff --git a/packages/preview/ncku-later/0.1.0/template/ref.bib b/packages/preview/ncku-later/0.1.0/template/ref.bib
new file mode 100644
index 0000000000..c862e98720
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/ref.bib
@@ -0,0 +1,19 @@
+@article{netwok2020,
+ title={At-scale impact of the {Net Wok}: A culinarically holistic investigation of distributed dumplings},
+ author={Astley, Rick and Morris, Linda},
+ journal={Armenian Journal of Proceedings},
+ volume={61},
+ pages={192--219},
+ year=2020,
+ publisher={Automatic Publishing Inc.}
+}
+
+@article{netwok2022,
+ title={{Net Wok}++: Taking distributed dumplings to the cloud},
+ author={Morris, Linda and Astley, Rick},
+ journal={Armenian Journal of Proceedings},
+ volume={65},
+ pages={101--118},
+ year=2022,
+ publisher={Automatic Publishing Inc.}
+}
diff --git a/packages/preview/ncku-later/0.1.0/template/setup.typ b/packages/preview/ncku-later/0.1.0/template/setup.typ
new file mode 100644
index 0000000000..4c74a7842a
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/template/setup.typ
@@ -0,0 +1,34 @@
+#import "@preview/ncku-later:0.1.0": setup
+
+/*
+ * WARN:
+ * this file should not contain any contents of the thesis/dissertation
+ * this file should be imported by other files with the contents of thesis/dissertation
+ */
+#let (
+ make-cover,
+ make-abstract-en,
+ make-abstract-zh-tw,
+ make-acknowledge-en,
+ make-acknowledge-zh-tw,
+ make-outline,
+ make-ref,
+ whole,
+ extended-abstract-en,
+ mainmatter-or-appendix,
+ begin-of-roman-page-num,
+ begin-of-arabic-page-num,
+) = setup(
+ in-degree: (master: false, doctor: true),
+ in-institute: "Department of Electrical Engineering",
+ in-title: (
+ en: "A Thesis/Dissertation Template written in Typst for National Cheng Kung University",
+ zh-tw: "以 Typst 撰寫之國立成功大學碩博士論文模板論文模板",
+ ),
+ in-student: (en: "Chun-Hao Chang", zh-tw: "張峻豪"),
+ in-advisor: (en: "Dr. Chia-Chi Tsai", zh-tw: "蔡家齊 博士"),
+ in-coadvisor: (
+ (en: "Dr. Ha-Ha Lin", zh-tw: "林哈哈 博士"),
+ ), // must make this argument be a array which contains one or many dict, so the trailing comma is important for the scenario with only one co-advisor
+ in-main-lang: (en: true, zh-tw: false),
+)
diff --git a/packages/preview/ncku-later/0.1.0/thumbnail.png b/packages/preview/ncku-later/0.1.0/thumbnail.png
new file mode 100644
index 0000000000..09922c2431
Binary files /dev/null and b/packages/preview/ncku-later/0.1.0/thumbnail.png differ
diff --git a/packages/preview/ncku-later/0.1.0/typst.toml b/packages/preview/ncku-later/0.1.0/typst.toml
new file mode 100644
index 0000000000..120a68ab01
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/typst.toml
@@ -0,0 +1,18 @@
+[package]
+# Hinting at "See you later," perfect for a thesis that gets you through to graduation.
+name = "ncku-later"
+version = "0.1.0"
+entrypoint = "lib.typ"
+authors = ["Haouo"]
+license = "MIT"
+description = "A Thesis/Dissertation Template written in Typst for National Cheng Kung University"
+repository = "https://github.com/Haouo/NCKU-Thesis-Typst"
+keywords = ["NCKU", "thesis", "dissertation", "template"]
+categories = ["paper", "thesis"]
+compiler = "0.12.0"
+exclude = ["fonts"]
+
+[template]
+path = "template"
+entrypoint = "main.typ"
+thumbnail = "thumbnail.png"
diff --git a/packages/preview/ncku-later/0.1.0/utils/page-numb.typ b/packages/preview/ncku-later/0.1.0/utils/page-numb.typ
new file mode 100644
index 0000000000..71492980e7
--- /dev/null
+++ b/packages/preview/ncku-later/0.1.0/utils/page-numb.typ
@@ -0,0 +1,11 @@
+#let begin-of-roman-page-num(doc) = {
+ counter(page).update(1)
+ set page(numbering: "i")
+ doc
+}
+
+#let begin-of-arabic-page-num(doc) = {
+ counter(page).update(1)
+ set page(numbering: "1")
+ doc
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/LICENSE b/packages/preview/ncku-thesis-template/0.1.0/LICENSE
new file mode 100644
index 0000000000..558f552325
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 CHUN-HAO CHANG
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/preview/ncku-thesis-template/0.1.0/Makefile b/packages/preview/ncku-thesis-template/0.1.0/Makefile
new file mode 100644
index 0000000000..5a93a754b7
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/Makefile
@@ -0,0 +1,9 @@
+ROOT_DIR = .
+FONT_DIR = fonts
+
+all: compile
+
+compile:
+ typst compile --root $(ROOT_DIR) --font-path $(FONT_DIR) template/main.typ
+watch:
+ typst watch --root $(ROOT_DIR) --font-path $(FONT_DIR) template/main.typ
diff --git a/packages/preview/ncku-thesis-template/0.1.0/README.md b/packages/preview/ncku-thesis-template/0.1.0/README.md
new file mode 100644
index 0000000000..95dfcf6317
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/README.md
@@ -0,0 +1,51 @@
+# 國立成功大學 碩博士論文模板 NCKU Thesis/Dissertation Template in Typst
+
+## Introduction
+
+This is a typst template which can be used to write thesis/dissertation in National Cheng Kung University.
+
+這個模板是基於 Typst 排版語言所撰寫的,主要作為[國立成功大學](https://www.ncku.edu.tw/)的碩博士畢業論文撰寫使用。
+
+### What is Typst?
+
+> Typst is a good choice for writing any long form text such as essays, articles, scientific papers, books, reports, and homework assignments.
+> Moreover, Typst is a great fit for any documents containing mathematical notation, such as papers in the math, physics, and engineering fields.
+> Finally, due to its strong styling and automation features, it is an excellent choice for any set of documents that share a common style, such as a book series.
+>
+> [Typst Docs](https://typst.app/docs/tutorial/)
+
+Many of you may have heard of or even used LaTeX, the powerful and classic typesetting language. However, its complexity often discourages many from diving deeper into it.
+
+For those who feel overwhelmed by LaTeX's intricate syntax, Typst might be a perfect alternative for you.
+As a relatively young language, Typst offers a clean and concise syntax, fast compilation speed, and comprehensive documentation.
+Despite its simplicity, Typst retains powerful and flexible typesetting capabilities, enabling users to achieve more than 90% of what they could typically do with LaTeX.
+
+大家應該或多或少都有聽過或甚至是接觸過 LaTex 這個強大且經典的排版語言,但或許也有很多人被其複雜的語法所勸退。
+針對這類人來說,或許你非常適合接觸 Typst。Typst 作為一門非常年輕的語言,有簡潔的語法、快速的編譯速度還有詳實的文件可以查閱。
+即使語法非常簡潔,Typst 卻不失其強大且具有彈性的排版能力,利用 Typst 可以做到接近 90% 以上本來可以在 LaTex 中做到的事情。
+
+If you’ve never worked with any markup language before, starting with Markdown might be a good idea.
+It serves as an excellent introduction and will make transitioning to Typst much smoother.
+For those already familiar with LaTeX, you can check out the [Typst - Guide for LaTeX Users](https://typst.app/docs/guides/guide-for-latex-users/).
+If you’ve written LaTeX before, picking up Typst will feel like a piece of cake!
+
+對於完全沒有接觸過任合標記式語言(Markup Language)的人,可以先參考看看 Markdown 這門語言,再來接觸 Typst 應該會容易很多!
+而對於那些本來就會寫 LaTeX 的人,可以閱讀 [Typst - Guide for LaTeX users](https://typst.app/docs/guides/guide-for-latex-users/),相信上手相信上手 Typst 對於寫過 LaTeX 的人來說根本就是 piece of cake。
+
+## Acknowledgements
+
+The completion of this template owes great gratitude to the following three projects:
+
+本模板的完成極力感謝以下三個專案
+
+1. [canonical-nthu-thesis](https://github.com/kotatsuyaki/canonical-nthu-thesis)
+2. [ncku-thesis-template-latex](https://github.com/wengan-li/ncku-thesis-template-latex)
+3. [modern-nju-thesis](https://github.com/nju-lug/modern-nju-thesis)
+
+which provided extensive references in terms of ideas and formatting.
+
+在想法上及格式上給予非常多參考
+
+## How to use?
+
+Please refer to the GitHub repository: [Haouo/NCKU-Thesis-Typst](https://github.com/Haouo/NCKU-Thesis-Typst)
diff --git a/packages/preview/ncku-thesis-template/0.1.0/assets/watermark-20160509_v2-a4.svg b/packages/preview/ncku-thesis-template/0.1.0/assets/watermark-20160509_v2-a4.svg
new file mode 100644
index 0000000000..e9bb57fc5d
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/assets/watermark-20160509_v2-a4.svg
@@ -0,0 +1,132 @@
+
+
diff --git a/packages/preview/ncku-thesis-template/0.1.0/layouts/extended-abstract-en.typ b/packages/preview/ncku-thesis-template/0.1.0/layouts/extended-abstract-en.typ
new file mode 100644
index 0000000000..29c8bb3324
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/layouts/extended-abstract-en.typ
@@ -0,0 +1,43 @@
+#let extended-abstract-en(
+ title-en: "A Thesis/Dissertation Template written in Typst for National Cheng Kung University",
+ institute: "Department of Electrical Engineering",
+ student-en: "Chun-Hao Chang",
+ advisor-en: "Chia-Chi Tsai",
+ summary: none,
+ keywords: (),
+ doc,
+) = {
+ // show thesis/dissertation title
+ set text(size: 14pt)
+ set align(center)
+ strong(title-en)
+ v(0.15cm)
+ // student and advisor names
+ set text(size: 12pt)
+ student-en
+ linebreak()
+ advisor-en
+ v(0.25em)
+ institute
+ v(0.5cm)
+
+ set align(left)
+ [= 英文延伸摘要 ]
+ set heading(outlined: false)
+ show heading.where(level: 1): it => {
+ set text(12pt)
+ set align(center)
+ smallcaps(it)
+ v(0.5em)
+ }
+
+ rect(inset: 1em)[
+ = SUMMARY
+
+ #summary
+
+ *Keyword*: #keywords.join(", ")
+ ]
+
+ doc
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/layouts/mainmatter-or-appendix.typ b/packages/preview/ncku-thesis-template/0.1.0/layouts/mainmatter-or-appendix.typ
new file mode 100644
index 0000000000..de51f8c5af
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/layouts/mainmatter-or-appendix.typ
@@ -0,0 +1,183 @@
+// Helper function: check whether the current heading is lavel-1 heading
+#let is-chapter-start-page() = {
+ // find chapter headings on the current page.
+ let all-level-one-heading = query(heading.where(level: 1))
+ let current-page = here().page()
+ return (
+ all-level-one-heading
+ .filter(it => {
+ it.location().page() == current-page
+ })
+ .len()
+ > 0
+ )
+}
+
+// define custom numbering function
+#let custom-numbering-mainmatter(..args) = {
+ if args.pos().len() == 1 {
+ "Chapter " + str(args.pos().at(0)) + "."
+ } else {
+ numbering("1.1.1.", ..args)
+ }
+}
+#let custom-numbering-appendix(..args) = {
+ if args.pos().len() == 1 {
+ "Appendix " + numbering("A", args.pos().at(0)) + "."
+ } else {
+ numbering("A.1.1.", ..args)
+ }
+}
+
+/*
+ * NOTE: this should be applied to the mainmatter of the thesis/dissertation which excludes the appendix part
+ */
+#let mainmatter-or-appendix(mode: (mainmatter: true, appendix: false), doc) = {
+ // check mode
+ assert(
+ (
+ (mode.mainmatter and (not mode.appendix))
+ or (mode.appendix and (not mode.mainmatter))
+ ),
+ message: "You should only chose one mode! mainmatter or appendix",
+ )
+
+ // chose custom numbering function type according to mode
+ let custom-numbering(..args) = if mode.mainmatter {
+ custom-numbering-mainmatter(..args)
+ } else { custom-numbering-appendix(..args) }
+
+ // reset heading counter
+ counter(heading).update(0)
+
+ // Set the page numbering to arabic numerals.
+ //
+ // Although we use custom headers and footers to display the page numbers in the body part,
+ // this is still required to show the page numbers in arabic numerals in the outlines.
+ set page(
+ margin: (top: 23mm, bottom: 35mm, left: 30mm, right: 25mm),
+ numbering: "1",
+ header: context {
+ if not is-chapter-start-page() {
+ let level-1-heading-so-far = query(
+ heading.where(level: 1).before(here()),
+ )
+ let current-chapter-heading = level-1-heading-so-far.last()
+
+ // smallcaps([Chapter ] + str(current-chapter-number) + ".")
+ // h(0.75em)
+ // smallcaps(current-chapter-heading.body)
+ // display chapter info on the left
+ smallcaps(
+ custom-numbering(counter(heading).get().at(0))
+ + " "
+ + current-chapter-heading.body,
+ )
+ // display page number on the right
+ h(1fr)
+ counter(page).display() // page number
+ }
+ },
+ footer: context {
+ if is-chapter-start-page() {
+ h(1fr)
+ counter(page).display() // page number
+ }
+ },
+ )
+
+ // set paragraph
+ set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+
+ set heading(numbering: custom-numbering)
+
+ // NOTE: heading rule 1 -> apply to all headings except for level-1 heading
+ show heading: it => {
+ if (it.level > 1) {
+ set text(size: 14pt)
+ v(0.75cm)
+ block(
+ width: 100%,
+ {
+ let all-prev-headings = query(
+ selector(heading).before(here(), inclusive: false),
+ )
+ if all-prev-headings.len() > 1 {
+ let pre-heading = all-prev-headings.last()
+ let is-same-page = (
+ pre-heading.location().page() == it.location().page()
+ )
+ let is-colse = (
+ pre-heading.location().position().y + 65pt
+ >= it.location().position().y
+ )
+ if (is-same-page and is-colse) {
+ v(-30pt)
+ }
+ }
+ set par(justify: false)
+ grid(
+ columns: 2,
+ gutter: 1em,
+ counter(heading).display(it.numbering), it.body,
+ )
+ v(1em)
+ },
+ )
+ }
+ }
+
+ // NOTE: heading rule 2 -> apply to all level-1 headings
+ show heading.where(level: 1): it => {
+ // Start a chapter on a new page unless it's the 1st chapter,
+ // in which case it is already on a new page.
+ if counter(heading).get().at(0) != 1 {
+ pagebreak()
+ }
+
+ // Do not justify top-level headings, which have a large font.
+ set par(justify: false)
+
+ if it.numbering == none {
+ // Show the body of the heading.
+ block(
+ width: 100%,
+ {
+ set text(size: 24pt)
+ v(1.5em)
+ it.body
+ v(1em)
+ },
+ )
+ } else {
+ // Show "Chapter n" and the body of the heading on 2 separate lines.
+ align(
+ center,
+ block(
+ width: 100%,
+ {
+ set text(size: 21pt)
+ text(counter(heading).display(it.numbering))
+ linebreak()
+ it.body
+ v(1.2cm)
+ },
+ ),
+ )
+ }
+ }
+
+ // WARN: the order of heading-rule-1 and heading-rule-2 is important
+ // WARN: this is because that the first rule only redering all heading except for level-1
+ // WARN: then the seoncd rule renders the level-1 headings
+ // WARN: swaping of the order will make the rendering rule of level-1 headings be overwritten
+ // WARN: which makes level-1 headings disapper
+
+ // display contents
+ doc
+}
+
diff --git a/packages/preview/ncku-thesis-template/0.1.0/layouts/whole.typ b/packages/preview/ncku-thesis-template/0.1.0/layouts/whole.typ
new file mode 100644
index 0000000000..e80496f30f
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/layouts/whole.typ
@@ -0,0 +1,38 @@
+/*
+ * NOTE: this is the global settings which applys to the whole documents
+ * NOTE: includes cover, abstract, acknowledge, mainmatter, reference and appendix
+ *
+ * @param main-lang: the main language to writting the thesis/dissertation
+ * @param doc: contents of the following documents which the show rule apply to
+ */
+#let whole(
+ main-lang: (en: true, zh-tw: false),
+ doc,
+) = {
+ // check the lang type setting
+ assert(
+ (
+ (main-lang.at("en") and (not main-lang.at("zh-tw")))
+ or (main-lang.at("zh-tw") and (not main-lang.at("en")))
+ ), // XOR logic
+ message: "You should chose only one main language type!",
+ )
+
+ // apply the the whole thesis/dissertation
+ set page(paper: "a4")
+
+ // set the fonts of whole document
+ set text(
+ // NOTE: "Times New Roman" as main english font
+ // NOTE: "TW-MOE-Std-Kai" as main zh-tw font
+ font: ("Times New Roman", "TW-MOE-Std-Kai"),
+ lang: if main-lang.at("zh-tw") { "zh" } else { "en" },
+ region: if main-lang.at("zh-tw") { "tw" } else { none },
+ )
+
+ // make objects with "invisible" lebel be hidden
+ show label("invisible"): it => { }
+
+ // display the content
+ doc
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/lib.typ b/packages/preview/ncku-thesis-template/0.1.0/lib.typ
new file mode 100644
index 0000000000..b9a1641052
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/lib.typ
@@ -0,0 +1,100 @@
+#import "layouts/whole.typ": whole
+#import "layouts/mainmatter-or-appendix.typ": mainmatter-or-appendix
+#import "layouts/extended-abstract-en.typ": extended-abstract-en
+#import "pages/cover.typ": *
+// #import "pages/approved-by.typ": *
+#import "pages/abstract.typ": *
+#import "pages/acknowledge.typ": make-acknowledge-en, make-acknowledge-zh-tw
+#import "pages/outline.typ": make-outline
+#import "pages/ref.typ": make-ref
+#import "utils/page-numb.typ": begin-of-roman-page-num, begin-of-arabic-page-num
+
+#let setup(
+ in-degree: (master: false, doctor: false),
+ in-institute: "",
+ in-student: (en: "", zh-tw: ""),
+ in-advisor: (en: "", zh-tw: ""),
+ in-coadvisor: (), // it should be a list with one or many two-key dicts which is (en: "", zh-tw: "")
+ in-title: (en: "", zh-tw: ""),
+ in-main-lang: (en: false, zh-tw: false),
+ in-date: (en: "", zh-tw: ""),
+) = {
+ // assertions
+ assert(
+ in-degree.master or in-degree.doctor,
+ message: "You should set degree correctly!",
+ )
+ assert(in-institute != "", message: "You should set institute correctly!")
+ assert(
+ in-student.en != "" and in-student.zh-tw != "",
+ message: "You should set student name correctly!",
+ )
+ assert(
+ in-advisor.en != "" and in-advisor.zh-tw != "",
+ message: "You should set advisor name correctly!",
+ )
+ assert(
+ in-title.en != "" and in-title.zh-tw != "",
+ message: "You should set title of the thesis/dissertation correctly!",
+ )
+ assert(
+ in-main-lang.en or in-main-lang.zh-tw,
+ message: "You should set the main language type correctly!",
+ )
+ // return functions the author need
+ return (
+ // NOTE: pages
+ make-cover: () => {
+ make-cover(
+ degree: in-degree,
+ institute: in-institute,
+ title: in-title,
+ student: in-student,
+ advisor: in-advisor,
+ coadvisor: in-coadvisor,
+ )
+ },
+ make-abstract-en: (keywords: (), doc) => {
+ make-abstract-en(keywords: keywords, doc)
+ },
+ make-abstract-zh-tw: (keywords: (), doc) => {
+ make-abstract-zh-tw(keywords: keywords, doc)
+ },
+ make-acknowledge-en: doc => {
+ make-acknowledge-en(doc)
+ },
+ make-acknowledge-zh-tw: doc => {
+ make-acknowledge-zh-tw(doc)
+ },
+ make-outline: () => {
+ make-outline()
+ },
+ make-ref: ref => {
+ make-ref(ref: ref)
+ },
+ // NOTE: layouts
+ whole: doc => {
+ whole(main-lang: in-main-lang, doc)
+ },
+ extended-abstract-en: (summary: [], keywords: (), doc) => {
+ extended-abstract-en(
+ title-en: in-title.en,
+ institute: in-institute,
+ student-en: in-student.en,
+ advisor-en: in-advisor.en,
+ summary: summary,
+ keywords: keywords,
+ doc,
+ )
+ },
+ mainmatter-or-appendix: (mode: (:), doc) => {
+ mainmatter-or-appendix(mode: mode, doc)
+ },
+ begin-of-roman-page-num: doc => {
+ begin-of-roman-page-num(doc)
+ },
+ begin-of-arabic-page-num: doc => {
+ begin-of-arabic-page-num(doc)
+ },
+ )
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/pages/abstract.typ b/packages/preview/ncku-thesis-template/0.1.0/pages/abstract.typ
new file mode 100644
index 0000000000..4bf7e21f3b
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/pages/abstract.typ
@@ -0,0 +1,50 @@
+#let make-abstract-en(keywords: (), it) = [
+ #set text(12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(21pt)
+
+ #align(center)[
+ #heading(
+ level: 1,
+ numbering: none,
+ outlined: true,
+ )[Abstract]]
+
+
+ #v(0.5cm)
+
+ #h(1em) // first-line-indent for first par.
+ #it
+
+ #v(0.5cm)
+ #h(-1em)
+ Keywords: #keywords.join(", ")
+
+ #pagebreak()
+]
+
+#let make-abstract-zh-tw(keywords: (), it) = [
+ #set text(size: 12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(size: 21pt)
+
+ #align(center)[#heading(level: 1, numbering: none, outlined: true)[摘要]]
+
+ #v(0.5cm)
+ #h(1em) // first-line-indent for first par.
+ #it
+
+ #v(0.5cm)
+ #h(-1em)
+ 關鍵字:#keywords.join("、")
+
+ #pagebreak()
+]
diff --git a/packages/preview/ncku-thesis-template/0.1.0/pages/acknowledge.typ b/packages/preview/ncku-thesis-template/0.1.0/pages/acknowledge.typ
new file mode 100644
index 0000000000..95557c49fc
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/pages/acknowledge.typ
@@ -0,0 +1,38 @@
+#let make-acknowledge-en(it) = [
+ #set text(12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(21pt)
+
+ #align(center)[
+ #heading(
+ level: 1,
+ numbering: none,
+ outlined: true,
+ )[Acknowledgements]]
+
+ #v(0.5cm)
+ #h(1em) // first-line-indent for first par.
+ #it
+ #pagebreak()
+]
+
+#let make-acknowledge-zh-tw(keywords: (), it) = [
+ #set text(size: 12pt)
+ #set par(
+ leading: 1.2em,
+ first-line-indent: 1em,
+ linebreaks: "optimized",
+ )
+ #show heading.where(level: 1): set text(size: 21pt)
+
+ #align(center)[#heading(level: 1, numbering: none, outlined: true)[致謝]]
+
+ #v(0.5cm)
+ #h(1em) // first-line-indent for first par.
+ #it
+ #pagebreak()
+]
diff --git a/packages/preview/ncku-thesis-template/0.1.0/pages/approved-by.typ b/packages/preview/ncku-thesis-template/0.1.0/pages/approved-by.typ
new file mode 100644
index 0000000000..5467c8f417
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/pages/approved-by.typ
@@ -0,0 +1,40 @@
+#let make-approved-by(
+ degree: "doctor",
+ title-zh-tw: "以 Typst 撰寫之國立成功大學碩博士論文模板",
+ title-en: "A Thesis/Dissertation Template written in Typst\nfor National Cheng Kung University",
+ student-zh-tw: "張峻豪",
+ date: "",
+) = {
+ set page(
+ paper: "a4",
+ numbering: none,
+ margin: (top: 23mm, bottom: 30mm, left: 20mm, right: 20mm),
+ )
+
+ let degree_show = if degree == "doctor" [博士論文] else [碩士論文]
+
+ set align(top + center)
+ stack(
+ text(size: 25pt)[國立成功大學],
+ v(1cm),
+ text(size: 25pt, degree_show),
+ v(2cm),
+ text(size: 17pt, title-zh-tw),
+ v(0.5cm),
+ text(size: 17pt, title-en),
+ v(1cm),
+ text(size: 17pt)[研究生:#student-zh-tw \ 本論文業經審查及口試合格特此證明],
+ v(1cm),
+ place(left, dx: 0.75cm, text(size: 17pt)[論文考試委員:]),
+ v(1cm),
+ )
+
+ grid(
+ columns: (45%, 45%),
+ align: (left, right),
+ rows: (2cm, 2cm, 2cm),
+ line(length: 50%), line(length: 50%),
+ line(length: 100%), line(length: 100%),
+ line(length: 100%),
+ )
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/pages/cover.typ b/packages/preview/ncku-thesis-template/0.1.0/pages/cover.typ
new file mode 100644
index 0000000000..c320e0b385
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/pages/cover.typ
@@ -0,0 +1,141 @@
+#let make-cover(
+ degree: (master: true, doctor: false),
+ institute: "Department of Computer Science and Informantion Engineering",
+ title: (
+ en: "A Thesis/Dissertation Template written in Typst for National Cheng Kung University",
+ zh-tw: "以 Typst 撰寫之國立成功大學碩博士論文模板論文模板",
+ ),
+ student: (en: "Chun-Hao Chang", zh-tw: "張峻豪"),
+ advisor: (en: "Dr. Chia-Chi Tsai", zh-tw: "蔡家齊 博士"),
+ coadvisor: (
+ (en: "Dr. Ha Ha Lin", zh-tw: "林哈哈 博士"),
+ (en: "Dr. Ha Ha Wang", zh-tw: "王哈哈 博士"),
+ ),
+) = {
+ // checking degree
+ assert(
+ (
+ (degree.master and (not degree.doctor))
+ or (degree.doctor and (not degree.master))
+ ), // XOR logic
+ message: "Wrong degree configuration!",
+ )
+
+ // set page margin
+ set page(
+ numbering: none,
+ margin: (top: 23mm, bottom: 30mm, left: 20mm, right: 20mm),
+ background: image("../assets/watermark-20160509_v2-a4.svg"),
+ )
+
+
+ // top of the cover
+ align(
+ top + center,
+ stack(
+ text(size: 25pt)[National Cheng Kung University],
+ v(1cm),
+ text(size: 25pt)[#institute],
+ v(1cm),
+ text(size: 25pt)[
+ #if degree.master {
+ [Master Thesis]
+ } else {
+ [Doctoral Dissertation]
+ }
+ ],
+ ),
+ )
+
+ // title of the cover
+ place(
+ center + horizon,
+ stack(
+ text(size: 17pt)[#title.zh-tw],
+ v(1.5em),
+ text(size: 17pt)[#title.en],
+ ),
+ )
+
+ // author info and date
+ // check whether there is any co-advisor
+ let has_coadvisor = (coadvisor.len() > 0)
+ let coadvisor_en = ()
+ let coadvisor_zh-tw = ()
+ if has_coadvisor {
+ for element in coadvisor {
+ coadvisor_en.push(element.en)
+ coadvisor_zh-tw.push(element.zh-tw)
+ }
+ }
+ align(bottom + center)[
+ // author (2 columns, zh-tw and en)
+ // first column: zh-tw ver.
+ #grid(
+ columns: (50%, 50%),
+ align: (top, top),
+ stack(
+ grid(
+ columns: (45%, 10%, 45%),
+ align: (right, center, left),
+ text(size: 17pt)[學生],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#student.zh-tw],
+ ),
+ v(1cm),
+ grid(
+ columns: (45%, 10%, 45%),
+ align: (right, center, left),
+ text(size: 17pt)[指導教授],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#advisor.zh-tw],
+ ),
+ if has_coadvisor { v(0.75cm) } else { none },
+ if has_coadvisor {
+ grid(
+ columns: (45%, 10%, 45%),
+ align: (right, center, left),
+ text(size: 17pt)[共同指導教授],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#coadvisor_zh-tw.join("\n")],
+ )
+ } else { none },
+ ),
+ // second column: english ver.
+ stack(
+ grid(
+ columns: (35%, 10%, 55%),
+ align: (right, center, left),
+ text(size: 17pt)[Student],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#student.en],
+ ),
+ v(1cm),
+ grid(
+ columns: (35%, 10%, 55%),
+ align: (right, center, left),
+ text(size: 17pt)[Advisor],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#advisor.en],
+ ),
+ if has_coadvisor { v(0.75cm) } else { none },
+ if has_coadvisor {
+ grid(
+ columns: (35%, 10%, 55%),
+ align: (right, center, left),
+ text(size: 17pt)[Co-Advisor],
+ text(size: 17pt)[:],
+ text(size: 17pt)[#coadvisor_en.join("\n")],
+ )
+ } else { none },
+ ),
+ )
+ // intentionally left vertical space
+ #v(5em)
+ // date
+ #text(size: 17pt)[#datetime.today().display()]
+ ]
+
+ // ensure page-break
+ pagebreak()
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/pages/outline.typ b/packages/preview/ncku-thesis-template/0.1.0/pages/outline.typ
new file mode 100644
index 0000000000..ef70714252
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/pages/outline.typ
@@ -0,0 +1,51 @@
+#let make-outline() = {
+ // text size except for outline title
+ set text(size: 12pt)
+
+ // set leading of outline (spaceing between lines)
+ set par(leading: 1.2em)
+
+ // outline heading style
+ show outline: it => {
+ // change the title style of outline
+ show heading: it => {
+ set text(size: 21pt)
+ set align(center)
+ it
+ v(0.8cm)
+ }
+ it
+ }
+
+ // the intention of the invisible level 1 heading is to
+ // make the outline itself appear on the outline
+ [
+ #show heading: none
+ = Table of Contents
+ ]
+ outline(title: [Table of Contents], indent: auto)
+ pagebreak()
+
+ [
+ #show heading: none
+ = List of Table
+ ]
+ outline(
+ indent: auto,
+ title: [List of Tables],
+ target: figure.where(kind: table),
+ )
+ pagebreak()
+
+ [
+ #show heading: none
+ = List of Figures
+ ]
+ outline(
+ indent: auto,
+ title: [List of Figures],
+ target: figure.where(kind: image),
+ )
+ pagebreak()
+}
+
diff --git a/packages/preview/ncku-thesis-template/0.1.0/pages/ref.typ b/packages/preview/ncku-thesis-template/0.1.0/pages/ref.typ
new file mode 100644
index 0000000000..6e51f26e5d
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/pages/ref.typ
@@ -0,0 +1,10 @@
+#let make-ref(ref: none) = {
+ show heading.where(level: 1): it => {
+ set align(center)
+ set text(size: 21pt)
+ it
+ v(1cm)
+ }
+ ref
+ pagebreak()
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/contents/abstract.typ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/abstract.typ
new file mode 100644
index 0000000000..b2ee9151b0
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/abstract.typ
@@ -0,0 +1,27 @@
+#import "../setup.typ": make-abstract-en, make-abstract-zh-tw
+
+#make-abstract-zh-tw(keywords: ("關鍵字一", "關鍵字二", "關鍵字三"))[
+ // NOTE: type your abstract (chinese ver.) here...
+
+ 哥又昔高昌禾兌辛收衣由抱人乍對裝弓昌姊貫,竹麼八送呀告鴨方草抄,白馬示扒習母升吧把個杯欠澡是法相起。
+
+ 丟員跳前加色實着前王隻,遠許卜辛兌寺而飽用麻昔爪六婆安海爸:外斗片室園很明害沒送回英每上旦放首菜,反夕白細升晚借夏壯小春肉住開正路寸室免抓品。
+
+ 聽尾荷點師蝴連千。聲雄加果笑時開活流學子方二室,筆河右停反六斗登禾麼花買樹世北再村,經少福犬香國;媽新晚遠媽九個即門巾「着亮什媽入」竹子。
+
+ 東具耳穴朋以朱花辛哥布地泉美占游回,手想走婆。清朵枝送叫。占蛋葉食借母百千「很前頭哪鼻畫太合良新」叫愛休您語正山陽澡刀出院聽珠尼品奶亭出,春每今口員很師晚游唱、兆長固海棵花片節聽右葉王因立,草知足。
+
+ 日公枝香,澡物愛荷鴨。好您尾葉常古燈幾怎尺耍話消氣我加七免冬斤:三自對那同友昔歌了去屋肉穿耳風「害手斤兒問美里室木北」活且是兄飯習開事這步身旦;見至兒樹福沒定田九海。學枝假。
+
+ 又雄連放做?木公書第良扒:口豆米兩直太多主有。視視高目邊年面鳥面占吹同士,汁假朱未今東雞走很夕者牠。白抄比雪公裝一毛汁音卜耳就,裏屋室朋何亭南珠細兔忍主泉麼?助游登新西讀甲條高七或新食扒種風黑法祖空。
+
+ 娘唱卜夕字爸次黃。神坡犬功!象吹里母,象干包頭。
+]
+
+#make-abstract-en(keywords: ("key 1", "key 2", "key 3"))[
+ // NOTE: type your abstract (english ver.) here...
+
+ #lorem(200)
+
+ #lorem(100)
+]
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/contents/acknowledgement.typ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/acknowledgement.typ
new file mode 100644
index 0000000000..e6a726f6ba
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/acknowledgement.typ
@@ -0,0 +1,9 @@
+#import "../setup.typ": make-acknowledge-en, make-acknowledge-zh-tw
+
+#make-acknowledge-zh-tw[
+ #lorem(250)
+]
+
+#make-acknowledge-en[
+ #lorem(250)
+]
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/contents/appendix.typ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/appendix.typ
new file mode 100644
index 0000000000..9e4d873d23
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/appendix.typ
@@ -0,0 +1,11 @@
+#import "../setup.typ": mainmatter-or-appendix
+
+#show: mainmatter-or-appendix.with(mode: (mainmatter: false, appendix: true))
+
+= this is a appendix
+
+#lorem(100)
+
+== test test test
+
+#lorem(100)
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/contents/extended-abstract-en.typ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/extended-abstract-en.typ
new file mode 100644
index 0000000000..398c004093
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/extended-abstract-en.typ
@@ -0,0 +1,21 @@
+#import "../setup.typ": extended-abstract-en
+
+#show: extended-abstract-en.with(
+ summary: [
+ #lorem(100)
+
+ #lorem(100)
+ ],
+ keywords: ("key1", "key2"),
+)
+
+= INTRODUCTION
+
+#lorem(50)
+
+= MATERIALS AND METHODS
+
+#lorem(50)
+
+#pagebreak()
+
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/contents/mainmatter.typ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/mainmatter.typ
new file mode 100644
index 0000000000..16edf3c4ff
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/contents/mainmatter.typ
@@ -0,0 +1,81 @@
+#import "../setup.typ": mainmatter-or-appendix
+
+#show: mainmatter-or-appendix.with(mode: (mainmatter: true, appendix: false))
+
+= #lorem(5)
+
+#lorem(50)
+
+== #lorem(4) #context here().position()
+
+== asdasd #context here().position()
+
+#lorem(100)
+
+=== #lorem(3)
+
+#lorem(5)
+
+#figure(
+ rotate(90deg, image("../images/image1.png", height: 20%)),
+ caption: [This is a simple image],
+)
+
+#figure(
+ table(
+ columns: 3,
+ [1], [2], [3],
+ [4], [5], [6],
+ ),
+ caption: [This is a simple table],
+)
+
+#lorem(100)
+
+#lorem(100)
+
+#lorem(100)
+
+// traditional chinese lorem
+
+十讀娘河交節買音雨幫昌背巾片圓己象,但光央斗勿文雄犬坡兌;示夕筆且做長冒呢弟貫讀步「燈就說菜文爪也」片再現封。力安葉采就。斥天休加弓寸。雞常語。
+
+詞民兄很家久英花院鼻門姐安,象雪直久假馬土反里林止空詞亭。合立動爪喜文春麼,活刀南怪免前高七棵綠澡房語水福?去拍我,請金河衣彩故斤抓問請。爸朋燈公生旁送道申原校聽歌不也法老朵門十!入公外巾。
+
+七哥人消功波穿穴習抱快反物朱瓜「奶白收正間貝」夕西千斤平斤上發自皮面爸嗎發再,東直入虎衣行,合面沒圓河央圓寺「你兌兔」走您條馬清空。
+
+位乍羽沒服;魚乙聽飛,媽經上沒草走且,視示怕細看怪住停才未皮住京光實布後年十多,後打念巴巾乾娘多裝波出沒英清消。
+
+肖知節福假吹竹元借兄爪服,消尾游入怎紅玉畫員牙學古房跳荷來采叫哥?草人訴珠問院游已而不愛很多刃申、園新朱兩工書司月定馬怪的首和屋太、草卜條至聽。
+
+前娘愛?呀加送歌貝良把拉筆百亮布!入戶害冬拉個不雪重比生眼別「田」片您苗古日。昌杯做家現占陽常怪回外肖日京光嗎;上蝴活寫鳥細品背玉拍,果實田刀愛,雪火巴:兆月百流歡立書面小游未!耍你雪。
+
+田馬媽木何民他和打息黃帽七字會拍幫帽婆泉。吹祖何年條未壯找跑條游昌助師飽片知?去杯朵雨,田南帽快次澡免尼女穿坡怎八蛋,寫青衣同。
+
+給躲綠穴穴道胡今二時不記鳥筆念中不菜、星唱蝸冒下山房海手呀晚了示請牙前帽母收學,里干也頭完南課游路肖「別洋怕巴害」開北來,很話斥元呢。
+
+着葉只書鴨甲太怎,幼肉又品辛秋發彩親鴨,跟幾目火!刀給勿回前候訴急青東秋幸火戶羊二未唱母告,明加荷交午月羊友言功六神?語它洋白言下往實或這,忍牛布又比買竹林背反禾直字。
+
+幾得或丁聲請合京姊牛,牠而者喜飽呢麻追坡燈同古路干早食去。美兒寺丁化但田那支汗告乞馬草說聲裝具我。南天戶點香右的地入平消「馬會雄她以很止八房誰」怎給遠錯新消裝記太三美。民几拉。
+
+首綠高春常背蛋飛,上陽央爪干條星戊爬聲的尺員昌,冰會圓相家和拉跑?員品但好歡八古再乞珠半羽經點幸第弟。
+
+文香學寺力蝴手功吉功,苗隻棵食虎外免冬起?真休聲娘,歌文誰七她尾意黑喝天故更棵買園,色候帶尼。寺家魚尺原亭白字中天都的金會借升吉,葉家和馬植。
+
+活直找氣遠大公小麼司雨干抱各要園冒,的心者尺飯只美貓。早別聲六家又燈:過洋采目姐苗火只象抄:乾開借很枝錯犬蝴向汗呢結院王!扒司主抓放辛朵服汁。
+
+足干丁頁清成助幾:因吉頁水合跟至知棵母羊念丁虎百母荷,告去愛怎點,棵力巾頁怕問皮活立到尾叫,麻主出。
+
+== testsetest
+
+#lorem(50)
+
+= another chapter
+
+#lorem(100)
+
+== test test test
+
+#lorem(1000)
+
+#pagebreak()
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/images/image1.png b/packages/preview/ncku-thesis-template/0.1.0/template/images/image1.png
new file mode 100644
index 0000000000..29c9855dd9
Binary files /dev/null and b/packages/preview/ncku-thesis-template/0.1.0/template/images/image1.png differ
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/main.typ b/packages/preview/ncku-thesis-template/0.1.0/template/main.typ
new file mode 100644
index 0000000000..ab0ec10364
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/main.typ
@@ -0,0 +1,33 @@
+#import "setup.typ": *
+
+#show: whole // rules and styles which applys to the whole document
+
+// NOTE: generate cover page
+#make-cover()
+
+// NOTE: set page number (using roman numb.)
+#show: begin-of-roman-page-num
+
+// NOTE: include abstracts (english and zh-tw)
+#include "contents/abstract.typ"
+
+// NOTE: include extended abstract (english ver.)
+#include "contents/extended-abstract-en.typ"
+
+// NOTE: include acknowledgements (english and zh-tw)
+#include "contents/acknowledgement.typ"
+
+// NOTE: generate outline (includes list-of-table and list-of-figure)
+#make-outline()
+
+// NOTE: set page number (using arabic numb.)
+#show: begin-of-arabic-page-num
+
+// NOTE: imclude mainmatter part
+#include "contents/mainmatter.typ"
+
+// NOTE: generate reference section
+#make-ref(bibliography(title: "Reference", full: true, "ref.bib"))
+
+// NOTE: include appendices
+#include "contents/appendix.typ"
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/ref.bib b/packages/preview/ncku-thesis-template/0.1.0/template/ref.bib
new file mode 100644
index 0000000000..c862e98720
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/ref.bib
@@ -0,0 +1,19 @@
+@article{netwok2020,
+ title={At-scale impact of the {Net Wok}: A culinarically holistic investigation of distributed dumplings},
+ author={Astley, Rick and Morris, Linda},
+ journal={Armenian Journal of Proceedings},
+ volume={61},
+ pages={192--219},
+ year=2020,
+ publisher={Automatic Publishing Inc.}
+}
+
+@article{netwok2022,
+ title={{Net Wok}++: Taking distributed dumplings to the cloud},
+ author={Morris, Linda and Astley, Rick},
+ journal={Armenian Journal of Proceedings},
+ volume={65},
+ pages={101--118},
+ year=2022,
+ publisher={Automatic Publishing Inc.}
+}
diff --git a/packages/preview/ncku-thesis-template/0.1.0/template/setup.typ b/packages/preview/ncku-thesis-template/0.1.0/template/setup.typ
new file mode 100644
index 0000000000..bc251e905a
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/template/setup.typ
@@ -0,0 +1,34 @@
+#import "@preview/ncku-thesis-template:0.1.0": setup
+
+/*
+ * WARN:
+ * this file should not contain any contents of the thesis/dissertation
+ * this file should be imported by other files with the contents of thesis/dissertation
+ */
+#let (
+ make-cover,
+ make-abstract-en,
+ make-abstract-zh-tw,
+ make-acknowledge-en,
+ make-acknowledge-zh-tw,
+ make-outline,
+ make-ref,
+ whole,
+ extended-abstract-en,
+ mainmatter-or-appendix,
+ begin-of-roman-page-num,
+ begin-of-arabic-page-num,
+) = setup(
+ in-degree: (master: false, doctor: true),
+ in-institute: "Department of Electrical Engineering",
+ in-title: (
+ en: "A Thesis/Dissertation Template written in Typst for National Cheng Kung University",
+ zh-tw: "以 Typst 撰寫之國立成功大學碩博士論文模板論文模板",
+ ),
+ in-student: (en: "Chun-Hao Chang", zh-tw: "張峻豪"),
+ in-advisor: (en: "Dr. Chia-Chi Tsai", zh-tw: "蔡家齊 博士"),
+ in-coadvisor: (
+ (en: "Dr. Ha-Ha Lin", zh-tw: "林哈哈 博士"),
+ ), // must make this argument be a array which contains one or many dict, so the trailing comma is important for the scenario with only one co-advisor
+ in-main-lang: (en: true, zh-tw: false),
+)
diff --git a/packages/preview/ncku-thesis-template/0.1.0/thumbnail.png b/packages/preview/ncku-thesis-template/0.1.0/thumbnail.png
new file mode 100644
index 0000000000..09922c2431
Binary files /dev/null and b/packages/preview/ncku-thesis-template/0.1.0/thumbnail.png differ
diff --git a/packages/preview/ncku-thesis-template/0.1.0/typst.toml b/packages/preview/ncku-thesis-template/0.1.0/typst.toml
new file mode 100644
index 0000000000..120a68ab01
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/typst.toml
@@ -0,0 +1,18 @@
+[package]
+# Hinting at "See you later," perfect for a thesis that gets you through to graduation.
+name = "ncku-later"
+version = "0.1.0"
+entrypoint = "lib.typ"
+authors = ["Haouo"]
+license = "MIT"
+description = "A Thesis/Dissertation Template written in Typst for National Cheng Kung University"
+repository = "https://github.com/Haouo/NCKU-Thesis-Typst"
+keywords = ["NCKU", "thesis", "dissertation", "template"]
+categories = ["paper", "thesis"]
+compiler = "0.12.0"
+exclude = ["fonts"]
+
+[template]
+path = "template"
+entrypoint = "main.typ"
+thumbnail = "thumbnail.png"
diff --git a/packages/preview/ncku-thesis-template/0.1.0/utils/page-numb.typ b/packages/preview/ncku-thesis-template/0.1.0/utils/page-numb.typ
new file mode 100644
index 0000000000..71492980e7
--- /dev/null
+++ b/packages/preview/ncku-thesis-template/0.1.0/utils/page-numb.typ
@@ -0,0 +1,11 @@
+#let begin-of-roman-page-num(doc) = {
+ counter(page).update(1)
+ set page(numbering: "i")
+ doc
+}
+
+#let begin-of-arabic-page-num(doc) = {
+ counter(page).update(1)
+ set page(numbering: "1")
+ doc
+}