Liviu Andronic wrote: > Given Jürgen's recent Argument developments, I am trying to come up > with an inset for Sweave Chunks. The inset would need to be similar to > ERT boxes, wrap the contents of the inset within the "<<>>=" and "@" > character, and would accept arguments that would be inserted between > "<<" and ">>=" from above. > > I came up with the inset definition below (also see new module > attached), but the issue is that when trying to 'Insert > Chunk > Options', LyX fails to do anything useful. Is this a bug?
With most recent trunk you can try the following InsetLayout "Flex:Sweave Chunk" LabelString "Sweave Chunk" LatexType none LyXType Custom Decoration Minimalistic MultiPar true ParbreakIsNewline 1 Spellcheck 0 FreeSpacing true ForceLTR true Argument 1 Mandatory 1 LabelString "Chunk Options" Tooltip "Chunk Options" LeftDelim << RightDelim >>= EndArgument End Note that: * there is no LaTeXType "Paragraph" in InsetLayout. Thus I used "none". * InsetArgument does not work within insets with "PassThru 1". This is a general problem (no inset can be inserted into a PassThru inset currently; I did not find the cause for this). * Inserting the trailing "@" is not yet supported by the InsetLayout syntax. This is completely independent of InsetArgument and would be a further enhancement. Jürgen