Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-25 Thread Liviu Andronic
Dear Richard, I must admit that I'm a bit lost. On Sat, May 25, 2013 at 12:20 AM, Richard Heck rgh...@lyx.org wrote: Try: git apply FILE.patch That should work. The patches are based off 01add2d52f, so you could do: git checkout -b Chunks 01add2d52f first, if you want. I tried to

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-25 Thread Liviu Andronic
Dear Richard, I must admit that I'm a bit lost. On Sat, May 25, 2013 at 12:20 AM, Richard Heck wrote: > Try: > git apply FILE.patch > That should work. The patches are based off 01add2d52f, so you could do: > git checkout -b Chunks 01add2d52f > first, if you want. > I

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-24 Thread Liviu Andronic
On Thu, May 23, 2013 at 10:11 PM, Richard Heck rgh...@lyx.org wrote: I have posted a lyx2lyx conversion routine to the bug report http://www.lyx.org/trac/ticket/8588#comment:23 Please test and let me know if there are problems. If so, please post the Richard, I'm afraid I'm having

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-24 Thread Richard Heck
On 05/24/2013 05:55 PM, Liviu Andronic wrote: On Thu, May 23, 2013 at 10:11 PM, Richard Heck rgh...@lyx.org wrote: I have posted a lyx2lyx conversion routine to the bug report http://www.lyx.org/trac/ticket/8588#comment:23 Please test and let me know if there are problems. If so, please

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-24 Thread Liviu Andronic
On Thu, May 23, 2013 at 10:11 PM, Richard Heck wrote: > > I have posted a lyx2lyx conversion routine to the bug report > http://www.lyx.org/trac/ticket/8588#comment:23 > Please test and let me know if there are problems. If so, please post the > Richard, I'm afraid I'm having

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-24 Thread Richard Heck
On 05/24/2013 05:55 PM, Liviu Andronic wrote: On Thu, May 23, 2013 at 10:11 PM, Richard Heck wrote: I have posted a lyx2lyx conversion routine to the bug report http://www.lyx.org/trac/ticket/8588#comment:23 Please test and let me know if there are problems. If so, please

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
On 05/18/2013 03:02 AM, Liviu Andronic wrote: Dear all, JMarc and I decided to go ahead with the Chunk inset for the literate modules in 2.1, and now we're only missing the lyx2lyx conversion routines. Now the patch is available on the bug tracker ( http://www.lyx.org/trac/ticket/8588 :

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Hello Richard, On Thu, May 23, 2013 at 3:55 PM, Richard Heck rgh...@lyx.org wrote: provide the lyx2lyx bits. We need to take any sequence of Chunk layouts and replace them by a Chunk inset. If the Chunk has some alignments parameters, they should be given to the Standard layout paragraph

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
So the relevant bits of these files look like: \begin_layout Chunk TEST= \end_layout \begin_layout Chunk 2+2 \end_layout \begin_layout Chunk @ \end_layout and: \begin_layout Standard \begin_inset Flex Chunk status open \begin_layout Plain Layout 2+2 \end_layout \end_inset \end_layout

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Richard, I'm sorry but I gave you an imperfect equivalent for the inset example. The attached knitr-new.lyx is better, and also uses the argument inset. The relevant bits are: \begin_layout Standard \begin_inset Flex Chunk status open \begin_layout Plain Layout \begin_inset Argument 1 status

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
So we take what's in the first Chunk paragraph, strip off the and = delimiters, and put that into the argument of the Chunk inset. Then we take everything up to the last Chunk paragraph, put that as a sequence of paragraphs into the Chunk inset, and discard the last Chunk paragraph. Yes?

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
On Thu, May 23, 2013 at 6:14 PM, Richard Heck rgh...@lyx.org wrote: So we take what's in the first Chunk paragraph, strip off the and = delimiters, and put that into the argument of the Chunk inset. Yes. Often after stripping the contents will be an empty string (). Then I think there is no

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
I have posted a lyx2lyx conversion routine to the bug report http://www.lyx.org/trac/ticket/8588#comment:23 Please test and let me know if there are problems. If so, please post the file causing the problems here, stripped down to be as minimal as possible. I have not yet written the

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
On 05/18/2013 03:02 AM, Liviu Andronic wrote: Dear all, JMarc and I decided to go ahead with the Chunk inset for the literate modules in 2.1, and now we're only missing the lyx2lyx conversion routines. Now the patch is available on the bug tracker ( http://www.lyx.org/trac/ticket/8588 :

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Hello Richard, On Thu, May 23, 2013 at 3:55 PM, Richard Heck wrote: >> provide the lyx2lyx bits. We need to take any sequence of Chunk >> layouts and replace them by a Chunk inset. If the Chunk has some >> alignments parameters, they should be given to the Standard layout >>

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
So the relevant bits of these files look like: \begin_layout Chunk <>= \end_layout \begin_layout Chunk 2+2 \end_layout \begin_layout Chunk @ \end_layout and: \begin_layout Standard \begin_inset Flex Chunk status open \begin_layout Plain Layout 2+2 \end_layout \end_inset \end_layout Is

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
Richard, I'm sorry but I gave you an imperfect equivalent for the inset example. The attached knitr-new.lyx is better, and also uses the argument inset. The relevant bits are: \begin_layout Standard \begin_inset Flex Chunk status open \begin_layout Plain Layout \begin_inset Argument 1 status

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
So we take what's in the first Chunk paragraph, strip off the << and >>= delimiters, and put that into the argument of the Chunk inset. Then we take everything up to the last Chunk paragraph, put that as a sequence of paragraphs into the Chunk inset, and discard the last Chunk paragraph.

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Liviu Andronic
On Thu, May 23, 2013 at 6:14 PM, Richard Heck wrote: > > So we take what's in the first Chunk paragraph, strip off the << and >>= > delimiters, and put that into the argument of the Chunk inset. > Yes. Often after stripping the contents will be an empty string (""). Then I think

Re: lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-23 Thread Richard Heck
I have posted a lyx2lyx conversion routine to the bug report http://www.lyx.org/trac/ticket/8588#comment:23 Please test and let me know if there are problems. If so, please post the file causing the problems here, stripped down to be as minimal as possible. I have not yet written the

lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-18 Thread Liviu Andronic
with that? Regards, Liviu On Wed, May 15, 2013 at 5:05 PM, LyX Ticket Tracker t...@lyx.org wrote: #8588: add Sweave Chunk inset ---+- [..] 3. For that, you send your current patch to the list and ask a kind soul to provide the lyx2lyx bits

lyx2lyx conversion routines (was: Re: #8588: add Sweave Chunk inset)

2013-05-18 Thread Liviu Andronic
with that? Regards, Liviu On Wed, May 15, 2013 at 5:05 PM, LyX Ticket Tracker <t...@lyx.org> wrote: > #8588: add Sweave Chunk inset > ---+- > [..] > 3. For that, you send your current patch to the list and ask a kind soul > to pro

Re: Sweave Chunk inset

2012-12-24 Thread Liviu Andronic
On Sun, Dec 23, 2012 at 5:39 PM, Jürgen Spitzmüller sp...@lyx.org wrote: It was not as tricky as I thought, so I implemented this. I've just tested this and it looks very nice. Thanks! Liviu

Re: Sweave Chunk inset

2012-12-24 Thread Liviu Andronic
On Wed, Nov 28, 2012 at 7:04 PM, Jürgen Spitzmüller sp...@lyx.org wrote: Liviu Andronic wrote: - 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 one

Re: Sweave Chunk inset

2012-12-24 Thread Liviu Andronic
On Sun, Dec 23, 2012 at 5:39 PM, Jürgen Spitzmüller wrote: > It was not as tricky as I thought, so I implemented this. > I've just tested this and it looks very nice. Thanks! Liviu

Re: Sweave Chunk inset

2012-12-24 Thread Liviu Andronic
On Wed, Nov 28, 2012 at 7:04 PM, Jürgen Spitzmüller <sp...@lyx.org> wrote: >> Liviu Andronic wrote: >>> - 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 fo

Re: Sweave Chunk inset

2012-12-23 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: Oh, I see. At the moment, such arguments need to be inserted in the first paragraph. This is also the case for layout sequences (such as lists) and it has been like this always (cf. item list in beamer in 2.0, for instance). Alas, it is not trivial to change

Re: Sweave Chunk inset

2012-12-23 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > Oh, I see. At the moment, such arguments need to be inserted in the first > paragraph. This is also the case for layout sequences (such as lists) and > it has been like this always (cf. item list in beamer in 2.0, for > instance). > > Alas, it is not trivial to

Re: Sweave Chunk inset

2012-12-22 Thread Jürgen Spitzmüller
Liviu Andronic wrote: Can we do anything about this? Please post you layout/module, so that I can actually test. Jürgen

Re: Sweave Chunk inset

2012-12-22 Thread Liviu Andronic
On Sat, Dec 22, 2012 at 9:06 AM, Jürgen Spitzmüller sp...@lyx.org wrote: Liviu Andronic wrote: Can we do anything about this? Please post you layout/module, so that I can actually test. Please see attached. Liviu sweave.module Description: Binary data

Re: Sweave Chunk inset

2012-12-22 Thread Jürgen Spitzmüller
Liviu Andronic wrote: Please see attached. Oh, I see. At the moment, such arguments need to be inserted in the first paragraph. This is also the case for layout sequences (such as lists) and it has been like this always (cf. item list in beamer in 2.0, for instance). Alas, it is not trivial

Re: Sweave Chunk inset

2012-12-22 Thread Liviu Andronic
On Sat, Dec 22, 2012 at 11:18 AM, Jürgen Spitzmüller sp...@lyx.org wrote: Liviu Andronic wrote: Please see attached. Oh, I see. At the moment, such arguments need to be inserted in the first paragraph. This is also the case for layout sequences (such as lists) and it has been like this

Re: Sweave Chunk inset

2012-12-22 Thread Jürgen Spitzmüller
Liviu Andronic wrote: The parent insets could have a first line reserved for argument insets. And by reserved I mean that it should not be possible to mix the parent inset content (text, etc.) and any argument inset. Thus when inserting an argument inset within the parent, it would

Re: Sweave Chunk inset

2012-12-22 Thread Jürgen Spitzmüller
Liviu Andronic wrote: > Can we do anything about this? Please post you layout/module, so that I can actually test. Jürgen

Re: Sweave Chunk inset

2012-12-22 Thread Liviu Andronic
On Sat, Dec 22, 2012 at 9:06 AM, Jürgen Spitzmüller wrote: > Liviu Andronic wrote: >> Can we do anything about this? > > Please post you layout/module, so that I can actually test. > Please see attached. Liviu sweave.module Description: Binary data

Re: Sweave Chunk inset

2012-12-22 Thread Jürgen Spitzmüller
Liviu Andronic wrote: > Please see attached. Oh, I see. At the moment, such arguments need to be inserted in the first paragraph. This is also the case for layout sequences (such as lists) and it has been like this always (cf. item list in beamer in 2.0, for instance). Alas, it is not trivial

Re: Sweave Chunk inset

2012-12-22 Thread Liviu Andronic
On Sat, Dec 22, 2012 at 11:18 AM, Jürgen Spitzmüller wrote: > Liviu Andronic wrote: >> Please see attached. > > Oh, I see. At the moment, such arguments need to be inserted in the first > paragraph. This is also the case for layout sequences (such as lists) and it > has been like

Re: Sweave Chunk inset

2012-12-22 Thread Jürgen Spitzmüller
Liviu Andronic wrote: > The parent insets could have a first line reserved for argument > insets. And by reserved I mean that it should not be possible to mix > the parent inset content (text, etc.) and any argument inset. Thus > when inserting an argument inset within the parent, it would >

Re: Sweave Chunk inset

2012-12-21 Thread Liviu Andronic
Hello Juergen On Sat, Dec 1, 2012 at 11:52 AM, Jürgen Spitzmüller sp...@lyx.org wrote: Liviu Andronic wrote: With latest trunk I can no longer replicate this problem. But I think I spotted a further issue with the layout arguments: - The user can insert two identical argument insets in the

Re: Sweave Chunk inset

2012-12-21 Thread Liviu Andronic
Hello Juergen On Sat, Dec 1, 2012 at 11:52 AM, Jürgen Spitzmüller wrote: > Liviu Andronic wrote: >> With latest trunk I can no longer replicate this problem. But I think >> I spotted a further issue with the layout arguments: >> - The user can insert two identical argument insets

Re: Sweave Chunk inset

2012-12-01 Thread Jürgen Spitzmüller
an argument inset in the middle of a phrase; although the LaTeX code will be generated correctly, UI-wise it's a bit ugly. Thus even if the right-click c-menu is triggered in the middle of the 4th line, the 'Chunk Options' would still get placed on the reserved 1st virtual line of the 'Sweave Chunk' inset

Re: Sweave Chunk inset

2012-12-01 Thread Jürgen Spitzmüller
d still get placed on the reserved > 1st "virtual" line of the 'Sweave Chunk' inset. But again, this is > cosmetics. This is the price you have to pay for the inset approach. Trying to set insets to a certain position gets you all sorts of trouble, see the big woes we have with Inset

Re: Sweave Chunk inset

2012-11-30 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: 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

Re: Sweave Chunk inset

2012-11-30 Thread Jürgen Spitzmüller
Liviu Andronic wrote: Right now this is what happens: - Insert 'Sweave Chunk': the inset gets inserted and the cursor is placed in teh inset - Type '2+2' - Move the cursor outside the inset: the inset gets 'Closed' (collapsed) The last part is suboptimal. It would be more desirable if

Re: Sweave Chunk inset

2012-11-30 Thread Liviu Andronic
On Fri, Nov 30, 2012 at 9:14 AM, Jürgen Spitzmüller sp...@lyx.org wrote: Jürgen Spitzmüller wrote: 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

Re: Sweave Chunk inset

2012-11-30 Thread Liviu Andronic
On Fri, Nov 30, 2012 at 9:24 AM, Jürgen Spitzmüller sp...@lyx.org wrote: - Move the cursor outside the inset: the inset gets 'Closed' (collapsed) The last part is suboptimal. It would be more desirable if after moving outside the inset, the inset would stay 'Opened' (un-collapsed). A 'Closed

Re: Sweave Chunk inset

2012-11-30 Thread Jean-Marc Lasgouttes
Le 30/11/2012 09:24, Jürgen Spitzmüller a écrit : The reason is that InsetFlex sets status_= Collapsed; in the constructor. AFAICS this is the only inset doing so. Is there a reason for this? It strikes me confusing that this inset is collapsed after insetion while all others are open. It is

Re: Sweave Chunk inset

2012-11-30 Thread Liviu Andronic
On Wed, Nov 28, 2012 at 7:04 PM, Jürgen Spitzmüller sp...@lyx.org wrote: - 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 one should be fixed now, too

Re: Sweave Chunk inset

2012-11-30 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > > 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

Re: Sweave Chunk inset

2012-11-30 Thread Jürgen Spitzmüller
Liviu Andronic wrote: > Right now this is what happens: > - Insert > 'Sweave Chunk': the inset gets inserted and the cursor is > placed in teh inset > - Type '2+2' > - Move the cursor outside the inset: the inset gets 'Closed' (collapsed) > > The last part is suboptimal. It would be more

Re: Sweave Chunk inset

2012-11-30 Thread Liviu Andronic
On Fri, Nov 30, 2012 at 9:14 AM, Jürgen Spitzmüller wrote: > Jürgen Spitzmüller wrote: >> > 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

Re: Sweave Chunk inset

2012-11-30 Thread Liviu Andronic
On Fri, Nov 30, 2012 at 9:24 AM, Jürgen Spitzmüller wrote: >> - Move the cursor outside the inset: the inset gets 'Closed' (collapsed) >> >> The last part is suboptimal. It would be more desirable if after >> moving outside the inset, the inset would stay 'Opened' >>

Re: Sweave Chunk inset

2012-11-30 Thread Jean-Marc Lasgouttes
Le 30/11/2012 09:24, Jürgen Spitzmüller a écrit : The reason is that InsetFlex sets "status_= Collapsed;" in the constructor. AFAICS this is the only inset doing so. Is there a reason for this? It strikes me confusing that this inset is collapsed after insetion while all others are open. It is

Re: Sweave Chunk inset

2012-11-30 Thread Liviu Andronic
On Wed, Nov 28, 2012 at 7:04 PM, Jürgen Spitzmüller <sp...@lyx.org> wrote: >>> - 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 followin

Re: Sweave Chunk inset

2012-11-28 Thread Jürgen Spitzmüller
Liviu Andronic wrote: - 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 one should be fixed now, too. Jürgen

Re: Sweave Chunk inset

2012-11-28 Thread Jürgen Spitzmüller
> Liviu Andronic wrote: >> - 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 one should be fixed now, too. Jürgen

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
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

Re: Sweave Chunk inset

2012-11-27 Thread Jürgen Spitzmüller
Chunk inset, then the 'Chunk options', then type 'a'. In the LyX source you would notice the following: a\selectlanguage{english}% =@ Strange. I saw this, too, but I thought I fixed it. This is due to the PassThru setting which sets the language to latex. I'll see what I can do. - I can

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
On Mon, Nov 26, 2012 at 1:08 PM, Jürgen Spitzmüller sp...@lyx.org wrote: Just for the demonstration, this is how the placeholder approach would look like (with the attached patch): I've just tested this and it does exactly what we need. Liviu InsetLayout Flex:Sweave Chunk

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
On Tue, Nov 27, 2012 at 2:09 PM, Jürgen Spitzmüller sp...@lyx.org wrote: - I can 'Insert Chunk options', but I do not see 'Chunk options' in the inset c-menu. Can this be configured somehow? Done now. Excellent! Two (somewhat cosmetic) follow-up questions: - By default custom insets are

Re: Sweave Chunk inset

2012-11-27 Thread Jürgen Spitzmüller
Liviu Andronic wrote: Two (somewhat cosmetic) follow-up questions: - By default custom insets are 'Closed' (collapsed). This interferes with the workflow in many situations, including in the new Sweave Chunk. Would it be possible to have a 'Closed true/false' layout parameter for insets so

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
On Tue, Nov 27, 2012 at 2:35 PM, Jürgen Spitzmüller sp...@lyx.org wrote: Liviu Andronic wrote: Two (somewhat cosmetic) follow-up questions: - By default custom insets are 'Closed' (collapsed). This interferes with the workflow in many situations, including in the new Sweave Chunk. Would it be

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
nt > 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

Re: Sweave Chunk inset

2012-11-27 Thread Jürgen Spitzmüller
d 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}% > > >>=@ Strange. I saw this, too, but I thought I fixed it. This is due to the PassThru setting whic

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
On Mon, Nov 26, 2012 at 1:08 PM, Jürgen Spitzmüller wrote: > Just for the demonstration, this is how the "placeholder" approach would look > like (with the attached patch): > I've just tested this and it does exactly what we need. Liviu > InsetLayout "Flex:Sweave Chunk" >

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
On Tue, Nov 27, 2012 at 2:09 PM, Jürgen Spitzmüller wrote: >> - I can 'Insert > Chunk options', but I do not see 'Chunk options' in >> the inset c-menu. Can this be configured somehow? > > Done now. > Excellent! Two (somewhat cosmetic) follow-up questions: - By default custom

Re: Sweave Chunk inset

2012-11-27 Thread Jürgen Spitzmüller
Liviu Andronic wrote: > Two (somewhat cosmetic) follow-up questions: > - By default custom insets are 'Closed' (collapsed). This interferes > with the workflow in many situations, including in the new Sweave > Chunk. Would it be possible to have a 'Closed true/false' layout > parameter for insets

Re: Sweave Chunk inset

2012-11-27 Thread Liviu Andronic
On Tue, Nov 27, 2012 at 2:35 PM, Jürgen Spitzmüller wrote: > Liviu Andronic wrote: >> Two (somewhat cosmetic) follow-up questions: >> - By default custom insets are 'Closed' (collapsed). This interferes >> with the workflow in many situations, including in the new Sweave >> Chunk.

Re: Sweave Chunk inset

2012-11-26 Thread Jean-Marc Lasgouttes
Le 26/11/2012 08:12, Jürgen Spitzmüller a écrit : Liviu Andronic wrote: Can we use '\n' or some other linebreak character in RightDelim? No. We could implement some placeholder that translates into a linebreak, but I'm starting to feel we extend the layout syntax too much for the sake of this

Re: Sweave Chunk inset

2012-11-26 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: We should probably forget about it. What we need is maybe a way to have default construction of insets, like saying that, at creation a Chunk inset contains already the stuff. Or that a figure float starts centered with a caption. Or that a table is better than

Re: Sweave Chunk inset

2012-11-26 Thread Jean-Marc Lasgouttes
Le 26/11/2012 08:12, Jürgen Spitzmüller a écrit : Liviu Andronic wrote: Can we use '\n' or some other linebreak character in RightDelim? No. We could implement some placeholder that translates into a linebreak, but I'm starting to feel we extend the layout syntax too much for the sake of this

Re: Sweave Chunk inset

2012-11-26 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: > We should probably forget about it. What we need is maybe a way to have > default construction of insets, like saying that, at creation a Chunk > inset contains already the <<>> stuff. Or that a figure float starts > centered with a caption. Or that a table is

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
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

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: * 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). This one is fixed now. Jürgen

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: * Inserting the trailing @ is not yet supported by the InsetLayout syntax. This is completely independent of InsetArgument and would be a further enhancement. This one is implemented now as well. The following should do what you want: InsetLayout Flex:Sweave Chunk

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Sun, Nov 25, 2012 at 7:13 PM, Jürgen Spitzmüller sp...@lyx.org wrote: Jürgen Spitzmüller wrote: * Inserting the trailing @ is not yet supported by the InsetLayout syntax. This is completely independent of InsetArgument and would be a further enhancement. This one is implemented now as

Re: Sweave Chunk inset

2012-11-25 Thread Scott Kostyshak
On Nov 25, 2012 1:13 PM, Jürgen Spitzmüller spitz sp...@lyx.org@sp...@lyx.org lyx.org sp...@lyx.org wrote: Jürgen Spitzmüller wrote: * Inserting the trailing @ is not yet supported by the InsetLayout syntax. This is completely independent of InsetArgument and would be a further

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Sun, Nov 25, 2012 at 5:35 PM, Jürgen Spitzmüller sp...@lyx.org wrote: * there is no LaTeXType Paragraph in InsetLayout. Thus I used none. Then the docs need to be fixed. In Section 5.3.9 I see: LatexType [Paragraph, Command, Environment, Item_Environment, List_Environment, Bib_Environment] I

Re: Sweave Chunk inset

2012-11-25 Thread Jean-Marc Lasgouttes
Le 25/11/2012 17:35, Jürgen Spitzmüller a écrit : With most recent trunk you can try the following InsetLayout Flex:Sweave Chunk LabelString Sweave Chunk LatexType none LyXType Custom DecorationMinimalistic

Re: Sweave Chunk inset

2012-11-25 Thread Yihui Xie
I do not see the value of the weird Scode environment; I think it was invented only to bring the author a fake feeling that he is writing LaTeX, since it is not really a LaTeX environment at all. For me, I just want an approach to input = and @ quickly in LyX; perhaps InsetArgument is an overkill

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Sun, Nov 25, 2012 at 11:27 PM, Yihui Xie x...@yihui.name wrote: For me, I just want an approach to input = and @ quickly in LyX; perhaps InsetArgument is an overkill for this task. I'll be happy enough if LyX has something like macro recording so I can press a shortcut to input = in an ERT

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Liviu Andronic wrote: * there is no LaTeXType Paragraph in InsetLayout. Thus I used none. Then the docs need to be fixed. I've done that yesterday. Jürgen

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: Will there be a carriage return after the = ? No, it just outputs OptArg=InsetText@ Is the line break needed? Jürgen

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Liviu Andronic wrote: Can we use '\n' or some other linebreak character in RightDelim? No. We could implement some placeholder that translates into a linebreak, but I'm starting to feel we extend the layout syntax too much for the sake of this special case. What about this Scode thing JMarc

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Mon, Nov 26, 2012 at 8:12 AM, Jürgen Spitzmüller sp...@lyx.org wrote: Liviu Andronic wrote: Can we use '\n' or some other linebreak character in RightDelim? No. We could implement some placeholder that translates into a linebreak, but I'm starting to feel we extend the layout syntax too

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
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

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > * 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). This one is fixed now. Jürgen

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > * Inserting the trailing "@" is not yet supported by the InsetLayout syntax. > This is completely independent of InsetArgument and would be a further > enhancement. This one is implemented now as well. The following should do what you want: InsetLayout "Flex:Sweave

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Sun, Nov 25, 2012 at 7:13 PM, Jürgen Spitzmüller wrote: > Jürgen Spitzmüller wrote: >> * Inserting the trailing "@" is not yet supported by the InsetLayout syntax. >> This is completely independent of InsetArgument and would be a further >> enhancement. > > This one is

Re: Sweave Chunk inset

2012-11-25 Thread Scott Kostyshak
On Nov 25, 2012 1:13 PM, "Jürgen Spitzmüller" @ lyx.org > wrote: > > Jürgen Spitzmüller wrote: > > * Inserting the trailing "@" is not yet supported by the InsetLayout syntax. > > This is completely independent of InsetArgument and would be a further > > enhancement.

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Sun, Nov 25, 2012 at 5:35 PM, Jürgen Spitzmüller wrote: > * there is no LaTeXType "Paragraph" in InsetLayout. Thus I used "none". > Then the docs need to be fixed. In Section 5.3.9 I see: LatexType [Paragraph, Command, Environment, Item_Environment, List_Environment,

Re: Sweave Chunk inset

2012-11-25 Thread Jean-Marc Lasgouttes
Le 25/11/2012 17:35, Jürgen Spitzmüller a écrit : With most recent trunk you can try the following InsetLayout "Flex:Sweave Chunk" LabelString "Sweave Chunk" LatexType none LyXType Custom DecorationMinimalistic

Re: Sweave Chunk inset

2012-11-25 Thread Yihui Xie
I do not see the value of the weird Scode environment; I think it was invented only to bring the author a fake feeling that he is writing LaTeX, since it is not really a LaTeX environment at all. For me, I just want an approach to input <<>>= and @ quickly in LyX; perhaps InsetArgument is an

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Sun, Nov 25, 2012 at 11:27 PM, Yihui Xie wrote: > For me, I just want an approach to input <<>>= and @ quickly in LyX; > perhaps InsetArgument is an overkill for this task. I'll be happy > enough if LyX has something like macro recording so I can press a > shortcut to input

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Liviu Andronic wrote: > > * there is no LaTeXType "Paragraph" in InsetLayout. Thus I used "none". > > Then the docs need to be fixed. I've done that yesterday. Jürgen

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: > Will there be a carriage return after the >>= ? No, it just outputs <>=InsetText@ Is the line break needed? Jürgen

Re: Sweave Chunk inset

2012-11-25 Thread Jürgen Spitzmüller
Liviu Andronic wrote: > Can we use '\n' or some other linebreak character in RightDelim? No. We could implement some placeholder that translates into a linebreak, but I'm starting to feel we extend the layout syntax too much for the sake of this special case. What about this Scode thing JMarc

Re: Sweave Chunk inset

2012-11-25 Thread Liviu Andronic
On Mon, Nov 26, 2012 at 8:12 AM, Jürgen Spitzmüller wrote: > Liviu Andronic wrote: >> Can we use '\n' or some other linebreak character in RightDelim? > > No. We could implement some placeholder that translates into a linebreak, but > I'm starting to feel we extend the layout