diff options
author | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-08-06 15:25:16 +0000 |
---|---|---|
committer | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-08-06 15:25:16 +0000 |
commit | 0f3147561c3558e2c6d5c0ec1d100ec746aa716e (patch) | |
tree | dae0543a0a91975608764cca0081e6ccc8a20c1f /tools/coqdoc | |
parent | 893a3ac7b2815b538206811e00c0747865726dcd (diff) |
Coqdoc inlined verbatim_char in latex
Patch by Adam Chilipala.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15690 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools/coqdoc')
-rw-r--r-- | tools/coqdoc/cpretty.mll | 6 | ||||
-rw-r--r-- | tools/coqdoc/output.ml | 4 | ||||
-rw-r--r-- | tools/coqdoc/output.mli | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tools/coqdoc/cpretty.mll b/tools/coqdoc/cpretty.mll index b96200091..3f780a57d 100644 --- a/tools/coqdoc/cpretty.mll +++ b/tools/coqdoc/cpretty.mll @@ -931,11 +931,11 @@ and escaped_html = parse | _ { Output.html_char (lexeme_char lexbuf 0); escaped_html lexbuf } and verbatim inline = parse - | nl ">>" space* nl { Output.verbatim_char '\n'; Output.stop_verbatim inline } - | nl ">>" { Output.verbatim_char '\n'; Output.stop_verbatim inline } + | nl ">>" space* nl { Output.verbatim_char inline '\n'; Output.stop_verbatim inline } + | nl ">>" { Output.verbatim_char inline '\n'; Output.stop_verbatim inline } | ">>" { Output.stop_verbatim inline } | eof { Output.stop_verbatim inline } - | _ { Output.verbatim_char (lexeme_char lexbuf 0); verbatim inline lexbuf } + | _ { Output.verbatim_char inline (lexeme_char lexbuf 0); verbatim inline lexbuf } and url = parse | "}}" { Output.url (Buffer.contents url_buffer) None; Buffer.clear url_buffer } diff --git a/tools/coqdoc/output.ml b/tools/coqdoc/output.ml index ab65474be..7a5a12fa0 100644 --- a/tools/coqdoc/output.ml +++ b/tools/coqdoc/output.ml @@ -1268,8 +1268,8 @@ let start_verbatim = select Latex.start_verbatim Html.start_verbatim TeXmacs.start_verbatim Raw.start_verbatim let stop_verbatim = select Latex.stop_verbatim Html.stop_verbatim TeXmacs.stop_verbatim Raw.stop_verbatim -let verbatim_char = - select output_char Html.char TeXmacs.char Raw.char +let verbatim_char inline = + select (if inline then Latex.char else output_char) Html.char TeXmacs.char Raw.char let hard_verbatim_char = output_char let url = diff --git a/tools/coqdoc/output.mli b/tools/coqdoc/output.mli index 2fcd58715..ea34e0e58 100644 --- a/tools/coqdoc/output.mli +++ b/tools/coqdoc/output.mli @@ -71,7 +71,7 @@ val latex_char : char -> unit val latex_string : string -> unit val html_char : char -> unit val html_string : string -> unit -val verbatim_char : char -> unit +val verbatim_char : bool -> char -> unit val hard_verbatim_char : char -> unit val start_latex_math : unit -> unit |