Open dquang opened 7 years ago
See https://hughjonesd.github.io/huxtable/design-principles.html and also https://tex.stackexchange.com/questions/359415/how-can-i-find-the-cell-height-in-a-tabular for why this is unlikely to be fixable. The bottom line is, LaTeX table vertical alignment doesn't work the way you think it does, and is not actually very useful for anything. But I can't fix that without fixing LaTeX ;-)
Understood, thank you! It seems that there are always problems with LaTex :) Wish you all the best!
Hi, I am having a similar problem. When I check valign in my huxtable, it says "top" everywhere. However, something in the huxtable latex code is coding all the parboxes as parbox[b]. I manually changed them all to parbox[t] and it fixed the table and top-aligned everything properly.
I'm not sure if I've give enough info, but is there anything you could possibly investigate to prevent huxtable from specifying parbox[b] instead of parbox[t] ?
Yeah, I have to admit that the current setup is a mess.
library(huxtable)
library(dplyr)
tmp <- hux("shorter","Long content that should wrap")
tmp %>% set_valign("bottom") %>% set_width(0.3) %>% set_all_borders() %>% quick_pdf()
tmp %>% set_valign("top") %>% set_width(0.3) %>% set_all_borders() %>% quick_pdf()
On the other hand, if alignment is in response to fixing row_height()
then valign
doesn't really do anything.
This is a breaking change, and it might affect other situations, so will need to test before making it.
Hi,
Thank you very much for the excellent package.
I have a problem of valign function in output pdf document. The valign does not work as expected. The sample Rmd code is following. Output table in the PDF file has v-aligned bottom even the setting is "top". Output to HTML is correct.
Could you please check again?
Another question is: how can I justify the column to the both side?
regards, Quang huxtable_issue.pdf