von Einfachkrank » Di 27. Nov 2012, 11:55
esdd hat geschrieben:
du könntest die Option xleftmargin dafür verwenden
Das Problem hier ist, dass dann der Bereich sichtbar über den Rand hinaussteht, da ich eine Hintergrundfarbe definiert habe.
Hier meine Standard-Konfiguration:
\lstset{
basicstyle=\ttfamily\scriptsize\mdseries,
keywordstyle=\bfseries\color[rgb]{0,0,1},
identifierstyle=,
commentstyle=\color[rgb]{0,0.58,0},
stringstyle=\itshape\color[rgb]{0.65,0.16,0},
numbers=left,
numberstyle=\tiny,
stepnumber=0,
breaklines=true,
frame=none,
showstringspaces=false,
tabsize=4,
backgroundcolor=\color[rgb]{0.9,0.9,0.9},
captionpos=b,
float=htbp,
language=Matlab,
xleftmargin=15pt,
xrightmargin=15pt
}
[quote="esdd"]
du könntest die Option xleftmargin dafür verwenden
[/quote]
Das Problem hier ist, dass dann der Bereich sichtbar über den Rand hinaussteht, da ich eine Hintergrundfarbe definiert habe.
Hier meine Standard-Konfiguration:
[code]
\lstset{
basicstyle=\ttfamily\scriptsize\mdseries,
keywordstyle=\bfseries\color[rgb]{0,0,1},
identifierstyle=,
commentstyle=\color[rgb]{0,0.58,0},
stringstyle=\itshape\color[rgb]{0.65,0.16,0},
numbers=left,
numberstyle=\tiny,
stepnumber=0,
breaklines=true,
frame=none,
showstringspaces=false,
tabsize=4,
backgroundcolor=\color[rgb]{0.9,0.9,0.9},
captionpos=b,
float=htbp,
language=Matlab,
xleftmargin=15pt,
xrightmargin=15pt
}
[/code]