-
Notifications
You must be signed in to change notification settings - Fork 516
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
JSS doc fails to knit with library(kableExtra) #497
Comments
When kableExtra is loaded, it will add some LaTeX depedencies in the \usepackage{booktabs}
\usepackage{longtable}
\usepackage{array}
\usepackage{multirow}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{colortbl}
\usepackage{pdflscape}
\usepackage{tabu}
\usepackage{threeparttable}
\usepackage{threeparttablex}
\usepackage[normalem]{ulem}
\usepackage{makecell}
\usepackage{xcolor} That is the only difference, and it seems one of them conflict with what is already in the template. The one being See kableExtra documentation: http://haozhu233.github.io/kableExtra/awesome_table_in_pdf.pdf for a workaround:
```{r}
options(kableExtra.latex.load_packages = FALSE)
library(kableExtra)
```
header-includes:
- \usepackage{booktabs}
- \usepackage{longtable}
- \usepackage{array}
- \usepackage{multirow}
- \usepackage{wrapfig}
- \usepackage{float}
- \usepackage{pdflscape}
- \usepackage{tabu}
- \usepackage{threeparttable}
- \usepackage{threeparttablex}
- \usepackage[normalem]{ulem}
- \usepackage[utf8]{inputenc}
- \usepackage{makecell}
- \usepackage{xcolor} You'll just loose some coloring feature I guess. cc @haozhu233 in you case you already encounter that. And it will be the same with huxtable as it uses also huxtable::report_latex_dependencies()
#> \usepackage{array}
#> \usepackage{caption}
#> \usepackage{graphicx}
#> \usepackage{siunitx}
#> \usepackage[normalem]{ulem}
#> \usepackage{colortbl}
#> \usepackage{multirow}
#> \usepackage{hhline}
#> \usepackage{calc}
#> \usepackage{tabularx}
#> \usepackage{threeparttable}
#> \usepackage{wrapfig}
#> \usepackage{adjustbox}
#> \usepackage{hyperref}
#> % These are LaTeX packages. You can install them using your LaTex management software,
#> % or by running `huxtable::install_latex_dependencies()` from within R.
#> % Other packages may be required if you use non-standard tabulars (e.g. tabulary). So basically this is an issue with JSS unless we can deal with it by changing some order of loading or configuration. Hope it helps understand |
By filing an issue to this repo, I promise that
xfun::session_info('rticles')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rticles')
.I understand that my issue may be closed if I don't fulfill my promises.
Problem Description
JSS document fails to knit when the
kableExtra
library is loaded.Suspect, possibly related to #329? When working in another document with an older version of
jss.cls
I get the error reported in #329, and when replacing with newestjss.cls
provided with `rticles' I get the error in the MRE below.MRE
Stock JSS template used below, with addition of call to
kableExtra
library, and session / tlmgr info chunk.Error output
Is there any suggested work around while awaiting a fix? I've tried using
huxtable
and get the same error, but only after creating a table, not when thehuxtable
library is called like in the MRE above.Session Info
TeXLive install:
The text was updated successfully, but these errors were encountered: