-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I am stuck with the following problem :
I a .Rnw file, i want to use the minted package, which needs to write files and therefore uses the -shell-escape flag on the latex command line. This is done automagically by my working environment (emacs + AUCTeX).
When knitring a .Rnw file with an R chink generating a figure :
tikzDevicebuilds a.texfile using (most of) the master file's preamble (hence uses\usepackage{minted}if present).tikzDevicecalls (pdf|xe|lua)latex on this file, without using the-shell-escapeflag
The first invocation of tikz fails with the message :
! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
Quitting from lines 34-35 (/home/charpent/Temporaire/Débourrage tikzDevice/Test1/Test1.Rnw)
Erreur : Failed to compile Fig1-1.tex. See Fig1-1.log for more info.
This log file has :
runsystem(mkdir -p _minted-Fig1-1)...disabled (restricted).
! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
See the minted package documentation for explanation.
tikzDevice currently does not seem to offer a way to add this flag to the (pdf|xe|lua)latex invocation (I checked that this cannot be done by setting tikzDefaultEngine).
It goes without saying that the same .Rnw file without \usepackage{minted} compiles perfectly...
I'm stuck...