\begin{filecontents}{myheadings.sty}
\newcommand{\ps@normalheadings}
{
    \renewcommand{\@oddhead}
        {\footnotesize\filetitle\ {\ttfamily\underline{\mfilename}}\hfill\thepage}
    \renewcommand{\@evenhead}{\@oddhead}
    \renewcommand{\@oddfoot}{}
    \renewcommand{\@evenfoot}{\@oddfoot}
}
\newcommand{\ps@firstpageheadings}
{
    \renewcommand{\@oddhead}
        {\underline{\matlabversion}\hfill\underline{\irisversion}}
    \renewcommand{\@evenhead}{\@oddhead}
    \renewcommand{\@oddfoot}{}
    \renewcommand{\@evenfoot}{\@oddfoot}
}
\end{filecontents}

\documentclass[10pt,$papersize$,fleqn]{article}

\usepackage[T1]{fontenc}
\usepackage[$papersize$,portrait,scale=$textscale$,pdftex]{geometry}
\usepackage{amsmath,color,sectsty,graphicx,listings}
\usepackage{myheadings}
\usepackage{concmath}

$packages$

\newcommand{\mylcmss}{\fontfamily{lcmss}\selectfont}

\sectionfont{\centering\Large\mdseries\mylcmss}
\subsectionfont{\centering\large\mdseries\mylcmss}

\renewcommand{\thesubsection}{\arabic{subsection}}
\renewcommand{\abstractname}{{\mdseries\mylcmss Introduction}}
\renewcommand{\contentsname}{Contents}

\definecolor{outputcodecolor}{rgb}{0,0,0.68}
\definecolor{inputcodebgcolor}{rgb}{0.90,0.90,0.90}
\definecolor{outputcodebgcolor}{rgb}{0.95,0.95,1}
\definecolor{bookmarkcolor}{rgb}{0.80,0,0}

\newcommand{\codesizeintitle}{\Large}
\newcommand{\codesizeintext}{\small}
\newcommand{\codesizeinabstract}{\footnotesize}
\newcommand{\codesize}{}

\newenvironment{myabstract}
{\renewcommand{\codesize}{\codesizeinabstract}\begin{abstract}}
{\end{abstract}\renewcommand{\codesize}{\codesizeintext}}

\lstdefinestyle{inputcode}{
   breaklines=false,
   language={},
   backgroundcolor=\color{inputcodebgcolor},
   columns=flexible,
   keepspaces=true,
   frame=single,rulecolor=\color{inputcodebgcolor},framerule=0.1em,
   numbers=left,
   numberstyle={\ttfamily},
   basicstyle={\color{black}\ttfamily\codesize},
   escapechar=`, %escapechar=",
   linewidth=1000em,   
}

\lstdefinestyle{outputcode}{
   breaklines=false,
   language={},
   backgroundcolor=\color{outputcodebgcolor},
   columns=flexible,
   keepspaces=true,
   frame=single,rulecolor=\color{outputcodebgcolor},framerule=0.1em,
   numbers=none,columns=flexible,
   basicstyle={\color{outputcodecolor}\ttfamily\codesize},
   escapechar={},
   linewidth=1000em,   
}

\newcommand{\filetitle}{}
\newcommand{\mfilename}{}
\newcommand{\matlabversion}{$matlabversion$}
\newcommand{\irisversion}{$irisversion$}
\newcommand{\mfilenametitle}[1]{\\ {\normalsize{\ttfamily \underline{#1}}}}

%%%% Cell environment %%%%%
\newenvironment{cell}[1]{
    \subsection$numbered${#1}}
{}

%%%% Split cell environment %%%%%
\newenvironment{splitcell}{}{}

%%%%% Intro text environment %%%%%
\newenvironment{introtext}{}{\medskip\par}

%%%%% Input code environment %%%%%
\newenvironment{inputcode}{
    \lstset{style=inputcode}}
{}

%%%%% Ouput code environment %%%%%
\newenvironment{outputcode}{
    \lstset{style=outputcode}}
{}

%%%%% Bookmarks %%%%%
\newcommand{\circled}[1]
{{\large\textcircled{\footnotesize\sffamily\bfseries\raisebox{0.2pt}{#1}}}}
\newcommand{\bookmark}[1]{\textcolor{bookmarkcolor}{\circled{#1}}}

%%%%% Table of contents %%%%%
\newcommand{\mytableofcontents}
{
    \tableofcontents
    %\bigskip\bigskip\par
    \pagebreak
}

%%%%% Title page %%%%%
\newcommand{\introduction}[2]
{\title{\fontfamily{lcmss}\selectfont#1#2}
\author{$author$}
\date{\medskip $date$}
\renewcommand{\codesize}{\codesizeintitle}
\begin{center}
\begin{minipage}{0.75\textwidth}
\maketitle
\end{minipage}
\end{center}
\renewcommand{\codesize}{\codesizeintext}
\thispagestyle{firstpageheadings}}
\newcommand{\byauthor}{\textit{by}\ }
\newcommand{\atevent}{\textit{at}\ }
\renewcommand{\and}{\\[2pt] \itshape}

\pagestyle{normalheadings}

\renewcommand{\today}{\number\day\space\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\year}

\linespread{$linespread$}

$preamble$

\begin{document}

\renewcommand{\codesize}{\codesizeintext}

$body$

\end{document}