On Mon, 23 Jan 2006, Rich Shepard wrote:

> > I have many code examples with lyx-code and they don't fit well on my
> > 6-inch wide page. I don't know how much space will be needed for the
> > perfect binding. I am using koma scrbook and have default left and right
> > margins which appear to be:
> 
> Jeremy,
> 
>   Ever seen sample code printed in a narrow magazine column? They add a
> backslash at the end of a continued line to indicate that it is a
> continuation.
> 
>   I've done this when the monospaced literal code extends past the right
> margin. It also works well on beamer class slides.
> 
>   Might this be an easy to implement solution to your problem?

In fact, most of my code examples already use the \ backslash for the line 
continuation. (My code examples are Unix shell scripts and PF 
configurations which support the \ backslash too so can be typed in same.)

I only have about 5.05 inches of body so I hope to be able to use the 
extra 0.35 inches I would have by removing my indent.

I tried using something like:

\ifthenelse{\equal{\lyxcode}{}}{}{
    \setlength{\leftmargin}{0in}}

But says extra } and undefined control sequence.

Or maybe I can redeibe the lyxcode environment, but I don't know how to 
redefine an existing environment. Or I can create my own class, but I was 
hoping I don't have to do that.

I found the lyxcode defined in lyxmacros.inc.

Any ideas on how to set \leftmargin to nothing when using lyx-code in my 
preamble?


 Jeremy C. Reed

                         technical support & remote administration
                         http://www.pugetsoundtechnology.com/

Reply via email to