Skip to content

Commit

Permalink
wrap output in mathit
Browse files Browse the repository at this point in the history
  • Loading branch information
patritzenfeld committed Nov 6, 2024
1 parent bea9556 commit eb05a9d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/TermTasks/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ import DataType (Term)


mathifySignature :: String -> String
mathifySignature s = replace "->" "\\to" (replace "x" "\\times" s)
mathifySignature s = open
++ replace " : " (withMathit " : ")
(replace " -> " (withMathit " \\to ") $
replace " x " (withMathit " \\times ") s)
++ close
where
open = "\\mathit{"
close = "}"
withMathit snip = close ++ snip ++ open

itemifyTerm :: (Int, Term String) -> String
itemifyTerm (i,t) = show i ++ ".\\," ++ show t

0 comments on commit eb05a9d

Please sign in to comment.