typst icon indicating copy to clipboard operation
typst copied to clipboard

Make Tufte-style tables achievable, and possibly the default.

Open OctarineSourcerer opened this issue 2 years ago • 2 comments

They've become a staple of LaTeX tables, and look fantastic. However, with the current stroke capabilities of table, they're rather difficult to achieve.

To give an idea of what these look like (from here): image

I believe the original text detailing these tables was The Visual Display of Quantitative Information by Edward R. Tufte, though I don't have a copy myself. I always used the slides found here, which seemed to achieve something similar.

Anyways; to manage typesetting these kind of tables, I imagine table's stroke property would need to be far more powerful, perhaps a function taking cell indices and returning a stroke.

I realise this isn't a complete spec, so anyone else that's familiar with Tufte tables, please put in your thoughts!

OctarineSourcerer avatar Mar 23 '23 19:03 OctarineSourcerer

There is a table-strokes branch that does pretty much that (functions for cells), but I didn't get it done in time for the beta launch because there's lots of edge cases to be handled.

laurmaedje avatar Mar 23 '23 19:03 laurmaedje

There is a table-strokes branch that does pretty much that (functions for cells), but I didn't get it done in time for the beta launch because there's lots of edge cases to be handled.

That's fantastic! Is there any kind of testing you need?

OctarineSourcerer avatar Mar 23 '23 19:03 OctarineSourcerer

May I add to the wishlist:

please also add native support for captions and table notes. In academic writing, we often need a caption for the table (e.g., "Table 1: Descriptive Statistics") and below the table some notes (e.g. "Note: sample was taken in the year 1980").

Realizing tables with these requirements is a pain in latex and often leads to compatibility issues with other packages. Therefore, I would be grateful if my suggestion could be considered.

image

mrwunderbar666 avatar Mar 28 '23 19:03 mrwunderbar666

It seems like this library makes it possible: https://github.com/PgBiel/typst-tablex/

kwertyops avatar May 10 '23 21:05 kwertyops

It seems like this library makes it possible: https://github.com/PgBiel/typst-tablex/

This seems great, but I would prefer that this extended functionality finds its way into typst itself. This would prevent the chaotic LaTeX situation where there are at least three different packages for table rendering that are required just for typesetting a standard academic table.

mrwunderbar666 avatar Jun 14 '23 07:06 mrwunderbar666

Work on making this possible natively is ongoing.

laurmaedje avatar Jun 14 '23 13:06 laurmaedje

Any news on that front?

0ip avatar Sep 29 '23 12:09 0ip

Not really. :/ I had resumed work on this a while ago, but didn't get to finishing it. The existence of tablex has made it a bit less pressing that some other things.

laurmaedje avatar Sep 29 '23 12:09 laurmaedje

May I add to the wishlist:

please also add native support for captions and table notes. In academic writing, we often need a caption for the table (e.g., "Table 1: Descriptive Statistics") and below the table some notes (e.g. "Note: sample was taken in the year 1980").

Realizing tables with these requirements is a pain in latex and often leads to compatibility issues with other packages. Therefore, I would be grateful if my suggestion could be considered.

image

The notes for the table can already be kind of done:

#figure(
  [
    #table(
      columns: 4,
      [t], [1], [2], [3],
      [y], [0.3s], [0.4s], [0.8s],
    )
    #align(left, [Note: Note xyz])
  ],
  caption: figure.caption(
    position: top,
    [Timing results]
  )
)

caemor avatar Dec 08 '23 10:12 caemor

@caemor this makes me happy :)

mrwunderbar666 avatar Dec 10 '23 14:12 mrwunderbar666

@PgBiel, the author of the tablex package mentioned above is now in the process of bringing better tables to Typst, cf. https://github.com/typst/typst/pull/3009 and https://github.com/typst/typst/pull/3037.

Heinenen avatar Dec 22 '23 10:12 Heinenen

This is now achievable with the new tables.

Enivex avatar Mar 24 '24 22:03 Enivex