An open API service indexing awesome lists of open source software.

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

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





rowtable example, basic

```typ
#import "@preview/rowmantic:0.5.0": rowtable

#rowtable(
stroke: 0.5pt,
[Input & tables & row- & wise ],
[Otherwise & same as & regular & `#table` ],
)
```

---





rowtable example, glossing 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.