I am progressing... I have now defined a custom layout:
InsetLayout Schunk
LyxType custom
LabelString <<>>=...
LatexType none
Decoration minimalistic
Font
Family typewriter
Color latex
Size small
EndFont
LabelFont
Family typewriter
Color latex
Series Bold
Size small
EndFont
BgColor listingsbg
MultiPar true
PassThru true
KeepEmpty true
FreeSpacing true
ForceLTR true
ForcePlain true
End
This solves my problem with respect of line feed. However, I cannot
tab/backtab in this environment. LyX says "command disabled" when I try
tab-insert or tab-delete commands.
How can I activate these commands in my layout, sa it is in listings?
Thanks in advance.
Best,
PhG
Philippe Grosjean wrote:
Uwe Stöhr wrote:
Philippe Grosjean schrieb:
I am defining a new style that should contain some program code. I
would like to get the same behavior as listings, i.e., keep line feed
and allow entering tabulation. Is it a way to define my style so that
it behaves that way?
I don't understand. What you want is what listings provide. What do
you miss with listings?
regards Uwe
No, I want the same behavior as listings, but for other purposes that do
not fit in it. Actually, I define a Schunk environment for using Sweave
(literate programming). Thus, the content is evaluated in R and should
not appear in a listing. Yet, I would like to get the same convenience
for editing my R code inside LyX as I got in listings (keep line feed
and use tabulations).
Thanks for your help.
Philippe