Metadata-Version: 2.5
Name: galaga-marimo
Version: 2.0.0a2
Summary: Marimo notebook helpers for geometric algebra — t-string powered LaTeX rendering
Project-URL: Homepage, https://github.com/edouardp/galaga
Project-URL: Repository, https://github.com/edouardp/galaga
Project-URL: Issues, https://github.com/edouardp/galaga/issues
Author: Edouard Poor
License-Expression: MIT
Keywords: geometric-algebra,latex,marimo,notebook,t-string
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Jupyter
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.14
Requires-Dist: galaga>=2.0.0a2
Requires-Dist: marimo>=0.23.14
Description-Content-Type: text/markdown

# galaga-marimo

Marimo notebook helpers for geometric algebra — t-string powered LaTeX rendering.

Requires Python 3.14+ for t-string support.

`galaga` itself remains Python 3.11+. The t-string requirement belongs only to
this optional adapter package.

During the Galaga 2 prerelease train:

```bash
python -m pip install --pre "galaga-marimo>=2.0.0a1,<3"
```

## Usage

```python
import galaga_marimo as gm

gm.md(t"""
# Example

Rotor: {R}
Vector: {v}
Derivation: {v:expr}
Concrete coefficients: {v:value}
""")
```

The ordinary interpolation path uses the object's public `.latex()` protocol.
The `:name`, `:expr`, `:value`, and `:full` format specifications select
Galaga facade content while keeping Marimo's inline/block layout independent.

## Recognizing Known Values

When computed results are numerically equal to named multivectors (e.g.
eigenstates, basis elements), use `recognize=` to annotate them:

```python
from galaga import Algebra

alg = Algebra(2)
e1, e2 = alg.basis_vectors()
u = alg.scalar(1.0).named("up", latex=r"\uparrow")
d = (e1 * e2).named("down", latex=r"\downarrow")

knowns = [u, d]

result = alg.scalar(1.0)
gm.md(t"Result: {result}", recognize=knowns)
# renders: Result: $1 \quad (\equiv \uparrow)$
```

The `Doc` builder also supports it:

```python
with gm.doc(recognize=knowns) as d:
    d.md(t"g₊(↓) = {g_plus(d)}")
    d.md(t"g₋(↓) = {g_minus(d)}")
```

Labels are taken from each MV's immutable `.name` value, created with
`.named(..., latex=...)`. Pass any collection (list, tuple, or dict) of named
multivectors.

Interactive visualizations are intentionally separate from this t-string
renderer. Install `galaga-anywidget` and import `galaga_anywidget.viz` for the
persistent 2D CGA widget.
