-
-
Notifications
You must be signed in to change notification settings - Fork 873
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
Generating tikz graphics fails with chunk before preamble #1055
Comments
Yes, it may be a bug. Forgive my laziness, but perhaps it is easier for you to move the code chunk after |
I would not say that you are lazy – after all you developed knitr. ;) (That's a hidden "thank you"). Of course, moving the code after |
It should not be too difficult to fix the bug. I just don't have the time at the moment and it does not sound like a terrible bug. Re: filehash, I guess the easiest way is to ask @rdpeng to release a new version of filehash to CRAN, and we update the version requirement in tikzDevice. |
Should be fixed now. Thanks! |
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 following MWE runs without problems:
As soon as the chunk
knitr-setup
is moved before the preamble, compilation fails with the following error:Error in getMetricsFromLatex(TeXMetrics)
.The following code can be used to reproduce the issue:
The problem seems to be that the knitr copies whole chunk
knitr-setup
totest-1.tikz
which is invalid TEX code. Therefore I suppose this is a bug in knitr.The text was updated successfully, but these errors were encountered: