From f825036b0937ecc8de260bbb075a2080aff8c2d7 Mon Sep 17 00:00:00 2001 From: Leedehai Date: Sun, 14 Jan 2024 15:10:57 -0500 Subject: [PATCH] Update to v0.9.2 --- README.md | 18 +++++++++--------- changelog.md | 2 +- physica-manual.typ | 4 ++-- physica.typ | 9 ++------- pkg-repo.py | 4 +++- typst.toml | 2 +- 6 files changed, 18 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index addfaa3..2ae2102 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -:green_book: The [manual](https://github.com/Leedehai/typst-physics/blob/v0.9.1/physica-manual.pdf). +:green_book: The [manual](https://github.com/Leedehai/typst-physics/blob/v0.9.2/physica-manual.pdf).

logo

-# The physica package for Typst (v0.9.1) +# The physica package for Typst (v0.9.2) [![CI](https://github.com/Leedehai/typst-physics/actions/workflows/ci.yml/badge.svg)](https://github.com/Leedehai/typst-physics/actions/workflows/ci.yml) [![Latest release](https://img.shields.io/github/v/release/Leedehai/typst-physics.svg?color=gold)][latest-release] -Available in the collection of [Typst packages](https://typst.app/docs/packages/): `#import "@preview/physica:0.9.1": *` +Available in the collection of [Typst packages](https://typst.app/docs/packages/): `#import "@preview/physica:0.9.2": *` > physica _noun_. > * Latin, study of nature @@ -27,7 +27,7 @@ natural sciences, including: ## A quick look -See the [manual](https://github.com/Leedehai/typst-physics/blob/v0.9.1/physica-manual.pdf)for more details and examples. +See the [manual](https://github.com/Leedehai/typst-physics/blob/v0.9.2/physica-manual.pdf)for more details and examples. ![demo-quick](https://github.com/Leedehai/typst-physics/assets/18319900/4a9f40df-f753-4324-8114-c682d270e9c7) @@ -50,21 +50,21 @@ compiler locally, it downloads packages on-demand and caches them on-disk, see ```typst // Style 1 -#import "@preview/physica:0.9.1": * +#import "@preview/physica:0.9.2": * $ curl (grad f), tensor(T, -mu, +nu), pdv(f,x,y,[1,2]) $ ``` ```typst // Style 2 -#import "@preview/physica:0.9.1": curl, grad, tensor, pdv +#import "@preview/physica:0.9.2": curl, grad, tensor, pdv $ curl (grad f), tensor(T, -mu, +nu), pdv(f,x,y,[1,2]) $ ``` ```typst // Style 3 -#import "@preview/physica:0.9.1" +#import "@preview/physica:0.9.2" $ physica.curl (physica.grad f), physica.tensor(T, -mu, +nu), physica.pdv(f,x,y,[1,2]) $ ``` @@ -89,7 +89,7 @@ typst 0.10.0 (70ca0d25) ## Manual -See the [manual](https://github.com/Leedehai/typst-physics/blob/v0.9.1/physica-manual.pdf) for a more comprehensive coverage, a PDF file +See the [manual](https://github.com/Leedehai/typst-physics/blob/v0.9.2/physica-manual.pdf) for a more comprehensive coverage, a PDF file generated directly with the [Typst](https://typst.app) binary. To regenerate the manual, use command @@ -107,7 +107,7 @@ request. If it is large, the best first step is creating an issue and let us explore the design together. Some features might warrant a package on its own. * Testing: currently testing is done by closely inspecting the generated -[manual](https://github.com/Leedehai/typst-physics/blob/v0.9.1/physica-manual.pdf). +[manual](https://github.com/Leedehai/typst-physics/blob/v0.9.2/physica-manual.pdf). This does not scale well. I plan to add programmatic testing by comparing rendered pictures with golden images. diff --git a/changelog.md b/changelog.md index 8178e9e..edfd29b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ # Changelog -## 0.9.2 (pending) +## 0.9.2 * Let `braket()` take an optional third argument to render `braket(u,A,v)` as `⟨u|A|v⟩`. The one argument case `braket(a)` is still rendered as `⟨a|a⟩` and diff --git a/physica-manual.typ b/physica-manual.typ index 774c851..a62bf5f 100644 --- a/physica-manual.typ +++ b/physica-manual.typ @@ -2,7 +2,7 @@ // This document is shared under the Creative Commons BY-ND 4.0 license. #import "physica.typ": * -#let version = "0.9.1" +#let version = "0.9.2" #set document( title: [physica-manual.typ], @@ -61,7 +61,7 @@ This manual itself was generated using the Typst CLI and the `physica` package, With `typst`'s #linkurl("package management", "https://github.com/typst/packages"): ```typst -#import "@preview/physica:0.9.1": * +#import "@preview/physica:0.9.2": * $ curl (grad f), pdv(,x,y,z,[2,k]), tensor(Gamma,+k,-i,-j) = pdv(vb(e_i),x^j)vb(e^k) $ ``` diff --git a/physica.typ b/physica.typ index 570e47b..7ab62ed 100644 --- a/physica.typ +++ b/physica.typ @@ -17,14 +17,9 @@ return false } - // Before my https://github.com/typst/typst/pull/3063: + // We don't consider math-style: see the reasons in the + // closed PR https://github.com/typst/typst/pull/3063 return impl(content) - // After my https://github.com/typst/typst/pull/3063: - // if content.func() == math.math-style { - // return impl(content.at("body")) - // } else { - // return impl(content) - // } } // Returns whether a Content object holds an integer. The caller is responsible diff --git a/pkg-repo.py b/pkg-repo.py index e22e6a8..e35cf79 100644 --- a/pkg-repo.py +++ b/pkg-repo.py @@ -14,7 +14,9 @@ def check_version(args): found_old_ver_strs = False for filename in os.listdir(Path(__file__).parent): path = Path(Path(__file__).parent, filename) - if filename.split('.')[-1] not in ["md", "typ", "toml"]: + if ( + filename == "changelog.md" or + filename.split('.')[-1] not in ["md", "typ", "toml"]): continue with open(path, 'r') as f: for i, line in enumerate(f.readlines()): diff --git a/typst.toml b/typst.toml index 4945094..5a6ddb6 100644 --- a/typst.toml +++ b/typst.toml @@ -1,6 +1,6 @@ [package] name = "physica" -version = "0.9.1" +version = "0.9.2" description = "Neat derivative, differential, field, matrix, braket, tensor, hbar, etc." authors = ["Leedehai"] repository = "https://github.com/Leedehai/typst-physics"