Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multirow cells don't get topaligned nicely in LaTeX #148

Open
hughjonesd opened this issue May 31, 2020 · 3 comments
Open

Multirow cells don't get topaligned nicely in LaTeX #148

hughjonesd opened this issue May 31, 2020 · 3 comments

Comments

@hughjonesd
Copy link
Owner

hughjonesd commented May 31, 2020

Here's an example:

iris %>% 
      group_by(Species) %>%
      slice(1:5) %>%
      as_hux() %>% 
      merge_repeated_rows(everywhere, "Species") %>%
      quick_pdf()

merge_repeated_rows isn't much help unless I can fix this.

hughjonesd added a commit that referenced this issue May 31, 2020
  - partial fix for #148
  - improve theme_mondrian() and hux_logo()
@hughjonesd
Copy link
Owner Author

A small improvement. Using set_tb_padding(0) also helps.

@hughjonesd
Copy link
Owner Author

Maybe playing with the 0ex in \multirow[t]{-2}{*}[0ex] will help.

@hughjonesd
Copy link
Owner Author

The closest I can get is:

\multirow[b]{-7}{*}[sum of bottom padding and top padding]

where the sum can be calculated using calc. This seems to be more predictable than \multirow[t]. For middle-aligned cells, you'd have to halve this.

An alternative approach here is to drop multirow entirely:

https://tex.stackexchange.com/questions/74108/text-alignment-on-top-with-multirow-command

but I wonder how this would play with e.g. cell backgrounds....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant