153 |
154 |
154 |
155 |
155 (* state *) |
156 (* state *) |
156 |
157 |
157 val browser_info = ref empty_browser_info; |
158 val browser_info = ref empty_browser_info; |
158 |
|
159 fun change_browser_info f = browser_info := map_browser_info f (! browser_info); |
159 fun change_browser_info f = browser_info := map_browser_info f (! browser_info); |
|
160 |
|
161 val suppress_tex_source = ref false; |
|
162 fun no_document f x = Library.setmp suppress_tex_source true f x; |
160 |
163 |
161 fun init_theory_info name info = |
164 fun init_theory_info name info = |
162 change_browser_info (fn (theories, tex_index, html_index, graph) => |
165 change_browser_info (fn (theories, tex_index, html_index, graph) => |
163 (Symtab.update ((name, info), theories), tex_index, html_index, graph)); |
166 (Symtab.update ((name, info), theories), tex_index, html_index, graph)); |
164 |
167 |
180 |
183 |
181 fun add_graph_entry e = |
184 fun add_graph_entry e = |
182 change_browser_info (fn (theories, tex_index, html_index, graph) => |
185 change_browser_info (fn (theories, tex_index, html_index, graph) => |
183 (theories, tex_index, html_index, ins_graph_entry e graph)); |
186 (theories, tex_index, html_index, ins_graph_entry e graph)); |
184 |
187 |
185 fun add_tex_source name txt = change_theory_info name (fn (tex_source, html_source, html) => |
188 fun add_tex_source name txt = |
186 (Buffer.add txt tex_source, html_source, html)); |
189 if ! suppress_tex_source then () |
|
190 else change_theory_info name (fn (tex_source, html_source, html) => |
|
191 (Buffer.add txt tex_source, html_source, html)); |
187 |
192 |
188 fun add_html_source name txt = change_theory_info name (fn (tex_source, html_source, html) => |
193 fun add_html_source name txt = change_theory_info name (fn (tex_source, html_source, html) => |
189 (tex_source, Buffer.add txt html_source, html)); |
194 (tex_source, Buffer.add txt html_source, html)); |
190 |
195 |
191 fun add_html name txt = change_theory_info name (fn (tex_source, html_source, html) => |
196 fun add_html name txt = change_theory_info name (fn (tex_source, html_source, html) => |