Permalink
Browse files

Removed hardcoded spaces

  • Loading branch information...
1 parent b9d9c58 commit 4c16e35172ec6d2de112211545275e401bbe14c3 @spockz committed Dec 16, 2011
Showing with 20 additions and 20 deletions.
  1. +18 −18 src/Language/LaTeX.hs
  2. +1 −1 src/Literate/Haskell.hs
  3. +1 −1 src/LiterateHighlighter.hs
View
@@ -20,24 +20,24 @@ makeLatexSafe = replace ">" "\\textgreater"
{- This part is to conserve some lhs2TeX behaviour. Really shouldn't be here... -}
. replace "=" "\\ = \\ "
-- . replace "_" "\\ \\anonymous\\ "
- . replace "$" "\\ \\mathbin{\\$}\\ "
- . replace "&&" "\\ \\mathrel{\\wedge}\\ "
- . replace "||" "\\ \\mathrel{\\vee}\\ "
- . replace "<-" "\\ \\leftarrow\\ "
- . replace "->" "\\ \\to\\ "
- . replace "=>" "\\ \\Rightarrow\\ "
- . replace "==" "\\ \\equiv\\ "
- . replace "++" "\\ \\plus\\ "
- . replace "/=" "\\ \\not\\equiv\\ "
- . replace "<=" "\\ \\leq\\ "
- . replace ">=" "\\ \\geq\\ "
- . replace ">>" "\\ \\sequ\\ "
- . replace ">>>" "\\ \\ggg\\ "
- . replace "<<<" "\\ \\lll\\ "
- . replace ">>=" "\\ \\bind\\ "
- . replace "=<<" "\\ \\rbind\\ "
- . replace "undefined" "\\bot\\ "
- . replace "not" "\\ \\neg "
+ . replace "$" "{\\$} "
+ . replace "&&" "\\mathrel{\\wedge}"
+ . replace "||" "\\mathrel{\\vee}"
+ . replace "<-" "\\leftarrow"
+ . replace "->" "\\to"
+ . replace "=>" "\\Rightarrow"
+ . replace "==" "\\equiv"
+ . replace "++" "\\plus"
+ . replace "/=" "\\not\\equiv"
+ . replace "<=" "\\leq"
+ . replace ">=" "\\geq"
+ . replace ">>" "\\seq"
+ . replace ">>>" "\\ggg"
+ . replace "<<<" "\\lll"
+ . replace ">>=" "\\bind"
+ . replace "=<<" "\\rbind"
+ . replace "undefined" "\\bot"
+ . replace "not" "\\neg"
-- %format _ = "\anonymous "
View
@@ -142,7 +142,7 @@ mapping = [
mtypes :: SimpleInfo -> [(String, String)]
mtypes SimpleInfo{types} = map dp types
-moperators SimpleInfo{operators} = map (\ a -> (a, "\\ \\mathbin{"++ makeLatexSafe a++"}\\ "))
+moperators SimpleInfo{operators} = map (\ a -> (a, "\\mathbin{"++ makeLatexSafe a++"}"))
operators
mconstructors SimpleInfo{constructors} = map dp constructors
mfunctions SimpleInfo{functions } = map dp functions
@@ -43,7 +43,7 @@ main = do args <- cmdArgsRun standard
else
printFormatting args
- where printFormat keyword (seek, rep) = "%format " ++ seek ++ " = \" {\\lhsCH" ++ keyword ++ "{" ++ rep ++ "}}\""
+ where printFormat keyword (seek, rep) = "%format " ++ seek ++ " = \"{\\lhsCH" ++ keyword ++ "{" ++ rep ++ "}}\""
writeOutput output mapping si =
mapM_ (\(keyword, f) -> mapM_ (hPutStrLn output . printFormat keyword)
(filter lhs2TeXSafe (f si))

0 comments on commit 4c16e35

Please sign in to comment.