On Fri, Jan 04, 2019 at 03:09:02PM -0500, Scott Kostyshak wrote: > On Fri, Jan 04, 2019 at 06:36:47PM +0100, Jean-Marc Lasgouttes wrote: > > Le 04/01/2019 ? 18:21, Pavel Sanda a écrit : > > > Hi all, > > > > > > since we gained the safety framework which requests explicit consent for > > > running external scripts it's now time to release the real beast :) > > > > > > I propose to introduce new inset layout parameter (say TriggerScript) > > > which > > > will would execute user-defined script/binary processing the content of > > > the > > > inset. > > > Something similar to knitr or gnuplot extensions but much easier for user > > > to > > > directly declare in inset layout definition. > > > > What use case do you have in mind? sweave and friend only make sense for a > > full document. > > Is Andrew's pLyX suite a potential use case for this proposed feature?
The original motivation is not to run some command for the whole document but to have intermediate layer for processing of each inset, i.e. lyx generates block of (latex) code for given inset, that is passed to your script which will process the way it wants and then return result back as final (latex) code for that block. Certainly you can (mis)use it for triggering script for the whole document or just use the inset as 'code' inset for whatever language you want -- result might be textual output, figure or launching Apollo to the Moon :) Pavel