Last active
May 25, 2017 14:41
-
-
Save mstankie/2bd3da2c7ecb12a39f967044519f1cfa to your computer and use it in GitHub Desktop.
Styles for listings package -different languages listings in LaTeX.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\definecolor{mygreen}{rgb}{0,0.6,0} | |
\definecolor{mygray}{rgb}{0.5,0.5,0.5} | |
\definecolor{mymauve}{rgb}{0.58,0,0.82} | |
\lstdefinestyle{customc}{ | |
belowcaptionskip=1\baselineskip, | |
breaklines=true, | |
frame=L, | |
xleftmargin=\parindent, | |
language=C, | |
showstringspaces=false, | |
basicstyle=\footnotesize\ttfamily, | |
keywordstyle=\bfseries\color{mygray}, | |
commentstyle=\itshape\color{mygreen}, | |
identifierstyle=\color{blue}, | |
stringstyle=\color{mymauve}, | |
numbers=left, | |
numbersep=12pt, | |
numberstyle=\tiny\color{black}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{listings} | |
% ... | |
\begin{lstlisting}[language=C, style=customc] | |
void test() {} | |
\end{lstlisting} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment