hughjonesd / huxtable

An R package to create styled tables in multiple output formats, with a friendly, modern interface.
http://hughjonesd.github.io/huxtable
Other
322 stars 28 forks source link

tabularray #247

Open JEAN71 opened 1 year ago

JEAN71 commented 1 year ago

Is it possible to have huxtable use tabularray instead of tabularx.

hughjonesd commented 1 year ago

If you bothered to make the case for it, maybe?

JEAN71 commented 1 year ago

Sorry, first time posting request on github. tabularray is much more customizable than tabularx. It is also easier to code as you can define a bunch of options in the header of the table. example such as background of particular rows, columns, etc..
for example the following \newcommand{\mycommand}[1]{$\left( #1 \right)$} \begin{document} \begin{tblr}{row{even}={ cmd={\mycommand}}, column{2}={bg=red, fg=white}} Hello&Hello&Hello\ world!&world!& world \end{tblr}

will put each of the elements in the second row in parenthesis and make the background of the second column red with foreground white. This is just one simple example of its flexibility

hughjonesd commented 1 year ago

OK. What advantages does it bring huxtable, though? Like, what new features can I implement? Being easy to code isn't really relevant because the tabularx code is already done...

JEAN71 commented 1 year ago

I guess the biggest advantage is that if huxtable includes an additional option that can go into the header of the table, users can customize their tables as they please (for example like above). it can also take care of longtable through its own longtblr environment which huxtable is lacking right now.

hughjonesd commented 1 year ago

OK. I think all I can say is, I'd be open to a pull request, with no guarantees - it depends how intrusive the changes would be. The longtblr would indeed be nice.

JEAN71 commented 1 year ago

Ok, thanks and great. Do I do this? sorry I am really not that familiar with github.

hughjonesd commented 1 year ago

If you are confident enough with R to make and submit a patch, you're welcome to try.

On Wed, 27 Sept 2023 at 15:54, JEAN71 @.***> wrote:

Ok, thanks and great. Do I do this? sorry I am really not that familiar with github.

— Reply to this email directly, view it on GitHub https://github.com/hughjonesd/huxtable/issues/247#issuecomment-1737450372, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMMT56I7XYQR4ZY7UGKL4LX4QVZVANCNFSM6AAAAAA5JIAHME . You are receiving this because you commented.Message ID: @.***>