Soon to enter the preview namespace, tada will ease the process of formatting and computing small tabular datasets during typesetting. It now has a comprehensive manual (https://github.com/ntjess/typst-tada/blob/main/docs/manual.pdf). I'd love to get people's feedback on the library as a whole and ideas for additional examples 🙂
#Major improvements to `tada`, the data table package!
20 messages · Page 1 of 1 (latest)
That's what I was going for 🙂 well, pandas or polars
Though I'm optimistic that polars will iron out its wasm wrinkles soon enough, at which point we can use it directly in typst!
@ashen scroll where's your post with the typst-notebook thing?
Also tada is an awesome name for this. As one of those statistician lingering about here (we are a few!) this would be awesome to have around... just in case.. and also cetz+tada+tablex could become a ferocious combination.
https://github.com/ntjess/typst-tada/tree/main/examples, you need python and typst-ts-cli available on your system. You can call python pyprocessor.py examples/titanic.typ and your terminal must be in the typst-tada folder (it is used as the --root location)
cetz+tada+tablex
If there's enough traction, I'd be interested in aplotmodule that lets you make cetz diagrams by referring to variable names, similar to pandas'df.plot.plot("time", "money")
no, I meant I can't find it in #1175784402333212733
Oh haha, here's the link: https://discordapp.com/channels/1054443721975922748/1184788516513779822
It's officially released! 🎉 #import "@prevew/tada:0.1.0"
this is so cool!
Are there any limitations related to tablex? E.g. some customisation is not possible.
@spiral gulch thanks! Can you clarify what you mean? The relevant code is here (https://github.com/ntjess/typst-tada/blob/bcf2e4dd7db59f4aebaff7a1d72290ddc815009c/src/display.typ#L174)
If I understand your question, then the limitations are: you cannot modify tablex positional arguments (the cell contents themselves), but you do have total control over all *keyword *arguments. They can either be carried with the TableData dict during construction (see the tablex-kwargs argument examples), or passed to to-tablex(..kwargs) for a one-time adjustment
you cannot modify tablex positional arguments (the cell contents themselves)
I realized you can define amap-rows/colsfunction that changes the cell contents if you want, so I guess there aren't limitations if you want to get technical, lol
Currently the function expects a tablex preview version, but in the next update of tada the function can also accept a custom tablex module -- so if you want to use a custom fork, you can pass it as well
@split rampart @ashen scroll
I wish I could pass this object into tablex directly and map rows while having access to the column names.
This will work with the current version:
let row-mapper(idx, row) = {
for cell in row {
let header = td.data.keys().at(cell.x)
}
// Your code here
}
But it would be interesting to support deeper integration with tablex
Once we get custom types it would be awesome to get a method for package interops (strawman if-has-package)