On Thursday 03 December 2009 16:19:19 you wrote:
> On Thu, Dec 3, 2009 at 4:06 PM, Steve Litt <sl...@troubleshooters.com>wrote:
> > On Thursday 03 December 2009 06:59:25 Luke Venediger wrote:
> > > Hi Guys,
> > >
> > > Is it possible to mark certain lines in a Program Listing in Lyx? I'm
> > > writing a book and want to point out certain things in code examples.
> > > I'm trying to get the same effect as the one used by Mark Pilgrim, see
> > > http://diveintopython.org/native_data_types/lists.html#d0e5623 
> > > (example 3.6)
> > >
> > > Many Thanks,
> > > Luke Venediger
> > > My book: Erlang for Skeptics: http://erlangforskeptics.com/book/
> >
> > There are probably a hundred ways to do it. The way that occurs to me is
> > to create a new environment -- call it lyx-code-marked, from the lyx-code
> > environment. lyx-code-marked would be a different color. So you would
> > change
> > the environment of the marked lines from lyx-code to lyx-code-marked.
> >
> > HTH
> >
> > SteveT
> >
> > Steve Litt
> > Recession Relief Package
> > http://www.recession-relief.US
> > Twitter: http://www.twitter.com/stevelitt
> 
> Hi Steve,
> 
> Are you saying that inside my "program listing" block I would change to a
> custom environment? Currently all text in a program listing block is in the
> Plain Layout environment. I'm also using "program listing" to get syntax
> highlighting when the output is rendered.

Whoa, you're doing things a whole lot differently than I do. I always use the 
lyx-code environment for program listings.

Whatever environment you're using for code listings, use that environment to 
derive a new environment differing from the original only in color, either 
foreground or background. Probably if you're printing black and white paper or 
if you expect some readers to be color blind, you're probably better off 
changing the background color so it appears gray instead of white.

I suggest you look at the lyx-code environment. I think it's better for 
displaying computer programs.

SteveT
 
Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt

Reply via email to