Skip to content

Instantly share code, notes, and snippets.

@dorchard
Last active August 16, 2017 22:39
Show Gist options
  • Save dorchard/2ef456b5c9bccd5bbe3c0c2c646d233a to your computer and use it in GitHub Desktop.
Save dorchard/2ef456b5c9bccd5bbe3c0c2c646d233a to your computer and use it in GitHub Desktop.
Auto highlighting with lhs2TeX
% Highlight comments in darkgreen
\definecolor{darkgreen}{rgb}{0,0.5,0}
\newcommand{\commenthighlight}{\color{darkgreen}\quad-{}- }
\let\onelinecomment=\commenthighlight
% Highlight constructors in darkblue
\definecolor{darkblue}{rgb}{0,0,0.5}
\renewcommand{\Conid}[1]{\textcolor{darkblue}{\textit{#1}}}
% Highlight variables (if you want to do them in some other color, uncomment)
% \renewcommand{\Varid}[1]{\textcolor{black}{\textit{#1}}}
@dorchard
Copy link
Author

Stick this after any %include of .fmt files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment