https://github.com/typst-community/rowmantic
A Typst package for row-wise table editing
https://github.com/typst-community/rowmantic
table typst typst-package
Last synced: 4 months ago
JSON representation
A Typst package for row-wise table editing
- Host: GitHub
- URL: https://github.com/typst-community/rowmantic
- Owner: typst-community
- Created: 2025-05-28T22:48:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-09T08:55:58.000Z (9 months ago)
- Last Synced: 2025-10-28T00:32:07.964Z (8 months ago)
- Topics: table, typst, typst-package
- Language: Typst
- Homepage: https://typst.app/universe/package/rowmantic
- Size: 1.88 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-EUPL-1.2.txt
Awesome Lists containing this project
README
# `rowmantic`
**A Typst package for row-wise table editing**
Rowmantic introduces the `rowtable` function as a row-oriented "frontend" to the usual `table` function in typst.
The `rowtable` function takes a markup block `[...]` per row, and the markup is split internally on a delimiter which is `&` by default. In all other aspects it works like the usual `table` function, with `stroke`, `fill`, `hline` and so on.
For example, the following
```typ,notest
#rowtable(
[A & B],
[C & D & E])
```
is equivalent to this `table`:
```typ,notest
#table(columns: 3,
[A], [B], [],
[C], [D], [E])
```
For improved table ergonomics, the longest row determines the number of columns, and all rows are effectively completed so that they are of full length. This creates a better editing experience, as rows and columns can be filled out gradually.
There is a corresponding `rowgrid` function with identical interface, but for the usual `grid`.
## Getting Started
```typ
#import "@preview/rowmantic:0.5.0": rowtable
#rowtable(
stroke: 0.5pt,
[Input & tables & row- & wise ],
[Otherwise & same as & regular & `#table` ],
)
```
---
```typ
#import "@preview/rowmantic:0.5.0": rowtable, expandcell
#{
show regex("\d"): super.with(size: 0.8em, typographic: false)
show table.cell: it => { set text(size: 0.9em) if it.y >= 1; it }
show table.cell.where(y: 0): emph
rowtable(
separator: ",", // configurable separator
stroke: none, // pass through table arguments, hlines, cells et.c.
inset: (x: 0em),
column-gutter: 0.9em,
// rows are filled to be equal length after collecting cells
[goá, iáu-boē, koat-tēng, tang-sî, boeh, tńg-khì ],
[goa1, iau1-boe3, koat2-teng3, tang7-si5, boeh2, tng1-khi3 ],
[goa2, iau2-boe7, koat4-teng7, tang1-si5, boeh4, tng2-khi3 ],
[I, not-yet, decide, when, want, return. ],
table.hline(),
// cell that fills remainder of row
expandcell["I have not yet decided when I shall return."],
)
}
```
This example [taken from Wikipedia](https://en.wikipedia.org/wiki/Interlinear_gloss)
## Function Documentation and Manual
Please see the manual for more explanations, examples and function documentation.
## License
The package is distributed under the terms of the European Union Public License v1.2 or any later version, which is an OSI-approved weakly copyleft license. The License is distributed with the package.