Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Everything related to code/listings
- \definecolor{comment_green}{rgb}{0.0, 0.35, 0.0}
- \definecolor{keyword_blue}{rgb}{0.0, 0.0, 0.5}
- \definecolor{attribute_purple}{rgb}{0.4, 0.0, 0.4}
- \colorlet{background_gray}{gray!25}
- \lstdefinestyle{codeinline}{
- backgroundcolor=\color{background_gray},
- basicstyle=\footnotesize\ttfamily,
- breaklines=true,
- }
- \lstdefinestyle{codelisting}{
- backgroundcolor=\color{background_gray},
- basicstyle=\footnotesize\ttfamily,
- commentstyle=\color{comment_green},
- keywordstyle=\color{keyword_blue},
- frame=none,
- breaklines=true,
- numbers=left
- }
- \lstdefinestyle{ebnflisting}{
- backgroundcolor=\color{white},
- basicstyle=\footnotesize\ttfamily,
- commentstyle=\color{comment_green},
- keywordstyle=\color{keyword_blue},
- frame=none,
- breaklines=false,
- numbers=none
- }
- %% Commands that map to other latex commands or style
- \newcommand{\code}[1]{\colorbox{background_gray}{\lstinline[style=codeinline]$#1$}}
- \newcommand{\rustcode}[1]{\colorbox{background_gray}\lstinline[style=codeinline, language=Rust]$#1$}
- \floatstyle{ruled}
- \newfloat{listing}{htbp!}{lol}[chapter]
- \floatname{listing}{Code Listing}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement