JSS doc fails to knit with library(kableExtra)
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 1.5k
- Forks
- 517
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
By filing an issue to this repo, I promise that
- I have fully read the issue guide at https://yihui.name/issue/.
- I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included
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'). - If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- I have learned the Github Markdown syntax, and formatted my issue correctly.
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 newest jss.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.
---
documentclass: jss
author:
- name: FirstName LastName
orcid: 0000-0000-0000-0000
affiliation: University/Company
# use this syntax to add text on several lines
address: |
| First line
| Second line
email: \email{name@company.com}
url: http://rstudio.com
- name: Second Author
orcid: 0000-0000-0000-0000
affiliation: 'Affiliation \AND'
# To add another line, use \AND at the end of the previous one as above
- name: Third Author
orcid: 0000-0000-0000-0000
address: |
| Department of Statistics and Mathematics,
| Faculty of Biosciences,
| Universitat Autònoma de Barcelona
affiliation: |
| Universitat Autònoma
| de Barcelona
# use a different affiliation in adress field (differently formated here)
affiliation2: Universitat Autònoma de Barcelona
title:
formatted: "A Capitalized Title: Something about a Package \\pkg{foo}"
# If you use tex in the formatted title, also supply version without
plain: "A Capitalized Title: Something about a Package foo"
# For running headers, if needed
short: "\\pkg{foo}: A Capitalized Title"
abstract: >
The abstract of the article.
keywords:
# at least one keyword must be supplied
formatted: [keywords, not capitalized, "\\proglang{Java}"]
plain: [keywords, not capitalized, Java]
preamble: >
\usepackage{amsmath}
output: rticles::jss_article
---
```{r, setup, include=FALSE}
options(prompt = 'R> ', continue = '+ ')
```
```{r}
library(kableExtra)
```
```{r}
tinytex::tlmgr_version()
xfun::session_info()
```
Error output
! Undefined control sequence.
<template> ...@setup \CT@row@color \CT@cell@color
\CT@do@color \endgroup \@t...
l.78 \begin{document}
Error: LaTeX failed to compile Untitled.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Untitled.log for more info.
Execution halted
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 the huxtable library is called like in the MRE above.
Session Info
R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6.5, RStudio 2022.2.3.492
Locale: en_AU.UTF-8 / en_AU.UTF-8 / en_AU.UTF-8 / C / en_AU.UTF-8 / en_AU.UTF-8
Package version:
base64enc_0.1.3 bslib_0.3.1 digest_0.6.29 evaluate_0.15 fastmap_1.1.0 fs_1.5.2
glue_1.6.2 graphics_4.2.0 grDevices_4.2.0 highr_0.9 htmltools_0.5.2 jquerylib_0.1.4
jsonlite_1.8.0 knitr_1.39 magrittr_2.0.3 methods_4.2.0 R6_2.5.1 rappdirs_0.3.3
rlang_1.0.2 rmarkdown_2.14.3 rticles_0.23.6 sass_0.4.1 stats_4.2.0 stringi_1.7.6
stringr_1.4.0 tinytex_0.40 tools_4.2.0 utils_4.2.0 xfun_0.31 yaml_2.3.5
TeXLive install:
tlmgr revision 63068 (2022-04-18 07:58:07 +0200)
tlmgr using installation: /Users/egould/Library/TinyTeX
TeX Live (https://tug.org/texlive) version 2022
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by knitting the provided stock JSS template through rticles::jss_article with library(kableExtra), then inspect the LaTeX error around \CT@row@color and the reported jss.cls history in #329. Done means the minimal reproducible document compiles successfully with kableExtra loaded without the Undefined control sequence error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, r
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100