You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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('knitr'). 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('yihui/knitr').
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.
The text was updated successfully, but these errors were encountered:
Thanks, Yihui. Now that you mention it, it does make sense that fig.retina should only make sense for HTML documents, but it seems like it's still being used when outputting to pdf (e.g., the \includegraphics[width=720] gets created in the tex file when fig.width=10 is set in the rmd document)
The example @apreshill had was being able to output to multiple types within the same rmd document, so all the options were in one setup chunk.
I just pushed a commit to avoid the error, but fig.retina still does not make sense for LaTeX output.
Note that fig.retina = 2 for HTML output by default. You probably don't need to adjust the default, unless your eyes are really really good :) (I can't tell the difference between fig.retina = 2 and 3)
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.
Using the
fig.retina
knitr option causes an "Illegal unit of measure" when trying to generate a pdf when the output isbookdown::pdf_document2
.It seems like in the intermediate
.tex
file, the\includegraphics
just has a number for the width, but does not have a unit.For example:
but chaning it to
will let me run
pdflatex
to generate the pdf.Minimal example:
This works:
This does not work:
Returns this error:
My session info:
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. 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('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: