Before I resolved a problem to set up a minted environment in LaTeX.
Now, I would like to add this environment as a LyX layout.
I have tried with
Style MatlabCode
Category MainText
Margin Static
LatexType Environment
LatexName matlabcode
NextNoIndent 1
LeftMargin MMM
RightMargin MMM
ParIndent MM
ParSkip 0
ItemSep 0
TopSep 0.5
BottomSep 0.5
ParSep 0
Align Block
AlignPossible Block, Left, Right, Center
Preamble
\usepackage{minted}
\newminted{matlab}{mathescape,linenos=true}
EndPreamble
End
Everything works and pdflatex gives me a nice PDF. The problem is that, when I use the environment, which is similar to a quotation layout in LyX, in the output I get blank lines, like this

And those weird brackets, since it should be just [2;3]
Does anyone know about this?
sudo apt-get install python-pygmentson Ubuntu. – scottkosty Oct 17 '13 at 23:22pygments, that's why it compiles well, but the output is weird. Thanks for the tips – PerroNoob Oct 18 '13 at 09:56~/.lyx. That is something different. I'm referring to Document > Settings > Local Layout. If you put the layout in there, everything is self-contained and it makes it easy for someone to come along and try to help. It's also useful for other reasons. – scottkosty Oct 18 '13 at 16:52matlab-prettifierpackage; see this answer. – jub0bs Apr 28 '14 at 16:31