Re: [PATCH] Fix importation of noweb files with tex2lyx

2012-10-25 Thread Gregor Gorjanc
Hi,

On 25 October 2012 06:33, Yihui Xie x...@yihui.name wrote:

 Gregor may know the history of Scrap; that term has been there ever
 since I started using LyX/Sweave, and I never know how it came in.

 Noweb is only one of the implementations of literate programming (to
 beat Knuth's WEB), so I guess literate may actually be a better
 name.


I was also surprised  by these terms when I first looked into the code. I
think I read somewhere that Kayvaan took these terms after some other
noweb system. I believe this is described somewhere in the lyx doc/devel
files.

gg


Re: [PATCH] Fix importation of noweb files with tex2lyx

2012-10-25 Thread Gregor Gorjanc
Hi,

On 25 October 2012 06:33, Yihui Xie  wrote:

> Gregor may know the history of "Scrap"; that term has been there ever
> since I started using LyX/Sweave, and I never know how it came in.
>
> Noweb is only one of the implementations of literate programming (to
> beat Knuth's WEB), so I guess "literate" may actually be a better
> name.


I was also surprised  by these terms when I first looked into the code. I
think I read somewhere that Kayvaan took these terms after some other
"noweb" system. I believe this is described somewhere in the lyx doc/devel
files.

gg


Re: A solution to the problem of Sweave.sty in the sweave module

2011-05-11 Thread Gregor GORJANC
I wote for copying file to temporary folder where LyX copies files for LaTeX
compilation.

Gregor Gorjanc


Re: A solution to the problem of Sweave.sty in the sweave module

2011-05-11 Thread Gregor GORJANC
I wote for copying file to temporary folder where LyX copies files for LaTeX
compilation.

Gregor Gorjanc


Re: #6623: Sweave cannot read local files

2010-12-13 Thread Gregor GORJANC
On 12 December 2010 22:28, LyX Ticket Tracker t...@lyx.org wrote:

 #6623: Sweave cannot read local files

 +---
  Reporter:  lasgouttes  |   Owner:  kay...@…
 Type:  defect  |  Status:  new
  Priority:  normal  |   Milestone:
 Component:  literate| Version:  2.0.0svn
  Severity:  normal  |Keywords:

 +---
 Changes (by lasgouttes):

  * keywords:  patch =


 Comment:

  I found my bugs. The ticket is now partly fixed at r36849 and r36850. What
  remains to be done is to avoid having the eps/pdf be output in document
  directory.


Perhaps the following might help:

\SweaveOpts{prefix.string=foo/bar}

and Sweave will place all figures in subdirectory foo and their name will
start with bar (instead of the name of the Sweave file). The subdirectory
foo should exist before you run Sweave.

Regards, gg


Re: #6623: Sweave cannot read local files

2010-12-13 Thread Gregor GORJANC
On 12 December 2010 22:28, LyX Ticket Tracker  wrote:

> #6623: Sweave cannot read local files
>
> +---
>  Reporter:  lasgouttes  |   Owner:  kay...@…
> Type:  defect  |  Status:  new
>  Priority:  normal  |   Milestone:
> Component:  literate| Version:  2.0.0svn
>  Severity:  normal  |Keywords:
>
> +---
> Changes (by lasgouttes):
>
>  * keywords:  patch =>
>
>
> Comment:
>
>  I found my bugs. The ticket is now partly fixed at r36849 and r36850. What
>  remains to be done is to avoid having the eps/pdf be output in document
>  directory.


Perhaps the following might help:

\SweaveOpts{prefix.string=foo/bar}

and Sweave will place all figures in subdirectory foo and their name will
start with bar (instead of the name of the Sweave file). The subdirectory
foo should exist before you run Sweave.

Regards, gg


Re: [PATCH] Sweave support (was: Re: Beta plans (again, again))

2010-10-20 Thread Gregor GORJANC
 I finally found some time for making an infrastructure for running sweave
 with our own customizations. As you can see the patch is trivial, but
 I would like to be sure that it works on windows.

Can I download somewhere a binary to test this?

 Currently, the only bug that this fixes is that it uses the full path to
 Sweave.sty when needed (by querying kpsewhich).

 It should not be difficult to add support for reading files as Gregor
 highlighted and finally to read files with proper encoding.

 Thoughts? Am I right that Rscript is widely available?

I checked on my Ubuntu and Windows installation and both of them have Rscript.

Regards, gg


Re: [PATCH] Sweave support (was: Re: Beta plans (again, again))

2010-10-20 Thread Gregor GORJANC
> I finally found some time for making an infrastructure for running sweave
> with our own customizations. As you can see the patch is trivial, but
> I would like to be sure that it works on windows.

Can I download somewhere a binary to test this?

> Currently, the only bug that this fixes is that it uses the full path to
> Sweave.sty when needed (by querying kpsewhich).
>
> It should not be difficult to add support for reading files as Gregor
> highlighted and finally to read files with proper encoding.
>
> Thoughts? Am I right that Rscript is widely available?

I checked on my Ubuntu and Windows installation and both of them have Rscript.

Regards, gg


Re: Beta plans (again, again)

2010-09-17 Thread Gregor GORJANC
Hi LyX-developers,

On 17 September 2010 15:58, Jean-Marc LASGOUTTES lasgout...@lyx.org wrote:
 Pavel Sanda sa...@lyx.org writes:
...
 which reminds me... people on users list ask on sweave status. i tried to
 find something in our manuals without success - is there something to bet put
 into them? maybe people like Gorjan would help and we will even have some
 sections about R  Sweave in 2.0 (CC-ing).

 Yes, this needs to be done, but my time is scarce.

I do not know what is the current status with direct Sweave support in
LyX.  It is some time since I used LyX with Sweave - there was no need
in the last year (had to finnish PhD). I can provide testing, but can
someone point me in the right direction, i.e., how can I start, etc. I
remember there was an issue with LyX compiling LaTeX in temporary
directory, but we could postpone this up to the point where all other
stuff works, though I have posted obvious (for me) solution to mailing
list several times.

lp, gg


Re: Beta plans (again, again)

2010-09-17 Thread Gregor GORJANC
Hi LyX-developers,

On 17 September 2010 15:58, Jean-Marc LASGOUTTES  wrote:
> Pavel Sanda  writes:
...
>> which reminds me... people on users list ask on sweave status. i tried to
>> find something in our manuals without success - is there something to bet put
>> into them? maybe people like Gorjan would help and we will even have some
>> sections about R & Sweave in 2.0 (CC-ing).
>
> Yes, this needs to be done, but my time is scarce.

I do not know what is the current status with direct Sweave support in
LyX.  It is some time since I used LyX with Sweave - there was no need
in the last year (had to finnish PhD). I can provide testing, but can
someone point me in the right direction, i.e., how can I start, etc. I
remember there was an issue with LyX compiling LaTeX in temporary
directory, but we could postpone this up to the point where all other
stuff works, though I have posted obvious (for me) solution to mailing
list several times.

lp, gg


Re: Enhancement bugs for 2.0

2010-03-30 Thread Gregor GORJANC
Hi,

Please read bellow.

On 30 March 2010 14:01, Jean-Marc Lasgouttes lasgout...@lyx.org wrote:
...
 - find a way to read local files. If I have a
   read.table(foo.txt)
  in the file, it will fail because R is ran from the tmp dir. Since
   there is no PATH-like support in R, I do not know how to solve the
   problem. I should try to contact R developers about this
 http://www.lyx.org/trac/ticket/6623

I still think that the way I described at [1] is the best it could be done.

 [1]http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg152966.html

gg


Re: Enhancement bugs for 2.0

2010-03-30 Thread Gregor GORJANC
Hi,

Please read bellow.

On 30 March 2010 14:01, Jean-Marc Lasgouttes  wrote:
...
> - find a way to read local files. If I have a
>   read.table("foo.txt")
>  in the file, it will fail because R is ran from the tmp dir. Since
>   there is no PATH-like support in R, I do not know how to solve the
>   problem. I should try to contact R developers about this
> http://www.lyx.org/trac/ticket/6623

I still think that the way I described at [1] is the best it could be done.

 [1]http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg152966.html

gg


SageTeX with LyX (was: On the interface between Lyx and CAS: some ideas for a better desing)

2008-09-27 Thread Gregor Gorjanc
Hi LyX developers!

Enthused with use of R (via Sweave) in LyX I started to also look for 
integration of SAGE (see http://www.sagemath.org). Since Python is used the 
integration should be doable. However, luckily much has already been done with 
the SageTeX (see last example at http://www.sagemath.org/tour-research.html and
http://www.ctan.org/tex-archive/macros/latex/contrib/sagetex/). This is really
a nice interface for CAS (free as well as comercial ones!). 

One adds LaTeX markup such as \sage{}, \sageplot{},  begin{sageblock} ... 
\end{sageblock} etc. to a LaTeX file (for more see docs at 
http://www.ctan.org/get/macros/latex/contrib/sagetex/sagetexpackage.pdf).
Then the compilation is done via:

latex file.tex
sage file.sage
latex file.tex 
...

First steps creates the sage script (file.sage) which needs to be evaluated 
with sage. The third step is a start of a normal LaTeX compilation.

Does anyone have any idea how we could use this directly in LyX? If there
would be a special file format, we could use the same thing as with Sweave
(see http://cran.r-project.org/contrib/extra/lyx/). Since the first step is
a LaTeX run and the file is a pure LaTeX markup, I do not know how to tell
LyX to run latex and sage before a normal LaTeX compilation.

Working example of SageTeX is in sage-*/examples/latex_embed folder of a SAGE
distribution. See the following blog post on howto install SAGE under Linux.

http://ggorjan.blogspot.com/2008/09/sage-open-source-mathematics-software.html

Regards, Gregor



SageTeX with LyX (was: On the interface between Lyx and CAS: some ideas for a better desing)

2008-09-27 Thread Gregor Gorjanc
Hi LyX developers!

Enthused with use of R (via Sweave) in LyX I started to also look for 
integration of SAGE (see http://www.sagemath.org). Since Python is used the 
integration should be doable. However, luckily much has already been done with 
the SageTeX (see last example at http://www.sagemath.org/tour-research.html and
http://www.ctan.org/tex-archive/macros/latex/contrib/sagetex/). This is really
a nice interface for CAS (free as well as comercial ones!). 

One adds LaTeX markup such as \sage{}, \sageplot{},  begin{sageblock} ... 
\end{sageblock} etc. to a LaTeX file (for more see docs at 
http://www.ctan.org/get/macros/latex/contrib/sagetex/sagetexpackage.pdf).
Then the compilation is done via:

latex file.tex
sage file.sage
latex file.tex 
...

First steps creates the sage script (file.sage) which needs to be evaluated 
with sage. The third step is a start of a "normal" LaTeX compilation.

Does anyone have any idea how we could use this directly in LyX? If there
would be a special file format, we could use the same thing as with Sweave
(see http://cran.r-project.org/contrib/extra/lyx/). Since the first step is
a LaTeX run and the file is a "pure" LaTeX markup, I do not know how to tell
LyX to run latex and sage before a "normal" LaTeX compilation.

Working example of SageTeX is in sage-*/examples/latex_embed folder of a SAGE
distribution. See the following blog post on howto install SAGE under Linux.

http://ggorjan.blogspot.com/2008/09/sage-open-source-mathematics-software.html

Regards, Gregor



Add Using Sweave with Lyx to webpage Press about LyX

2008-05-28 Thread Gregor Gorjanc
Hi!

I hope this is the right plase for this. I would like to suggest to add the 
following article to LyX webpage - Press about LyX at

http://www.lyx.org/PressAboutLyX

Using Sweave with LyX: How to lower the LaTeX/Sweave learning curve
R News, Volume 8(1):2-9 May 2008:
http://cran.r-project.org/doc/Rnews/Rnews_2008-1.pdf

Regards, Gregor



Add "Using Sweave with Lyx" to webpage "Press about LyX"

2008-05-28 Thread Gregor Gorjanc
Hi!

I hope this is the right plase for this. I would like to suggest to add the 
following article to LyX webpage - Press about LyX at

http://www.lyx.org/PressAboutLyX

Using Sweave with LyX: How to lower the LaTeX/Sweave learning curve
R News, Volume 8(1):2-9 May 2008:
http://cran.r-project.org/doc/Rnews/Rnews_2008-1.pdf

Regards, Gregor



Re: Export - what the heck happened?

2008-01-11 Thread Gregor Gorjanc
Hi!

does anyone have 1.4 to test if format for 1.5 works?

\format latextex LaTeX (plain) editor editor document

Regards, Gregor



Re: Export - what the heck happened?

2008-01-11 Thread Gregor Gorjanc
Hi!

does anyone have 1.4 to test if format for 1.5 works?

\format "latex""tex" "LaTeX (plain)""" "editor" "editor" "document"

Regards, Gregor



Re: Export - what the heck happened?

2008-01-09 Thread Gregor Gorjanc
Gorjanc Gregor [EMAIL PROTECTED] writes:

  \format literate Rnw Sweaveeditor editor
  \format rR   R/S code  editor editor
  \format latextex LaTeX (plain) editor editor
  \format pdflatex tex LaTeX (pdflatex)  editor editor

As shown in this thread, the problem is with LyX 1.5 having the following
lines (or similar ones) in the .lyx/preferences file

\format latextex LaTeX (plain) editor editor

instead of 

\format latextex LaTeX (plain) editor editor document
 ^^
Can anyone test or tell me if above line would work with 1.4 series? If so,
I would use this format only.

Thanks, Gregor



Re: Export - what the heck happened?

2008-01-09 Thread Gregor Gorjanc
Gorjanc Gregor <[EMAIL PROTECTED]> writes:

> >> \format "literate" "Rnw" "Sweave"   "" "editor" "editor"
> >> \format "r""R"   "R/S code" "" "editor" "editor"
> >> \format "latex""tex" "LaTeX (plain)""" "editor" "editor"
> >> \format "pdflatex" "tex" "LaTeX (pdflatex)" "" "editor" "editor"

As shown in this thread, the problem is with LyX 1.5 having the following
lines (or similar ones) in the .lyx/preferences file

\format "latex""tex" "LaTeX (plain)""" "editor" "editor"

instead of 

\format "latex""tex" "LaTeX (plain)""" "editor" "editor" "document"
 ^^
Can anyone test or tell me if above line would work with 1.4 series? If so,
I would use this format only.

Thanks, Gregor



Re: Use Computer Algebra System with LyX

2007-08-02 Thread Gregor Gorjanc
Andreas Karlsson [EMAIL PROTECTED] writes:
 Dear LyX developers,
 
 Under the Edit  Math menu in LyX there is an entry Use Computer 
 Algebra System.

...

There is a way to use yacas from R via R package Ryacas [1] so it could 
be  possible to use this in LyX via Sweave (noweb like system using R 
as a  program and LaTeX for documentation). I tried this on my fresh 
Windows box:

1. Installed LyX 1.4.5 and dependencies

2. Installed R 2.5.1 
   http://cran.at.r-project.org/bin/windows/base/R-2.5.1-win32.exe

3. Installed Ryacas package (enables easy install of yacas)
   - started R
   - launched the following code from within R 

   install.packages('Ryacas', dep = TRUE)
   library(Ryacas)
   yacasInstall()

4. Tweaked my preferences file to

# FORMATS SECTION #
#

\format literate Rnw Sweaveeditor editor
\format rR   R/S code  editor editor
\format latextex LaTeX (plain) editor editor
\format pdflatex tex LaTeX (pdflatex)  editor editor

#
# CONVERTERS SECTION ##
#

\converter literate rR CMD Stangle $$i 
\converter literate latexR CMD Sweave $$i  
\converter literate pdflatex R CMD Sweave $$i  

5. Copied contents of the following links to layouts subdirectory 
in user library (please note that each URL should be one line, but
gmane is limiting me to 80 chars per line)

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-article.layout

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-book.layout

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-report.layout

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-scrap.inc

6. Added R TeX stuff to search path

- added R subfolder in C:/*/MikTeX/tex/latex 

- copied contents from C:/*/R/R-2.5.1pat/share/texmf to 
  C:/*/MikTeX/tex/latex/R

- updated TeX database (MikTeX Settings -- Refresh FNDB)

- checked if TeX can find Sweave.sty- launch in the command tool 
  the following

findtexmf Sweave.sty

7. Start LyX and reconfigure

8. Created new document

- went to Document -- Settings menu and choose document class that 
  has (Sweave noweb) string beside

- started new environment scrap and typed the following (watchout, 
  you must use SHITF+ENTER for newline)
  
myFirstChunk=
1+1
@

- saved and previewed PDF to make sure that Sweave is working OK 
  within LyX

- added the following chunk of code to check Ryacas

ryacasChunk=
library(Ryacas)
exp1 - yacas(expression(Factor(x^2 - 1)))
Eval(exp1, list(x = 4))
@

Voila!

[1] http://code.google.com/p/ryacas/



Re: Use Computer Algebra System with LyX

2007-08-02 Thread Gregor Gorjanc
Andreas Karlsson <[EMAIL PROTECTED]> writes:
> Dear LyX developers,
> 
> Under the Edit > Math menu in LyX there is an entry Use Computer 
> Algebra System.

...

There is a way to use yacas from R via R package Ryacas [1] so it could 
be  possible to use this in LyX via Sweave (noweb like system using R 
as a  program and LaTeX for documentation). I tried this on my fresh 
Windows box:

1. Installed LyX 1.4.5 and dependencies

2. Installed R 2.5.1 
   http://cran.at.r-project.org/bin/windows/base/R-2.5.1-win32.exe

3. Installed Ryacas package (enables easy install of yacas)
   - started R
   - launched the following code from within R 

   install.packages('Ryacas', dep = TRUE)
   library(Ryacas)
   yacasInstall()

4. Tweaked my preferences file to

# FORMATS SECTION #
#

\format "literate" "Rnw" "Sweave"   "" "editor" "editor"
\format "r""R"   "R/S code" "" "editor" "editor"
\format "latex""tex" "LaTeX (plain)""" "editor" "editor"
\format "pdflatex" "tex" "LaTeX (pdflatex)" "" "editor" "editor"

#
# CONVERTERS SECTION ##
#

\converter "literate" "r""R CMD Stangle $$i" ""
\converter "literate" "latex""R CMD Sweave $$i"  ""
\converter "literate" "pdflatex" "R CMD Sweave $$i"  ""

5. Copied contents of the following links to layouts subdirectory 
in user library (please note that each URL should be one line, but
gmane is limiting me to 80 chars per line)

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-article.layout

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-book.layout

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-report.layout

http://r-ggorjan.svn.sourceforge.net/viewvc/*checkout*/r-ggorjan/
trunk/LyX-Sweave/literate-scrap.inc

6. Added R TeX stuff to search path

- added R subfolder in C:/*/MikTeX/tex/latex 

- copied contents from C:/*/R/R-2.5.1pat/share/texmf to 
  C:/*/MikTeX/tex/latex/R

- updated TeX database (MikTeX Settings --> Refresh FNDB)

- checked if TeX can find Sweave.sty- launch in the command tool 
  the following

findtexmf Sweave.sty

7. Start LyX and reconfigure

8. Created new document

- went to Document --> Settings menu and choose document class that 
  has (Sweave noweb) string beside

- started new environment scrap and typed the following (watchout, 
  you must use SHITF+ENTER for newline)
  
<>=
1+1
@

- saved and previewed PDF to make sure that Sweave is working OK 
  within LyX

- added the following chunk of code to check Ryacas

<>=
library(Ryacas)
exp1 <- yacas(expression(Factor(x^2 - 1)))
Eval(exp1, list(x = 4))
@

Voila!

[1] http://code.google.com/p/ryacas/



Re: Policy of adding new commands to syntax.default

2007-01-09 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:

 
 Gregor Gorjanc wrote:
 
  I have another set of Sweave specific commands. I believe this is the last
  one. Here is the patch. Trunk and 1_4_X branch please. Thank you very
  much!
 
 I put it in trunk. Jean-Marc, I guess 1.4 is also OK?

Great.

 I did not forget your other mail, but that will stay in the todo queue for
 some time since it requires some thinking.

Thank you for this! I did thought nobody is interested in Sweave support. I 
agree that it need some more thinking. I am looking forward if anyone would 
like  to discuss this. I guess this will not make it into 1.5. Am I right?

As I mentioned I am writing a short note about Sweave with LyX for Rnews[1]. I
have all the needed customisations described and it is really not much to do 
from a user perspective. If my reasoning about 1.5. is right, I will go ahead
with this note and mention possible direct support in the future. Perhaps 
anyone interested in this and with more C++ knowledge could jump in.

I can send this note to anyone interested for review/comments?

[1]http://cran.r-project.org/doc/Rnews

Gregor




Re: Policy of adding new commands to syntax.default

2007-01-09 Thread Gregor Gorjanc
José Matos [EMAIL PROTECTED] writes:

 
 On Tuesday 09 January 2007 3:17 pm, Gregor Gorjanc wrote:
  Thank you for this! I did thought nobody is interested in Sweave support. I
  agree that it need some more thinking. I am looking forward if anyone would
  like  to discuss this. I guess this will not make it into 1.5. Am I right?
 
   Show us the changes, if they are self-contained and clean I will consider 
 them. If not for 1.5.0 possibly for 1.5.x ( x  1) as long as it does not 
 involve backwards incompatible changes in the file format.
 
   Note that I don't make any promisses (even although I have been packing 
 several R modules for Fedora). 

I am glad to see the interest. José, please read the thread Literate: noweb 
Sweave, especially my last post

http://thread.gmane.org/gmane.editors.lyx.devel/73050/focus=73577

where I describe what I think could or should be changed. Unfortunatelly, the
needed changes in tex2lyx and elsewhere where strings literate, LITERATE,
noweb etc appear are not yet done as I do not have a clue about C++. This is 
the stuff Georg say that needs a bit of thinking.

But I do have all stuff with layouts, prefrences etc. I will finnish the note
this days and send the files to the list.

Best wishes, Gregor




Re: Policy of adding new commands to syntax.default

2007-01-09 Thread Gregor Gorjanc
Georg Baum <[EMAIL PROTECTED]> writes:

> 
> Gregor Gorjanc wrote:
> 
> > I have another set of Sweave specific commands. I believe this is the last
> > one. Here is the patch. Trunk and 1_4_X branch please. Thank you very
> > much!
> 
> I put it in trunk. Jean-Marc, I guess 1.4 is also OK?

Great.

> I did not forget your other mail, but that will stay in the todo queue for
> some time since it requires some thinking.

Thank you for this! I did thought nobody is interested in Sweave support. I 
agree that it need some more thinking. I am looking forward if anyone would 
like  to discuss this. I guess this will not make it into 1.5. Am I right?

As I mentioned I am writing a short note about Sweave with LyX for Rnews[1]. I
have all the needed customisations described and it is really not much to do 
from a user perspective. If my reasoning about 1.5. is right, I will go ahead
with this note and mention possible direct support in the future. Perhaps 
anyone interested in this and with more C++ knowledge could jump in.

I can send this note to anyone interested for review/comments?

[1]http://cran.r-project.org/doc/Rnews

Gregor




Re: Policy of adding new commands to syntax.default

2007-01-09 Thread Gregor Gorjanc
José Matos <[EMAIL PROTECTED]> writes:

> 
> On Tuesday 09 January 2007 3:17 pm, Gregor Gorjanc wrote:
> > Thank you for this! I did thought nobody is interested in Sweave support. I
> > agree that it need some more thinking. I am looking forward if anyone would
> > like  to discuss this. I guess this will not make it into 1.5. Am I right?
> 
>   Show us the changes, if they are self-contained and clean I will consider 
> them. If not for 1.5.0 possibly for 1.5.x ( x > 1) as long as it does not 
> involve backwards incompatible changes in the file format.
> 
>   Note that I don't make any promisses (even although I have been packing 
> several R modules for Fedora). 

I am glad to see the interest. José, please read the thread "Literate: noweb &
Sweave", especially my last post

http://thread.gmane.org/gmane.editors.lyx.devel/73050/focus=73577

where I describe what I think could or should be changed. Unfortunatelly, the
needed changes in tex2lyx and elsewhere where strings "literate", "LITERATE",
"noweb" etc appear are not yet done as I do not have a clue about C++. This is 
the stuff Georg say that needs a bit of thinking.

But I do have all stuff with layouts, prefrences etc. I will finnish the note
this days and send the files to the list.

Best wishes, Gregor




Re: Policy of adding new commands to syntax.default

2007-01-08 Thread Gregor Gorjanc
Gregor Gorjanc [EMAIL PROTECTED] writes:
 Jean-Marc Lasgouttes lasgouttes at ... writes:
  Gregor Any chance to port this also to 1_4_X branch?
  
  I just did it.to say
 
 I have another set of Sweave specific commands. I believe this is the last 
 one.
 Here is the patch. Trunk and 1_4_X branch please. Thank you very much!

...

Pretty please with a sugar on a top ;)

Gregor



Re: Policy of adding new commands to syntax.default

2007-01-08 Thread Gregor Gorjanc
Gregor Gorjanc <[EMAIL PROTECTED]> writes:
> Jean-Marc Lasgouttes  ...> writes:
> > Gregor> Any chance to port this also to 1_4_X branch?
> > 
> > I just did it.to say
> 
> I have another set of Sweave specific commands. I believe this is the last 
> one.
> Here is the patch. Trunk and 1_4_X branch please. Thank you very much!

...

Pretty please with a sugar on a top ;)

Gregor



Re: Policy of adding new commands to syntax.default

2007-01-07 Thread Gregor Gorjanc
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
 Gregor Any chance to port this also to 1_4_X branch?
 
 I just did it.

I have another set of Sweave specific commands. I believe this is the last one.
Here is the patch. Trunk and 1_4_X branch please. Thank you very much!

Index: syntax.default
===
--- syntax.default  (revision 16467)
+++ syntax.default  (working copy)
@@ -730,3 +730,15 @@
 % Sweave stuff
 \Sexpr{}
 \SweaveOpts{}
+\SweaveInput{}
+\SweaveSyntax{}
+\Scoderef{}
+
+\Rcode{}
+\Robject{}
+\Rcommand{}
+\Rfunction{}
+\Rfunarg{}
+\Rpackage{}
+\Rclass{}
+\Rmethod{}






Re: Policy of adding new commands to syntax.default

2007-01-07 Thread Gregor Gorjanc
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> Gregor> Any chance to port this also to 1_4_X branch?
> 
> I just did it.

I have another set of Sweave specific commands. I believe this is the last one.
Here is the patch. Trunk and 1_4_X branch please. Thank you very much!

Index: syntax.default
===
--- syntax.default  (revision 16467)
+++ syntax.default  (working copy)
@@ -730,3 +730,15 @@
 % Sweave stuff
 \Sexpr{}
 \SweaveOpts{}
+\SweaveInput{}
+\SweaveSyntax{}
+\Scoderef{}
+
+\Rcode{}
+\Robject{}
+\Rcommand{}
+\Rfunction{}
+\Rfunarg{}
+\Rpackage{}
+\Rclass{}
+\Rmethod{}






Re: #3052 tex2lyx skips lines for some noweb files

2007-01-02 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:
...
 I saw the report in bugzilla, but have had no time to investigate. I had a 
 look now and the fix was really easy, see attached.

Great. Thank you. I hope this will get also in BRANCH_1_4_X as asked for in
bugzilla. I agree that empty paragraph is better than invalid file. This relates
a bit with http://bugzilla.lyx.org/show_bug.cgi?id=3054. I guess that removing 
empty
paragraphs by default would be OK?

Gregor





tex2lyx and character sytles

2007-01-02 Thread Gregor Gorjanc
Hi!

Is tex2lyx supposed to recognize character styles? Say I have a file file.tex
with \Rcode{1+1} LaTeX markup. Tex2lyx will use layout file with the following
CharStyle definition 

CharStyle Rcode
  LaTeXName Rcode
  LaTeXType Command
  Font
Family  typewriter
Color   latex
  EndFont
  Preamble
   \newcommand{\Rcode}[1]{{\texttt{#1}}}
  EndPreamble
End

What should I see in imported file?
 * an TeX ERT box with \Rcode{1+1} or 
 * 1+1 as Rcode character sytle

Thanks, Gregor



Re: tex2lyx and character sytles

2007-01-02 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:
 Am Dienstag, 2. Januar 2007 18:15 schrieb Gregor Gorjanc:
  Hi!
  
  Is tex2lyx supposed to recognize character styles?
 
 No.

OK. Any (long-term) plans for this?

Gregor





Re: Literate: noweb Sweave

2007-01-02 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:

Sorry, I did not know about this mail. I just find it out now.

  There is no difference in syntax between noweb and Sweave. There is only
  difference in what layout should provide - for example Sweave does not
  need \usepackage{noweb} - it needs \usepackage{Sweave}, but this is
  inserted by Sweave intself.
 
 Then I don't understand your problem with importing. It should be as easy as
 defining a sweave-lyx converter that calls tex2lyx in noweb mode. Why do
 you want a new option in tex2lyx as you wrote above?

The point is that literate format has special meaning. If format is literate
then tex2lyx does translation in a bit special way:
- parsing of code chunks to scrap style
- choice of literate-* layouts

Additionally, view/export is done as:
1. export to noweb format, which is LaTeX with 
chunk= 
...
@
parts and of course \usepackage{noweb} in preamble

2. weaving with defined weaver to get LaTeX
3. further on

I want/think that additional option would be the easiest way since it is 
easier to hack in another set of layouts say sweave-* as based on literate-*. 
I have been working on this styles for last month and there are some additions
that I would like to see in sweave-* layouts. This could also be done as a copy
step between literate and sweave, but would this cause also change of layout
i.e. say from literate-article to sweave-article? If yes OK, but note that the
other way around i.e. sweave -- literate is not what I want as literate will
put \usepackage{noweb}, while I want \usepackage{Sweave} + some other nifty
stuff. Having another format, say sweave instead of literate, would ease the
converters part.

  This is again a problem, as I have to use literate in output definition in
  layout files. Then I would need sweave -- literate converter, but then I
  again have problem with noweb specific things.
 
 I don't get it. Why would you need a sweave-literate converter? If we don't
 have a sweave backend, export would go like this:
 
 lyx-literate-sweave-{dvisweave,pssweave,pdfsweave}
 
 where the step sweave-{dvisweave,pssweave,pdfsweave} would probably be
 composed of several steps.

The point is that literate behaves differently than latex format as noted above.

After one month of thinking and tweaking the layout files I think that direct
support of Sweave in LyX would really be great and I am realising that probably
only minor changes/additions are needed. The needed structure is already in LyX.
What is needed is option to use this structure just a bit differently - to use
literate-* layouts or sweave-* layouts. I would suggest -l option to tex2lyx
instead of -n as -n is specific to noweb. -l option would also accept literate
paradigm, default would be noweb, but with possibility for sweave i.e.

tex2lyx -l file.nw
tex2lyx -l sweave file.Rnw

I already have sweave-*.layout file, working preferences (configure.py could 
be easily enriched with this) and additions to syntax.default (already in).

Thanks and happy new year!

Gregor

# What: LyX (1.4.4) preferences file with Sweave tweaks
# $Id: preferences 57 2007-01-02 00:39:57Z ggorjan $
#
# FORMATS SECTION #
#

\format literate Rnw Sweaveeditor editor
\format rR   R/S code  editor editor

#
# CONVERTERS SECTION ##
#

\converter literate rR CMD Stangle $$i 
\converter literate latexR CMD Sweave $$i  
\converter literate pdflatex R CMD Sweave $$i  

--

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[article, Sweave.sty]{article (Sweave noweb)}
#
# What: literate-article textclass definition file.
# Author: Gregor Gorjanc [EMAIL PROTECTED]
# $Id: literate-article.layout 58 2007-01-02 00:41:59Z ggorjan $
#
# This is a copy of literate-article.layout from LyX, but changed for
# Sweave - NoWeb syntax:
#  - changed noweb.sty to Sweave.sty
#  - moved preamble to literate-scrap.inc

Format 2
Input article.layout
Input literate-scrap.inc

--

# What: Style definition for R/S code chunks (scraps)
# Author: Gregor Gorjanc [EMAIL PROTECTED]
# $Id: literate-scrap.inc 67 2007-01-02 04:24:10Z ggorjan $
#
# This file is a copy of literate-scrap.inc from LyX, but changed for
# Sweave - NoWeb syntax:
#  - added preamble where Sweave is used instead of noweb
#  - simplified style for scrap
#  - added all align possibilities
#  - added subtitle style
#  - added character styles for R code
#
# Within scrap, lines are separated by newlines (Ctrl-Return).

Format 2

Preamble
\usepackage{Sweave}
\newcommand{\Rcode}[1]{{\texttt{#1}}}
\newcommand{\Robject}[1]{{\texttt{#1}}}
\newcommand{\Rfunction}[1]{{\texttt{#1}}}
\newcommand{\Rfunction}[1]{{\texttt{#1}}}
\newcommand{\Rfunarg}[1]{{\textit{#1}}}
\newcommand{\Rpackage}[1]{{\textit{#1}}}
\newcommand{\Rmethod}[1]{{\textit{#1

Re: #3052 tex2lyx skips lines for some noweb files

2007-01-02 Thread Gregor Gorjanc
Georg Baum <[EMAIL PROTECTED]> writes:
...
> I saw the report in bugzilla, but have had no time to investigate. I had a 
> look now and the fix was really easy, see attached.

Great. Thank you. I hope this will get also in BRANCH_1_4_X as asked for in
bugzilla. I agree that empty paragraph is better than invalid file. This relates
a bit with http://bugzilla.lyx.org/show_bug.cgi?id=3054. I guess that removing 
empty
paragraphs by default would be OK?

Gregor





tex2lyx and character sytles

2007-01-02 Thread Gregor Gorjanc
Hi!

Is tex2lyx supposed to recognize character styles? Say I have a file file.tex
with \Rcode{1+1} LaTeX markup. Tex2lyx will use layout file with the following
CharStyle definition 

CharStyle Rcode
  LaTeXName Rcode
  LaTeXType Command
  Font
Family  typewriter
Color   latex
  EndFont
  Preamble
   \newcommand{\Rcode}[1]{{\texttt{#1}}}
  EndPreamble
End

What should I see in imported file?
 * an TeX ERT box with \Rcode{1+1} or 
 * 1+1 as Rcode character sytle

Thanks, Gregor



Re: tex2lyx and character sytles

2007-01-02 Thread Gregor Gorjanc
Georg Baum <[EMAIL PROTECTED]> writes:
> Am Dienstag, 2. Januar 2007 18:15 schrieb Gregor Gorjanc:
> > Hi!
> > 
> > Is tex2lyx supposed to recognize character styles?
> 
> No.

OK. Any (long-term) plans for this?

Gregor





Re: Literate: noweb & Sweave

2007-01-02 Thread Gregor Gorjanc
Georg Baum <[EMAIL PROTECTED]> writes:

Sorry, I did not know about this mail. I just find it out now.

> > There is no difference in syntax between noweb and Sweave. There is only
> > difference in what layout should provide - for example Sweave does not
> > need \usepackage{noweb} - it needs \usepackage{Sweave}, but this is
> > inserted by Sweave intself.
> 
> Then I don't understand your problem with importing. It should be as easy as
> defining a sweave->lyx converter that calls tex2lyx in noweb mode. Why do
> you want a new option in tex2lyx as you wrote above?

The point is that literate format has special meaning. If format is literate
then tex2lyx does translation in a bit special way:
- parsing of code chunks to scrap style
- choice of literate-* layouts

Additionally, view/export is done as:
1. export to noweb format, which is LaTeX with 
<>= 
...
@
parts and of course \usepackage{noweb} in preamble

2. weaving with defined weaver to get LaTeX
3. further on

I "want/think" that additional option would be the easiest way since it is 
easier to hack in another set of layouts say sweave-* as based on literate-*. 
I have been working on this styles for last month and there are some additions
that I would like to see in sweave-* layouts. This could also be done as a copy
step between literate and sweave, but would this cause also change of layout
i.e. say from literate-article to sweave-article? If yes OK, but note that the
other way around i.e. sweave --> literate is not what I want as literate will
put \usepackage{noweb}, while I want \usepackage{Sweave} + some other nifty
stuff. Having another format, say sweave instead of literate, would ease the
converters part.

> > This is again a problem, as I have to use literate in output definition in
> > layout files. Then I would need sweave --> literate converter, but then I
> > again have problem with noweb specific things.
> 
> I don't get it. Why would you need a sweave->literate converter? If we don't
> have a sweave backend, export would go like this:
> 
> lyx->literate->sweave->{dvisweave,pssweave,pdfsweave}
> 
> where the step sweave->{dvisweave,pssweave,pdfsweave} would probably be
> composed of several steps.

The point is that literate behaves differently than latex format as noted above.

After one month of thinking and tweaking the layout files I think that direct
support of Sweave in LyX would really be great and I am realising that probably
only minor changes/additions are needed. The needed structure is already in LyX.
What is needed is option to use this structure just a bit differently - to use
literate-* layouts or sweave-* layouts. I would suggest -l option to tex2lyx
instead of -n as -n is specific to noweb. -l option would also accept literate
paradigm, default would be noweb, but with possibility for sweave i.e.

tex2lyx -l file.nw
tex2lyx -l sweave file.Rnw

I already have sweave-*.layout file, working preferences (configure.py could 
be easily enriched with this) and additions to syntax.default (already in).

Thanks and happy new year!

Gregor

# What: LyX (1.4.4) preferences file with Sweave tweaks
# $Id: preferences 57 2007-01-02 00:39:57Z ggorjan $
#
# FORMATS SECTION #
#

\format "literate" "Rnw" "Sweave"   "" "editor" "editor"
\format "r""R"   "R/S code" "" "editor" "editor"

#
# CONVERTERS SECTION ##
#

\converter "literate" "r""R CMD Stangle $$i" ""
\converter "literate" "latex""R CMD Sweave $$i"  ""
\converter "literate" "pdflatex" "R CMD Sweave $$i"  ""

--

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[article, Sweave.sty]{article (Sweave noweb)}
#
# What: literate-article textclass definition file.
# Author: Gregor Gorjanc <[EMAIL PROTECTED]>
# $Id: literate-article.layout 58 2007-01-02 00:41:59Z ggorjan $
#
# This is a copy of literate-article.layout from LyX, but changed for
# Sweave - NoWeb syntax:
#  - changed noweb.sty to Sweave.sty
#  - moved preamble to literate-scrap.inc

Format 2
Input article.layout
Input literate-scrap.inc

--

# What: Style definition for R/S code chunks (scraps)
# Author: Gregor Gorjanc <[EMAIL PROTECTED]>
# $Id: literate-scrap.inc 67 2007-01-02 04:24:10Z ggorjan $
#
# This file is a copy of literate-scrap.inc from LyX, but changed for
# Sweave - NoWeb syntax:
#  - added preamble where Sweave is used instead of noweb
#  - simplified style for scrap
#  - added all align pos

#3052 tex2lyx skips lines for some noweb files

2007-01-01 Thread Gregor Gorjanc
Hi,

tex2lyx skips lines of text after the code chunk if documentation/text is not
separated from top of the chunk. I.e. the following:

--
some text directly above code chunk
chunk1=
someCode
@

some text bellow code chunk
--

results in:

--
\begin_layout Standard

some text directly above code chunk
\end_layout

\begin_layout Scrap

chunk1=
\newline
1+1
\newline
@

\end_layout
some text bellow code chunk
--

When I open such file I see in terminal:
Handling unknown body token: `some text bellow code chunk'

That line should be in Standard layout. Example file is uploaded to bugzilla
that shows possible combinations and outcome. I have tested this in 1.4.3,
1.4.4svn and 1.5.0svn under Debian GNU/Linux.

Gregor





Simplified literate layouts

2007-01-01 Thread Gregor Gorjanc
Hi!

All literate layouts (literate-{article, report, book}.layout) define 
preamble, but this could be done only once in literate.scrap.inc file
that all mentioned files include. Here is the patch:

Index: literate-report.layout
===
--- literate-report.layout  (revision 16448)
+++ literate-report.layout  (working copy)
@@ -4,9 +4,5 @@
 # Author : Edmar Wienskoski Jr. [EMAIL PROTECTED]

 Format 2
-Preamble
-   \usepackage{noweb}
-EndPreamble
-
 Input report.layout
 Input literate-scrap.inc
Index: literate-article.layout
===
--- literate-article.layout (revision 16448)
+++ literate-article.layout (working copy)
@@ -4,9 +4,5 @@
 # Author : Edmar Wienskoski Jr. [EMAIL PROTECTED]

 Format 2
-Preamble
-   \usepackage{noweb}
-EndPreamble
-
 Input article.layout
 Input literate-scrap.inc
Index: literate-book.layout
===
--- literate-book.layout(revision 16448)
+++ literate-book.layout(working copy)
@@ -4,9 +4,5 @@
 # Author : Edmar Wienskoski Jr. [EMAIL PROTECTED]

 Format 2
-Preamble
-   \usepackage{noweb}
-EndPreamble
-
 Input book.layout
 Input literate-scrap.inc
Index: literate-scrap.inc
===
--- literate-scrap.inc  (revision 16448)
+++ literate-scrap.inc  (working copy)
@@ -9,6 +9,10 @@
 Format 2
 OutputType  literate

+Preamble
+ \usepackage{noweb}
+EndPreamble
+
 Style Scrap
MarginFirst_Dynamic
LatexType Paragraph




#3052 tex2lyx skips lines for some noweb files

2007-01-01 Thread Gregor Gorjanc
Hi,

tex2lyx skips lines of text after the code chunk if documentation/text is not
separated from top of the chunk. I.e. the following:

--
some text directly above code chunk
<>=
someCode
@

some text bellow code chunk
--

results in:

--
\begin_layout Standard

some text directly above code chunk
\end_layout

\begin_layout Scrap

<>=
\newline
1+1
\newline
@

\end_layout
some text bellow code chunk
--

When I open such file I see in terminal:
Handling unknown body token: `some text bellow code chunk'

That line should be in Standard layout. Example file is uploaded to bugzilla
that shows possible combinations and outcome. I have tested this in 1.4.3,
1.4.4svn and 1.5.0svn under Debian GNU/Linux.

Gregor





Simplified literate layouts

2007-01-01 Thread Gregor Gorjanc
Hi!

All literate layouts (literate-{article, report, book}.layout) define 
preamble, but this could be done only once in literate.scrap.inc file
that all mentioned files include. Here is the patch:

Index: literate-report.layout
===
--- literate-report.layout  (revision 16448)
+++ literate-report.layout  (working copy)
@@ -4,9 +4,5 @@
 # Author : Edmar Wienskoski Jr. <[EMAIL PROTECTED]>

 Format 2
-Preamble
-   \usepackage{noweb}
-EndPreamble
-
 Input report.layout
 Input literate-scrap.inc
Index: literate-article.layout
===
--- literate-article.layout (revision 16448)
+++ literate-article.layout (working copy)
@@ -4,9 +4,5 @@
 # Author : Edmar Wienskoski Jr. <[EMAIL PROTECTED]>

 Format 2
-Preamble
-   \usepackage{noweb}
-EndPreamble
-
 Input article.layout
 Input literate-scrap.inc
Index: literate-book.layout
===
--- literate-book.layout(revision 16448)
+++ literate-book.layout(working copy)
@@ -4,9 +4,5 @@
 # Author : Edmar Wienskoski Jr. <[EMAIL PROTECTED]>

 Format 2
-Preamble
-   \usepackage{noweb}
-EndPreamble
-
 Input book.layout
 Input literate-scrap.inc
Index: literate-scrap.inc
===
--- literate-scrap.inc  (revision 16448)
+++ literate-scrap.inc  (working copy)
@@ -9,6 +9,10 @@
 Format 2
 OutputType  literate

+Preamble
+ \usepackage{noweb}
+EndPreamble
+
 Style Scrap
MarginFirst_Dynamic
LatexType Paragraph




Re: Compile latest SVN checkout

2006-12-31 Thread Gregor Gorjanc
Peter Kümmel [EMAIL PROTECTED] writes:
 Please update your checkout, it is out of date!!

Sorry, that seems to be the case. I apologize. 






Re: Compile latest SVN checkout

2006-12-31 Thread Gregor Gorjanc
Peter Kümmel <[EMAIL PROTECTED]> writes:
> Please update your checkout, it is out of date!!

Sorry, that seems to be the case. I apologize. 






Re: Policy of adding new commands to syntax.default

2006-12-30 Thread Gregor Gorjanc
Andr� Poenitz wrote:
 On Thu, Dec 21, 2006 at 09:49:21PM +0100, Gregor Gorjanc wrote:
 Andre Poenitz wrote:
 On Thu, Dec 21, 2006 at 04:56:32PM +, Gregor Gorjanc wrote:
 Index: lib/syntax.default
 ...
 +% Sweave stuff
 +\Sexpr{}
 +\SweaveOpts{}
 Any comments on this?
 It's uncritical to put in as far as I can tell ;-)
 Sorry, but what does that mean?
 
 'Just put it in, it won't hurt anybody'

Thanks, but this has already been done by Santa aka Enrico in trunk

http://article.gmane.org/gmane.editors.lyx.devel/74677

and Jean-Marc in 1_4 branch

http://article.gmane.org/gmane.editors.lyx.devel/74690

-- 
Lep pozdrav / With regards,
Gregor Gorjanc
--
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3   mail: gregor.gorjanc at bfro.uni-lj.si

SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europefax: +386 (0)1 72 17 888

--
One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try. Sophocles ~ 450 B.C.
--


configure script for BRANCH_1_4_x?

2006-12-30 Thread Gregor Gorjanc
Hi,

I just wanted to check something in yet to be 1.4.4 release and can not figure 
out, how to get setup for compilation of BRANCH_1_4_X. I did:

$ svn co svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X lyx-1.4.X
$ cd lyx-1.4.X
$ ./configure --with-frontend=qt4 --with-qt-dir=/usr/share/qt4
bash: ./configure: No such file or directory

Hmm, there is no configure file. Why is that? It might just be my poor knowledge
about building software. If I simply try to generate it with autoconf as noted
in configure.ac I get errors and unusable configure script

$ autoconf
configure.ac:25: error: possibly undefined macro: AM_MAINTAINER_MODE
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.ac:28: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:52: error: possibly undefined macro: AM_PATH_PYTHON
configure.ac:148: error: possibly undefined macro: AC_DISABLE_SHARED
configure.ac:149: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.ac:232: error: possibly undefined macro: AM_GNU_GETTEXT
configure.ac:257: error: possibly undefined macro: AC_FUNC_MKDIR
configure.ac:287: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:312: error: possibly undefined macro: MSYS_AC_CANONICAL_PATH

$ ./configure --with-frontend=qt4 --with-qt-dir=/usr/share/qt4
./configure: line 1795: LYX_CHECK_VERSION: command not found
./configure: line 1796: LYX_VERSION_SUFFIX: command not found
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
./configure: line 1924: LYX_USE_PACKAGING: command not found
./configure: line 1936: AM_MAINTAINER_MODE: command not found
./configure: line 1939: syntax error near unexpected token `foreign'
./configure: line 1939: `AM_INIT_AUTOMAKE(foreign dist-bzip2 tar-ustar no-define
1.9)'

I have Debian GNU/Linux (testing) and I got above result with autoconf vcersion
2.63, 2.61 as well as with 2.59a-3.

Thanks!

Thanks, Gregor




Compile latest SVN checkout

2006-12-30 Thread Gregor Gorjanc
Hi,

Is anyone able to compile latest SVN checkout? I get this error during make on
Debian GNU/Linux:

...
a -Wall -g -O -MT docstring.lo -MD -MP -MF .deps/docstring.Tpo 
-c docstring.C -o
docstring.o
In file included from docstring.C:14:
qstring_helpers.h:17:17: error: QChar: No such file or directory
qstring_helpers.h:18:19: error: QString: No such file or directory
qstring_helpers.h:30: error: expected initializer before 'const'
qstring_helpers.h:42: error: expected initializer before 'const'
qstring_helpers.h:55: error: 'lyx::qchar_to_ucs4' declared as an 'inline' 
variable
qstring_helpers.h:55: error: 'QChar' was not declared in this scope
qstring_helpers.h:56: error: expected ',' or ';' before '{' token
qstring_helpers.h:68: error: expected initializer before 'const'
qstring_helpers.h:93: error: expected constructor, destructor, or type
conversion before 'const'
qstring_helpers.h:103: error: 'QString' has not been declared
qstring_helpers.h: In function 'void lyx::ucs4_to_qstring(const 
lyx::char_type*,
size_t, int)':
qstring_helpers.h:106: error: request for member 'resize' in 's', which is 
of non-class type 'int'
qstring_helpers.h:108: error: invalid types 'int[int]' for array subscript
qstring_helpers.h:108: error: 'ucs4_to_qchar' was not declared in this scope
qstring_helpers.h: At global scope:
qstring_helpers.h:118: error: 'QString' was not declared in this scope
qstring_helpers.h:127: error: 'QString' was not declared in this scope
docstring.C: In function 'const lyx::docstring lyx::from_local8bit(const
std::string)':
docstring.C:97: error: 'QString' has not been declared
docstring.C: In function 'const std::string lyx::to_local8bit(const
lyx::docstring)':
docstring.C:112: error: 'QByteArray' was not declared in this scope
docstring.C:112: error: expected `;' before 'const'
docstring.C:113: error: 'local' was not declared in this scope
docstring.C:115: error: 'local' was not declared in this scope
make[5]: *** [docstring.lo] Error 1
make[5]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src/support'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src/support'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src/support'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src'
make: *** [all-recursive] Error 1

Here is relevant part from configure output

Configuration
  Host type:  i686-pc-linux-gnu
  Special build flags:assertions pch concept-checks stdlib-debug
warnings  use-ispell
  C   Compiler:   gcc
  C   Compiler LyX flags:
  C   Compiler flags: -Wextra -Wall-g -O
  C++ Compiler:   g++ (4.1.2)
  C++ Compiler LyX flags:
  C++ Compiler flags: -Wextra -Wall-g -O
  Linker flags:
  Linker user flags:
  Qt 4 Frontend:
  Qt 4 version: 4.2.1
  Packaging:  posix
  LyX binary dir: /usr/local/bin
  LyX files dir:  /usr/local/share/lyx

Regards, Gregor



Re: Compile latest SVN checkout

2006-12-30 Thread Gregor Gorjanc
Bo Peng wrote:
 Is anyone able to compile latest SVN checkout? I get this error during
 make on
 Debian GNU/Linux:
 
 Fine here (with scons).

That is odd. I have compiled lyx-devel succefully in the past - month or
so ago. So I should not get errors due to different build system. Or
should I?

-- 
Lep pozdrav / With regards,
Gregor Gorjanc
--
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3   mail: gregor.gorjanc at bfro.uni-lj.si

SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europefax: +386 (0)1 72 17 888

--
One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try. Sophocles ~ 450 B.C.
--


Re: Compile latest SVN checkout

2006-12-30 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:

 
 On Saturday 30 December 2006 19:24, Bo Peng wrote:
  This is not odd. For good or bad, we have three build systems. Abdel
  just introduced some new files so all three build systems need to be
  updated. Since he is not an expert on all of them and can not test
  them all, it is not surprising that autotools fail.
 
 That was not the reason, he added the files to Makefile.am.
 
  I guess you can run autogen.sh and configure again. If autotools still
  does not work, wait for Georg to fix it.
 
 It works for me. I suspect that Gregor forgot to rerun autogen.sh and 
 configure.

Did that and now I get different error:



make[7]: Entering directory
`/home/share/projectSoft/lyx/lyx-devel/src/frontends/qt4'
if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ 
-DHAVE_CONFIG_H -I. -I.
-I../../../src  -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL
-DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h -I../../../src
-I../../../src/frontends -I../../../images -DQT_SHARED -I/usr/include/qt4
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui   -I../../../boost
-I../../../src/frontends/controllers -Wextra -Wall -g -O -MT Alert_pimpl.lo
-MD -MP -MF .deps/Alert_pimpl.Tpo -c -o Alert_pimpl.lo Alert_pimpl.C; \
then mv -f .deps/Alert_pimpl.Tpo .deps/Alert_pimpl.Plo; else rm -f
.deps/Alert_pimpl.Tpo; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE
-DQT_GENUINE_STR -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h
-I../../../src -I../../../src/frontends -I../../../images -DQT_SHARED
-I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
-I../../../boost -I../../../src/frontends/controllers -Wextra -Wall -g -O -MT
Alert_pimpl.lo -MD -MP -MF .deps/Alert_pimpl.Tpo -c Alert_pimpl.C -o 
Alert_pimpl.o
./qt_connection_check.h: In static member function 'static void
Signal_Slot_argument_mismatchSIGNAL_ARG_TYPE, SLOT_ARG_TYPE::match()':
./qt_connection_check.h:231: error: there are no arguments to 'p' that 
depend on
a template parameter, so a declaration of 'p' must be available
./qt_connection_check.h:231: error: (if you use '-fpermissive', G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
./qt_connection_check.h:232: error: 'p' was not declared in this scope
make[7]: *** [Alert_pimpl.lo] Error 1
make[7]: Leaving directory `/.../lyx/lyx-devel/src/frontends/qt4'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/.../lyx/lyx-devel/src/frontends/qt4'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/.../lyx/lyx-devel/src/frontends/qt4'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/.../lyx/lyx-devel/src/frontends'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/.../lyx/lyx-devel/src/frontends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/.../lyx/lyx-devel/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/.../lyx/lyx-devel/src'
make: *** [all-recursive] Error 1





Re: Policy of adding new commands to syntax.default

2006-12-30 Thread Gregor Gorjanc
Andr� Poenitz wrote:
> On Thu, Dec 21, 2006 at 09:49:21PM +0100, Gregor Gorjanc wrote:
>> Andre Poenitz wrote:
>>> On Thu, Dec 21, 2006 at 04:56:32PM +0000, Gregor Gorjanc wrote:
>>>>> Index: lib/syntax.default
>>>> ...
>>>>> +% Sweave stuff
>>>>> +\Sexpr{}
>>>>> +\SweaveOpts{}
>>>> Any comments on this?
>>> It's uncritical to put in as far as I can tell ;-)
>> Sorry, but what does that mean?
> 
> 'Just put it in, it won't hurt anybody'

Thanks, but this has already been done by Santa aka Enrico in trunk

http://article.gmane.org/gmane.editors.lyx.devel/74677

and Jean-Marc in 1_4 branch

http://article.gmane.org/gmane.editors.lyx.devel/74690

-- 
Lep pozdrav / With regards,
Gregor Gorjanc
--
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3   mail: gregor.gorjanc  bfro.uni-lj.si

SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europefax: +386 (0)1 72 17 888

--
"One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try." Sophocles ~ 450 B.C.
--


configure script for BRANCH_1_4_x?

2006-12-30 Thread Gregor Gorjanc
Hi,

I just wanted to check something in yet to be 1.4.4 release and can not figure 
out, how to get setup for compilation of BRANCH_1_4_X. I did:

$ svn co svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X lyx-1.4.X
$ cd lyx-1.4.X
$ ./configure --with-frontend=qt4 --with-qt-dir=/usr/share/qt4
bash: ./configure: No such file or directory

Hmm, there is no configure file. Why is that? It might just be my poor knowledge
about building software. If I simply try to generate it with autoconf as noted
in configure.ac I get errors and unusable configure script

$ autoconf
configure.ac:25: error: possibly undefined macro: AM_MAINTAINER_MODE
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.ac:28: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:52: error: possibly undefined macro: AM_PATH_PYTHON
configure.ac:148: error: possibly undefined macro: AC_DISABLE_SHARED
configure.ac:149: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.ac:232: error: possibly undefined macro: AM_GNU_GETTEXT
configure.ac:257: error: possibly undefined macro: AC_FUNC_MKDIR
configure.ac:287: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:312: error: possibly undefined macro: MSYS_AC_CANONICAL_PATH

$ ./configure --with-frontend=qt4 --with-qt-dir=/usr/share/qt4
./configure: line 1795: LYX_CHECK_VERSION: command not found
./configure: line 1796: LYX_VERSION_SUFFIX: command not found
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
./configure: line 1924: LYX_USE_PACKAGING: command not found
./configure: line 1936: AM_MAINTAINER_MODE: command not found
./configure: line 1939: syntax error near unexpected token `foreign'
./configure: line 1939: `AM_INIT_AUTOMAKE(foreign dist-bzip2 tar-ustar no-define
1.9)'

I have Debian GNU/Linux (testing) and I got above result with autoconf vcersion
2.63, 2.61 as well as with 2.59a-3.

Thanks!

Thanks, Gregor




Compile latest SVN checkout

2006-12-30 Thread Gregor Gorjanc
Hi,

Is anyone able to compile latest SVN checkout? I get this error during make on
Debian GNU/Linux:

...
a -Wall -g -O -MT docstring.lo -MD -MP -MF .deps/docstring.Tpo 
-c docstring.C -o
docstring.o
In file included from docstring.C:14:
qstring_helpers.h:17:17: error: QChar: No such file or directory
qstring_helpers.h:18:19: error: QString: No such file or directory
qstring_helpers.h:30: error: expected initializer before 'const'
qstring_helpers.h:42: error: expected initializer before 'const'
qstring_helpers.h:55: error: 'lyx::qchar_to_ucs4' declared as an 'inline' 
variable
qstring_helpers.h:55: error: 'QChar' was not declared in this scope
qstring_helpers.h:56: error: expected ',' or ';' before '{' token
qstring_helpers.h:68: error: expected initializer before 'const'
qstring_helpers.h:93: error: expected constructor, destructor, or type
conversion before 'const'
qstring_helpers.h:103: error: 'QString' has not been declared
qstring_helpers.h: In function 'void lyx::ucs4_to_qstring(const 
lyx::char_type*,
size_t, int&)':
qstring_helpers.h:106: error: request for member 'resize' in 's', which is 
of non-class type 'int'
qstring_helpers.h:108: error: invalid types 'int[int]' for array subscript
qstring_helpers.h:108: error: 'ucs4_to_qchar' was not declared in this scope
qstring_helpers.h: At global scope:
qstring_helpers.h:118: error: 'QString' was not declared in this scope
qstring_helpers.h:127: error: 'QString' was not declared in this scope
docstring.C: In function 'const lyx::docstring lyx::from_local8bit(const
std::string&)':
docstring.C:97: error: 'QString' has not been declared
docstring.C: In function 'const std::string lyx::to_local8bit(const
lyx::docstring&)':
docstring.C:112: error: 'QByteArray' was not declared in this scope
docstring.C:112: error: expected `;' before 'const'
docstring.C:113: error: 'local' was not declared in this scope
docstring.C:115: error: 'local' was not declared in this scope
make[5]: *** [docstring.lo] Error 1
make[5]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src/support'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src/support'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src/support'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/share/projectSoft/lyx/lyx-devel/src'
make: *** [all-recursive] Error 1

Here is relevant part from configure output

Configuration
  Host type:  i686-pc-linux-gnu
  Special build flags:assertions pch concept-checks stdlib-debug
warnings  use-ispell
  C   Compiler:   gcc
  C   Compiler LyX flags:
  C   Compiler flags: -Wextra -Wall-g -O
  C++ Compiler:   g++ (4.1.2)
  C++ Compiler LyX flags:
  C++ Compiler flags: -Wextra -Wall-g -O
  Linker flags:
  Linker user flags:
  Qt 4 Frontend:
  Qt 4 version: 4.2.1
  Packaging:  posix
  LyX binary dir: /usr/local/bin
  LyX files dir:  /usr/local/share/lyx

Regards, Gregor



Re: Compile latest SVN checkout

2006-12-30 Thread Gregor Gorjanc
Bo Peng wrote:
>> Is anyone able to compile latest SVN checkout? I get this error during
>> make on
>> Debian GNU/Linux:
> 
> Fine here (with scons).

That is odd. I have compiled lyx-devel succefully in the past - month or
so ago. So I should not get errors due to different build system. Or
should I?

-- 
Lep pozdrav / With regards,
Gregor Gorjanc
--
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3   mail: gregor.gorjanc  bfro.uni-lj.si

SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europefax: +386 (0)1 72 17 888

--
"One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try." Sophocles ~ 450 B.C.
--


Re: Compile latest SVN checkout

2006-12-30 Thread Gregor Gorjanc
Georg Baum <[EMAIL PROTECTED]> writes:

> 
> On Saturday 30 December 2006 19:24, Bo Peng wrote:
> > This is not odd. For good or bad, we have three build systems. Abdel
> > just introduced some new files so all three build systems need to be
> > updated. Since he is not an expert on all of them and can not test
> > them all, it is not surprising that autotools fail.
> 
> That was not the reason, he added the files to Makefile.am.
> 
> > I guess you can run autogen.sh and configure again. If autotools still
> > does not work, wait for Georg to fix it.
> 
> It works for me. I suspect that Gregor forgot to rerun autogen.sh and 
> configure.

Did that and now I get different error:



make[7]: Entering directory
`/home/share/projectSoft/lyx/lyx-devel/src/frontends/qt4'
if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ 
-DHAVE_CONFIG_H -I. -I.
-I../../../src  -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL
-DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h -I../../../src
-I../../../src/frontends -I../../../images -DQT_SHARED -I/usr/include/qt4
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui   -I../../../boost
-I../../../src/frontends/controllers -Wextra -Wall -g -O -MT Alert_pimpl.lo
-MD -MP -MF ".deps/Alert_pimpl.Tpo" -c -o Alert_pimpl.lo Alert_pimpl.C; \
then mv -f ".deps/Alert_pimpl.Tpo" ".deps/Alert_pimpl.Plo"; else rm -f
".deps/Alert_pimpl.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src -DQT_CLEAN_NAMESPACE
-DQT_GENUINE_STR -DQT_NO_STL -DQT_NO_KEYWORDS -Winvalid-pch --include=./pch.h
-I../../../src -I../../../src/frontends -I../../../images -DQT_SHARED
-I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui
-I../../../boost -I../../../src/frontends/controllers -Wextra -Wall -g -O -MT
Alert_pimpl.lo -MD -MP -MF .deps/Alert_pimpl.Tpo -c Alert_pimpl.C -o 
Alert_pimpl.o
./qt_connection_check.h: In static member function 'static void
Signal_Slot_argument_mismatch::match()':
./qt_connection_check.h:231: error: there are no arguments to 'p' that 
depend on
a template parameter, so a declaration of 'p' must be available
./qt_connection_check.h:231: error: (if you use '-fpermissive', G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
./qt_connection_check.h:232: error: 'p' was not declared in this scope
make[7]: *** [Alert_pimpl.lo] Error 1
make[7]: Leaving directory `/.../lyx/lyx-devel/src/frontends/qt4'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/.../lyx/lyx-devel/src/frontends/qt4'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/.../lyx/lyx-devel/src/frontends/qt4'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/.../lyx/lyx-devel/src/frontends'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/.../lyx/lyx-devel/src/frontends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/.../lyx/lyx-devel/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/.../lyx/lyx-devel/src'
make: *** [all-recursive] Error 1





When will 1.4.4 be released

2006-12-27 Thread Gregor Gorjanc
Hi!

What are the plans for releasing 1.4.4 version?

Thanks!

Gregor



When will 1.4.4 be released

2006-12-27 Thread Gregor Gorjanc
Hi!

What are the plans for releasing 1.4.4 version?

Thanks!

Gregor



Re: Policy of adding new commands to syntax.default

2006-12-26 Thread Gregor Gorjanc
Enrico Forestieri [EMAIL PROTECTED] writes:
...
 Merry Christmas 
 
 http://www.lyx.org/trac/changeset/16394

Any chance to port this also to 1_4_X branch?

Thanks again! 

Gregor






Re: Policy of adding new commands to syntax.default

2006-12-26 Thread Gregor Gorjanc
Enrico Forestieri <[EMAIL PROTECTED]> writes:
...
> Merry Christmas 
> 
> http://www.lyx.org/trac/changeset/16394

Any chance to port this also to 1_4_X branch?

Thanks again! 

Gregor






Re: Policy of adding new commands to syntax.default

2006-12-24 Thread Gregor Gorjanc
Enrico Forestieri [EMAIL PROTECTED] writes:
  should have had put this on the list of wishes for Santa  ;)
 
 Merry Christmas 

Thank you Santa!

Gregor





Re: Policy of adding new commands to syntax.default

2006-12-24 Thread Gregor Gorjanc
Enrico Forestieri <[EMAIL PROTECTED]> writes:
> > should have had put this on the list of wishes for Santa  ;)
> 
> Merry Christmas 

Thank you Santa!

Gregor





Re: Policy of adding new commands to syntax.default

2006-12-23 Thread Gregor Gorjanc
Hi again.

Sorry for bothering the list, did anyone attempt to add Sweave syntax? Perhaps I
should have had put this on the list of wishes for Santa  ;)

Thanks, Gregor



Re: Policy of adding new commands to syntax.default

2006-12-23 Thread Gregor Gorjanc
Hi again.

Sorry for bothering the list, did anyone attempt to add Sweave syntax? Perhaps I
should have had put this on the list of wishes for Santa  ;)

Thanks, Gregor



Re: Policy of adding new commands to syntax.default

2006-12-21 Thread Gregor Gorjanc
 Index: lib/syntax.default
...
 +% Sweave stuff
 +\Sexpr{}
 +\SweaveOpts{}


Any comments on this?

Thank!

Gregor









Re: Policy of adding new commands to syntax.default

2006-12-21 Thread Gregor Gorjanc
Andre Poenitz wrote:
 On Thu, Dec 21, 2006 at 04:56:32PM +, Gregor Gorjanc wrote:
 Index: lib/syntax.default
 ...
 +% Sweave stuff
 +\Sexpr{}
 +\SweaveOpts{}

 Any comments on this?
 
 It's uncritical to put in as far as I can tell ;-)

Sorry, but what does that mean?

Gregor


Re: Policy of adding new commands to syntax.default

2006-12-21 Thread Gregor Gorjanc
> Index: lib/syntax.default
...
> +% Sweave stuff
> +\Sexpr{}
> +\SweaveOpts{}


Any comments on this?

Thank!

Gregor









Re: Policy of adding new commands to syntax.default

2006-12-21 Thread Gregor Gorjanc
Andre Poenitz wrote:
> On Thu, Dec 21, 2006 at 04:56:32PM +0000, Gregor Gorjanc wrote:
>>> Index: lib/syntax.default
>> ...
>>> +% Sweave stuff
>>> +\Sexpr{}
>>> +\SweaveOpts{}
>>
>> Any comments on this?
> 
> It's uncritical to put in as far as I can tell ;-)

Sorry, but what does that mean?

Gregor


Policy of adding new commands to syntax.default

2006-12-20 Thread Gregor Gorjanc
Hello!

What is the policy of adding new/additional latex commands to snytax.default
file. I have two additions from Sweave. It is not a problem to put these into a
local file, but it would be nice to have them directly in LyX by default.

Thanks!

Gregor

And a patch against current lyx-devel

Index: lib/syntax.default
===
--- lib/syntax.default  (revision 16352)
+++ lib/syntax.default  (working copy)
@@ -725,3 +725,8 @@
 % These are not known by LyX but work nevertheless:
 empheq
 \end{mathenvironments}
+
+%%
+% Sweave stuff
+\Sexpr{}
+\SweaveOpts{}




Policy of adding new commands to syntax.default

2006-12-20 Thread Gregor Gorjanc
Hello!

What is the policy of adding new/additional latex commands to snytax.default
file. I have two additions from Sweave. It is not a problem to put these into a
local file, but it would be nice to have them directly in LyX by default.

Thanks!

Gregor

And a patch against current lyx-devel

Index: lib/syntax.default
===
--- lib/syntax.default  (revision 16352)
+++ lib/syntax.default  (working copy)
@@ -725,3 +725,8 @@
 % These are not known by LyX but work nevertheless:
 empheq
 \end{mathenvironments}
+
+%%
+% Sweave stuff
+\Sexpr{}
+\SweaveOpts{}




Re: More involved converters: literate (Sweave) to HTML

2006-12-08 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:
 Am Donnerstag, 7. Dezember 2006 23:10 schrieb Gregor Gorjanc:
  Hi,
  
  I am also interested in setting up converter for literate (Sweave) to 
 HTML. I
  find it hard to do that, because I need to first weave the file and I do 
 not
  know how to tell LyX to HTML-ize produced LaTeX file. I have the 
 following in my
  prefs file
  
  \converter literate latex R CMD Sweave --opts=png=TRUE $$i 
 
 Then you also need a converter from latex to html (that should be 
 autodetected normally if one of htlatex, tth, latex2html or hevea is 
 installed). If you have that converter LyX should offer you to export to 
 html. See also section 3.5 Converters, Formats, Viewers, Editors and 
 Copiers of Cunstomization.lyx

Thank you Georg. I know all that, but consider this situation:

# Format for Sweave
\format literate Rnw Sweave N editor editor

# Converters for literate
\converter literate latex R CMD Sweave $$i --opts='pdf=FALSE'
\converter literate pdflatex R CMD Sweave $$i --opts='eps=FALSE'
\converter literate ??? R CMD Sweave $$i
--opts='eps=FALSE,pdf=FALSE,png=TRUE'

I.e. I have extra converters for latex and pdflatex. Sweave creates both EPS and
PDF by default - that is way I use pdf=FALSE for latex etc. PNG is not created
by default and I have to pass --opts='eps=FALSE,pdf=FALSE,png=TRUE' (read more
on this bellow) to create it. Now I wonder what format should I use for last
converter where I would like to convert produced LaTeX (after weaving from
literate) to HTML?

  Additionally, is it OK to have  command/converter definition?
 
 No, because LyX does not know what to do in this case. What do you want to 
 achieve with such a definition?

[1]I have used now last field as an extra flag and with '. Is this OK? Or should
I escape  i.e. --opts=\additionalOpts\?

Regards, Gregor





Re: "More involved" converters: literate (Sweave) to HTML

2006-12-08 Thread Gregor Gorjanc
Georg Baum <[EMAIL PROTECTED]> writes:
> Am Donnerstag, 7. Dezember 2006 23:10 schrieb Gregor Gorjanc:
> > Hi,
> > 
> > I am also interested in setting up converter for literate (Sweave) to 
> HTML. I
> > find it hard to do that, because I need to first weave the file and I do 
> not
> > know how to tell LyX to HTML-ize produced LaTeX file. I have the 
> following in my
> > prefs file
> > 
> > \converter "literate" "latex" "R CMD Sweave --opts="png=TRUE" $$i" ""
> 
> Then you also need a converter from latex to html (that should be 
> autodetected normally if one of htlatex, tth, latex2html or hevea is 
> installed). If you have that converter LyX should offer you to export to 
> html. See also section 3.5 "Converters, Formats, Viewers, Editors and 
> Copiers" of Cunstomization.lyx

Thank you Georg. I know "all" that, but consider this situation:

# Format for Sweave
\format "literate" "Rnw" "Sweave" "N" "editor" "editor"

# Converters for literate
\converter "literate" "latex" "R CMD Sweave $$i" "--opts='pdf=FALSE'"
\converter "literate" "pdflatex" "R CMD Sweave $$i" "--opts='eps=FALSE'"
\converter "literate" "???" "R CMD Sweave $$i"
"--opts='eps=FALSE,pdf=FALSE,png=TRUE'"

I.e. I have extra converters for latex and pdflatex. Sweave creates both EPS and
PDF by default - that is way I use pdf=FALSE for latex etc. PNG is not created
by default and I have to pass --opts='eps=FALSE,pdf=FALSE,png=TRUE' (read more
on this bellow) to create it. Now I wonder what format should I use for last
converter where I would like to convert produced LaTeX (after weaving from
literate) to HTML?

> > Additionally, is it OK to have "" command/converter definition?
> 
> No, because LyX does not know what to do in this case. What do you want to 
> achieve with such a definition?

[1]I have used now last field as an extra flag and with '. Is this OK? Or should
I escape "" i.e. --opts=\"additionalOpts\"?

Regards, Gregor





More involved converters: literate (Sweave) to HTML

2006-12-07 Thread Gregor Gorjanc
Hi,

I am also interested in setting up converter for literate (Sweave) to HTML. I
find it hard to do that, because I need to first weave the file and I do not
know how to tell LyX to HTML-ize produced LaTeX file. I have the following in my
prefs file

\converter literate latex R CMD Sweave --opts=png=TRUE $$i 

Additionally, is it OK to have  command/converter definition?

Thank you!



"More involved" converters: literate (Sweave) to HTML

2006-12-07 Thread Gregor Gorjanc
Hi,

I am also interested in setting up converter for literate (Sweave) to HTML. I
find it hard to do that, because I need to first weave the file and I do not
know how to tell LyX to HTML-ize produced LaTeX file. I have the following in my
prefs file

\converter "literate" "latex" "R CMD Sweave --opts="png=TRUE" $$i" ""

Additionally, is it OK to have "" command/converter definition?

Thank you!



Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-04 Thread Gregor Gorjanc
Juergen Spitzmueller [EMAIL PROTECTED] writes:
 Gregor Gorjanc wrote:
  Gosh. I am surprised on license need for something so small.
 
 This is just our way to get you into the boat 

;)

  Which 1.4.X will have this feature?
 
 The next one (1.4.4).

Thank you again!

Gregor





Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-04 Thread Gregor Gorjanc
Juergen Spitzmueller <[EMAIL PROTECTED]> writes:
> Gregor Gorjanc wrote:
> > Gosh. I am surprised on license need for something so small.
> 
> This is just our way to get you into the boat 

;)

> > Which 1.4.X will have this feature?
> 
> The next one (1.4.4).

Thank you again!

Gregor





Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-03 Thread Gregor Gorjanc
Juergen Spitzmueller wrote:
 Juergen Spitzmueller wrote:
 Yes (in 1.4.X too)
 I'll do that.
 
 However, after testing Gregor's patch, I noticed that it adds some unneeded 
 blank lines after \end tags (where a linebreak occurs anyway). So I'll apply 
 the attached patch instead.

Thank you very much for getting this into LyX!

 Before I do this: Gregor, can you please post a message to this list, stating 
 something like I hereby grant permission to licence my contributions to LyX 
 under the Gnu General Public Licence, version 2 or later (for the list 
 archieve)? This is needed to incorporate your patch into LyX.

Gosh. I am surprised on license need for something so small. OK. Here is
goes ;)

I (Gregor Gorjanc) hereby grant permission to licence my contributions
to LyX under the Gnu General Public Licence, version 2 or later

Gregor


Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-03 Thread Gregor Gorjanc
Gregor Gorjanc [EMAIL PROTECTED] writes:
 Juergen Spitzmueller wrote:
  Juergen Spitzmueller wrote:
  Yes (in 1.4.X too)

Which 1.4.X will have this feature?

Thanks. 

Gregor





Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-03 Thread Gregor Gorjanc
Juergen Spitzmueller wrote:
> Juergen Spitzmueller wrote:
>>> Yes (in 1.4.X too)
>> I'll do that.
> 
> However, after testing Gregor's patch, I noticed that it adds some unneeded 
> blank lines after \end tags (where a linebreak occurs anyway). So I'll apply 
> the attached patch instead.

Thank you very much for getting this into LyX!

> Before I do this: Gregor, can you please post a message to this list, stating 
> something like "I hereby grant permission to licence my contributions to LyX 
> under the Gnu General Public Licence, version 2 or later" (for the list 
> archieve)? This is needed to incorporate your patch into LyX.

Gosh. I am surprised on license need for something so small. OK. Here is
goes ;)

"I (Gregor Gorjanc) hereby grant permission to licence my contributions
to LyX under the Gnu General Public Licence, version 2 or later"

Gregor


Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-03 Thread Gregor Gorjanc
Gregor Gorjanc <[EMAIL PROTECTED]> writes:
> Juergen Spitzmueller wrote:
> > Juergen Spitzmueller wrote:
> >>> Yes (in 1.4.X too)

Which 1.4.X will have this feature?

Thanks. 

Gregor





Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
...
  stupid code ...
  I suppose you do not know the difference between centering and
  center
 
 First, I want to point out that this is the code output by LyX, not
 Gregor's doing. And I do not think that his particular problem is
 about center vs centering.

Any comments on my wish and proposed patch?

Gregor





Re: Optional LatexParam in layouts

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
...
 Gregor \begin{Scode}{echo=true, eval=false, ...} \end{Scode}
 
 Gregor where ... means other options. How can I define this with
 Gregor LatexParam directive? Is it possible to modfy this values
 Gregor later when a user is writting a file with this environment?
 
 We do not have for now a way to create environments with options that
 can be set by the user. It is possible though in 1.5 to make
 environments with optional arguments like
 \begin{foo}[argument]
 ...
 \end{foo}

OK, but what is the meaning of optional arguments if user can not set them. Did
I miss something? 

Sorry for ranting.

Gregor






Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-01 Thread Gregor Gorjanc
Gregor Gorjanc [EMAIL PROTECTED] writes:
 Jean-Marc Lasgouttes lasgouttes at ... writes:
 ...
   stupid code ...
   I suppose you do not know the difference between centering and
   center
  
  First, I want to point out that this is the code output by LyX, not
  Gregor's doing. And I do not think that his particular problem is
  about center vs centering.
 
 Any comments on my wish and proposed patch?

Sorry for ranting again. Can someone please evaluate my proposal. Should I 
file
bug report, or, ...

Thank you!

Gregor






Re: Optional LatexParam in layouts

2006-12-01 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:
 Yes. The user can set them. Plase have a look at the term optional
 argument in any LaTeX book. What you want is not a standard optional
 argument as used by many LaTeX commands. What you want is not possible,
 standard optional arguments are.

Thank you Georg. You are the second on the list that noticed my LaTeX 
knowledge. Sorry about this, but that is the real power of using LyX i.e. 
users do not need to know much about LaTeX. Unfortunatelly it turns out that 
users then think anything is possible.

Regards, Gregor






Re: Optional LatexParam in layouts

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
 Well, the basic feature itself would be reasonably easy: add a new LatexType
 EnvironmentWithArg, and when such an environment is used, output the
 first paragraph as argument and the next ones inside the environment.
 The patch for that would be very small.
 
 However there are problems:
 
 - first thing people will do is ask for more arguments. THis means
   more code.
 
 - what happens when there is a required and an optional argument? In
   what order should they be output?
 
 - we need an UI to show to the user that the first paragraph and the
   second one are of different nature. This means that the font, for
   example should be different. This means much more changes to LyX'
   kernel.

Perhaps users could set this as we can do now for paragraph settings i.e. by
marking options in paragraph or environment settings menu - this menu would 
then 
have to be environment specific. I guess I want to much, but that would
be quite flexible and general things to have. But there is probably a lot of 
work
with this so lyx 1.5 is not an option.

Regards, Gregor




Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes wrote:
 Gregor == Gregor Gorjanc [EMAIL PROTECTED] writes:
 
 Gregor Gregor Gorjanc [EMAIL PROTECTED] writes:
 Jean-Marc Lasgouttes lasgouttes at ... writes: ...   stupid
 code ...   I suppose you do not know the difference between
 centering and   center
 First, I want to point out that this is the code output by LyX,
 not  Gregor's doing. And I do not think that his particular
 problem is  about center vs centering.

 Any comments on my wish and proposed patch?
 
 Gregor Sorry for ranting again. Can someone please evaluate my
 Gregor proposal. Should I file bug report, or, ...
 
 I think it makes sense, but it needs careful checking. In particular,
 extra \n can create unwanted extra paragraphs in some cases.
 
 Sorry for not being more precise at this time. Filing a bug report on
 this particular problem would be sound.

OK, Done.

Thank you, Gregor


Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
...
> >> stupid code ...
> >> I suppose you do not know the difference between centering and
> >> center
> 
> First, I want to point out that this is the code output by LyX, not
> Gregor's doing. And I do not think that his particular problem is
> about center vs centering.

Any comments on my wish and proposed patch?

Gregor





Re: Optional LatexParam in layouts

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
...
> Gregor> \begin{Scode}{echo=true, eval=false, ...} \end{Scode}
> 
> Gregor> where ... means other options. How can I define this with
> Gregor> LatexParam directive? Is it possible to modfy this values
> Gregor> later when a user is writting a file with this environment?
> 
> We do not have for now a way to create environments with options that
> can be set by the user. It is possible though in 1.5 to make
> environments with optional arguments like
> \begin{foo}[argument]
> ...
> \end{foo}

OK, but what is the meaning of optional arguments if user can not set them. Did
I miss something? 

Sorry for ranting.

Gregor






Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-01 Thread Gregor Gorjanc
Gregor Gorjanc <[EMAIL PROTECTED]> writes:
> Jean-Marc Lasgouttes  ...> writes:
> ...
> > >> stupid code ...
> > >> I suppose you do not know the difference between centering and
> > >> center
> > 
> > First, I want to point out that this is the code output by LyX, not
> > Gregor's doing. And I do not think that his particular problem is
> > about center vs centering.
> 
> Any comments on my wish and proposed patch?

Sorry for ranting again. Can someone please "evaluate" my proposal. Should I 
file
bug report, or, ...

Thank you!

Gregor






Re: Optional LatexParam in layouts

2006-12-01 Thread Gregor Gorjanc
Georg Baum <[EMAIL PROTECTED]> writes:
> Yes. The user can set them. Plase have a look at the term "optional
> argument" in any LaTeX book. What you want is not a standard optional
> argument as used by many LaTeX commands. What you want is not possible,
> standard optional arguments are.

Thank you Georg. You are the second on the list that noticed "my LaTeX 
knowledge". Sorry about this, but that is the real power of using LyX i.e. 
users do not need to know much about LaTeX. Unfortunatelly it turns out that 
users then think "anything" is possible.

Regards, Gregor






Re: Optional LatexParam in layouts

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> Well, the basic feature itself would be reasonably easy: add a new LatexType
> EnvironmentWithArg, and when such an environment is used, output the
> first paragraph as argument and the next ones inside the environment.
> The patch for that would be very small.
> 
> However there are problems:
> 
> - first thing people will do is ask for more arguments. THis means
>   more code.
> 
> - what happens when there is a required and an optional argument? In
>   what order should they be output?
> 
> - we need an UI to show to the user that the first paragraph and the
>   second one are of different nature. This means that the font, for
>   example should be different. This means much more changes to LyX'
>   kernel.

Perhaps users could set this as we can do now for paragraph settings i.e. by
marking options in paragraph or environment settings menu - this menu would 
then 
have to be environment specific. I guess I want to much, but that would
be quite flexible and general things to have. But there is probably a lot of 
work
with this so lyx 1.5 is not an option.

Regards, Gregor




Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-12-01 Thread Gregor Gorjanc
Jean-Marc Lasgouttes wrote:
>>>>>> "Gregor" == Gregor Gorjanc <[EMAIL PROTECTED]> writes:
> 
> Gregor> Gregor Gorjanc <[EMAIL PROTECTED]> writes:
>>> Jean-Marc Lasgouttes  ...> writes: ... > >> stupid
>>> code ... > >> I suppose you do not know the difference between
>>> centering and > >> center
>>>> First, I want to point out that this is the code output by LyX,
>>> not > Gregor's doing. And I do not think that his particular
>>> problem is > about center vs centering.
>>>
>>> Any comments on my wish and proposed patch?
> 
> Gregor> Sorry for ranting again. Can someone please "evaluate" my
> Gregor> proposal. Should I file bug report, or, ...
> 
> I think it makes sense, but it needs careful checking. In particular,
> extra \n can create unwanted extra paragraphs in some cases.
> 
> Sorry for not being more precise at this time. Filing a bug report on
> this particular problem would be sound.

OK, Done.

Thank you, Gregor


Re: Literate: noweb Sweave

2006-11-30 Thread Gregor Gorjanc
Andre Poenitz [EMAIL PROTECTED] writes:
...
  I also tweaked system configure.py (preferable if this should be in
  future LyX) getting the same effect. However, I am not satisfied with
  this since with above changes user has to tweak the files/menus and I do
  not have the support to import and export Sweave files and adding proper
  entries in configure.py  causes Noweb to disapear - since I use literate
  for Sweave.
 
  Is there any way to provide functionality for several literate
  systems - if there are apropriate tools on the system of course? 
 
 The usual trick is to define an additional target format 'latex2' or
 maybe 'latexSweave' 

Hello Andre.

Sorry for late response. I am not subscribed to the list and did not notice your
answer.

This will not work - I have already tried that - since literate format name has
special meaning i.e. tex2lyx -n forces creation of literate format. Hence I do
not see any simple way to provide Sweave directly with LyX. For now I have
managed to get thing working with changed settings in prefrences (formats and
converters) and layouts (literate-*). I am not satisfied with this since this
can not be added to LyX directly as it changes current implementation that suits
to noweb only. Sweave is based on noweb, but has a bit different philosophy i.e.
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




Wish: add newline after \begin{centering} and before \end{centering}

2006-11-30 Thread Gregor Gorjanc
Dear LyX team!

I am trying to provide support for Sweave[1] (another literate programming idea
based on noweb) in LyX. I have already contacted this list about Sweave [2] and
got some respone from Andre. I have just responded in that thread. To have a bit
better support for Sweave I would like to see that there would be a newline
after \begin{centering} and before \end{centering} as weel as other align
environments (see my simple patch bellow).

I appologize in advance for the length of this mail, but I wanted to be
descriptive as much as possible.

The reasoning for prpoposed change. In Sweave we can enter R/S code into scrap
environment and this code will be replaced by results after weaving. For 
example:

---
some text
scrap1, echo=FALSE=
1+1
@
some text
---

will after weaving look like

---
some text
\begin{Schunk}
\begin{Soutput}
[1] 2
\end{Soutput}
\end{Schunk}
some text
---

We can also include plots

---
some text
scrap2, echo=FALSE, fig=TRUE=
plot(x=1:10, y=10:1)
@
some text
---

which will look like this after weaving:

---
some text
\includegraphics{filename-scrap2}
some text
---

Here comes the problem with center(ing) (I am not really sure what is the diff
betwenn center and centering) as well as other align environments. Usually one
would like to have the following:

---
some text
\begin{figure}
\begin{centering}
scrap2, echo=FALSE, fig=TRUE=
plot(x=1:10, y=10:1)
@
\end{centering}
\end{figure}
some text
---

and after weaving

---
some text
\begin{figure}
\begin{centering}
\includegraphics{filename-scrap2}
\end{centering}
\end{figure}
some text
---

BUT, LyX produces LaTeX code (prior to weaving) that is not so nicely
structured. I get this with LyX 1.4.3 and also with LyX-devel.

---
some text
\begin{figure}
\begin{centering}scrap2, echo=FALSE, fig=TRUE=
plot(x=1:10, y=10:1)
@\par\end{centering}
\end{figure}
some text
---

This will cause problems to Sweave, since it expects  at the begining of line
as well as @ as the only element in that line. So I wish that LyX would insert a
newline after \begin{centering} and before \end{centering}. I believe this will
also produce more readable LaTeX file.

Here is the proposed patch (I can also send the file). Please review it with
extreme care as I do not have any clue about C++. Thank you very much!

Index: paragraph.C
===
--- paragraph.C (revision 16119)
+++ paragraph.C (working copy)
@@ -736,7 +736,7 @@
output += correction(env);
else
output += env;
-   return output + };
+   return output + }\n;
 }

 } // namespace anon
@@ -837,24 +837,24 @@
case LYX_ALIGN_LEFT: {
string output;
if (getParLanguage(bparams)-babel() != hebrew)
-   output = corrected_env(\\par\\end, flushleft,
ownerCode());
+   output = corrected_env(\n\\par\\end, flushleft,
ownerCode());
else
-   output = corrected_env(\\par\\end, flushright,
ownerCode());
+   output = corrected_env(\n\\par\\end, flushright,
ownerCode());
os  from_ascii(output);
column += output.size();
break;
} case LYX_ALIGN_RIGHT: {
string output;
if (getParLanguage(bparams)-babel() != hebrew)
-   output = corrected_env(\\par\\end, flushright,
ownerCode());
+   output = corrected_env(\n\\par\\end, flushright,
ownerCode());
else
-   output = corrected_env(\\par\\end, flushleft,
ownerCode());
+   output = corrected_env(\n\\par\\end, flushleft,
ownerCode());
os  from_ascii(output);
column += output.size();
break;
} case LYX_ALIGN_CENTER: {
string output;
-   output = corrected_env(\\par\\end, center, ownerCode());
+   output = corrected_env(\n\\par\\end, center, ownerCode());
os  from_ascii(output);
column += output.size();
break;

[1]http://www.ci.tuwien.ac.at/%7Eleisch/Sweave/
[2]http://thread.gmane.org/gmane.editors.lyx.devel/73050/focus=73050



Re: Literate: noweb Sweave

2006-11-30 Thread Gregor Gorjanc
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? 

Thinking a bit further, this could be solved by another option for tex2lyx to
specify which literate programing file format would be chosen. I suggest noweb
for  default name instead of literate as literate is far more general than
noweb. For Sweave file format name sweave could be chosen. In the future
somebody could also provide support for other literate programming tools and
this could then be used. My luck is that Sweave resembles noweb so much that
noweb part of tex2lyx can be used. Then layout files could be named as

noweb-*
sweave-*
whatever-*

Of course this involves quite a lot of work in several places. Any thoughts? 
Is there anyone that would bite into this? My C++ knowledge is unfortunately 
at level zero.

Gregor





Re: Literate: noweb Sweave

2006-11-30 Thread Gregor Gorjanc
Hello!

Thank you for you answer. Comments bellow.

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. 
 
 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 DocumentSettings to choose
 a literate programming program.

The differences are minor, but there are some. I am writting an article
for RNews and for the moment I have this (preliminary) stuff on layouts.
I can send you offline the whole article if you are interested. When I
was writting this I was thinking a lot about how to get things around.
Perhaps I do not see things from right perspective.

--- Start

\LyX{} uses layouts for definition of document classes as well as for
sytles/environments, say standard layout for normal text and scrap
layout for program code in literate programming. There are already
layouts with literate support for article, report and book. Definitions
for this files can be found in \file{layout} subdirectory of library
directory.  Files are named \file{literate-article.layout},
\file{literate-report.layout} and \file{literate-book.layout}. These
files include \file{literate-scrap.inc} file, where scrap layout is
defined. These files are really very simple and new ones for other
document classes can be easily created. When \LyX{} imports literate
programming file it automatically chooses one of these layouts. That is
the reason for mandatory use of \command{literate} file format name as
described before in formats subsection.

Default layout files for literate programming in \LyX{} were written
with \command{noweb} tool in mind. There are two problems with these
layouts, because \command{Sweave} does not have exactly the same
implementation as \command{noweb}. Default layouts are available for use
to \LyX{} user only if \file{noweb.sty} file is found by \TeX{} in the
configuration of \LyX{} - done during first start of \LyX{} or via
\command{Tools} -- \command{Reconfigure} menu. Another problem lies in
the heart of the difference between \command{Sweave} and
\command{noweb}. In weave ``mode'' \command{Sweave} can output code as
well as results from the code and user might want to format this
results, while \command{noweb} produces only code. Therefore, it does
not seem necesarry to use alignment for code chunk in \command{noweb},
whereas in \command{Sweave} this can be used often - especially when
inserting figures via \code{plot()} functions.

To avoid mentioned problems we provide modified literate layout files
for article, report and book at ?. Note that it is not mandatory to use
these layouts to have \command{Sweave} support in \LyX{} - install
\file{noweb.sty} file (could also be a fake file) and live with a
contraint that you can not align code chunks. Provided layouts offer
better integration\footnote{}.

--- End

 I would personally be interested in using sweave in LyX, but
 unfortunately I will not have time to work on that.

Of course. Availability of human resources is always a problem.

Gregor


Re: Literate: noweb Sweave

2006-11-30 Thread Gregor Gorjanc
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. 
 
 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 DocumentSettings to choose
 a literate programming program.

Additional problem is also related to newline after and before align
environments as reported at

http://thread.gmane.org/gmane.editors.lyx.devel/73563/focus=73563

I guess that this should really be easy to fix.

Thanks.

Gregor


Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-11-30 Thread Gregor Gorjanc
Herbert Voss [EMAIL PROTECTED] writes:
 you mean center, not centering ...
 \centering is a macro and center an environment.
 

Whatever. LyX sometimes outputs centering otherwise center.

Gregor






Re: Literate: noweb Sweave

2006-11-30 Thread Gregor Gorjanc
Georg Baum [EMAIL PROTECTED] writes:
...
  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.

I did not found any bug in tex2lyx noweb!

There is no difference in syntax between noweb and Sweave. There is only
difference in what layout should provide - for example Sweave does not need
\usepackage{noweb} - it needs \usepackage{Sweave}, but this is inserted by
Sweave intself. And there is a need to be able to align scrap environment -
current literate layouts do not allow this. I have all the needed modifications,
but that is a hack. Partly because noweb support is a 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 DocumentSettings 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.

Only literate format can be used as it has specific meaning.

 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

Hmm. This is interesting. How can I define dummy converter that just copies
literate to sweave layout?

 dvi,ps and pdf formats with an appropriate converter from sweave. The long

This is again a problem, as I have to use literate in output definition in
layout files. Then I would need sweave -- literate converter, but then I again
have problem with noweb specific things.

 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.

Seems to be the way I proposed. But involves some coding. I can at least 
help in testing.

 2) layout files (or maybe not - depending on the solution to 1)

I have it.

 3) import: should not be difficult to fix once 1) is decided

Current tex2lyx works just fine we would just need to specify sweave and not
noweb (current literate) format.

 4) problems with some encironments. I do nut understand that fully yet.

Will be fixed with proper layout and newline fix in align environments.

Thanks!

Gregor





Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-11-30 Thread Gregor Gorjanc
Gregor Gorjanc [EMAIL PROTECTED] writes:

 
 Herbert Voss hvoss at ... writes:
  you mean center, not centering ...
  \centering is a macro and center an environment.
  
 
 Whatever. LyX sometimes outputs centering otherwise center.

That is the output if I center scrap (modified to allow that) environment:

\begin{figure}
\begin{centering}fig=true=
boxplot(Sepal.Length~Species,data=iris)
@\par\end{centering}


\caption{bla bla}
\end{figure}

Gregor



Re: Literate: noweb Sweave

2006-11-30 Thread Gregor Gorjanc
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
...
 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. 
 
 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 DocumentSettings to choose
 a literate programming program.

Such implementation would be the cleanest since only chosen literate programming
format would be available at the moment. However there still needs to be a way
to handle (tex2lyx or somethingelse2lyx, layout file and specific wavers and
tanglers) chosen literate programming approach - i.e. noweb, nuweb, cweb, ...
and finnaly my ranting about sweave.

Gregor




Re: Wish: add newline after \begin{centering} and before \end{centering}

2006-11-30 Thread Gregor Gorjanc
Herbert Voss [EMAIL PROTECTED] writes:
  That is the output if I center scrap (modified to allow that) environment:
  
  \begin{figure}
  \begin{centering}fig=true=
  boxplot(Sepal.Length~Species,data=iris)
   at \par\end{centering}
  
  
  \caption{bla bla}
  \end{figure}
 
 stupid code ...

Why?
 
 I suppose you do not know the difference between centering and center

You are right, I do not know the diff. Can anyone enlight me please?

Thanks, Gregor




  1   2   >