Re: listings in beamer don't work?? (1.6.2)
Micha Feigin wrote: On Fri, 20 Mar 2009 18:12:05 +0200 Micha Feigin wrote: On Fri, 20 Mar 2009 10:06:15 -0400 Neal Becker wrote: I found the info in beameruserguide.pdf. It says you need to add [fragile] to \begin{frame} How would I be able to do this in lyx? (lyx inserts \lyxframe to start a beamer frame) You need to insert a new frame and the at the begining of the frame title insert an ert with [fragile]. Not as the next line but as the beginning of the frame title. Another solution is to insert the listing from a file. That works with no issues Doesn't seem like the \begin{frame}[fragile] solution works, tried it in ert completely and it still didn't work. My solution was to write the listings in a text file and include it. A bit more cumbersome but it wokrs It works in ERT (example attached), but it's not a happy solution. I suspect the problem lies in the \lyxframe macro, but I'm not TeX-wise enough to spot where the flaw is. /Paul beamer_listing.lyx Description: application/lyx
Re: listings in beamer don't work?? (1.6.2)
On Fri, 20 Mar 2009 18:12:05 +0200 Micha Feigin wrote: > On Fri, 20 Mar 2009 10:06:15 -0400 > Neal Becker wrote: > > > I found the info in beameruserguide.pdf. It says you need to add [fragile] > > to \begin{frame} > > > > How would I be able to do this in lyx? (lyx inserts \lyxframe to start a > > beamer frame) > > > > > > You need to insert a new frame and the at the begining of the frame title > insert an ert with [fragile]. Not as the next line but as the beginning of the > frame title. > > Another solution is to insert the listing from a file. That works with no > issues > Doesn't seem like the \begin{frame}[fragile] solution works, tried it in ert completely and it still didn't work. My solution was to write the listings in a text file and include it. A bit more cumbersome but it wokrs
Re: listings in beamer don't work?? (1.6.2)
On Fri, 20 Mar 2009 10:06:15 -0400 Neal Becker wrote: > I found the info in beameruserguide.pdf. It says you need to add [fragile] > to \begin{frame} > > How would I be able to do this in lyx? (lyx inserts \lyxframe to start a > beamer frame) > > You need to insert a new frame and the at the begining of the frame title insert an ert with [fragile]. Not as the next line but as the beginning of the frame title. Another solution is to insert the listing from a file. That works with no issues
Re: listings in beamer don't work?? (1.6.2)
Neal Becker wrote: > I found the info in beameruserguide.pdf. It says you need to add > [fragile] to \begin{frame} > > How would I be able to do this in lyx? (lyx inserts \lyxframe to start a > beamer frame) How can I produce \begin{frame}[fragile]? If I choose BeginFrame, then immediately try insert ERT, this produces: \lyxframeend{}\lyxframe{[fragile]Generic Programming with C++} That doesn't work.
Re: listings in beamer don't work?? (1.6.2)
I found the info in beameruserguide.pdf. It says you need to add [fragile] to \begin{frame} How would I be able to do this in lyx? (lyx inserts \lyxframe to start a beamer frame)
listings in beamer don't work?? (1.6.2)
lyx-1.6.2 fedora f10 In a beamer doc, I start a frame. Then try to insert program listing. 1. If I simply paste in code, it is not verbatim - all the lines got wrapped! 2. Even trying some trivial code example, I get: ! LaTeX Error: \begin{lstlisting} on input line 132 ended by \end{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.133 \end{document} Your command was ignored. Type Ito replace it with another command, orto continue without it. (./numpy.aux) ! You can't use `\end' in internal vertical mode. \enddocument ... \endgroup \deadcycles \z@ \@@end l.133 \end{document} Sorry, but I'm not programmed to handle this case; I'll just pretend that you didn't ask for it. If you're in the wrong mode, you might be able to return to the right one by typing `I}' or `I$' or `I\par'. ! LaTeX Error: \begin{lstlisting} on input line 132 ended by \end{document}. The offending latex code looks like: \lyxframe{Generic Programming with C++} \begin{lstlisting} def whatever(): whatever \end{lstlisting} \lyxframeend{} \end{document}