Rainer M Krug wrote: > On Mon, Mar 2, 2009 at 10:30 PM, Paul Johnson <pauljoh...@gmail.com> wrote: >> Hello, I don't have any answers, but I have some questions for you.. I >> have an interest because I have been using LyX with Sweave a long >> time, but have not yet needed a beamer Sweave. > > I wanted to use it for lectures, where it would be very nice to have > the code and the result. > >> I've only spent 40 minutes looking at your case. I don't know what a >> fragile frame is for, but I'll go read more about it. >> >> The problem is obviously that you have an error in the latex macros in >> your layout file. Trying to find where those problems might be is, >> well, difficult (since I don't see why you care about changing the >> frame, mainly). > > Right - so I decided to use a different approach (see attached file > BeamerSweaveExample3.lyx) which is working. > > My question is just: why is "Slide 2" working, but "Slide 1" or "Slide > 3" not, when I say "echo=TRUE"? > > I don't have a problem usoing ERT boxes, but I know others, who would > prefer the approch used for "Slide 1" or "Slide 3" using the Frame > environment. > >> On Mon, Mar 2, 2009 at 1:53 AM, Rainer M Krug <r.m.k...@gmail.com> wrote: >>> Hi >>> >>> I want to use sweave in a beamer presentation. I found the following article >>> http://ggorjan.blogspot.com/2008/09/using-beamer-with-lyx-sweave.html >>> >>> and I implemented the laypout file as suggested, but changed it, based >>> on the BeamerUserGuide.pdf 3.13 Verbatim Text, tho include a fragile >>> frame and a verbatim environment (see layout file attached). >>> >>> But there must be something wrong: when I try to compile the attached >>> lyx file, it gives an error message ()\\i the LaTeX log: >>> >> I've downloaded your test case on my Ubuntu Linux 8.1 system and I can >> confirm that your fragile frame environment causes the compile to >> fail. Here's one way to try and figure what is going on. Instead of >> using the LyX Layout approach, just write ERT in your lyx document. If >> that DOES work, then you have good information because it means the >> fragile frame will work. Then concentrate on the LyX layout. > > As I said, I am not using it any more. > >> I suppose it would help if we had a tex file with the fragile frame in >> use, so we could compare the working tex against the tex that LyX >> creates. >> >> With the existing Layout file you provide, you can see a bit more >> about where this is going wrong if you export the LyX document to TeX >> format. Then we could compare that TeX file with a working tex file. >> The file LyX creates will default to batchmode, but you can edit that >> tex file and erase line 1, the batchmode line. After that, you can >> run latex or pdflatex on the tex file to see what happens. >> >> From looking at that tex file, it appears to me there is a mismatch in >> the frame begin and end markers. Here's a snip >> >> >> \lyxframeend{}\lyxfragileframe{Slide 1} >> >> \includegraphics{beamertest-001} >> >> >> \lyxframeend{}\lyxframe{Slide 2} >> >> >> Note that your Layout causes a \lyxframeend to be inserted, then a >> \lyxfragileframe, but there is no \lyxfragileframeend, only >> \lyxframeend. Do you think that is related to the trouble? > > No - I took the plain frame \lyxframeplain, and changed "plain" to "fragile". > >> Here are some latex errors I see when I run that through. I believe >> the first one is superficial, but the second is more serious. >> >> (/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty) >> >> Package hyperref Warning: Option `pdfpagelabels' is turned off >> (hyperref) because \thepage is undefined. >> >> Hyperref stopped early >> ) >> *hyperref using default driver hdvips* >> >> >> (/usr/share/texmf/tex/latex/beamer/themes/color/beamercolorthemewhale.sty)) >> (/usr/share/texmf-texlive/tex/generic/babel/babel.sty >> (/usr/share/texmf-texlive/tex/generic/babel/english.ldf >> (/usr/share/texmf-texlive/tex/generic/babel/babel.def))) >> (/usr/share/texmf/tex/latex/R/Sweave.sty >> (/usr/share/texmf-texlive/tex/latex/base/ifthen.sty) >> (/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty >> Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz) >> No file fancyvrb.cfg. >> ) (/usr/share/texmf/tex/latex/R/upquote.sty >> (/usr/share/texmf-texlive/tex/latex/base/textcomp.sty >> (/usr/share/texmf-texlive/tex/latex/base/ts1enc.def)))) (./beamertest.aux) >> (/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd) >> (/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty >> (/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty)) >> (./beamertest.out) >> (./beamertest.out) >> No file beamertest.nav. >> ) >> Runaway argument? >> ! File ended while scanning use of \next. >> <inserted text> >> \par >> <*> beamertest.tex >> >> >> >> I hope you get this working and let us know how you did it. > > I got it working, but am not entirely happy. > > Thanks for your comments, > > Rainer > >> >> >> >>> ### >>> ... >>> No file BeamerSweaveExample.nav. >>> \openout3 = `BeamerSweaveExample.vrb'. >>> >>> ) >>> Runaway argument? >>> ! File ended while scanning use of \next. >>> ... >>> ### >>> >>> When I change from "Frame (fragile)" to "Frame", it compiles, but when >>> setting one "echo=TRUE", it does not as it is not in "verbtim". If I >>> set the environment of the ERT to Verbatim, it still does not compile. >>> >>> What am I missing? >>> >>> Thanks, >>> >>> Rainer >>> >>> >>> -- >>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation >>> Biology, UCT), Dipl. Phys. (Germany) >>> >>> Centre of Excellence for Invasion Biology >>> Faculty of Science >>> Natural Sciences Building >>> Private Bag X1 >>> University of Stellenbosch >>> Matieland 7602 >>> South Africa >>> >> >> >> -- >> Paul E. Johnson >> Professor, Political Science >> 1541 Lilac Lane, Room 504 >> University of Kansas >> > > >
Thanks!! I too have been looking for an integrated Sweave-LyX-Beamer setup. I've had some scattered issues with Beamer itself in LyX without Sweave, and I've never had the chance to troubleshoot or document them. I'll check this out! -- M. Edward (Ed) Borasky http://www.linkedin.com/in/edborasky I've never met a happy clam. In fact, most of them were pretty steamed.