>>>>> "John" == John D Blair <[EMAIL PROTECTED]> writes:

John> This is probably a trival question for all you LaTeX hackers,
John> but I'm not sure how to solve it. I would like to redefine the
John> font & fontsize for the LyX-Code style. My problem is that I
John> cannot fit 80 columns on a page, so most of my code listings
John> wrap. How can I do this?

You have to change the definition in lib/layouts/lyxmacros.inc (you
can just make a local copy of this file in ~/.lyx/layouts). The
definition of LyX-Code is as follows. The place to modify is marked
with <<<<<<<<

I'll modify this code to use \verbatim@font as font, so that it is
easier to redefine.

JMarc

# Lyx-Code style definition
Style LyX-Code
  Margin                Static
  LatexType             Environment
  LatexName             lyxcode
  NextNoIndent          1
  LeftMargin            MMM
  RightMargin           MMM
  TopSep                0.5
  BottomSep             0.5
  Align                 Left
  AlignPossible         Block, Left, Right, Center
  LabelType             No_Label
  FreeSpacing           1

  # define the environment lyxcode
  Preamble
  \newenvironment{lyxcode}
    {\begin{list}{}{
      \setlength{\rightmargin}{\leftmargin}
      \raggedright
      \setlength{\itemsep}{0pt}
      \setlength{\parsep}{0pt}
#      \ttfamily}% <<<<<<<<<<< replaced by the line below
       \ttfamily\small}%
     \item[]}
    {\end{list}}
  EndPreamble

  # standard font definition
  Font 
    Family              Typewriter
  EndFont

End

Reply via email to