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

Reimplement full width tables in PDF report #43

Closed
jwalton3141 opened this issue Aug 15, 2022 · 2 comments
Closed

Reimplement full width tables in PDF report #43

jwalton3141 opened this issue Aug 15, 2022 · 2 comments

Comments

@jwalton3141
Copy link
Contributor

jwalton3141 commented Aug 15, 2022

{kableExtra} uses the LaTeX packages "longtable" and "tabu" to typeset tables which are "full width". However, the tabu package is broken and unmaintained.

This is a known issue, which can be tracked here: haozhu233/kableExtra#625

For now I've set full_width = FALSE, but the resulting tables are unsatisfactory.

Possible solutions might include

  1. Setting \usepackage{longtable}[=v4.13] in inst/rmarkdown/templates/nata-report/resources/template.tex file (easy) and trying to get {tinytex} to install this older version of longtable (maybe not so easy...), or
  2. Patching the raw LaTeX which {kableExtra} produces to use the tabularray package (https://tex.stackexchange.com/q/600724/181010 for more details)
@jwalton3141
Copy link
Contributor Author

jwalton3141 commented Oct 10, 2022

A possible workaround could include using the column_spec() function with the width argument

@jwalton3141
Copy link
Contributor Author

jwalton3141 commented Oct 10, 2022

Well, I'm pleasantly surprised: setting \usepackage{longtable}[=v4.13] in inst/rmarkdown/templates/nata-report/resources/template.tex did the trick, without necessitating any messing about with {tinytex} or installing historic LaTeX packages!

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