Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
maranget committed Mar 9, 2007
1 parent ff7236d commit cf88389
Show file tree
Hide file tree
Showing 16 changed files with 206 additions and 141 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
version 1.09+7
- Some changes for active characters -, ', and `
* -- not merged in entity if TT is on.
* ' -> simple right quote, ` simple left quote
version 1.09+6
- test new technique for release [shell]
- skip_blanks in save.mll -> also eat spaces after
\n (-> \urldef more compatible ??)
- \usepackage{hevea} -> execute \usepackage{comment} for LaTeX
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SUF=
DIR=
OCAMLC=$(DIR)ocamlc$(SUF)
OCAMLFLAGS=
#OCAMLFLAGS=-w ZY
OCAMLFLAGS=-w ZY
OCAMLCI=$(OCAMLC)
OCAMLOPT=$(DIR)ocamlopt$(SUF)
OCAMLLEX=$(DIR)ocamllex$(SUF) -q
Expand Down
7 changes: 4 additions & 3 deletions examples/index.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ \section*{Some examples on the web}
\item The on-line
``\ahref{http://www.enseignement.polytechnique.fr/profs/informatique/Luc.Maranget/compil/poly/}{\emph{polycopi\'e}}''
of my compilation course at \'Ecole polytechnique.
Another
``\ahref{http://www.enseignement.polytechnique.fr/profs/informatique/Luc.Maranget/421/poly/}{\emph{polycopi\'e}}'' of mine.
\item Another on-line
``\ahref{http://www.enseignement.polytechnique.fr/informatique/IF/poly/index.html}{\emph{polycopi\'e}}''
from \'Ecole polytechnique.
Expand All @@ -25,11 +27,10 @@ \section*{Some examples on the web}
\ahref{http://caml.inria.fr/pub/docs/manual-ocaml/index.html}{Objective
Caml} manual.
\item The on-line
\ahref{http://pauillac.inria.fr/\home{diaz}/gnu-prolog/manual/index.html}
{GNU-prolog} manual.
\item The on-line
\ahref{http://www.lifl.fr/\home{boulet}/softs/mldoc/index.html}{MlDoc}
manual. MlDoc is a literate programming tool.
\item The on-line
\ahref{http://omake.metaprl.org/omake.html}{OMake} manual.
\end{tocenv}
\end{tocenv}

Expand Down
3 changes: 2 additions & 1 deletion html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(* *)
(***********************************************************************)

let header = "$Id: html.ml,v 1.113 2007-02-09 17:22:29 maranget Exp $"
let header = "$Id: html.ml,v 1.114 2007-03-09 13:23:52 maranget Exp $"

(* Output function for a strange html model :
- Text elements can occur anywhere and are given as in latex
Expand Down Expand Up @@ -447,6 +447,7 @@ and insert_block s attr =
and insert_attr s = insert_attr (find_block s)
and erase_mods = erase_mods
and open_mod = open_mod
and has_mod = has_mod
and clearstyle = clearstyle
and nostyle = nostyle
and get_fontsize = get_fontsize
Expand Down
1 change: 1 addition & 0 deletions html.mli
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ val nostyle : unit -> unit
val clearstyle : unit -> unit
val open_mod : Element.text -> unit
val erase_mods : Element.text list -> unit
val has_mod : Element.text -> bool
val forget_par : unit -> int option
val close_par : unit -> bool
val open_par : unit -> unit
Expand Down
2 changes: 1 addition & 1 deletion html/amssymb.hva
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
\DeclareSymbolAMS{\varkappa}{X03F0}
\DeclareSymbolAMS{\measuredangle}{X2221}
\DeclareSymbolAMS{\beth}{X2136}
\DeclareSymbolAMS{\backprime}{X2035}
\DeclareSymbolAMS[\@print{`}]{\backprime}{X2035}
\DeclareSymbolAMS{\complement}{X2201}
\DeclareSymbolAMS{\daleth}{X2138}
\DeclareSymbolAMS{\gimel}{X2137}
Expand Down
6 changes: 3 additions & 3 deletions htmlCommon.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(* *)
(***********************************************************************)

let header = "$Id: htmlCommon.ml,v 1.62 2007-02-08 17:48:28 maranget Exp $"
let header = "$Id: htmlCommon.ml,v 1.63 2007-03-09 13:23:52 maranget Exp $"

(* Output function for a strange html model :
- Text elements can occur anywhere and are given as in latex
Expand Down Expand Up @@ -1082,8 +1082,8 @@ let rec open_mods = function
| [] -> ()
;;



let has_mod m = already_here m
(* Blocks *)

let pstart = function
Expand Down
3 changes: 2 additions & 1 deletion info.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
(***********************************************************************)


let header = "$Id: info.ml,v 1.41 2006-10-10 11:02:04 maranget Exp $"
let header = "$Id: info.ml,v 1.42 2007-03-09 13:23:52 maranget Exp $"

open Misc
open Text
Expand All @@ -30,6 +30,7 @@ let nostyle=Text.nostyle;;
let clearstyle=Text.clearstyle;;
let open_mod=open_mod;;
let erase_mods=Text.erase_mods;;
let has_mod = Text.has_mod;;
let forget_par = Text.forget_par;;
let open_par = Text.open_par;;
let close_par = Text.close_par;;
Expand Down
30 changes: 14 additions & 16 deletions info.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@
(* Automatique. Distributed only by permission. *)
(* *)
(***********************************************************************)

open Lexstate
exception Error of string
type block
(*
val iso : char -> string
val iso_string : string -> string
*)
val set_out : Out.t -> unit
val stop : unit -> unit
val restart : unit -> unit
val is_empty : unit -> bool

val get_fontsize : unit -> int
val nostyle : unit -> unit
val clearstyle : unit -> unit
val open_mod : Element.text -> unit
val erase_mods : Element.text list -> unit
exception Error of string
type block
val set_out : Out.t -> unit
val stop : unit -> unit
val restart : unit -> unit
val is_empty : unit -> bool

val get_fontsize : unit -> int
val nostyle : unit -> unit
val clearstyle : unit -> unit
val open_mod : Element.text -> unit
val erase_mods : Element.text list -> unit
val has_mod : Element.text -> bool
val forget_par : unit -> int option
val close_par : unit -> bool
val open_par : unit -> unit
Expand Down
61 changes: 50 additions & 11 deletions latexscan.mll
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(* *)
(***********************************************************************)

(* $Id: latexscan.mll,v 1.309 2007-02-09 17:22:29 maranget Exp $ *)
(* $Id: latexscan.mll,v 1.310 2007-03-09 13:23:52 maranget Exp $ *)


{
Expand Down Expand Up @@ -3454,8 +3454,10 @@ OutUnicode.def_default OutUnicode.emdash "\\@print{---}" ;
()
;;

let has_tt () = Dest.has_mod (Element.Style "TT")

let do_minus lexbuf =
if is_plain '-' then
if is_plain '-' && not (has_tt ()) then
if Save.if_next_char '-' lexbuf then begin
gobble_one_char lexbuf ;
if Save.if_next_char '-' lexbuf then begin
Expand All @@ -3471,21 +3473,58 @@ let do_minus lexbuf =
Dest.put_char '-'
;;

OutUnicode.def_default OutUnicode.lquot "\\@print{\"}" ;
OutUnicode.def_default OutUnicode.rquot "\\@print{\"}" ;
OutUnicode.def_default OutUnicode.ldquot "\\@print{\"}" ;
OutUnicode.def_default OutUnicode.rdquot "\\@print{\"}" ;
OutUnicode.def_default OutUnicode.lsquot "\\@print{`}" ;
OutUnicode.def_default OutUnicode.rsquot "\\@print{'}" ;
OutUnicode.def_default OutUnicode.prime "\\@print{'}" ;
OutUnicode.def_default OutUnicode.dprime "\\@print{''}" ;
OutUnicode.def_default OutUnicode.tprime "\\@print{'''}" ;
OutUnicode.def_default OutUnicode.rprime "\\@print{`}" ;
OutUnicode.def_default OutUnicode.rdprime "\\@print{``}" ;
OutUnicode.def_default OutUnicode.rtprime "\\@print{```}" ;
()
;;

let do_backquote lexbuf =
if not !in_math && is_plain '`' && Save.if_next_char '`' lexbuf then begin
gobble_one_char lexbuf ;
put_unicode OutUnicode.lquot
end else Dest.put_char '`'
if is_plain '`' then begin
if !in_math then begin
if Save.if_next_char '`' lexbuf then begin
gobble_one_char lexbuf ;
if Save.if_next_char '`' lexbuf then begin
gobble_one_char lexbuf ;
put_unicode OutUnicode.rtprime
end else
put_unicode OutUnicode.rdprime
end else
put_unicode OutUnicode.rprime
end else if has_tt () then put_unicode OutUnicode.lsquot
else if Save.if_next_char '`' lexbuf then begin
gobble_one_char lexbuf ;
put_unicode OutUnicode.ldquot
end else
put_unicode OutUnicode.lsquot
end else
Dest.put_char '`'

and do_quote lexbuf =
if not !in_math && is_plain '\'' && Save.if_next_char '\'' lexbuf then begin
gobble_one_char lexbuf ;
put_unicode OutUnicode.rquot
if is_plain '\'' then begin
if !in_math then begin
if Save.if_next_char '\'' lexbuf then begin
gobble_one_char lexbuf ;
if Save.if_next_char '\'' lexbuf then begin
gobble_one_char lexbuf ;
put_unicode OutUnicode.tprime
end else
put_unicode OutUnicode.dprime
end else
put_unicode OutUnicode.prime
end else if has_tt () then put_unicode OutUnicode.rsquot
else if Save.if_next_char '\'' lexbuf then begin
gobble_one_char lexbuf ;
put_unicode OutUnicode.rdquot
end else
put_unicode OutUnicode.rsquot
end else
Dest.put_char '\''
;;
Expand Down
1 change: 1 addition & 0 deletions outManager.mli
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ val nostyle : unit -> unit
val clearstyle : unit -> unit
val open_mod : Element.text -> unit
val erase_mods : Element.text list -> unit
val has_mod : Element.text -> bool
val forget_par : unit -> int option
val close_par : unit -> bool
val open_par : unit -> unit
Expand Down
12 changes: 10 additions & 2 deletions outUnicode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -840,5 +840,13 @@ and iexcl = 0xA10
and minus = 0x2212
and endash = 0x2013
and emdash = 0x2014
and lquot = 0x201C
and rquot = 0x201D
and ldquot = 0x201C
and rdquot = 0x201D
and lsquot = 0x2018
and rsquot = 0x2019
and prime = 0x2032
and dprime = 0x2033
and tprime = 0x2034
and rprime = 0x2035
and rdprime = 0x2036
and rtprime = 0x2037
12 changes: 10 additions & 2 deletions outUnicode.mli
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,13 @@ val iexcl : unichar
val minus : unichar
val endash : unichar
val emdash : unichar
val lquot : unichar
val rquot : unichar
val ldquot : unichar
val rdquot : unichar
val lsquot : unichar
val rsquot : unichar
val prime : unichar
val dprime : unichar
val tprime : unichar
val rprime : unichar
val rdprime : unichar
val rtprime : unichar
9 changes: 6 additions & 3 deletions text.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(* *)
(***********************************************************************)

let header = "$Id: text.ml,v 1.82 2007-02-16 19:09:57 maranget Exp $"
let header = "$Id: text.ml,v 1.83 2007-03-09 13:23:53 maranget Exp $"


open Misc
Expand Down Expand Up @@ -355,6 +355,7 @@ let check_stacks () = match stacks with
check_stack pending_par ;
check_stack after

(* Buffer for one line *)
let line = String.create (!Parse_opts.width +2);;

type saved = string * flags_t * saved_stacks * saved_out
Expand Down Expand Up @@ -453,7 +454,7 @@ let do_put_char_format nbsp c =
if not nbsp && c=' ' then flags.last_space <- flags.x;
if flags.x =(-1) then begin
(* La derniere ligne finissait un paragraphe : on indente *)
Printf.eprintf "FIRST LINE: %i %i\n" flags.x_start flags.first_line ;
(* Printf.eprintf "FIRST LINE: %i %i\n" flags.x_start flags.first_line ; *)
flags.x<-flags.x_start + flags.first_line;
for i = 0 to flags.x-1 do
line.[i]<-' ';
Expand Down Expand Up @@ -603,6 +604,8 @@ let close_mod () = match !cur_out.active with
| _ -> ()
;;

let has_mod _ = false (* No text-level elements in text *)

let erase_mods _ = ()
;;

Expand Down Expand Up @@ -675,7 +678,7 @@ let do_pending () =
let try_open_block s args =
(* Prepare l'environnement specifique au bloc en cours *)
if !verbose > 2 then
prerr_endline ("=> try_open ``"^s^"''");
prerr_endline ("=> try_open '"^s^"'");

push stacks.s_x
(flags.hsize,flags.x,flags.x_start,flags.x_end,
Expand Down
Loading

0 comments on commit cf88389

Please sign in to comment.