Jean-Marc Lasgouttes wrote:

>>>>>> "Gregor" == Gregor Gorjanc
>>>>>> <[EMAIL PROTECTED]> writes:
> 
> Gregor> Gregor Gorjanc <[EMAIL PROTECTED]> writes: ...
>>> to noweb only. Sweave is based on noweb, but has a bit different
>>> philosophy uses code to do the "computing in the document" and the
>>> code is then replaced with the results. Does anyone see any other
>>> route to provide Sweave support directly in LyX?
> 
> Gregor> Thinking a bit further, this could be solved by another option
> Gregor> for tex2lyx to specify which literate programing file format
> Gregor> would be chosen. I suggest noweb for default name instead of
> Gregor> literate as literate is far more general than noweb. For
> Gregor> Sweave file format name sweave could be chosen.

Why a different format? What is different in sweave that requires tex2lyx to
act differently? I suspect that you simply found a bug in the noweb import
that would also accor with noweb files, because the tex2lyx noweb support
was really a quick hack.

> Is there any reason to have a sweave-article and a noweb-article
> class? What would the difference be between the two? It seems to me
> that it would be better to pick a tool in Document>Settings to choose
> a literate programming program.

But that is already possible if you simply redefine the noweb converter. As
Gregor pointed out this is not nice if you use both. The alternative to a
new document class would be yet another set of dvi, ps and pdf formats for
output via sweave, with an appropriate set of converters. That becomes
unmanageable if it is extended even more. I already do not like the
different pdf formats, but I have no better idea.
I always wanted to reply to his original message but did not find the time.

IMO, there are four problems:

1) output to sweave format. This is currently only possible with hacks,
either via redefining the literate format, or by defining a literate->seave
converter (would be a dummy converter that just copies the file), and new
dvi,ps and pdf formats with an appropriate converter from sweave. The long
term solution would be to implement a sweave backend in LyX (it could just
be an alias for the existing noweb backend), so that LyX knows what
converters to call for a sweave doc.
2) layout files (or maybe not - depending on the solution to 1)
3) import: should not be difficult to fix once 1) is decided
4) problems with some encironments. I do nut understand that fully yet.


Georg

Reply via email to