From f34f0420899594847b6e7633a4488f034a4300f6 Mon Sep 17 00:00:00 2001 From: msozeau Date: Mon, 29 Dec 2008 16:58:51 +0000 Subject: Produce better html code with coqdoc and improve doc: - correct nesting of a and div (fixes bug #2022) - use span instead of div for inline parts - fix standard lib template missing/new links - use -g to produce the stdlib doc (no proofs) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11724 85f007b7-540e-0410-9357-904b9bb8a0f7 --- tools/coqdoc/coqdoc.css | 10 +++++++--- tools/coqdoc/output.ml | 32 +++++++++++++++++--------------- 2 files changed, 24 insertions(+), 18 deletions(-) (limited to 'tools') diff --git a/tools/coqdoc/coqdoc.css b/tools/coqdoc/coqdoc.css index bb9d2886c7..c4e0663cdd 100644 --- a/tools/coqdoc/coqdoc.css +++ b/tools/coqdoc/coqdoc.css @@ -43,8 +43,6 @@ body { padding: 0px 0px; #main .section { background-color:#90bdff; font-size : 175% } -#main code { font-family: monospace } - #main .doc { margin: 0px; padding: 10px; font-family: sans-serif; @@ -55,7 +53,13 @@ body { padding: 0px 0px; background-color: #90bdff; border-style: plain} -#main .doc code { font-family: monospace} +.inlinecode { + display: inline; + font-family: monospace } + +.code { + display: block; + font-family: monospace } /* Pied de page */ diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml index 57ccce7640..b38cf7b9a4 100644 --- a/tools/coqdoc/output.ml +++ b/tools/coqdoc/output.ml @@ -446,38 +446,40 @@ module Html = struct let ident_ref m fid typ s = match find_module m with | Local -> - printf "" m fid; - printf "
" typ; raw_ident s; printf "
" + printf "" typ; + printf "" m fid; raw_ident s; + printf "" | Coqlib when !externals -> let m = Filename.concat !coqlib m in + printf "" typ; printf "" m fid; - printf "
" typ; raw_ident s; printf "
" + raw_ident s; printf "
" | Coqlib | Unknown -> - printf "
" typ; raw_ident s; printf "
" + printf "" typ; raw_ident s; printf "" let ident s loc = if is_keyword s then begin - printf "
"; + printf ""; raw_ident s; - printf "
" + printf "" end else begin try (match Index.find !current_module loc with | Def (fullid,ty) -> - printf "" fullid; - printf "
" (type_name ty); raw_ident s; printf "
" + printf "" (type_name ty); + printf "" fullid; raw_ident s; printf "" | Mod (m,s') when s = s' -> module_ref m s | Ref (m,fullid,ty) -> ident_ref m fullid (type_name ty) s | Mod _ -> - printf "
"; raw_ident s ; printf "
") + printf ""; raw_ident s ; printf "") with Not_found -> if is_tactic s then - (printf "
"; raw_ident s; printf "
") + (printf ""; raw_ident s; printf "") else - (printf "
"; raw_ident s ; printf "
") + (printf ""; raw_ident s ; printf "") end let with_html_printing f tok = @@ -508,9 +510,9 @@ module Html = struct let stop_item () = reach_item_level 0 - let start_coq () = if not !raw_comments then printf "\n" + let start_coq () = if not !raw_comments then printf "
\n" - let end_coq () = if not !raw_comments then printf "\n" + let end_coq () = if not !raw_comments then printf "
\n" let start_doc () = if not !raw_comments then @@ -524,9 +526,9 @@ module Html = struct let end_code () = end_coq (); start_doc () - let start_inline_coq () = printf "" + let start_inline_coq () = printf "" - let end_inline_coq () = printf "" + let end_inline_coq () = printf "" let paragraph () = stop_item (); printf "\n

\n" -- cgit v1.2.3