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

! Undefined control sequence. #1372

Closed
phillip-toone opened this issue Jun 15, 2018 · 6 comments
Closed

! Undefined control sequence. #1372

phillip-toone opened this issue Jun 15, 2018 · 6 comments
Milestone

Comments

@phillip-toone
Copy link

I get this error:

! Undefined control sequence.
l.106 \includegraphics
[width=1\linewidth]{2plots_files/figure-latex/unnamed-...

When I run this code:

---
output:
  pdf_document:
    template:  /usr/share/pandoc/data/templates/default.latex
---
```{r, out.width='100%'}
plot(1)
```

This error is ONLY generated when I specify both a template file and use the "out.width='100%'" option in every plot. Omitting either the template file, the "out.width='100%'", or adding an additional plot that does not use the "out.width='100%'" option makes this error go away. For example:

---
output:
  pdf_document:
    template:  /usr/share/pandoc/data/templates/default.latex
---
```{r, out.width='100%'}
plot(1)
```
```{r}
plot(1)
```

does not generate this error.

@yihui
Copy link
Member

yihui commented Jun 15, 2018

Please do follow the issue template to provide your session info: https://github.com/rstudio/rmarkdown/blob/master/.github/ISSUE_TEMPLATE.md

@phillip-toone
Copy link
Author

Session info -----------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.4.4 (2018-03-15)
system x86_64, linux-gnu
ui RStudio (1.1.453)
language en_US
collate en_US.UTF-8
tz America/Denver
date 2018-06-15

Packages ---------------------------------------------------------------------------------------------------------------------------------
package * version date source
backports 1.1.2 2017-12-13 CRAN (R 3.4.4)
base64enc 0.1-3 2015-07-28 CRAN (R 3.4.4)
digest 0.6.15 2018-01-28 CRAN (R 3.4.4)
evaluate 0.10.1 2017-06-24 CRAN (R 3.4.4)
glue 1.2.0 2017-10-29 CRAN (R 3.4.4)
graphics * 3.4.4 2018-04-21 local
grDevices * 3.4.4 2018-04-21 local
highr 0.6 2016-05-09 CRAN (R 3.4.4)
htmltools 0.3.6 2017-04-28 CRAN (R 3.4.4)
jsonlite 1.5 2017-06-01 CRAN (R 3.4.4)
knitr 1.20 2018-02-20 CRAN (R 3.4.4)
magrittr 1.5 2014-11-22 CRAN (R 3.4.4)
markdown 0.8 2017-04-20 CRAN (R 3.4.4)
methods * 3.4.4 2018-04-21 local
mime 0.5 2016-07-07 CRAN (R 3.4.4)
Rcpp 0.12.17 2018-05-18 CRAN (R 3.4.4)
rmarkdown 1.10.2 2018-06-15 Github (18207b9)
rprojroot 1.3-2 2018-01-03 CRAN (R 3.4.4)
stats * 3.4.4 2018-04-21 local
stringi 1.2.2 2018-05-02 CRAN (R 3.4.4)
stringr 1.3.1 2018-05-10 CRAN (R 3.4.4)
tinytex 0.5 2018-04-16 CRAN (R 3.4.4)
tools 3.4.4 2018-04-21 local
utils * 3.4.4 2018-04-21 local
yaml 2.1.19 2018-05-01 CRAN (R 3.4.4)

@yihui
Copy link
Member

yihui commented Jun 15, 2018

Duplicate of #325. Please see my first reply there.

@yihui yihui marked this as a duplicate of #325 Jun 15, 2018
@yihui yihui closed this as completed Jun 15, 2018
@yihui yihui added this to the v1.11 milestone Jun 15, 2018
@phillip-toone
Copy link
Author

Thank you very much! :) This fixed my problem.

@yihui
Copy link
Member

yihui commented Jun 15, 2018

Good to know!

@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