-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
plot_crop fails silently #2381
Comments
It seems it should warn by default as Line 812 in 9eb1074
Lines 821 to 838 in 9eb1074
Did you get no warning at all ? I tried
and I got the warning. So maybe this is something else in another context ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using
knitr
viaQuarto
. One issue that I had was that the pdf plots had too much margin, but I solved it with the knitr::hook_pdfcrop. The thing is that it took me a while to getpfdcrop
to work. The problem was that:pdfcrop
was not installed: solved it withtinytex::tlmgr_install("pdfcrop")
$HOME/bin
was not in the PATH originally, see https://yihui.org/tinytex/#installation, Install pdfcrop not working on Ubuntu 22 rstudio/tinytex#435, Cannot set/change user binary dir on Linux rstudio/tinytex#365).Until I fixed the problems above with some trials and errors,
knitr::plot_crop
was failing silently, returning the path of the image to crop, but not actually cropping.Would it be a good idea to change this
knitr/R/plot.R
Line 345 in 9eb1074
into something that raises a warning if the utility is not found?
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: