Extract text from SVG figures into editable Typst overlays while preserving the original vector graphics.
Project description
vec2typst
Extract text from SVG figures into editable Typst overlays while preserving the original vector graphics. A Typst equivalent of Inkscape's PDF+LaTeX SVG export.
[!NOTE] vec2typst is still in an early stage. Future versions may also support PDF-based workflows.
Why not just use image()?
SVG figures can already be embedded directly in Typst with image().
However, the text inside the SVG remains part of the original graphic and cannot participate
in Typst's typesetting system.
vec2typst extracts SVG text into editable Typst overlays while preserving the original vector graphics.
The goal is to preserve the original SVG rendering as closely as possible while allowing figure texts to become native Typst content. This makes it possible to:
- use native Typst content inside figure texts, including math, styling
- adjust text styling with
set text(...)
Installation
uv tool install vec2typst
Usage
vec2typst figure.svg
This generates:
figure.typfigure_notext.svg
To include the figure in your document:
#figure(
{
import "figure.typ": fig
set text(size: .75em) // adjustment
fig(width: 50%)
},
caption: [Caption.],
) <fig>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vec2typst-0.2.0.tar.gz.
File metadata
- Download URL: vec2typst-0.2.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1af8670da03b4e0dff8d2644d526d769b49d4cf7bcdec71aa203ff3710fb5d0d
|
|
| MD5 |
eb1aef3531928882691c6ffe903d7a28
|
|
| BLAKE2b-256 |
b6ffb2d94ba7acf89c32a634b06a2ff3d94c1c3217df53deaf84d32835efa02d
|
Provenance
The following attestation bundles were made for vec2typst-0.2.0.tar.gz:
Publisher:
publish.yml on yuanxun-yx/vec2typst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vec2typst-0.2.0.tar.gz -
Subject digest:
1af8670da03b4e0dff8d2644d526d769b49d4cf7bcdec71aa203ff3710fb5d0d - Sigstore transparency entry: 1631482121
- Sigstore integration time:
-
Permalink:
yuanxun-yx/vec2typst@daf8ad237398a93fa3363544bcc4b4971525c5d4 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/yuanxun-yx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@daf8ad237398a93fa3363544bcc4b4971525c5d4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vec2typst-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vec2typst-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c00ce5ad487b177ed65ddb6ac51760b8e59aeaeca968cd4e0f60074e18d00f2f
|
|
| MD5 |
f8fe5da4413ae3a96b5aa6d33a009db6
|
|
| BLAKE2b-256 |
dc2d964ed4a49d1b0f640b984270c21da809b23179c228b090a2677d61883865
|
Provenance
The following attestation bundles were made for vec2typst-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on yuanxun-yx/vec2typst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vec2typst-0.2.0-py3-none-any.whl -
Subject digest:
c00ce5ad487b177ed65ddb6ac51760b8e59aeaeca968cd4e0f60074e18d00f2f - Sigstore transparency entry: 1631482190
- Sigstore integration time:
-
Permalink:
yuanxun-yx/vec2typst@daf8ad237398a93fa3363544bcc4b4971525c5d4 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/yuanxun-yx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@daf8ad237398a93fa3363544bcc4b4971525c5d4 -
Trigger Event:
push
-
Statement type: