I am using listing
\lstset{language=Matlab,%
%basicstyle=\color{red},
breaklines=false,%
morekeywords={matlab2tikz},
keywordstyle=\color{blue},%
morekeywords=[2]{1}, keywordstyle=[2]{\color{black}},
identifierstyle=\color{black},%
stringstyle=\color{mylilas},
commentstyle=\color{mygreen},%
showstringspaces=false,%without this there will be a symbol in the places where there is a space
numbers=none,%
numberstyle={\tiny \color{black}},% size of the numbers
numbersep=1pt, % this defines how far the numbers are from the text
emph=[1]{for,end,break},emphstyle=[1]\color{red}, %some words to emphasise
%emph=[2]{word1,word2}, emphstyle=[2]{style},
}
and
\begin{lstlisting}[frame=single]
for j=1:100:
j
end
\end{lstlisting}
I have three problems: 1) How do I remove the black box around the code? 2) How can I reduce interline in the code? 3) How can I copy-paste from my matlab code without loosing indentation? Because if I paste in my editor they start all from the same point and it's ugly
frame=singleif you don't want a frame, 3) is an editor-specific problem. TeXshop, at least, didn't modify your example when I pasted it in. For 2), are you talking about interline spacing? Mine looks like normal single-spaced text and reducing it might cause overlap.matlab-prettifier– percusse Sep 28 '16 at 21:52