% --------- listings --------- \usepackage{listings} % % contribute @ http://piratepad.net/latex-mxml-listings-preset % % Colors used by Flex Builder 3. % by Clovis, from http://blog.vxp.be/2009/05/23/latex-listings-actionscript-3/ \definecolor{purple}{rgb}{0.65, 0.12, 0.82} \definecolor{flexred}{rgb}{0.65, 0.01, 0.01} \definecolor{flexgreen}{rgb}{0, 0.6, 0} \definecolor{flexgray}{rgb}{0.25, 0.37, 0.75} \definecolor{flexblue}{rgb}{0, 0.2, 1} \definecolor{flexfunction}{rgb}{0.2, 0.6, 0.4} \definecolor{flexvar}{rgb}{0.4, 0.6, 0.8} \definecolor{black}{rgb}{0, 0, 0} \lstset{lineskip=-2pt, frame=single, framextopmargin=6pt, framexbottommargin=6pt, framexrightmargin=4pt, framexleftmargin=4pt, aboveskip=15pt, belowskip=10pt, rulecolor=\color{black}} % Define new language for listings. % by Clovis \lstdefinelanguage{ActionScript} { basicstyle=\ttfamily\scriptsize, sensitive=true, morestring=[b]", morestring=[d]/, morecomment=[l][\color{flexgreen}\ttfamily]{//}, morecomment=[s][\color{flexgreen}\ttfamily]{/*}{*/}, morecomment=[s][\color{flexgray}\ttfamily]{/**}{*/}, morecomment=[n][\color{flexblue}\ttfamily]{<}{>}, stringstyle=\color{flexred}\textbf, commentstyle=\color{flexgreen}, showstringspaces=false, numberstyle=\scriptsize, numberblanklines=true, showspaces=false, breaklines=true, showtabs=false, emph = {[1] class, package, interface }, emphstyle={[1]\color{purple}\textbf}, emph = {[2] internal, public, protected, private, super, this, import, new, extends, implements, void, true, false, as }, emphstyle={[2]\color{flexblue}\textbf}, emph = {[3] function }, emphstyle={[3]\color{flexfunction}\textbf}, emph = {[4] var }, emphstyle={[4]\color{flexvar}\textbf} } % Define new language for listings. % by Brian, from http://brianhoffmann.de/meinblog/2009/06/11/latex-mxml-listings-preset/ \lstdefinelanguage{MXML} { basicstyle=\ttfamily\scriptsize, sensitive=true, morecomment=[s][\color{flexred}\ttfamily]{}, commentstyle=\color{flexred}, morecomment=[s][\color{black}]{}, commentstyle=\color{black}, % morecomment=[n][\color{black}]{\{}{\}}, commentstyle=\color{black}, string=[b]", stringstyle=\color{flexred}, morestring=[b]', stringstyle=\color{flexred}, showstringspaces=false, numberstyle=\scriptsize, numberblanklines=true, showspaces=false, breaklines=true, showtabs=false, alsoletter={:}, keywords = [1] { mx:WindowedApplication, mx:Application, mx:Button, mx:Text, mx:HBox, mx:VBox }, keywordstyle={[1]\color{flexblue}}, % otherkeywords={<,>,/>,