Skip to content

Commit

Permalink
ADD BIZ UD font installation
Browse files Browse the repository at this point in the history
  • Loading branch information
kimushun1101 committed Aug 21, 2024
1 parent ffc27b4 commit b6aa8da
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
29 changes: 29 additions & 0 deletions docs/setting-fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ sudo apt-get update
sudo apt-get install -y fonts-noto fonts-noto-cjk fonts-noto-cjk-extra
```
で Noto フォントがインストールできます.
BIZ UD フォントのインストールは
```
# Install BIZUDGothic
curl -L https://github.com/googlefonts/morisawa-biz-ud-gothic/releases/latest/download/morisawa-biz-ud-gothic-fonts.zip -o morisawa-biz-ud-gothic-fonts.zip
unzip morisawa-biz-ud-gothic-fonts.zip
sudo mkdir /usr/local/share/fonts/BIZUDGothic
sudo mv morisawa-biz-ud-gothic-fonts/fonts/ttf/*.ttf /usr/local/share/fonts/BIZUDGothic/
rm -rf morisawa-biz-ud-gothic-fonts*
# Install BIZUDMincho
curl -L https://github.com/googlefonts/morisawa-biz-ud-mincho/releases/latest/download/morisawa-biz-ud-mincho-fonts.zip -o morisawa-biz-ud-mincho-fonts.zip
unzip morisawa-biz-ud-mincho-fonts.zip
sudo mkdir /usr/local/share/fonts/BIZUDMincho
sudo mv morisawa-biz-ud-mincho-fonts/fonts/ttf/*.ttf /usr/local/share/fonts/BIZUDMincho/
rm -rf morisawa-biz-ud-mincho-fonts*
# Update fonts cache
fc-cache -vf
```



ちなみに GitHub Actions で自動生成される PDF は上記の設定を [.github/workflows/gh-pages.yml](../.github/workflows/gh-pages.yml#L22-L23) で行っております.

以下,本文より引用.
Expand All @@ -21,3 +43,10 @@ sudo apt-get install -y fonts-noto fonts-noto-cjk fonts-noto-cjk-extra
> ```sh
> typst fonts
> ```
## フォント選定の理由
1. できるだけデフォルトで入っている
2. 入っていない場合にはインストールが簡単
3. プロポーショナルフォントが望ましい
4. どの OS でも外観を似せたい
32 changes: 16 additions & 16 deletions main.typ
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
// MIT No Attribution
// Copyright 2024 Shunsuke Kimura

// #import "libs/rsj-conf/lib.typ": rsj-conf, gothic
// #show: rsj-conf.with(
#import "libs/rsj-conf/lib.typ": rsj-conf, gothic
#show: rsj-conf.with(
title: [Typst を使った国内学会論文の書き方 \ - 国内学会予稿集に似せたフォーマットの作成 - ],
authors: [◯ 著者姓1 著者名1,著者姓2 著者名2(○○○大学),著者姓3 著者名3 (□□□株式会社)],
abstract: [#lorem(80)],
bibliography: bibliography("refs.yml", full: false)
)

// #import "libs/rengo/lib.typ": rengo, gothic
// #show: rengo.with(
// title: [Typst を使った国内学会論文の書き方 \ - 国内学会予稿集に似せたフォーマットの作成 - ],
// authors: [◯ 著者姓1 著者名1,著者姓2 著者名2(○○○大学),著者姓3 著者名3 (□□□株式会社)],
// etitle: [How to Write a Conference Paper in Japanese],
// eauthors: [\*A. First, B. Second (○○○ Univ.), and C. Third (□□□ Corp.)],
// abstract: [#lorem(80)],
// keywords: ([Typst], [conference paper writing], [manuscript format]),
// bibliography: bibliography("refs.yml", full: false)
// )

// #import "libs/rengo/lib.typ": rengo, gothic
// #show: rengo.with(
// #import "libs/mscs/lib.typ": mscs, gothic
// #show: mscs.with(
// title: [Typst を使った国内学会論文の書き方 \ - 国内学会予稿集に似せたフォーマットの作成 - ],
// authors: [◯ 著者姓1 著者名1,著者姓2 著者名2(○○○大学),著者姓3 著者名3 (□□□株式会社)],
// etitle: [How to Write a Conference Paper in Japanese],
// eauthors: [\*A. First, B. Second (○○○ Univ.), and C. Third (□□□ Corp.)],
// eauthors: [\*A. First, B. Second (○○○ University), and C. Third (□□□ Corporation)],
// abstract: [#lorem(80)],
// keywords: ([Typst], [conference paper writing], [manuscript format]),
// bibliography: bibliography("refs.yml", full: false)
// )

#import "libs/mscs/lib.typ": mscs, gothic
#show: mscs.with(
title: [Typst を使った国内学会論文の書き方 \ - 国内学会予稿集に似せたフォーマットの作成 - ],
authors: [◯ 著者姓1 著者名1,著者姓2 著者名2(○○○大学),著者姓3 著者名3 (□□□株式会社)],
etitle: [How to Write a Conference Paper in Japanese],
eauthors: [\*A. First, B. Second (○○○ University), and C. Third (□□□ Corporation)],
abstract: [#lorem(80)],
keywords: ([Typst], [conference paper writing], [manuscript format]),
bibliography: bibliography("refs.yml", full: false)
)

// ソースコードブロックを表示するためのパッケージ
#import "@preview/sourcerer:0.2.1": code
// #import "libs/sourcerer-0.2.1/src/lib.typ": code // 2.3.1 を参照
Expand Down

0 comments on commit b6aa8da

Please sign in to comment.