Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve: titleやnameの別ファイルでの定義 #6

Open
kanakanho opened this issue Nov 30, 2024 · 0 comments
Open

improve: titleやnameの別ファイルでの定義 #6

kanakanho opened this issue Nov 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kanakanho
Copy link
Member

kanakanho commented Nov 30, 2024

起きていること

タイトルや著者の情報をmain.typの中に記述している

望む状態

yml ファイルに定義して、main.typに直接読み込むと便利なのではないか?
別になくても困らない

bib.yml

title:
  - Typst を用いた
    論文のテンプレート
name:
  - ja: "佐藤智"
    en: "Satoru Sato"
    group: 1
  - ja: "斎藤彩都"
    en: "Saito Saito"
    group: 2
  - ja: "山田邪馬"
    en: "Yamada Yama"
    group: 1
affiliations:
  - ja: "愛知工業大学情報科学部"
    en: "Aichi Institute of Technology"
    group: 1
  - ja: "愛知工業大学大学院経営情報科学研究科"
    en: "Department of Information Science"
    group: 2

main.typ

#let bib = yaml("bib.yml")

#show: template.with(
  title: bib.title,
  names: bib.name,
  affiliations: bib.affiliations,
)
@kanakanho kanakanho added the enhancement New feature or request label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant