Skip to content

Commit

Permalink
MOD Typst ver 0.12
Browse files Browse the repository at this point in the history
Signed-off-by: Shunsuke Kimura <[email protected]>
  • Loading branch information
kimushun1101 committed Nov 2, 2024
1 parent 9eec84b commit 42746b0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# typst-jp-conf-template

**このソースコードはTypst version 0.11に対応しています**
**このソースコードはTypst version 0.12で作成しました**
Typst で日本語論文を書くときのテンプレートです.
Typst の概要について知りたい方は,https://github.com/kimushun1101/How-to-use-typst-for-paper-jp をご覧ください.

Expand Down
9 changes: 4 additions & 5 deletions libs/mscs/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
)
set text(size: 10pt, font: mincho)
// show regex("[0-9a-zA-Z]"): set text(font: "New Computer Modern Math")
set par(leading: 0.55em, first-line-indent: 1em, justify: true)
show par: set block(spacing: 0.55em)
set par(leading: 0.55em, first-line-indent: 1em, justify: true, spacing: 0.55em)

// Configure equation numbering and spacing.
set math.equation(numbering: "(1)")
Expand All @@ -53,9 +52,9 @@

// Configure headings.
set heading(numbering: "1.")
show heading: it => locate(loc => {
show heading: it => {
// Find out the final number of the heading counter.
let levels = counter(heading).at(loc)
let levels = counter(heading).get()
let deepest = if levels != () {
levels.last()
} else {
Expand Down Expand Up @@ -86,7 +85,7 @@
#it.body
#v(10pt, weak: true)
]
})
}

// Configure figures.
show figure.where(kind: table): set figure(placement: top, supplement: [Table])
Expand Down
9 changes: 4 additions & 5 deletions libs/rengo/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
)
set text(size: 10pt, font: mincho)
// show regex("[0-9a-zA-Z]"): set text(font: "New Computer Modern Math")
set par(leading: 0.55em, first-line-indent: 1em, justify: true)
show par: set block(spacing: 0.55em)
set par(leading: 0.55em, first-line-indent: 1em, justify: true, spacing: 0.55em)

// Configure equation numbering and spacing.
set math.equation(numbering: "(1)")
Expand All @@ -53,9 +52,9 @@

// Configure headings.
set heading(numbering: "1.")
show heading: it => locate(loc => {
show heading: it => {
// Find out the final number of the heading counter.
let levels = counter(heading).at(loc)
let levels = counter(heading).get()
let deepest = if levels != () {
levels.last()
} else {
Expand Down Expand Up @@ -86,7 +85,7 @@
#it.body
#v(10pt, weak: true)
]
})
}

// Configure figures.
show figure.where(kind: table): set figure(placement: top, supplement: [Table])
Expand Down
11 changes: 5 additions & 6 deletions libs/rsj-conf/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

set text(size: 10pt, font: mincho)
// 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)
set par(leading: 0.55em, first-line-indent: 1em, justify: true, spacing: 0.55em)

// Configure equation numbering and spacing.
set math.equation(numbering: "(1)")
Expand All @@ -51,9 +50,9 @@

// Configure headings.
set heading(numbering: "1.")
show heading: it => locate(loc => {
show heading: it => {
// Find out the final number of the heading counter.
let levels = counter(heading).at(loc)
let levels = counter(heading).get()
let deepest = if levels != () {
levels.last()
} else {
Expand All @@ -71,7 +70,7 @@
h(8pt, weak: true)
}
#it.body
#v(13.75pt, weak: true)
#v(10pt, weak: true)
] else [
// The other level headings are run-ins.
#set par(first-line-indent: 0pt)
Expand All @@ -84,7 +83,7 @@
#it.body
#v(10pt, weak: true)
]
})
}

show figure.where(kind: table): set figure(placement: top, supplement: [表])
show figure.where(kind: table): set figure.caption(position: top, separator: [ ])
Expand Down
10 changes: 5 additions & 5 deletions main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
// #import "libs/sourcerer-0.2.1/src/lib.typ": code // 2.3.1 を参照
// 定理環境
#import "@preview/ctheorems:1.1.2": thmplain, thmproof, thmrules
// #import "libs/ctheorems-1.1.2/lib.typ": thmplain, thmproof, thmrules // 2.3.1 を参照
#import "@preview/ctheorems:1.1.3": thmplain, thmproof, thmrules
// #import "libs/ctheorems-1.1.3/lib.typ": thmplain, thmproof, thmrules // 2.3.1 を参照
#let thmjp = thmplain.with(base: {}, separator: [#h(0.5em)], titlefmt: strong, inset: (top: 0em, left: 0em))
#let definition = thmjp("definition", text(font: gothic)[定義])
#let lemma = thmjp("lemma",text(font: gothic)[補題])
Expand Down Expand Up @@ -126,8 +126,8 @@ VS Code の拡張機能である Tinymist Typst をインストールすれば
#import "libs/sourcerer-0.2.1/src/lib.typ": code // 2.3.1 を参照
// 定理環境
// #import "@preview/ctheorems:1.1.2": thmplain, thmproof, thmrules
#import "libs/ctheorems-1.1.2/lib.typ": thmplain, thmproof, thmrules // 2.3.1 を参照
// #import "@preview/ctheorems:1.1.3": thmplain, thmproof, thmrules
#import "libs/ctheorems-1.1.3/lib.typ": thmplain, thmproof, thmrules // 2.3.1 を参照
```
)

Expand Down Expand Up @@ -391,7 +391,7 @@ table の columns の数に応じて,文字列の配列が自動的に整列
#code(
```typ
// Theorem environment
#import "@preview/ctheorems:1.1.2": thmplain, thmproof, thmrules
#import "@preview/ctheorems:1.1.3": thmplain, thmproof, thmrules
#let thmjp = thmplain.with(base: {}, separator: [#h(0.5em)], titlefmt: strong, inset: (top: 0em, left: 0em))
#let definition = thmjp("definition", text(font: gothic)[定義])
#let lemma = thmjp("lemma",text(font: gothic)[補題])
Expand Down

0 comments on commit 42746b0

Please sign in to comment.