开源项目 Typst 模板使用教程

开源项目 Typst 模板使用教程

templatesThe templates that ship with the Typst web app.项目地址:https://gitcode.com/gh_mirrors/templates10/templates

1. 项目的目录结构及介绍

Typst 模板项目的目录结构如下:

typst-templates/
├── README.md
├── LICENSE
├── templates/
│   ├── template1/
│   │   ├── main.typ
│   │   ├── config.toml
│   │   └── assets/
│   │       ├── image1.png
│   │       └── image2.jpg
│   ├── template2/
│   │   ├── main.typ
│   │   ├── config.toml
│   │   └── assets/
│   │       ├── image1.png
│   │       └── image2.jpg
│   └── ...
└── ...
  • README.md: 项目说明文件。
  • LICENSE: 项目许可证文件。
  • templates/: 存放各种模板的目录。
    • template1/, template2/, ...: 具体的模板目录。
      • main.typ: 模板的主文件。
      • config.toml: 模板的配置文件。
      • assets/: 存放模板所需资源的目录。

2. 项目的启动文件介绍

每个模板目录下的 main.typ 文件是该模板的启动文件。它包含了模板的主要内容和结构。例如:

// main.typ 文件示例

#import "config.toml"

#show:
  @title: "模板标题"
  @author: "作者"
  @date: "日期"

#content:
  ## 标题1
  这里是内容。

3. 项目的配置文件介绍

每个模板目录下的 config.toml 文件是该模板的配置文件。它包含了模板的配置信息,如标题、作者、日期等。例如:

# config.toml 文件示例

title = "模板标题"
author = "作者"
date = "2023-10-01"

通过修改 config.toml 文件,可以轻松地自定义模板的各种属性。


以上是 Typst 模板项目的基本使用教程,希望对你有所帮助。

templatesThe templates that ship with the Typst web app.项目地址:https://gitcode.com/gh_mirrors/templates10/templates

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

吉昀蓓

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值