Skip to content

Commit

Permalink
MOD Hiragino fonts into all templates
Browse files Browse the repository at this point in the history
  • Loading branch information
kimushun1101 committed Apr 7, 2024
1 parent ed3ebf2 commit c456928
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions libs/mscs/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
set document(title: title)

// Set the Fonts
let gothic = ("MS PGothic", "IPAexGothic", "Noto Sans CJK JP")
let mincho = ("MS PMincho", "IPAexMincho", "Noto Serif CJK JP")
let gothic = ("MS PGothic", "Hiragino Kaku Gothic Pro", "IPAexGothic", "Noto Sans CJK JP")
let mincho = ("MS PMincho", "Hiragino Mincho Pro", "IPAexMincho", "Noto Serif CJK JP")
let english = ("Times New Roman", "New Computer Modern")

// Configure the page.
Expand Down Expand Up @@ -136,7 +136,7 @@
// Display bibliography.
if bibliography != none {
show std-bibliography: set text(9pt)
show regex("[0-9a-zA-Z]"): set text(font: "New Computer Modern")
show regex("[0-9a-zA-Z]"): set text(font: english)
set std-bibliography(title: align(center, text(11pt)[参 考 文 献]), style: "sice.csl")
bibliography
}
Expand Down
6 changes: 3 additions & 3 deletions libs/rengo/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
set document(title: title)

// Set the Fonts
let gothic = ("MS PGothic", "IPAexGothic", "Noto Sans CJK JP")
let mincho = ("MS PMincho", "IPAexMincho", "Noto Serif CJK JP")
let gothic = ("MS PGothic", "Hiragino Kaku Gothic Pro", "IPAexGothic", "Noto Sans CJK JP")
let mincho = ("MS PMincho", "Hiragino Mincho Pro", "IPAexMincho", "Noto Serif CJK JP")
let english = ("Times New Roman", "New Computer Modern")

// Configure the page.
Expand Down Expand Up @@ -136,7 +136,7 @@
// Display bibliography.
if bibliography != none {
show std-bibliography: set text(9pt)
show regex("[0-9a-zA-Z]"): set text(font: "New Computer Modern")
show regex("[0-9a-zA-Z]"): set text(font: english)
set std-bibliography(title: align(center, text(11pt)[参 考 文 献]), style: "rengo.csl")
bibliography
}
Expand Down
11 changes: 6 additions & 5 deletions libs/rsj-conf/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
set document(title: title)

// Set the Fonts
let gothic = ("MS PGothic", "IPAexGothic", "Noto Sans CJK JP", "Hiragino Kaku Gothic Pro")
let mincho = ("MS PMincho", "IPAexMincho", "Noto Serif CJK JP", "Hiragino Mincho Pro")
let gothic = ("MS PGothic", "Hiragino Kaku Gothic Pro", "IPAexGothic", "Noto Sans CJK JP")
let mincho = ("MS PMincho", "Hiragino Mincho Pro", "IPAexMincho", "Noto Serif CJK JP")
let english = ("Times New Roman", "New Computer Modern")

// Configure the page.
set page(
Expand All @@ -22,7 +23,7 @@
)

set text(size: 10pt, font: mincho)
// show regex("[0-9a-zA-Z]"): set text(font: "New Computer Modern Math")
// show regex("[0-9a-zA-Z]"): set text(font: english)
set par(leading: 0.55em, first-line-indent: 1em, justify: true)
show par: set block(spacing: 0.55em)

Expand Down Expand Up @@ -104,7 +105,7 @@
columns: (0.7cm, 1fr, 0.7cm),
[],
[
#set text(10pt, font: "New Computer Modern")
#set text(10pt, font: english)
#h(1em) #abstract
],
[]
Expand All @@ -121,7 +122,7 @@
// Display bibliography.
if bibliography != none {
show std-bibliography: set text(9pt)
show regex("[0-9a-zA-Z]"): set text(font: "New Computer Modern")
show regex("[0-9a-zA-Z]"): set text(font: english)
set std-bibliography(title: align(center, text(11pt)[参 考 文 献]), style: "rsj-conf.csl")
bibliography
}
Expand Down
8 changes: 4 additions & 4 deletions main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ VS Code の拡張機能である Typst LSP と Typst Preview をインストー
アブストラクトは左右に 0.7 cm 余白を取っています.

フォントの設定は @tab:fonts の通りです.
ここで,ゴシック体とは "MS PGothic", "IPAexGothic", "Noto Sans CJK JP" のいずれか,明朝体とは "MS PMincho", "IPAexMincho", "Noto Serif CJK JP" のいずれかで見つかるものが採用されます.
ここで,ゴシック体とは "MS PGothic", "Hiragino Kaku Gothic Pro", "IPAexGothic", "Noto Sans CJK JP" のいずれか,明朝体とは ""MS PMincho", "Hiragino Mincho Pro", "IPAexMincho", "Noto Serif CJK JP" のいずれかで見つかるものが採用されます.
これらのフォントがお使いのコンピュータになければインストールするか,代わりに使いたいフォントがあればソースコードの方に追加してください.
以下のコマンドで使用可能なフォント一覧を確認できます.
#code(
Expand All @@ -119,9 +119,9 @@ VS Code の拡張機能である Typst LSP と Typst Preview をインストー
[フォント],
),
table.hline(),
[#text(18pt, "タイトル", font: ("MS PGothic", "Noto Sans CJK JP", "IPAexGothic"))], [18], [ゴシック体],
[#text(12pt, "著者名", font: ("MS PGothic", "Noto Sans CJK JP", "IPAexGothic"))], [12], [ゴシック体],
[#text(12pt, "章タイトル", font: ("MS PGothic", "Noto Sans CJK JP", "IPAexGothic"))], [12], [ゴシック体],
[#text(18pt, "タイトル", font: ("MS PGothic", "Hiragino Kaku Gothic Pro", "IPAexGothic", "Noto Sans CJK JP"))], [18], [ゴシック体],
[#text(12pt, "著者名", font: ("MS PGothic", "Hiragino Kaku Gothic Pro", "IPAexGothic", "Noto Sans CJK JP"))], [12], [ゴシック体],
[#text(12pt, "章タイトル", font: ("MS PMincho", "Hiragino Mincho Pro", "IPAexMincho", "Noto Serif CJK JP"))], [12], [ゴシック体],
[節,小節,本文], [10], [明朝体],
[#text(9pt, "参考文献")], [9], [明朝体],
)
Expand Down

0 comments on commit c456928

Please sign in to comment.