vincentarelbundock / tinytable

Simple and Customizable Tables in `R`
https://vincentarelbundock.github.io/tinytable
GNU General Public License v3.0
211 stars 18 forks source link

Added theme void + cleaned problems with vertical lines in last row #223

Closed marcboschmatas closed 7 months ago

marcboschmatas commented 7 months ago

I managed to make a workable void theme for typst (I need to work on bootstrap still). Plus, I noticed a problem that it would not draw vertical lines up to the last row because of 1 indexing (line 148 on style_typst.R). However, it will throw an error if you try to add default lines to the header because it will find two hlinex(x = 0...) lines on the typst code and then the lines_drop function crashes. I can imagine several workarounds around that (using a slightly different colour (#000001 for instance) ought to work, but otherwise, I cannot think of a proper solution. I hope this is useful to you! Best,

vincentarelbundock commented 7 months ago

Thanks a lot! This is absolutely definitely very useful.

Do you think that this PR stands alone as complete for the feature set you had in mind? It's good to split multiple feature contributions into several PRs, so I'm fine with merging smaller ones like this.

Before I look at the code, could you please just:

  1. Remove irrelevant files: .Rproj
  2. Remove the addition to .gitignore, which is not related to the feature.
  3. Revert to the original indentation. I don't mind the different indentation so much, but the change makes it very difficult to review the changes because in the Github diff, it looks like every single line has changed...

Thanks!

marcboschmatas commented 7 months ago

Hi, for what I need, this is perfect. I'll keep working on theme_bootstrap these days, still, and I'll try my best to keep working on other issues in the package. I'll change these things and then it's done.

vincentarelbundock commented 7 months ago

Thanks, looks good. I pushed a few simplifications and cleanups.

Also, I think you may have forgotten to reassign to table@table_string, such that the theme had no effect on the final table.

Right now, it looks fine on my computer.

Is there a particularly reason why you are dropping the line with "align"?

 tab <- lines_drop(tab, regex = "align", position = "equal")

This doesn't seem directly related to the "void" theme, and it seems useful to keep alignment here.

Thoughts?

marcboschmatas commented 7 months ago

The first thing was a mistake on my end, sorry. On the other, I took the latex as a model and it looked like it didn't align any colunmn, but I'm happy to leave it there. Thanks!

El dj., 4 d’abr. 2024, 17:36, Vincent Arel-Bundock @.***> va escriure:

Thanks, looks good. I pushed a few simplifications and cleanups.

Also, I think you may have forgotten to reassign to @.***_string, such that the theme had no effect on the final table.

Right now, it looks fine on my computer.

Is there a particularly reason why you are dropping the line with "align"?

tab <- lines_drop(tab, regex = "align", position = "equal")

This doesn't seem directly related to the "void" theme, and it seems useful to keep alignment here.

Thoughts?

— Reply to this email directly, view it on GitHub https://github.com/vincentarelbundock/tinytable/pull/223#issuecomment-2037539851, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKYMO7TTTUPQ3EVPDFWIZTY3VXORAVCNFSM6AAAAABFXNM56WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZXGUZTSOBVGE . You are receiving this because you authored the thread.Message ID: @.***>

vincentarelbundock commented 7 months ago

Great, thanks a lot for this nice contribution!

I merged and added a news item with a thank you note.

marcboschmatas commented 7 months ago

You're welcome!