Dean Attali has just added an R package called ezknitr to CRAN. It enables those who use knitr and RMarkdown in .Rmd files to handle directories quite flexibly. His blog describes it well: path control with ezknitr
Unfortunately, the package doesn't at this time help if knitr compiles an .Rnw file for LaTeX.
Is there a comparable package or code technique to enable the efficient and simple identification of multiple directories (for images, for output, etc.) with LaTeX?
.//as a path segment then tex will find files in any directory below the current directory in the directory tree, this works for\inputand\includegraphicsand specialised input such as\usepackage– David Carlisle Dec 11 '15 at 12:58\graphicspatheg\graphicspath{{dir1/}{dir2/}}command (usetexdoc grfguideto see the relevant manual) or more efficiently just set the environment variable TEXINPUTS to be.//:before starting tex – David Carlisle Dec 11 '15 at 19:55