Commit 9bfd4922 authored by Simon Marlow's avatar Simon Marlow
Browse files

Add the ability to colourise the haskell-prime parts of the report

parent 37cba5c7
......@@ -4,6 +4,7 @@
\usepackage{times}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[dvipsnames,usenames]{color}
\evensidemargin=0in
\oddsidemargin=.5in
......@@ -315,6 +316,11 @@
\newcommand{\subsubsubsection}{\subsubsection*}
\newcommand{\subsubsubsubsection}{\subsubsubsection*}
% Haskell-prime
\definecolor{prime}{named}{DarkOrchid}
\newcommand{\hprime}[1]{\color{prime}#1\normalcolor}
\newenvironment{haskellprime}{\color{prime}}{\normalcolor}
%\sloppy
% a few hyphenation patterns, anyone?
......
......@@ -1025,9 +1025,11 @@ texCommands = [("\\",doEol),
("geq2",emit (HProtect [symFont [HSpecial 179],HString "2"])
.|. use ">=2"),
("geq0",emit (HProtect [symFont [HSpecial 179],HString "0"])
.|. use ">=0")
.|. use ">=0"),
("hprime", embed $ \h -> HProtect [prime_font, h])
]
prime_font = HColor "#6600CC"
use :: String -> PCFun
use str = emit (HString str)
......@@ -1134,6 +1136,7 @@ doBlock a d hs =
[HFont Bold, HString "Axiom", HLineBreak],
h,
HPara]
"haskellprime" -> HProtect [prime_font, h]
_ -> HString ("Unknown begin: \\begin{" ++ a ++ "}\n")
where (opts,d') = case (break (== ';') d) of
(str,"") -> ("", str)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment