[TxMt] command to convert TM theme to LaTeX listings package style?

Tim Bates timothy.c.bates at gmail.com
Tue Aug 5 14:58:27 UTC 2014


Hi,
We’re writing a booking (currently LaTeX) and I’d like to be able to use TM themes in the code listings.

Any solutions for that?

We’re using  LaTeX packages “listings” + “color” to do the syntax highlighting. It allows statements such as this:

\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
 
\lstdefinestyle{mystyle}{
    backgroundcolor=\color{backcolour},   
    commentstyle=\color{codegreen},
    keywordstyle=\color{magenta},
    numberstyle=\tiny\color{codegray},
    stringstyle=\color{codepurple},
    basicstyle=\footnotesize,
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=5pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=2
}

Pretty basic… Anyone seen anything better (pygments?) Or even a way to convert themes to this style?

Thank you, and best wishes,
tim


More information about the textmate mailing list