Skip to content

Commit

Permalink
Update to v0.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Leedehai committed Jan 14, 2024
1 parent 2500dd9 commit f825036
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 21 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).
<p align="center">
<img width="545" alt="logo" src="https://github.com/Leedehai/typst-physics/assets/18319900/ed86198a-8ddb-4473-aed3-8111d5ecde60">
</p>

# 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
Expand All @@ -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)

Expand All @@ -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]) $
```
Expand All @@ -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
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions physica-manual.typ
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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) $
```
Expand Down
9 changes: 2 additions & 7 deletions physica.typ
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion pkg-repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()):
Expand Down
2 changes: 1 addition & 1 deletion typst.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit f825036

Please sign in to comment.