-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Single-file knitr projects do not build properly #42
Comments
Latexmk as far as I know doesn't have inbuilt support for
Another option would be I'd be interested in knowing how you solve this, and maybe even update the readme with what works for you! |
@James-Yu maybe should re-open this until confirmation that it works? |
I'm using LaTeX for a bunch of stuff, including my thesis, so I ended up using the Docker container which builds my thesis to build this paper. It worked well, but went way outside the scope of this package so I think it's probably a bad thing to recommend to others. :-) Were I to recommend a fix or write a PR, I would rewrite the
The package could then run the pre-processing commands whenever those files were modified and saved, and in my case the LaTeX root would then be pointed at the output of the pre-processing command for my source file. |
On further reflection, I think a better way to handle this would be to combine |
As main functionality for the extension is to provide LaTeX support, the variants are not considered as important. I'd recommend you create customized I personally do not use either |
Option 1Am I oversimplifying this, or wouldn't a
The builder should parse the Once issue I foresee though is that the Option 2Repeating from my last comment, but I'd highly recommend
Then with the directive in the Unfortunately, I don't use R, so can't test this! |
@ashthespy Thanks a lot for the summary! I will add a reference to this answer in the readme. @mathuin Can you please check if the methods suggested by @ashthespy above work for you? Thanks. |
The first option works, with some minor sed magic which replaces the Rnw with tex.
I was unable to get |
Glad at least it works for you! |
With the PR merged, I'd reckon the following configuration would work for
Cheers! :-) |
I have a project which has a single knitr file named
weightpaper.Rnw
. There are no other.tex
or.Rnw
files in the directory. I have created a.latexcfg
with the following contents:I open the knitr file, and click the build icon at the bottom. I get a blue notification that this file has been set as the root file, and a red notification reporting a failure to build. The contents of the red notification:
I had expected something like this to be executed before the call to
latexmk
:Rscript -e "library(knitr); knit('$<')"
Am I doing something wrong? What should I be doing instead?
The text was updated successfully, but these errors were encountered: