Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:35:35 +08:00
commit a47452744f
6 changed files with 196 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"name": "Typst",
"description": "Typst文档编写SKILLS",
"version": "0.0.0-2025.11.28",
"author": {
"name": "Dongdong Kong",
"email": "kongdd.sysu@gmail.com"
},
"skills": [
"./skills/typst-physica"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# Typst
Typst文档编写SKILLS

52
plugin.lock.json Normal file
View File

@@ -0,0 +1,52 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:kongdd/Skills_for_Your_AI_Student:typst",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "65edb7727c62e1b505e7d22b5b9b3c0f7e1fa78d",
"treeHash": "1011e000ccdd74ff53760c9de415719cbec5b2bca9b552608410d20458335269",
"generatedAt": "2025-11-28T10:19:56.227560Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "Typst",
"description": "Typst文档编写SKILLS"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "bc8f69a6f14ca2bdbda9d1ae10945b2d40ea6ebdbcc8fbb4be23e945fbb7d37b"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "57ed3996ea71bb92281480cf2089cb385ab53dc7203e55913e7f348936c177d6"
},
{
"path": "skills/typst-physica/examples.typ",
"sha256": "f29c070d485af884731333a127b9933966faee31d5682c9e77858b93a1822853"
},
{
"path": "skills/typst-physica/example_physica.typ",
"sha256": "a3aeff09aa965d57419261a9a3d9a206652c5b730c1f59afe7c6eb33a1b66bf9"
},
{
"path": "skills/typst-physica/SKILL.md",
"sha256": "16a786b033af36f7421bb12f4d9fffcc8cb2782d74c989709d201fe4fd418634"
}
],
"dirSha256": "1011e000ccdd74ff53760c9de415719cbec5b2bca9b552608410d20458335269"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,53 @@
---
name: typst-physica
description: typst公式中的微分、偏微分方程编写latex公式转typst。
---
# 引用包
应在typst文档的开头引用包。公式编写、文档排版依赖`modern-cug-report`
用于如果已经引用了`modern-cug-report`,则无需再重复添加了。
```typst
#import "@local/modern-cug-report:0.1.3": *
#show: doc => template(doc, footer: "CUG水文气象学2025", header: "")
```
# 偏微分方程
- `(∂ theta) / (∂ t)`
`\frac{\partial \theta}{\partial t}`采用typst编写会非常简单`pdv(theta, t)`
```typst
(partial.diff theta) / (partial.diff t) // 是错误写法
pdv(theta, t) // 正确写法
```
- `(d theta) / (d t)`则是:`dv(theta, t)`
# text
typst公式中的本文需要使用引号
```typst
q_(infiltration) // 错误
q_("infiltration") // 正确
```
# fraction
- latex的`\frac{y}{x}`写成typst则是`y/x`
若分子、分母有多个变量则用括号括起来。例如latex的`\frac{y z}{x}`写成typst则是`(y z) / x`
# 排版
- 一级标题之前空两行,凸显章节的层次感。
- 第一个一级标题,不用空两行。

View File

@@ -0,0 +1,40 @@
// Copyright 2023 Leedehai
// Use of this code is governed by a MIT license in the LICENSE.txt file.
// For a manual on this package, see physica-manual.pdf.
#import "@local/modern-cug-report:0.1.3": *
#show: doc => template(doc, footer: "CUG水文气象学2025", header: "")
// #import "physica.typ": *
#show: super-T-as-transpose // Render "..^T" as transposed matrix
$
A^T, curl vb(E) = - pdv(vb(B), t),
quad
tensor(Lambda, +mu, -nu) = dmat(1, RR),
quad
f(x,y) dd(x, y),
quad
dd(vb(x), y, [3]),
quad
dd(x, y, 2, d: Delta, p: and),
quad
dv(phi, t, d: upright(D)) = pdv(phi, t) + vb(u) grad phi \
H(f) = hmat(f; x, y; delim: "[", big: #true),
quad
vb(v^a) = sum_(i=1)^n alpha_i vu(u^i),
quad
Set((x, y), pdv(f, x, y, [2,1]) + pdv(f, x, y, [1,2]) < epsilon) \
-1/c^2 pdv(, t, 2)psi + laplacian psi = (m^2c^2) / hbar^2 psi,
quad
ket(n^((1))) = sum_(k in.not D) mel(k^((0)), V, n^((0))) / (E_n^((0)) - E_k^((0))) ket(k^((0))),
quad
integral_V dd(V) (pdv(cal(L), phi) - partial_mu (pdv(cal(L), (partial_mu phi)))) = 0 \
dd(s, 2) = -(1-(2G M)/r) dd(t, 2) + (1-(2G M)/r)^(-1) dd(r, 2) + r^2 dd(Omega, 2)
$
$
"clk:" & signals("|1....|0....|1....|0....|1....|0....|1....|0..", step: #0.5em) \
"bus:" & signals(" #.... X=... ..... ..... X=... ..... ..... X#.", step: #0.5em)
$

View File

@@ -0,0 +1,36 @@
#import "@local/modern-cug-report:0.1.3": *
#show: doc => template(doc, footer: "CUG水文气象学2025", header: "")
== 1 Richards方程
Richards方程
$ pdv(theta, t) = nabla dot [K(theta) nabla H] + S $
其中:
- $theta$:体积含水量 [L^3/L^3]
- $t$:时间 [T]
- $S$:源汇项 [1/T]
总水头 $H$ 由基质势 $h$ 和重力势 $z$ 组成:
$ H = h + z $
== 2 质量守恒定律
对于土壤控制体积,质量守恒方程为:
$ pdv(rho theta, t) + nabla dot (rho q) = rho S $
假设水密度 $rho$ 为常数,简化为:
$ pdv(theta, t) + nabla dot q = S $
== 3 上边界层条件
上边界通常受大气条件控制,主要包括:
*降雨入渗条件:*
$ -K(theta) pdv(H, z) |_(z=0) = q_("infiltration") $
*蒸发条件:*
$ -K(theta) pdv(H, z) |_(z=0) = q_("evaporation") $