Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
vonbrank committed May 2, 2024
2 parents 329d677 + 16fc188 commit 5dd4533
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,32 @@

## 使用

`templates/` 目录下选择你需要的模板,直接修改或复制一份,在根目录运行以下命令进行编译:
`templates/` 目录下选择您需要的模板,直接修改或复制一份,在根目录运行以下命令进行编译:

```bash
typst compile ./templates/<template-name>.typ --root ./
```

你也可以使用如下命令
您也可以使用如下命令

```bash
typst watch ./templates/<template-name>.typ --root ./
```

并在 VS Code 中使用 [Tinymist Typst](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp), [vscode-pdf](https://marketplace.visualstudio.com/items?itemName=tomoki1207.pdf) 等插件来实现实时预览。

> [!TIP]
> 本模板正处于积极开发阶段,更新较为频繁,并且尚未上传至 Typst Universe,这种情况下您可能遇到更新模板较为困难的问题.
>
> 如果您已经以某个版本的模板为基础开始撰写论文,又想获得后续更新,可以借助 Typst local packages 来实现,具体做法为:
> - 在 Release 页面下载对应版本的源码压缩包,并将其解压到 `{data-dir}/typst/packages/local/hit-thesis/{version}``{data-dir}` 在不同操作系统下的值为:
> - `$XDG_DATA_HOME` or `~/.local/share` on Linux
> - `~/Library/Application` Support on macOS
> - `%LOCALAPPDATA%` on Windows
>
> `{version}` 的值为 `typst.toml``version` 项的值.
>
> 解压完成后 `typst.toml` 文件应该出现在 `{data-dir}/typst/packages/local/hit-thesis/{version}` 目录下.
>
> - 接着您需要在您的论文中将 `#import "../lib.typ"` 修改为 `#import "@local/hit-thesis:{version}"`,即可更新模板.
2 changes: 1 addition & 1 deletion typst.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hit-thesis"
version = "0.1.5"
version = "0.1.6"
entrypoint = "lib.typ"
authors = ["CHOSER Tech"]
license = "MIT"
Expand Down

0 comments on commit 5dd4533

Please sign in to comment.