src/Pure/Thy/html.ML
changeset 17221 6cd180204582
parent 17209 2ae243868a62
child 17412 e26cb20ef0cc
equal deleted inserted replaced
17220:b41d8e290bf8 17221:6cd180204582
   203   val escape = fn "<" => "&lt;" | ">" => "&gt;" | "&" => "&amp;" | c => c;
   203   val escape = fn "<" => "&lt;" | ">" => "&gt;" | "&" => "&amp;" | c => c;
   204 
   204 
   205   fun output_sym s =
   205   fun output_sym s =
   206     if Symbol.is_raw s then (1.0, Symbol.decode_raw s)
   206     if Symbol.is_raw s then (1.0, Symbol.decode_raw s)
   207     else
   207     else
   208       (case Symtab.lookup (html_syms, s) of SOME x => x
   208       (case Symtab.curried_lookup html_syms s of SOME x => x
   209       | NONE => (real (size s), translate_string escape s));
   209       | NONE => (real (size s), translate_string escape s));
   210 
   210 
   211   fun output_sub s = apsnd (enclose "<sub>" "</sub>") (output_sym s);
   211   fun output_sub s = apsnd (enclose "<sub>" "</sub>") (output_sym s);
   212   fun output_sup s = apsnd (enclose "<sup>" "</sup>") (output_sym s);
   212   fun output_sup s = apsnd (enclose "<sup>" "</sup>") (output_sym s);
   213   fun output_loc s = apsnd (enclose "<span class=\"loc\">" "</span>") (output_sym s);
   213   fun output_loc s = apsnd (enclose "<span class=\"loc\">" "</span>") (output_sym s);