Metadata-Version: 2.4
Name: vec2typst
Version: 0.1.0
Summary: Extract text from SVG figures into editable Typst overlays while preserving the original vector graphics.
Project-URL: Homepage, https://github.com/yuanxun-yx/vec2typst
Author-email: Xun Yuan <yuanxun2000@outlook.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Requires-Dist: lxml>=6.1
Description-Content-Type: text/markdown

# 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.
> Currently, SVG transforms are not yet supported.
> Future versions may also support PDF-based workflows.

## Installation

```bash
uv tool install vec2typst
```

## Usage

```bash
vec2typst figure.svg
```

This generates: 
- `figure.typ`
- `figure_notext.svg`. 

To include the figure in your document:

```typst
#figure(
  {
    import "figure.typ": fig
    set text(size: .75em)
    fig(width: 50%)
  },
  caption: [Caption.],
) <fig>
```