#Major improvements to `tada`, the data table package!

20 messages · Page 1 of 1 (latest)

ashen scroll
#

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 🙂

weak comet
#

cool!

#

looks like pandas for typst

ashen scroll
#

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!

earnest kite
#

@ashen scroll where's your post with the typst-notebook thing?

earnest kite
#

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.

ashen scroll
#

cetz+tada+tablex
If there's enough traction, I'd be interested in a plot module that lets you make cetz diagrams by referring to variable names, similar to pandas' df.plot.plot("time", "money")

earnest kite
ashen scroll
ashen scroll
#

It's officially released! 🎉 #import "@prevew/tada:0.1.0"

spiral gulch
#

this is so cool!

#

Are there any limitations related to tablex? E.g. some customisation is not possible.

ashen scroll
#

@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

GitHub

Contribute to ntjess/typst-tada development by creating an account on GitHub.

#

you cannot modify tablex positional arguments (the cell contents themselves)
I realized you can define a map-rows/cols function 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

spiral gulch
#

@split rampart @ashen scroll

I wish I could pass this object into tablex directly and map rows while having access to the column names.

ashen scroll
#

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

inner hill
#

Once we get custom types it would be awesome to get a method for package interops (strawman if-has-package)