Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
64f04ad
Upload alchemist v0.1.0
Robotechnic Aug 10, 2024
d101456
Merge branch 'typst:main' into alchemist
Robotechnic Aug 12, 2024
8f4ee7c
Upload alchemist v0.1.1
Robotechnic Aug 18, 2024
7b56078
merge distant with local
Robotechnic Aug 18, 2024
71c7919
Upload alchemist v0.1.2
Robotechnic Nov 11, 2024
2f3112f
Merge branch 'typst:main' into alchemist
Robotechnic Nov 11, 2024
093a609
fixe a bug
Robotechnic Nov 13, 2024
68048a4
updated changelog
Robotechnic Nov 13, 2024
9c7a496
Upload alchemist v0.1.3
Robotechnic Dec 15, 2024
0a7f7d6
Merge branch 'typst:main' into alchemist
Robotechnic Dec 15, 2024
72c3187
Upload alchemist v0.1.4
Robotechnic Jan 30, 2025
f882c93
Merge branch 'typst:main' into alchemist
Robotechnic Jan 30, 2025
0d2ab5c
fixed the licence and a typo
Robotechnic Jan 30, 2025
07906da
Upload alchemist v0.1.6
Robotechnic Jun 5, 2025
692aefd
fixed wrong folder structure
Robotechnic Jun 5, 2025
21fea77
Merge branch 'typst:main' into alchemist
Robotechnic Jun 5, 2025
5c9f935
Upload alchemist v0.1.7
Robotechnic Aug 9, 2025
12e4dd7
Merge branch 'alchemist' of github.com:Robotechnic/packages into alch…
Robotechnic Aug 9, 2025
ce2aa9c
Upload alchemist v0.1.7
Robotechnic Aug 9, 2025
0860225
Merge branch 'alchemist' of github.com:Robotechnic/packages into alch…
Robotechnic Aug 9, 2025
c5086be
Delete packages/preview/alchemist/0.1.7/0.1.7 directory
Robotechnic Aug 9, 2025
a6ea70a
Merge branch 'typst:main' into alchemist
Robotechnic Aug 9, 2025
b95161b
udated README alchemist version
Robotechnic Aug 13, 2025
9955e76
Upload alchemist v0.1.8
Robotechnic Aug 21, 2025
11da2c7
Merge branch 'typst:main' into alchemist
Robotechnic Aug 22, 2025
0c3aae7
Update packages/preview/alchemist/0.1.8/README.md
Robotechnic Aug 22, 2025
eb6b314
Upload alchemist v0.1.9
Robotechnic Mar 15, 2026
76b8110
Merge branch 'alchemist' of github.com:Robotechnic/packages into alch…
Robotechnic Mar 15, 2026
24114e2
Merge branch 'typst:main' into alchemist
Robotechnic Mar 15, 2026
124b304
updated include version in Readme
Robotechnic Mar 15, 2026
ee5f06b
Update README with new manual link
Robotechnic Mar 19, 2026
e38a344
Update README link to the 0.9.0 manual version
Robotechnic Mar 19, 2026
df77294
Update User Manual badge link to 0.1.9 link in README.md
Robotechnic Mar 19, 2026
f94cf55
Upload alchemist v0.1.10
Robotechnic May 25, 2026
4e55ee4
Merge branch 'alchemist' of github.com:Robotechnic/packages into alch…
Robotechnic May 25, 2026
ee44eec
fix readme
Robotechnic May 25, 2026
00336fb
Upload alchemist v0.2.0
Robotechnic Jun 9, 2026
098eb22
Merge branch 'typst:main' into alchemist
Robotechnic Jun 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/preview/alchemist/0.2.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2025 Robotechnic

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
163 changes: 163 additions & 0 deletions packages/preview/alchemist/0.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
[![Typst Package](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FTypsium%2Falchemist%2Fmaster%2Ftypst.toml&query=%24.package.version&prefix=v&logo=typst&label=package&color=239DAD)](https://github.com/Typsium/alchemist)
[![MIT License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/Typsium/alchemist/blob/0.2.0/LICENSE)
[![User Manual](https://img.shields.io/badge/manual-.pdf-purple)](https://raw.githubusercontent.com/Typsium/alchemist/0.2.0/doc/manual.pdf)

# alchemist

Alchemist is a typst package to draw skeletal formulae. It is based on the [chemfig](https://ctan.org/pkg/chemfig) package. The main goal of alchemist is not to reproduce one-to-one chemfig. Instead, it aims to provide an interface to achieve the same results in Typst.

<!--EXAMPLE(links)-->
````typ
#skeletize({
fragment(name: "A", "A")
single()
fragment("B")
branch({
single(angle: 1)
fragment(
"W",
links: (
"A": double(stroke: red),
),
)
single()
fragment(name: "X", "X")
})
branch({
single(angle: -1)
fragment("Y")
single()
fragment(
name: "Z",
"Z",
links: (
"X": single(stroke: black + 3pt),
),
)
})
single()
fragment(
"C",
links: (
"X": cram-filled-left(fill: blue),
"Z": single(),
),
)
})
````
![links](https://raw.githubusercontent.com/Typsium/alchemist/0.2.0/tests/README-graphic1/ref/1.png)

Check warning on line 48 in packages/preview/alchemist/0.2.0/README.md

View check run for this annotation

Typst package check / @preview/alchemist:0.2.0

packages/preview/alchemist/0.2.0/README.md#L48

Possibly inadequate alternative description for image: `links`. Please add a short description to make this image more accessible.

Alchemist uses cetz to draw the molecules. This means that you can draw cetz shapes in the same canvas as the molecules. Like this:

<!--EXAMPLE(cetz)-->
````typ
#skeletize({
import cetz.draw: *
double(absolute: 30deg, name: "l1")
single(absolute: -30deg, name: "l2")
fragment("X", name: "X")
hobby(
"l1.50%",
("l1.start", 0.5, 90deg, "l1.end"),
"l1.start",
stroke: (paint: red, dash: "dashed"),
mark: (end: ">"),
)
hobby(
(to: "X.north", rel: (0, 1pt)),
("l2.end", 0.4, -90deg, "l2.start"),
"l2.50%",
mark: (end: ">"),
)
})
````
![cetz](https://raw.githubusercontent.com/Typsium/alchemist/0.2.0/tests/README-graphic2/ref/1.png)

Check warning on line 74 in packages/preview/alchemist/0.2.0/README.md

View check run for this annotation

Typst package check / @preview/alchemist:0.2.0

packages/preview/alchemist/0.2.0/README.md#L74

Possibly inadequate alternative description for image: `cetz`. Please add a short description to make this image more accessible.

## Usage

To start using alchemist, just use the following code:

```typ
#import "@preview/alchemist:0.2.0": *

#skeletize({
// Your molecule here
})
```

For more information, check the [manual](https://raw.githubusercontent.com/Typsium/alchemist/0.2.0/doc/manual.pdf).

## Tests

The test suite is managed with [tytanic](https://github.com/typst-community/tytanic).

## Changelog

### 0.2.0

- Updated cetz to version 0.5.2
- Updated to compiler 0.14.0
- Rename `plus` link to `plus-link` to avoid confusion with the `plus` typst symbol
- Adds a way to specify stoke of individual lines in double and triple links [#31](https://github.com/Typsium/alchemist/pull/31)
- Fix bugs with touying bindings and `hide` function

### 0.1.10

- Added touying bindings in lib.typ to support automatic integration
- Added a way to ignore charges in the links connection of a fragment with the `ignore-charge` parameter
- Fix [#27](https://github.com/Typsium/alchemist/issues/27)
- Fix [#23](https://github.com/Typsium/alchemist/issues/23)

### 0.1.9

- Updated cetz to version 0.4.2
- Exposed name in lib.typ to be used by other packages
- Adds a touying support

### 0.1.8

- Fixed bugs introduced in 0.1.7

### 0.1.7

- Updated cetz to version 0.4.1
- Added default values for `color` and `font` for `fragment` elements
- Added a `skeletize-config` function to create a `skeletize` function with a specific configuration
- Fixed a bug with cetz anchors not being correctly translated
- Added an `over` argument to links to allow hiding overlapped links

### 0.1.6

- Fixed the parenthesis height to work with the new typst version
- Renamed `molecule` into `fragment`
- Added support for charges and apostrophes in the string of a molecule
- Fixed the parenthesis auto positioning and alignment
- Added a new operator element and a new parameter in parenthesis to write resonance formulae

### 0.1.5

- Update to compiler 0.13.1 and Cetz 0.3.4

### 0.1.4

- Added the possibility to create Lewis formulae
- Added parenthesis element to create groups and polymer

### 0.1.3

- Added the possibility to add exponent in the string of a molecule.

### 0.1.2

- Added default values for link style properties.
- Updated `cetz` to version 0.3.1.
- Added a `tip-length` argument to dashed cram links.

### 0.1.1

- Exposed the `draw-skeleton` function. This allows to draw in a cetz canvas directly.
- Fixed multiples bugs that causes overdraws of links.

### 0.1.0

- Initial release
Loading
Loading