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

Markdown tables fail: Undefined control sequence. <argument> \@@magyar@captionfix #1505

Closed
mdozmorov opened this issue Dec 26, 2018 · 3 comments
Milestone

Comments

@mdozmorov
Copy link

beamer_presentation: default with a Markdown table fails with error ! Undefined control sequence. <argument> \@@magyar@captionfix. Pure markdown tables, knit::kable and pander::pander tables produce the same error. Yet, knitting to pdf_document: default works. This issue relates to #1360 and a question on RStudio Community, and can be resolved by manually putting \relax into the .tex file, as described and compiling it into pdf. But this is clearly unsustainable.

Minimal example


---
output:
  beamer_presentation: default
---

## That works

```{r}
cars[1:5,]
```

<!--
## That does not

|    | a2 | a3 |
|----|----|----|
| s1 | 1  | 2  |
| s2 | 3  | 4  |
-->

## That also works

```{r}
knitr::kable(cars[1:5,], format = "latex")
```

## That does not

```{r}
knitr::kable(cars[1:5,])
# pander::pander(cars[1:5, ])
# Any command above throws an error:
# ! Undefined control sequence.
# <argument> \@@magyar@captionfix 
```

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6, RStudio 1.1.463

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  base64enc_0.1.3  digest_0.6.18    evaluate_0.12    glue_1.3.0       graphics_3.5.1   grDevices_3.5.1 
  highr_0.7        htmltools_0.3.6  jsonlite_1.6     knitr_1.21       magrittr_1.5     markdown_0.9    
  methods_3.5.1    mime_0.6         Rcpp_1.0.0       rmarkdown_1.11.3 stats_3.5.1      stringi_1.2.4   
  stringr_1.3.1    tinytex_0.9      tools_3.5.1      utils_3.5.1      xfun_0.4         yaml_2.2.0      

Pandoc version: 2.5
@yihui yihui added this to the v1.12 milestone Dec 26, 2018
@yihui
Copy link
Member

yihui commented Dec 26, 2018

According to the TeX.SE post you mentioned, this was a bug in a certain LaTeX package that has been fixed half a year ago. I cannot reproduce this issue with the latest versions of LaTeX packages. You may consider using TinyTeX if you are currently using MacTeX or TeX Live:

tinytex::install_tinytex()

@yihui yihui closed this as completed Dec 26, 2018
@mdozmorov
Copy link
Author

After uninstalling MacTex and installing tinytex::install_tinytex(), all works. Thanks, @yihui!

@github-actions
Copy link

github-actions bot commented Nov 3, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants