Bonhôte, André wrote:
On 27.12.2005, at 16:48, Bonhôte, André wrote:
a _long_ standing bug in LyX. You need to hit ctrl-return
at the end of every line, otherwise LyX inserts an additional
linebreak.
Hm ... how does the LyX-Code work then? I can live with CTRL- return,
but I don't see how LyX-Code is done then.
By the way, just found that CMD-return (it's a Mac (-8) results in a \ \
at the end of each line. But this goes into my first problem, I suppose
...
yes. the lyx-code layout is wrong here
#===================================================================
# Style ProgrammingCode - Herbert Voss 20051227
#===================================================================
Style ProgCode
Margin Static
LatexType Environment
LatexName ProgCode
NextNoIndent 1
LeftMargin MMM
ParSkip 0.4
TopSep 1.5
BottomSep 0.7
ParSep 0.3
Align Left
AlignPossible Left
Preamble
\RequirePackage{xcolor}
\RequirePackage{listings}
\lstnewenvironment{ProgCode}
{ \lstset{language=SQL,basicstyle=\small,
keywordstyle=\color{blue}, commentstyle=\color{red}, numbers=left,
numberstyle=\tiny, stepnumber=2, numbersep=5pt}
}
{}
EndPreamble
End
to get it right, you have to define the \\ as a comment,
which isn't print -> listings documentation
Herbert