I use your template book.
I want to crate an environment aligning with text margin for Matlab codes like \newenvironment{theorem} , ...
Some tools are provided, however, I cant assemble them.
Code: Select all
\documentclass{article}
\usepackage{tikz}
\RequirePackage[framemethod=TikZ]{mdframed}
% Matlab box
\newmdenv[skipabove=7pt, skipbelow=7pt,
backgroundcolor=black!5, linecolor=ocre, innerleftmargin=5pt,
innerrightmargin=5pt, innertopmargin=5pt, leftmargin=0cm,
rightmargin=0cm, roundcorner=5pt,
innerbottommargin=5pt]{mBox}
\newenvironment{matlabcode}{\begin{mBox}??????\end{mBox}}
% including verbatim (if it is possible)
\begin{document}
\begin{matlabcode}
a = w*f;
k = sin(x);
\end{matlabcode}
\end{document}