@@ -218,7 +218,12 @@ renderExternal fmt width doc
218 decorate HTMLOutput (AnnData _ _) = tag "idris-data" Nothing
218 decorate HTMLOutput (AnnData _ _) = tag "idris-data" Nothing
219 decorate HTMLOutput (AnnType _ _) = tag "idris-type" Nothing
219 decorate HTMLOutput (AnnType _ _) = tag "idris-type" Nothing
220 decorate HTMLOutput AnnKeyword = tag "idris-keyword" Nothing
220 decorate HTMLOutput AnnKeyword = tag "idris-keyword" Nothing
221− decorate HTMLOutput (AnnTextFmt _) = id -- TODO
221+ decorate HTMLOutput (AnnTextFmt fmt) =
223+ BoldText -> mkTag "strong"
224+ ItalicText -> mkTag "em"
225+ UnderlineText -> tag "idris-underlined" Nothing
226+ where mkTag t x = "<"++t++">"++x++"</"++t++">"
222 decorate HTMLOutput (AnnTerm _ _) = id
227 decorate HTMLOutput (AnnTerm _ _) = id
223 decorate HTMLOutput (AnnSearchResult _) = id
228 decorate HTMLOutput (AnnSearchResult _) = id
224 decorate HTMLOutput (AnnErr _) = id
229 decorate HTMLOutput (AnnErr _) = id
@@ -241,7 +246,11 @@ renderExternal fmt width doc
241 decorate LaTeXOutput (AnnData _ _) = latex "IdrisData"
246 decorate LaTeXOutput (AnnData _ _) = latex "IdrisData"
242 decorate LaTeXOutput (AnnType _ _) = latex "IdrisType"
247 decorate LaTeXOutput (AnnType _ _) = latex "IdrisType"
243 decorate LaTeXOutput AnnKeyword = latex "IdrisKeyword"
248 decorate LaTeXOutput AnnKeyword = latex "IdrisKeyword"
244− decorate LaTeXOutput (AnnTextFmt _) = id -- TODO
249+ decorate LaTeXOutput (AnnTextFmt fmt) =
251+ BoldText -> latex "textbf"
252+ ItalicText -> latex "emph"
253+ UnderlineText -> latex "underline"
245 decorate LaTeXOutput (AnnTerm _ _) = id
254 decorate LaTeXOutput (AnnTerm _ _) = id
246 decorate LaTeXOutput (AnnSearchResult _) = id
255 decorate LaTeXOutput (AnnSearchResult _) = id
247 decorate LaTeXOutput (AnnErr _) = id
256 decorate LaTeXOutput (AnnErr _) = id
@@ -260,7 +269,8 @@ renderExternal fmt width doc
260 ".idris-function {color: green; }",
269 ".idris-function {color: green; }",
261 ".idris-keyword { font-weight: bold; }",
270 ".idris-keyword { font-weight: bold; }",
262 ".idris-bound { color: purple; }",
271 ".idris-bound { color: purple; }",
263− ".idris-implicit { font-style: italic; }"]
272+ ".idris-implicit { font-style: italic; }",
273+ ".idris-underlined { text-decoration: underline; }"]
264 wrap LaTeXOutput str =
274 wrap LaTeXOutput str =
265 concat . intersperse "\n" $
275 concat . intersperse "\n" $
266 ["\\documentclass{article}",
276 ["\\documentclass{article}",