From 7d174d807368575b08d57a45ba0d4fa1f481208d Mon Sep 17 00:00:00 2001 From: "Y.D.X" <73375426+YDX-2147483647@users.noreply.github.com> Date: Thu, 26 Oct 2023 04:43:23 +0800 Subject: [PATCH] Improve documentation a bit (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix typos. - Enable syntax highlighting for raw/code blocks. Note that I didn't touch inline `#hl(…)`, because they look better than typst's builtin. - Replace a Typst's repo URL to doc URL. The repo link is broken due to a refactor, and I guess it's https://github.com/typst/typst/blob/a7fbe5151e3feed933a6f66ed946e8e9ed30795a/crates/typst-library/src/math/op.rs now. --- README.md | 8 ++++---- physica-manual.typ | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ab531fa..762722f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ See the [manual](https://github.com/Leedehai/typst-physics/blob/master/physica-m ![demo](https://user-images.githubusercontent.com/18319900/236073825-e91b4601-7e92-490b-a7e4-e9e405a2147b.png) -## Using phyiscs in your Typst document +## Using physica in your Typst document ### With `typst` package management (recommended) @@ -42,21 +42,21 @@ See https://github.com/typst/packages. effect

-``` +```typst // Style 1 #import "@preview/physica:0.8.0": * $ curl (grad f), tensor(T, -mu, +nu), pdv(f,x,y,[1,2]) $ ``` -``` +```typst // Style 2 #import "@preview/physica:0.8.0": curl, grad, tensor, pdv $ curl (grad f), tensor(T, -mu, +nu), pdv(f,x,y,[1,2]) $ ``` -``` +```typst // Style 3 #import "@preview/physica:0.8.0" diff --git a/physica-manual.typ b/physica-manual.typ index c125729..3d14399 100644 --- a/physica-manual.typ +++ b/physica-manual.typ @@ -54,7 +54,7 @@ With `typst`'s #linkurl("package management", "https://github.com/typst/packages #import "physica.typ": * -``` +```typst #import "@preview/physica:0.8.0": * $ curl (grad f), tensor(T, -mu, +nu), pdv(f,x,y,[1,2]) $ @@ -422,7 +422,7 @@ xmat(2, 2, #g)`) #v(1em) -Typst built-in math operators: #linkurl("source code", "https://github.com/typst/typst/blob/main/library/src/math/op.rs"). +Typst built-in math operators: #linkurl(`math.op`, "https://typst.app/docs/reference/math/op/"). #table( columns: (auto, auto), @@ -877,7 +877,7 @@ Function: `signals(str`, `step:`:..., `style`:...`)`. [`X` \ $ signals("X") $], [], - [ingore: (blankspace) \ separate: `&`], + [ignore: (blankspace) \ separate: `&`], [repeat: `.` (dot)], ) @@ -896,7 +896,7 @@ $ signals("-|=|-", step: #2em), signals("-|#|-"), signals("-<=>-<=") $ $ signals("R1..F0..", step: #.5em)signals("R1.|v|1", step: #.5em, color:#fuchsia) $ *(5)* -``` +```typst "clk:" & signals("|1....|0....|1....|0....|1....|0....|1....|0..", step: #0.5em) \ "bus:" & signals(" #.... X=... ..... ..... X=... ..... ..... X#.", step: #0.5em) ```