On Sun, Nov 25, 2012 at 7:13 PM, Jürgen Spitzmüller <sp...@lyx.org> wrote:
> InsetLayout "Flex:Sweave Chunk"
>         LabelString           "Sweave Chunk"
>         LatexType             none
>         LyXType               Custom
>         RightDelim            @
>
>         Decoration            Minimalistic
>         MultiPar              true
>         PassThru              1
>         ParbreakIsNewline     1
>         Spellcheck            0
>         FreeSpacing           true
>         ForceLTR              true
>         Argument 1
>                 Mandatory       1
>                 LabelString     "Chunk Options"
>                 Tooltip         "Chunk Options"
>                 LeftDelim       <<
>                 RightDelim      >>=
>         EndArgument
> End
>
I just tried this and it's pretty cool: It works!

Several comments:
- In principle a placeholder to insert line breaks where appropriate
isn't really needed as the user can insert line breaks herself within
the ERT-like inset. But for usability concerns, it is highly
recommended to have those breaks controlled automatically.

- I may have found a small bug: Insert the Sweave Chunk inset, then
the 'Chunk options', then type 'a'. In the LyX source you would notice
the following:
<<a\selectlanguage{english}%
>>=@

This is obviously unintended, I think even for LaTeX. If next you
'backspace' and then 'a' you get, as expected:
<<a>>=@

- I can 'Insert > Chunk options', but I do not see 'Chunk options' in
the inset c-menu. Can this be configured somehow?

Thanks
Liviu

Reply via email to