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 need to include the Chunk argument 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?
>
That is my understanding, too. I attach a new pair of examples that
contain multiple lines of code. Old Style version:
\begin_layout Chunk
<<TEST>>=
\end_layout

\begin_layout Chunk
2+2
\end_layout

\begin_layout Chunk
3+3
\end_layout

\begin_layout Chunk
@
\end_layout


New Inset version:
\begin_layout Standard
\begin_inset Flex Chunk
status open

\begin_layout Plain Layout

\begin_inset Argument 1
status open

\begin_layout Plain Layout
TEST
\end_layout

\end_inset

2+2
\end_layout

\begin_layout Plain Layout

3+3
\end_layout

\end_inset


\end_layout


Liviu


> Richard
>
>
>
> On 05/23/2013 12:11 PM, Liviu Andronic wrote:
>>
>> 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 open
>>
>> \begin_layout Plain Layout
>>
>> TEST
>> \end_layout
>>
>> \end_inset
>>
>> 2+2
>> \end_layout
>>
>> \end_inset
>>
>>
>> \end_layout
>>
>>
>> The code below is the old-style equivalent of the above.
>>
>>
>> On Thu, May 23, 2013 at 5:17 PM, Richard Heck <rgh...@lyx.org> wrote:
>>>
>>> \begin_layout Chunk
>>> <<TEST>>=
>>> \end_layout
>>>
>>> \begin_layout Chunk
>>> 2+2
>>> \end_layout
>>>
>>> \begin_layout Chunk
>>> @
>>> \end_layout
>>>
>>> Is it correct, then, to remove the first and last chunks, and leave only
>>> the
>>> middle bit?
>>>
>> I do not have a good understanding of the LyX file format. Maybe JMarc
>> knows better?
>>
>> Liviu
>
>



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail

Attachment: knitr.lyx
Description: Binary data

Attachment: knitr-new.lyx
Description: Binary data

Reply via email to