MathJax isn’t currently supported out-of-the-box with Octopress. The main reason seems to be that the Markdown processor — rdiscount — doesn’t deal with the MathJax escaping very well. However, since Maruku supports it, I thought I’d try switching over.
I made the following two changes:
switch Markdown processors in _config.yml
enable MathJax in source/_includes/custom/head.html link
importData.List(group)-- DatatypestypeEncoded=[(Int,Char)]-- An encoded String with form [(times, char), ...]typeDecoded=String-- Takes a decoded string and returns an encoded list of tuplesrlencode::Decoded->Encodedrlencode=map(\g->(lengthg,headg)).group-- Takes an encoded list of tuples and returns the associated decoded Stringrldecode::Encoded->Decodedrldecode=concatMapdecodeTuplewheredecodeTuple(n,c)=replicatencmain::IO()main=do-- Get inputputStr"String to encode: "input<-getLine-- Output encoded and decoded versions of inputletencoded=rlencodeinputdecoded=rldecodeencodedputStrLn$"Encoded: "++showencoded++"\nDecoded: "++showdecoded