I'm working on a document in LyX and I'm trying to create a frame around some verbatim text. I've tried a number of different things including ERT \begin{frame}[fragile]
and \end{frame}
around the block and also using beamer-fragile module. However this simply doesn't do what I need to – the PDF, instead of the frame around the block, contains two small rectangles and text fragile]
before the verbatim block. Here's what I've got in lyx:
And here's what I am getting in PDF:
Exactly the same result is produced if I use beamer-fragile module instead of ERT. I'm using LyX 2.0.7.1 (updated from 1.6 today) on OS X 10.9 if that matters. How can I get the frame around the block?
Best Answer
In 2.1 there is an easier way. I really recommend reading the (brand new) Beamer LyX manual. Go to Help > Specific Manuals > Beamer Presentations
To change a normal frame to a fragile frame, put the cursor at the beginning of the frame (in the following screenshot, this means after the red text "Frame" and before the "Default Overlay Specifications").
Then change the environment from Frame to Frame (fragile) by going up the top left as shown here:
And clicking on FragileFrame
You should end up with