This segment is what I have at the moment, granted I know it doesn't work, but it should give you an idea what I mean.
Code: Select all
\usepackage{xifthen}
\usepackage{minted}
\newcommand{\codesrc}[5][]{%
\inputminted[%
\ifthenelse{\isempty{#1}}{}{label=#1,}%
frame=lines,%
framesep=1.2em,%
linenos=true,%
\ifthenelse{\isempty{#2}}{}{firstnumber=#2,firstline=#2,}{}%
\ifthenelse{\isempty{#3}}{}{lastline=#3,}{}%
]{#4}{#5}%
}
OK, those are the two possible ideas I have. If anyone has any constructive advice or ideas on this, please comment.