Skip to content

Commit

Permalink
fix: 修复格式、依赖问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Dec 4, 2024
1 parent 90d754a commit 49d6158
Show file tree
Hide file tree
Showing 13 changed files with 463 additions and 374 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"tinymist.formatterMode": "typstyle",
"[typst]": {
"editor.inlayHints.enabled": "off"
},
"files.watcherExclude": {
"**/target": true
}
}
2 changes: 1 addition & 1 deletion src/basic/latex-look.typ
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
above: 1.4em,
below: 1em,
)

content
}
18 changes: 17 additions & 1 deletion src/basic/mod.typ
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
#import "/src/book.typ"
#import "/typ/templates/page.typ": main-color

#import "../mod.typ": code as _code, exec-code as _exec-code, refs, todo-box, todo-color, pro-tip, typst-func, term, mark, exercise, ref-bookmark, ref-method-signature, ref-func-signature, ref-cons-signature
#import "../mod.typ": (
code as _code,
exec-code as _exec-code,
refs,
todo-box,
todo-color,
pro-tip,
typst-func,
term,
mark,
exercise,
ref-bookmark,
ref-method-signature,
ref-func-signature,
ref-cons-signature,
)

#let eval-local(it, scope, res) = if res != none {
res
} else {
eval(it.text, mode: "markup", scope: scope)
}
#let exec-code(it, scope: (:), res: none, ..args) = _exec-code(it, res: eval-local(it, scope, res), ..args)
/// - it (content): the body of code.
#let code(it, scope: (:), res: none, ..args) = _code(it, res: eval-local(it, scope, res), ..args)
8 changes: 4 additions & 4 deletions src/basic/reference-grammar.typ
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
[图像标题],
refs.writing-markup.with(reference: <grammar-figure>),
````typ
#figure(```typ
#figure(```typ
#image("/assets/files/香風とうふ店.jpg")
```, caption: [用于加载香風とうふ店送外卖的宝贵影像的代码])
````,
Expand Down Expand Up @@ -329,7 +329,7 @@
[下标],
refs.writing-markup.with(reference: <grammar-subscript>),
````typ
威严满满#sub[抱头蹲防]
威严满满#sub[抱头蹲防]
````,
),
(
Expand Down Expand Up @@ -744,7 +744,7 @@
````typ
#show <一整段话>: set text(fill: blue)
#[$lambda$语言是世界上最好的语言。] <一整段话>
另一段话。
````,
),
Expand All @@ -761,7 +761,7 @@
[获取位置],
refs.content-scope-style.with(reference: <grammar-locate>),
````typ
#locate(loc =>
#locate(loc =>
loc.position())
````,
),
Expand Down
2 changes: 1 addition & 1 deletion src/book.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "@preview/shiroa:0.1.1": *
#import "@preview/shiroa:0.1.2": *

#show: book

Expand Down
2 changes: 1 addition & 1 deletion src/ebook.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "@preview/shiroa:0.1.1": *
#import "@preview/shiroa:0.1.2": *
#import "/typ/templates/ebook.typ"

#show: ebook.project.with(
Expand Down
Loading

0 comments on commit 49d6158

Please sign in to comment.