Closed StaloneLab closed 6 months ago
Oh boy, that one is an issue ... :'(
I am not even sure why this package was used in the first place. Does it still offer something we need?
Yeah: tables are a mess in latex, and this package allow for columns that resize with their content and the one of the table (a bit like in any text editor), something which is not possible with default latex tables.
According to https://maximsmol.medium.com/tabu-is-dead-long-live-tabularx-8ff907b66e56, we can switch (back?) to tabularx
.
The last note seems to be interresting for us, no?
tabularx (see below), and xltabular (tabularx if you need multi-page tables)
I looked at tabularx
and xltabular
, and I am left with two problems:
tabu
. For instance reproducing the spread 0pt
needs work from our side, as these package can only support fixed width;X[-1]
is not supported, and was what allowed it in tabu
;tabu
, so there might be an easy fix for this one. Code that didn't work:\begin{xltabular}{\textwidth}{|m{\dimexpr(\linewidth) / 4 - 2 * \tabcolsep}|m{\dimexpr(\linewidth) / 4 - 2 * \tabcolsep}|m{\dimexpr(\linewidth) / 4 - 2 * \tabcolsep}|} \hline
Column 1 & Column 2 & Column 3 \\ \hline
\endhead
A text a little bit longer in this column. And even more longer. & The text is actually so long we need a break inside the table. & Text \\ \hline
\end{xltabular}
Here is where I am left. I see that the work required to switch seems non-trivial, and might require new macros from the template side. Maybe we could inspire ourselves from some parts of tabu
, but I cannot even understand one line of the package source.
New challenger : tabularray
(https://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/tabularray/tabularray.pdf). They seem to cover both the long tables (see chapter 4) and the nasty tabu
column types.
I vote for tabularray
too which is as widely used as tabularx
(very simple drop-in replacement for some people) and xltabular
. Question: did someone check how the same tables are exported by Pandoc?
I was trying today to compile a very simple content using the template on TeX Live 2022, but couldn't get anything to work. After many trials, I narrowed the error down to the
tabu
package. For instance, this very simple code, which is supposed to work (taken for the document oftabu
), doesn't:After searching, I found that the error was due to the
tabu
package not being maintained anymore, and therefore not working with TeX Live > 2019. You can find more information on the main repository: https://github.com/tabu-issues-for-future-maintainer/tabu .While this is not a problem by now for ZdS, which uses the 2019 version, I think it might stop working anytime if we decide to update the distribution for any reason (likely because it would be updated in Debian). Would you have any idea of a replacement? I am not even sure why this package was used in the first place. Does it still offer something we need? I am including below an example of LaTeX generated by ZMarkdown so you can see an use case: