equal
deleted
inserted
replaced
20 |
20 |
21 sealed case class HTML_Document(title: String, content: String) |
21 sealed case class HTML_Document(title: String, content: String) |
22 |
22 |
23 class HTML_Context |
23 class HTML_Context |
24 { |
24 { |
|
25 /* cached theory exports */ |
|
26 |
25 val cache: Term.Cache = Term.Cache.make() |
27 val cache: Term.Cache = Term.Cache.make() |
26 |
28 |
27 private val already_presented = Synchronized(Set.empty[String]) |
29 private val already_presented = Synchronized(Set.empty[String]) |
28 def register_presented(nodes: List[Document.Node.Name]): List[Document.Node.Name] = |
30 def register_presented(nodes: List[Document.Node.Name]): List[Document.Node.Name] = |
29 already_presented.change_result(presented => |
31 already_presented.change_result(presented => |
41 val thy = make_thy |
43 val thy = make_thy |
42 (thy, thys + (thy_name -> thy)) |
44 (thy, thys + (thy_name -> thy)) |
43 } |
45 } |
44 }) |
46 }) |
45 } |
47 } |
|
48 |
|
49 |
|
50 /* HTML content */ |
46 |
51 |
47 def head(title: String, rest: XML.Body = Nil): XML.Tree = |
52 def head(title: String, rest: XML.Body = Nil): XML.Tree = |
48 HTML.div("head", HTML.chapter(title) :: rest) |
53 HTML.div("head", HTML.chapter(title) :: rest) |
49 |
54 |
50 def source(body: XML.Body): XML.Tree = HTML.pre("source", body) |
55 def source(body: XML.Body): XML.Tree = HTML.pre("source", body) |