-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
Knit PDF won't compile if all plots have fig.align="center" #325
Comments
You need to add At some point in the future, we may need to automate this, or just always pass the |
Some sort of automatic fix would be great, it's pretty confusing that you need to do something special if all of your figures are aligned, but not if it's only some of them. Is there any downside to always including |
I guess the only downside is that it may waste a few milliseconds (life is short...) if your markdown document really contains no graphics :) If you consider fixing the problem by yourself, I'd strongly recommend using |
Sneaky! I made a change to the custom template and referenced the new (altered) template in my local folder, and then this old issue came back to life. I'm glad the fix was documented here. |
Hello everyone, I am trying to render a PDF report from a Shiny App and it seems that this problem persists. When I remove the following code chunk options, the report renders with no issues. {r , echo = FALSE, fig.width=8, fig.height=4, fig.align='center'} => Does not work {r , echo = FALSE} => Works This is the error I'm getting from pandoc:
I can remove the chunk options and change the default figure settings in the YAML header. This works although it changes the settings for ALL figures in the doc and therefore does not provide control on the individual settings of the chunks. Any idea what's going on and how we could fix it? Thanks |
@hherrada Have you found a solution? I experience the same issue. |
@hherrada @NiklasDL Please make sure you have the latest versions of R packages (it seems you were using a very old version of the rmarkdown package). |
@yihui Thank you for your immediate response. Here is a code example and the resulting error (unfortunatelly some parts are in german):
first code chunk:
second code chunk producing the error:
the error message:
|
@NiklasDL I believe your issue is a totally different one. How exactly did you compile the document? Is that a package vignette? |
@yihui It is supposed to be a tutorial for my package someday. I am really sorry if I'am off the track. |
@NiklasDL It is a different issue, but it is our fault (you could blame either the RStudio IDE or the rmarkdown package or probably both). You are not the first person who has had problems with compiling PDF vignettes (on Windows), but we haven't had a chance to investigate it yet. Sorry. For now, I guess the only way is |
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. |
The simple document,
fails to compile, giving this error:
If there's a plot without
fig.align
then everything works fine, e.g.I think the problem comes up in the template
default.tex
, where the variablegraphics
isn't set:NB: I'm using RStudio Version 0.98.1091, this is my session information:
The text was updated successfully, but these errors were encountered: