Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow to specify LaTeX dependencies in knitr_meta #647
This patch allows third party packages to specify LaTeX package names and options to be inserted in the final LaTeX header.
Why is it needed
At least the
Based on the discussion started here, I wrote this patch. Summarizing:
This looks good overall. My only concern is that unlike HTML, LaTeX is so very fragile and this approach could easily fail, e.g. you cannot
Another possibly useful feature is like the
I have addressed all the code comments. Regarding @yihui comment about LaTeX fragility, I totally agree with you, but there is little I can do. Other packages that want to use this feature will have to cooperate in order to avoid compatibility issues.
Given that it seems all right to you, I would rather offer a simple initial implementation than trying to address all possible issues without having practical use cases.
added a commit
this pull request
Mar 22, 2016
Something is unclear about this.
I'm building a package with a custom thesis template and want to include a custom .sty file in the pdf_document. My function, afit_thesis.R, contains a call to pdf_document in which I've provided the argument extra_dependencies=latex_dependency('myPackage') where 'myPackage' has been the name of the package and the path to the package using
After reading this pull request, the rmarkdown documentation and the online documentation for pdf documents, it is not clear as to where the custom Latex package should be stored or how it should be called to ensure it is included in a .tex file.
@yihui By 'them' I assume you mean relative paths to the .sty files.
Per the documentation for
Perhaps my problem is trying to reference an absolute file path with