hevea-2.09/0000755004317100512160000000000012204704205012556 5ustar marangetcristalhevea-2.09/color.ml0000644004317100512160000001062212017660721014235 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type t = Name of string | Hex of string let default_color = Name "black" ;; let table = (Hashtbl.create 17 : (string, t) Hashtbl.t) ;; type saved = (string, t) Hashtbl.t let checkpoint () = let ctable = Hashtbl.create 17 in Misc.copy_hashtbl table ctable ; ctable and hot_start ctable = Misc.copy_hashtbl ctable table let to_hex x = Printf.sprintf "%02X" (truncate (255.0 *. x)) ;; let cmyk_to_rgb c m y k = 1.0 -. min 1.0 (c *. (1.0 -. k) +. k), 1.0 -. min 1.0 (m *. (1.0 -. k) +. k), 1.0 -. min 1.0 (y *. (1.0 -. k) +. k) ;; let hls_to_rgb h l s = let rgb q1 q2 hue = let hue = if hue > 360.0 then hue -. 360.0 else if hue < 0.0 then hue +. 360.0 else hue in if hue < 60.0 then q1 +. (q2 -. q1) /. 60.0 else if hue < 180.0 then q2 else if hue < 240.0 then q1 +. (q2 -. q1) *. (240.0 -. hue) /. 60.0 else q1 in let p2 = if l <= 0.5 then l *. (1.0 +. s) else l +. s -. (l *. s) in let p1 = 2.0 *. l -. p2 in if s = 0.0 then l,l,l else rgb p1 p2 (h +. 100.0), rgb p1 p2 h, rgb p1 p2 (h -. 120.0) ;; let hsv_to_rgb h s v = if s = 0.0 then v,v,v else let h = h /. 60.0 in let i = truncate h in let f = h -. float i in let p = v *. (1.0 -. s) in let q = v *. (1.0 -. (s *. f)) in let t = v *. (1.0 -. (s *. (1.0 -. f))) in match i with | 0 -> v,t,p | 1 -> q,v,p | 2 -> p,v,t | 3 -> p,q,v | 4 -> t,p,v | 5 -> v,p,q | _ -> Misc.fatal ("Bad HSV color specification") ;; exception Failed ;; let names = Hashtbl.create 17 let _ = List.iter (fun (xx,name) -> Hashtbl.add names xx name) [ "000000", "black" ; "C0C0C0", "silver" ; "808080", "gray" ; "FFFFFF", "white" ; "800000", "maroon" ; "FF0000", "red" ; "800080", "purple" ; "FF00FF", "fuchsia" ; "008000", "green" ; "00FF00", "lime" ; "808000", "olive" ; "FFFF00", "yellow" ; "000080", "navy" ; "0000FF", "blue" ; "008080", "teal" ; "00FFFF", "aqua" ; ] let do_compute mdl value = match mdl with | "named" -> begin try Hashtbl.find table ("named@"^value) with | Not_found -> begin Misc.warning ("Unkown name in the named color model: "^value) ; raise Failed end end | _ -> let res = match mdl with | "gray" -> let x = Colscan.one (MyLexing.from_string value) in let xx = to_hex x in xx^xx^xx | "rgb" -> let r,g,b = Colscan.three(MyLexing.from_string value) in to_hex r^to_hex g^to_hex b | "cmyk" -> let c,m,y,k = Colscan.four (MyLexing.from_string value) in let r,g,b = cmyk_to_rgb c m y k in to_hex r^to_hex g^to_hex b | "hsv" -> let h,s,v = Colscan.three (MyLexing.from_string value) in let r,g,b = hsv_to_rgb h s v in to_hex r^to_hex g^to_hex b | "hls" -> let h,l,s = Colscan.three (MyLexing.from_string value) in let r,g,b = hls_to_rgb h l s in to_hex r^to_hex g^to_hex b | _ -> Misc.warning ("Color.compute, unknown color model: "^mdl); raise Failed in try Name (Hashtbl.find names res) with Not_found -> Hex res let compute mdl value = try do_compute mdl value with Failed -> default_color let define clr mdl value = try Hashtbl.add table clr (do_compute mdl value) with Failed -> () ;; let retrieve clr = try Hashtbl.find table clr with Not_found -> Misc.warning ("Color.retrieve, unknown color: "^clr); default_color ;; let define_named name mdl value = define ("named@"^name) mdl value ;; let remove clr = Hashtbl.remove table clr hevea-2.09/inputenc.hva0000644004317100512160000000502711670416714015122 0ustar marangetcristal%% Inputencodings are simple minded, and also impacts on the output %% document charset %% - The 'input' translator is changed to accept chars on 8-bits %% and to translate them to the appropriate unicode chars. %% - Numerical entities given by \@print@u{NUM} are translated %% to chars when possible (through 'output' translator) %% output translator and document charset must of course agree, %% - \usepackage[enc]{inputenc} affects both input and %% output translators and doc charset. %% - Later, one can desynchronize the translators %% For instance, to interpret input as latin1 and to output %% ascii only, one should perform: %% \usepackage[latin1]{inputenc} %% \@def@charset{US-ASCII} %% %% Or, to change input translator alone : \inputencoding{enc} \ProvidesPackage{inputenc} \def\ic@mk@map#1{ic@#1@map} \def\def@ic@map#1#2{\def\csname\ic@mk@map{#1}\endcsname{#2}} %%%Direct setting of inputencoding \newcommand{\ic@restore} {\@set@in@translator {mappings/\csname\ic@mk@map{\inputencodingname}\endcsname.map}}% %% \newcommand{\inputencoding}[1] {\@ifundefined{\ic@mk@map{#1}} {\hva@warn{Unknown input encoding: '#1'}} {\def\inputencodingname{#1}% \@set@in@translator{mappings/\csname\ic@mk@map{#1}\endcsname.map}% \@funregister{\ic@restore}}} %%%Setting inputencoding as package option also sets output encoding \newcommand{\ic@set}[1] {\def\inputencodingname{#1}% \def\@charset{\csname\ic@mk@map{#1}\endcsname}% \@set@translators{mappings/\csname\ic@mk@map{#1}\endcsname.map}} \newcommand{\ic@set@bis}[1] {\def\inputencodingname{#1}% \@set@in@translator{mappings/\csname\ic@mk@map{#1}\endcsname.map}} \newcommand{\ic@option}[2] {\def@ic@map{#1}{#2}% \DeclareOption{#1}{\ic@set{#1}}}% \newcommand{\ic@option@bis}[2] {\def@ic@map{#1}{#2}% \DeclareOption{#1}{\ic@set@bis{#1}}}% %%% \ic@option{ascii}{US-ASCII}% %%% \ic@option{latin1}{ISO-8859-1}% \ic@option{latin2}{ISO-8859-2}% \ic@option{latin3}{ISO-8859-3}% \ic@option{latin4}{ISO-8859-4}% \ic@option{latin5}{ISO-8859-9}% \ic@option{latin6}{ISO-8859-10}% \ic@option{latin7}{ISO-8859-13}% \ic@option{latin8}{ISO-8859-14}% \ic@option{latin9}{ISO-8859-15}% \ic@option{latin10}{ISO-8859-16}% \ic@option{tis-620}{ISO-8859-11}% \ic@option@bis{thai}{ISO-8859-11}% %%% \ic@option{cp1250}{windows-1250}% \ic@option{cp1251}{windows-1251}% \ic@option{cp1252}{windows-1252}% \ic@option{cp1257}{windows-1257}% \ic@option{ansinew}{windows-1252}% %%% \ic@option{applemac}{macintosh}% %%% \ic@option{koi8-r}{KOI8-R}% \ic@option{utf8}{UTF-8}% \ic@option{utf8x}{UTF-8}% %%% \ProcessOptions*% hevea-2.09/info.ml0000644004317100512160000001046212017700472014052 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Misc open Text exception Error of string let set_out=Text.set_out;; let stop = Text.stop;; let restart = Text.restart;; let is_empty=Text.is_empty;; let get_fontsize=Text.get_fontsize;; 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;; let par=Text.par;; let open_block =Text.open_block;; let close_block =Text.close_block;; let force_block =Text.force_block;; let close_flow =Text.close_flow;; let insert_block =Text.insert_block;; let insert_attr =Text.insert_attr;; let open_maths = Text.open_maths and close_maths = Text.close_maths ;; let open_display_varg =Text.open_display_varg;; let open_display =Text.open_display;; let close_display =Text.close_display;; let item_display =Text.item_display;; let force_item_display =Text.force_item_display;; let erase_display =Text.erase_display and standard_sup_sub = Text.standard_sup_sub and limit_sup_sub = Text.limit_sup_sub and int_sup_sub = Text.int_sup_sub and addvsize = Text.addvsize and over = Text.over and left = Text.left and right = Text.right ;; let set_dcount =Text.set_dcount;; let item = Text.item;; let nitem = Text.nitem;; let ditem = Text.ditem;; let erase_block =Text.erase_block;; let open_group =Text.open_group;; let open_aftergroup =Text.open_aftergroup;; let close_group =Text.close_group;; let put s = Text.put s and put_char c = Text.put_char c and put_unicode i = Text.put_unicode i let flush_out =Text.flush_out;; let skip_line =Text.skip_line;; (* Gestion des references *) let loc_name=InfoRef.loc_name;; let open_chan=Text.open_chan;; let close_chan=Text.close_chan;; let to_string=Text.to_string;; let to_style=Text.to_style;; let get_current_output =Text.get_current_output;; (* Finalisation du fichier info *) let finalize check = if check then begin if !verbose>1 then prerr_endline "Beginning of second phase."; InfoRef.finalize_nodes (); Text.finalize check ; let name,buf = if Parse_opts.filter then let texte = get_current_output () in "",MyLexing.from_string texte else (* changer de nom de fichier (renommer ?) *) try let f = Parse_opts.name_out^".tmp" in f,Lexing.from_channel (open_in f) with Sys_error msg -> Misc.fatal ("Cannot re-open info output file "^msg) in InfoRef.dump buf ; if not Parse_opts.filter && !verbose <= 0 then Mysys.remove name end else Text.finalize false ;; let horizontal_line =Text.horizontal_line;; let put_separator =Text.put_separator;; let unskip = Text.unskip;; let put_tag =Text.put_tag;; let put_nbsp =Text.put_nbsp;; let put_open_group =Text.put_open_group;; let put_close_group =Text.put_close_group;; let put_in_math =Text.put_in_math;; let open_table =Text.open_table;; let new_row =Text.new_row;; let open_cell =Text.open_cell;; let erase_cell =Text.erase_cell;; let close_cell =Text.close_cell;; let do_close_cell = Text.do_close_cell;; let open_cell_group = Text.open_cell_group;; let close_cell_group = Text.close_cell_group;; let erase_cell_group = Text.erase_cell_group;; let close_row =Text.close_row;; let erase_row =Text.erase_row;; let close_table =Text.close_table;; let make_border = Text.make_border;; let make_inside = Text.make_inside;; let make_hline = Text.make_hline;; let infonode = InfoRef.infonode;; let infoextranode = InfoRef.infoextranode;; let infomenu = InfoRef.infomenu;; let image = Text.image;; type saved = Text.saved let check = Text.check and hot = Text.hot hevea-2.09/hevea.sty0000644004317100512160000000576210504772141014426 0ustar marangetcristal% hevea : hevea.sty % This is a very basic style file for latex document to be processed % with hevea. It contains definitions of LaTeX environment which are % processed in a special way by the translator. % Mostly : % - latexonly, not processed by hevea, processed by latex. % - htmlonly , the reverse. % - rawhtml, to include raw HTML in hevea output. % - toimage, to send text to the image file. % The package also provides hevea logos, html related commands (ahref % etc.), void cutting and image commands. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hevea}[2002/01/11] \RequirePackage{comment} \newif\ifhevea\heveafalse \@ifundefined{ifimagen}{\newif\ifimagen\imagenfalse} \makeatletter% \newcommand{\heveasmup}[2]{% \raise #1\hbox{$\m@th$% \csname S@\f@size\endcsname \fontsize\sf@size 0% \math@fontsfalse\selectfont #2% }}% \DeclareRobustCommand{\hevea}{H\kern-.15em\heveasmup{.2ex}{E}\kern-.15emV\kern-.15em\heveasmup{.2ex}{E}\kern-.15emA}% \DeclareRobustCommand{\hacha}{H\kern-.15em\heveasmup{.2ex}{A}\kern-.15emC\kern-.1em\heveasmup{.2ex}{H}\kern-.15emA}% \DeclareRobustCommand{\html}{\protect\heveasmup{0.ex}{HTML}} %%%%%%%%% Hyperlinks hevea style \newcommand{\ahref}[2]{{#2}} \newcommand{\ahrefloc}[2]{{#2}} \newcommand{\aname}[2]{{#2}} \newcommand{\ahrefurl}[1]{\texttt{#1}} \newcommand{\footahref}[2]{#2\footnote{\texttt{#1}}} \newcommand{\mailto}[1]{\texttt{#1}} \newcommand{\imgsrc}[2][]{} \newcommand{\home}[1]{\protect\raisebox{-.75ex}{\char126}#1} \AtBeginDocument {\@ifundefined{url} {%url package is not loaded \let\url\ahref\let\oneurl\ahrefurl\let\footurl\footahref} {}} %% Void cutting instructions \newcounter{cuttingdepth} \newcommand{\tocnumber}{} \newcommand{\notocnumber}{} \newcommand{\cuttingunit}{} \newcommand{\cutdef}[2][]{} \newcommand{\cuthere}[2]{} \newcommand{\cutend}{} \newcommand{\htmlhead}[1]{} \newcommand{\htmlfoot}[1]{} \newcommand{\htmlprefix}[1]{} \newenvironment{cutflow}[1]{}{} \newcommand{\cutname}[1]{} \newcommand{\toplinks}[3]{} \newcommand{\setlinkstext}[3]{} \newcommand{\flushdef}[1]{} \newcommand{\footnoteflush}[1]{} %%%% Html only \excludecomment{rawhtml} \newcommand{\rawhtmlinput}[1]{} \excludecomment{htmlonly} %%%% Latex only \newenvironment{latexonly}{}{} \newenvironment{verblatex}{}{} %%%% Image file stuff \def\toimage{\endgroup} \def\endtoimage{\begingroup\def\@currenvir{toimage}} \def\verbimage{\endgroup} \def\endverbimage{\begingroup\def\@currenvir{verbimage}} \newcommand{\imageflush}[1][]{} %%% Bgcolor definition \newsavebox{\@bgcolorbin} \newenvironment{bgcolor}[2][] {\newcommand{\@mycolor}{#2}\begin{lrbox}{\@bgcolorbin}\vbox\bgroup} {\egroup\end{lrbox}% \begin{flushleft}% \colorbox{\@mycolor}{\usebox{\@bgcolorbin}}% \end{flushleft}} %%% Style sheets macros, defined as no-ops \newcommand{\newstyle}[2]{} \newcommand{\addstyle}[1]{} \newcommand{\setenvclass}[2]{} \newcommand{\getenvclass}[1]{} \newcommand{\loadcssfile}[1]{} \newenvironment{divstyle}[1]{}{} \newenvironment{cellstyle}[2]{}{} \newif\ifexternalcss %%% Postlude \makeatother hevea-2.09/htmllex.mli0000644004317100512160000000206412017660721014746 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: htmllex.mli,v 1.6 2006-10-09 08:25:16 maranget Exp $ *) (***********************************************************************) val ptop : unit -> unit val to_string : Lexeme.token -> string val cost : Lexeme.style -> int * int val reset : unit -> unit val next_token : Lexing.lexbuf -> Lexeme.token val styles : Lexing.lexbuf -> Css.id list val classes : Lexing.lexbuf -> Emisc.Strings.t hevea-2.09/ifpdf.hva0000644004317100512160000000010510500032547014342 0ustar marangetcristal\newif\ifpdf\pdftrue \AtBeginDocument{\ifpdf\@addimagenopt{-pdf}\fi} hevea-2.09/auxx.ml0000644004317100512160000001462512113135426014107 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Misc let rtable = Hashtbl.create 17 ;; let rset name value = Hashtbl.add rtable name value ;; let rget name = try Hashtbl.find rtable name with Not_found -> begin warning ("Undefined label: '"^name^"'") ; "??" end ;; let btable = Hashtbl.create 17 ;; let bset name value = Hashtbl.add btable name value ;; let bget warn name = let r = try Some (Hashtbl.find btable name) with Not_found -> begin if warn then warning ("Undefined citation: '"^name^"'") ; None end in r ;; let auxfile = ref None and auxname = ref "" and something = ref false and digest = ref None ;; let read_digest name = try Some (Digest.file name) with | Sys_error _ -> None let labelcount = ref 0 let rseen = Hashtbl.create 17 and bseen = Hashtbl.create 17 ;; (* result is true when another run is needed *) let finalize check = match !auxfile with | None -> false | Some file -> close_out file ; if not !something then Mysys.remove !auxname; if check then begin let changed = !digest <> read_digest !auxname in if changed then Misc.message "HeVeA Warning: Label(s) may have changed. Rerun me to get cross-references right." ; changed end else false ;; let write output_fun = match !auxfile with | None -> () | Some file -> something := true ; output_fun file ;; let bcheck key = try let _ = Hashtbl.find bseen key in warning ("Multiple definitions for citation: "^key) ; false with | Not_found -> Hashtbl.add bseen key () ; true let rcheck key = try let _ = Hashtbl.find rseen key in warning ("Multiple definitions for label: "^key) ; -1 with | Not_found -> let x = !labelcount in incr labelcount ; Hashtbl.add rseen key x ; x let swrite msg = match !auxfile with | None -> () | Some file -> something := true ; output_string file msg let bwrite key pretty = if bcheck key then write (fun file -> output_string file "\\bibcite{" ; output_string file key ; output_string file "}{" ; output_string file pretty ; output_string file "}\n") and rwrite key pretty = let idx = rcheck key in if idx >= 0 then write (fun file -> output_string file "\\newlabel{" ; output_string file key ; output_string file "}{{" ; output_string file pretty ; output_string file "}{X}}\n") and rwrite2 anchor key pretty = let idx = rcheck key in if idx >= 0 then write (fun file -> output_string file "\\new@anchor@label{" ; output_string file anchor ; output_string file "}{" ; output_string file key ; output_string file "}{{" ; output_string file pretty ; output_string file "}{X}}\n") ;; type toc_t = {mutable level : int ; mutable depth : int ; chan : out_channel } let toctable = Hashtbl.create 5 ;; let tocfilename suf = Parse_opts.base_out^"."^suf let do_addtoc toc level what = (* First adjust nesting of tocenv *) if level > toc.level then begin for _i = toc.level to level-1 do output_string toc.chan "\\begin{tocenv}\n" done ; toc.depth <- toc.depth + level - toc.level ; toc.level <- level end else if level < toc.level then begin let nclose = min toc.depth (toc.level - level) in for _i = 1 to nclose do output_string toc.chan "\\end{tocenv}\n" done ; toc.depth <- toc.depth - nclose ; if toc.depth=0 then begin output_string toc.chan "\\begin{tocenv}\n" ; toc.depth <- 1 ; end ; toc.level <- level end ; (* Then ouput toc item *) Printf.fprintf toc.chan "\\tocitem %s\n" what let addtoc suf level what = try try let toc = Hashtbl.find toctable suf in do_addtoc toc level what with | Not_found -> let name = Parse_opts.base_out^"."^suf in let chan = open_out name in output_string chan "\\begin{tocenv}\n" ; let toc = {level=level ; depth=1 ; chan=chan } in Hashtbl.add toctable suf toc ; do_addtoc toc level what with | Sys_error msg -> Misc.warning ("Problem with toc file "^tocfilename suf^": "^msg) (* To be performed aroound haux file reading *) let init base = digest := read_digest (base^".haux") let final base = Hashtbl.iter (fun _ toc -> for _i=1 to toc.depth do output_string toc.chan "\\end{tocenv}\n" ; done ; close_out toc.chan) toctable ; Hashtbl.clear toctable ; let filename = base^".haux" in try let file = open_out filename in auxname := filename ; auxfile := Some file with Sys_error s -> warning ("Cannot open out file: "^filename^" : "^s) type saved = (string, string) Hashtbl.t * int * (string, int) Hashtbl.t * (string, string) Hashtbl.t * (string, unit) Hashtbl.t * out_channel option * string * bool * Digest.t option let check () = Hashtbl.copy rtable, !labelcount, Hashtbl.copy rseen, Hashtbl.copy btable, Hashtbl.copy bseen, !auxfile, !auxname, !something, !digest let hot (srtable, slabelcount, srseen, sbtable, sbseen, sauxfile, sauxname, ssomething, sdigest) = Misc.copy_hashtbl srtable rtable ; labelcount := slabelcount ; Misc.copy_hashtbl srseen rseen ; Misc.copy_hashtbl sbtable btable ; Misc.copy_hashtbl sbseen bseen ; auxfile := sauxfile ; auxname := sauxname ; something := ssomething ; digest := sdigest (* Valid only juste before reading main input file *) let hot_start () = Hashtbl.clear rtable ; labelcount := 0 ; Hashtbl.clear rseen ; Hashtbl.clear btable ; Hashtbl.clear bseen ; auxfile := None ; auxname := "" ; something := false ; digest := None hevea-2.09/explode.ml0000644004317100512160000000335512017660721014564 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: explode.ml,v 1.7 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) open Htmltext open Tree let of_styles env r = match env with | [] -> r | _ -> Node (env,[r]) let rec tree env t k = match t with | Text s -> of_styles env (Text s)::k | Blanks s -> of_styles (List.filter (fun s -> not (Htmltext.blanksNeutral s)) env) (Blanks s):: k | Node (s,ts) -> begin try let new_env = Htmltext.add_style s env in List.fold_right (tree new_env) ts k with | Split (s,env) -> let ts = List.fold_right (tree []) ts [] in let now = if Util.is_blanks ts then (List.filter (fun s -> not (Htmltext.blanksNeutral s)) env) else env in match ts with | [] -> k | _ -> of_styles now (Node ([s],ts))::k end | ONode (so,sc,ts) -> of_styles env (ONode (so,sc, List.fold_right (tree []) ts []))::k let trees ts = List.fold_right (tree []) ts [] hevea-2.09/text.mli0000644004317100512160000000137111774606345014270 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) include OutManager.S hevea-2.09/ultra.mli0000644004317100512160000000155210512403554014416 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: ultra.mli,v 1.5 2006-10-09 08:25:16 maranget Exp $ *) (***********************************************************************) val main : out_channel -> Lexeme.style Tree.t list -> unit hevea-2.09/htmlparse.ml0000644004317100512160000000757012017660721015126 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: htmlparse.ml,v 1.11 2008-01-22 18:08:37 maranget Exp $ *) (***********************************************************************) open Lexeme open Htmllex open Tree exception Error of string let error msg _lb = raise (Error msg) ;; let buff = ref None let next_token lexbuf = match !buff with | Some tok -> buff := None ; tok | None -> Htmllex.next_token lexbuf and put_back lexbuf tok = match !buff with | None -> buff := Some tok | _ -> error "Put back" lexbuf let txt_buff = Buff.create () let rec to_close tag lb = match next_token lb with | Close (t,_) as tok when t=tag -> tok | Open (t,_,txt) when t=tag -> Buff.put txt_buff txt ; Buff.put txt_buff (Htmllex.to_string (to_close tag lb)) ; to_close tag lb | Eof -> error ("Eof in to_close") lb | tok -> Buff.put txt_buff (Htmllex.to_string tok); to_close tag lb let rec tree cls lexbuf = match next_token lexbuf with | (Eof|Close (_,_)) as tok-> put_back lexbuf tok ; None | Open (STYLE,_,txt) -> let otxt = txt and ctxt = Htmllex.to_string (to_close STYLE lexbuf) in let txt = Buff.to_string txt_buff in let txt = match cls with | None -> txt | Some cls -> let css = Htmllex.styles (MyLexing.from_string txt) in let buff = Buff.create () in Buff.put_char buff '\n' ; List.iter (fun cl -> match cl with | Css.Other txt -> Buff.put buff txt ; Buff.put_char buff '\n' | Css.Class (name, addname, txt) -> if Emisc.Strings.mem name cls then begin Buff.put_char buff '.' ; Buff.put buff name ; begin match addname with | None -> () | Some n -> Buff.put_char buff ' ' ; Buff.put buff n end ; Buff.put buff txt ; Buff.put_char buff '\n' end) css ; Buff.to_string buff in Some (Text (otxt^txt^ctxt)) | Open (SCRIPT,_,txt) -> Buff.put txt_buff txt ; Buff.put txt_buff (Htmllex.to_string (to_close SCRIPT lexbuf)) ; Some (Text (Buff.to_string txt_buff)) | Open (tag,attrs,txt) -> let fils = trees cls lexbuf in begin match next_token lexbuf with | Close (ctag,ctxt) when tag=ctag -> Some (match tag with | A|SUP|SUB -> ONode (txt,ctxt,fils) | _ -> Node ({tag=tag ; attrs=attrs ; txt=txt ; ctxt=ctxt},fils)) | tok -> error (Htmllex.to_string tok ^ " closes "^txt) lexbuf end | Lexeme.Text txt -> Some (Text txt) | Lexeme.Blanks txt -> Some (Blanks txt) and trees cls lexbuf = match tree cls lexbuf with | None -> [] | Some t -> t::trees cls lexbuf let rec do_main cls lexbuf = match tree cls lexbuf with | None -> begin match next_token lexbuf with | Eof -> [] | tok -> error ("Unexpected " ^ to_string tok) lexbuf end | Some (Text _ as last) -> [last] | Some t -> t :: do_main cls lexbuf let reset () = Buff.reset txt_buff let main cls lexbuf = try do_main cls lexbuf with | e -> reset () ; raise e hevea-2.09/ultra.ml0000644004317100512160000003334012017660721014250 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: ultra.ml,v 1.14 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) open Printf open Tree open Htmltext open Util let same_prop f s = try let p = Htmltext.get_prop f.nat in List.exists (fun s -> p s.nat) s with | NoProp -> false let rec part_factor some blanks i s keep leave = function | [] -> keep,leave | ((f,_) as x)::rem when there f s || same_prop f s || (blanks && Htmltext.blanksNeutral f)-> part_factor some blanks i s (x::keep) leave rem | (f,j)::rem -> part_factor some blanks i s keep (some f j (i-1) leave) rem let there_factor s fs = List.exists (fun (f,_) -> same_style s f) fs let rec start_factor i fs start = function | [] -> start | s::rem when there_factor s fs -> start_factor i fs start rem | s::rem -> start_factor i fs ((s,i)::start) rem let extend_factors some blanks i s r fs = let keep,leave = part_factor some blanks i s [] r fs in start_factor i fs keep s,leave let rec part_factor_neutral some i keep leave = function | [] -> keep,leave | ((f,_) as x)::rem when Htmltext.blanksNeutral f -> part_factor_neutral some i (x::keep) leave rem | (f,j)::rem -> part_factor_neutral some i keep (some f j (i-1) leave) rem let extend_factors_neutral some i r fs = part_factor_neutral some i [] r fs let finish_factors some i r fs = part_factor some false i [] [] r fs let pfactor chan fs = List.iter (fun ((i,j),f) -> Printf.fprintf chan " %d,%d:%s" i j f.txt) fs ; output_char chan '\n' let covers (i1:int) (j1:int) i2 j2 = (i1 <= i2 && j2 < j1) || (i1 < i2 && j2 <= j1) let rec all_blanks ts i j = if i <= j then is_blank ts.(i) && all_blanks ts (i+1) j else true let rec get_same ts i j f = function | [] -> ((i,j),f) | ((ii,jj),_)::_ when covers i j ii jj && all_blanks ts i (ii-1) && all_blanks ts (jj+1) j -> ((ii,jj),f) | _::rem -> get_same ts i j f rem let get_sames ts fs = let rec do_rec r = function | [] -> r | (((i,j),f) as x)::rem -> do_rec (if blanksNeutral f then get_same ts i j f fs::r else x::r) rem in do_rec [] fs let group_font ts fs = let fonts,no_fonts = List.partition (fun (_,f) -> is_font f.nat) fs in get_sames ts fonts@no_fonts let group_span ts fs = let span,no_span = List.partition (fun (_,f) -> is_span f.nat) fs in get_sames ts span@no_span let conflict_low i1 j1 i2 j2 = i1 < i2 && i2 <= j1 && j1 < j2 let correct_cfl_low ts i1 j1 i2 j2 = if conflict_low i1 j1 i2 j2 && all_blanks ts i1 (i2-1) then i1 else i2 and correct_cfl_high ts i1 j1 i2 j2 = if conflict_low i1 j1 i2 j2 && all_blanks ts (j1+1) j2 then j2 else j1 let rec mk_cover_one ts i j f = function | [] -> (i,j),f | ((ii,jj),_)::rem -> mk_cover_one ts (correct_cfl_low ts ii jj i j) (correct_cfl_high ts i j ii jj) f rem let rec mk_cover ts fs = function | [] -> [] | ((i,j),f)::rem -> mk_cover_one ts i j f fs :: mk_cover ts fs rem let extend_neutrals ts fs = let neutral,not_neutral = List.partition (fun (_,f) -> blanksNeutral f) fs in mk_cover ts fs neutral @ not_neutral let factorize low high ts = if low >= high then [] else let limit_blanks_right i = let rec do_rec i = if i <= low then low else begin if is_blank ts.(i) then do_rec (i-1) else i end in do_rec i in let correct_prop f i j env = try let _ = Htmltext.get_prop f.nat in let rec find_same k = match ts.(k) with | Node (s,_) when there f s -> k | _ -> find_same (k-1) in let j = find_same j in if j=i || (blanksNeutral f && all_blanks ts i (j-1)) then env else ((i,j),f)::env with | NoProp -> ((i,j),f)::env in let some f i j env = if not (Htmltext.blanksNeutral f) then begin if j-i > 0 then correct_prop f i j env else env end else begin let r = ref 0 in for k = i to j do if not (is_blank ts.(k)) then incr r done ; if !r > 1 then correct_prop f i (limit_blanks_right j) env else env end in let rec do_rec i r fs = if i <= high then begin let fs,r = match ts.(i) with | Node (s,ts) -> extend_factors some (is_blanks ts) i s r fs | t -> if is_blank t then extend_factors_neutral some i r fs else finish_factors some i r fs in do_rec (i+1) r fs end else let _,r = finish_factors some i r fs in r in let r = do_rec low [] [] in let r = group_font ts r in let r = group_span ts r in let r = extend_neutrals ts r in if r <> [] && !Emisc.verbose > 1 then begin Printf.fprintf stderr "Factors in %d %d\n" low high ; for i=low to high do Pp.tree stderr ts.(i) done ; prerr_endline "\n*********" ; pfactor stderr r end ; r let same ((i1,j1),_) ((i2,j2),_) = i1=i2 && j1=j2 let covers_cost ((((i1:int),(j1:int)),_),_) (((i2,j2),_),_) = covers i1 j1 i2 j2 let biggest fs = let rec through r = function | [] -> r | x::rem -> if List.exists (fun y -> covers_cost y x) rem then through r rem else through (x::r) rem in through [] (through [] fs) let conflicts ((i1,j1),_) ((i2,j2),_) = (i1 < i2 && i2 <= j1 && j1 < j2) || (i2 < i1 && i1 <= j2 && j2 < j1) let num_conflicts f fs = List.fold_left (fun r g -> if conflicts f g then 1+r else r) 0 fs let put_conflicts fs = List.fold_left (fun r g -> (g,num_conflicts g fs)::r) [] fs let rec add f = function | [] -> let i,f = f in [i,[f]] | x::rem as r -> if same f x then let _,f = f and i,r = x in (i,(f::r))::rem else if conflicts f x then r else x::add f rem let get_them fs = List.fold_left (fun r (f,_) -> add f r) [] fs let pfactorc chan fs = List.iter (fun (((i,j),f),c) -> Printf.fprintf chan " %d,%d:%s(%d)" i j f.txt c) fs ; output_char chan '\n' let slen f = (if is_font f.nat then 5 else 0) + String.length f.txt + String.length f.ctxt let order_factors (((_i1,_j1),f1),c1) (((_i2,_j2),f2),c2) = if c1 < c2 then true else if c1=c2 then slen f1 >= slen f2 else false let select_factors fs = let fs1 = put_conflicts fs in let fs2 = biggest fs1 in let fs3 = Sort.list order_factors fs2 in if !Emisc.verbose > 1 then begin prerr_string "fs1:" ; pfactorc stderr fs1 ; prerr_string "fs2:" ; pfactorc stderr fs2 ; prerr_string "fs3:" ; pfactorc stderr fs3 end ; Sort.list (fun ((_,j1),_) ((i2,_),_) -> j1 <= i2) (get_them fs3) let some_font s = List.exists (fun s -> is_font s.nat) s let rec font_tree = function | Node (s,ts) -> some_font s || font_trees ts | Blanks _ -> true | _ -> false and font_trees ts = List.for_all font_tree ts let other_props s = let rec other r = function | [] -> r | s::rem when is_font s.nat -> other (List.fold_left (fun r p -> if p s.nat then r else p::r) [] r) rem | _::rem -> other r rem in other font_props s let rec all_props r ts = match r with | [] -> [] | _ -> match ts with | [] -> r | Node (s,_)::rem when some_font s -> all_props (List.filter (fun p -> List.exists (fun s -> is_font s.nat && p s.nat) s) r) rem | Node (_,ts)::rem -> all_props (all_props r ts) rem | Blanks _::rem -> all_props (List.filter neutral_prop r) rem | _ -> assert false let extract_props ps s = List.partition (fun s -> is_font s.nat && List.exists (fun p -> p s.nat) ps) s let clean t k = match t with | Node ([],ts) -> ts@k | _ -> t::k let rec neutrals started r = function | [] -> r | Blanks _::rem -> neutrals started r rem | Node (s, _)::rem -> if started then neutrals true (inter r (List.filter blanksNeutral s)) rem else neutrals true (List.filter blanksNeutral s) rem | _ -> [] let rec remove_list fs ts = match ts with | [] -> [] | Node (gs,args)::rem -> begin match sub gs fs with | [] -> args @ remove_list fs rem | ks -> Node (ks,args) :: remove_list fs rem end | t::rem -> t::remove_list fs rem let lift_neutral fs ts k = match neutrals false [] ts with | [] -> Node (fs,ts)::k | lift -> Node (lift@fs, remove_list lift ts)::k let check_node fs ts k = match ts with | Node (si,args)::rem when some_font fs && font_trees ts -> begin match all_props (other_props fs) ts with | [] -> lift_neutral fs ts k | ps -> let lift,keep = extract_props ps si in lift_neutral (lift@fs) (clean (Node (keep,args)) rem) k end | _ -> lift_neutral fs ts k let rec as_list i j ts k = if i > j then k else (clean ts.(i)) (as_list (i+1) j ts k) let remove s = function | Node (os,ts) -> node (sub os s) ts | t -> t and is_text_blank = function | Text _ | Blanks _ -> true | _ -> false and is_node = function | Node (_::_,_) -> true | _ -> false let rec cut_begin p ts l i = if i >= l then l,[] else if p ts.(i) then let j,l = cut_begin p ts l (i+1) in j,ts.(i)::l else i,[] let cut_end p ts l = let rec do_rec r i = if i < 0 then i,r else if p ts.(i) then do_rec (ts.(i)::r) (i-1) else i,r in do_rec [] (l-1) let is_other s = match s.nat with | Other -> true | _ -> false let rec deeper i j ts k = let rec again r i = if i > j then r else match ts.(i) with | Node ([],args) -> let b1 = List.exists is_node args in again (b1 || r) (i+1) | Node (s,args) when List.exists is_other s -> let r = again r (i+1) in if not r then ts.(i) <- Node (s,opt true (Array.of_list args) []) ; r | _ -> again r (i+1) in if again false i then begin let ts = as_list i j ts [] in let rs = opt true (Array.of_list ts) k in rs end else as_list i j ts k and trees i j ts k = if i > j then k else match factorize i j ts with | [] -> deeper i j ts k | fs -> let rec zyva cur fs k = match fs with | [] -> deeper cur j ts k | ((ii,jj),gs)::rem -> for k=ii to jj do ts.(k) <- remove gs ts.(k) done ; deeper cur (ii-1) ts (check_node gs (trees ii jj ts []) (zyva (jj+1) rem k)) in let fs = select_factors fs in if !Emisc.verbose > 1 then begin prerr_endline "selected" ; List.iter (fun ((i,j),fs) -> Printf.fprintf stderr " %d,%d:" i j ; List.iter (fun f -> output_string stderr (" "^f.txt)) fs) fs ; prerr_endline "" end ; zyva i fs k and opt_onodes ts i = match ts.(i) with | ONode (o,c,args) -> begin match opt false (Array.of_list args) [] with | [Node (s,args)] when false -> let s1, s2 = partition_color s in ts.(i) <- begin match s1, s2 with | [],[] -> assert false | [],s -> ONode (o,c,[Node (s, args)]) | s,[] -> Node (s,[ONode (o,c,args)]) | _,_ -> Node (s1, [ONode (o,c,[Node (s2, args)])]) end | t -> ts.(i) <- ONode (o,c,t) end | _ -> () and opt top ts k = let l = Array.length ts in for i = 0 to l-1 do opt_onodes ts i done ; let p = is_text_blank in let start,pre = cut_begin p ts l 0 in if start >= l then pre@k else let fin,post = cut_end p ts l in if top then pre@trees start fin ts (post@k) else extend_blanks pre (trees start fin ts []) post k and extend_blanks pre ts post k = match ts with | [Node (s,args)] when pre <> [] && post <> [] && List.exists blanksNeutral s && is_blanks pre && is_blanks post -> let neutral,not_neutral = List.partition blanksNeutral s in [Node (neutral, (match not_neutral with | [] -> pre@args@post@k | _ -> pre@Node (not_neutral,args)::post@k))] | _ -> pre@ts@post@k let main chan ts = if !Emisc.verbose > 2 then begin eprintf "**Ultra input **\n" ; Pp.ptrees stderr ts ; eprintf "** Ultra end**\n%!" ; () end ; let ci = costs Htmllex.cost ts in let rs = opt true (Array.of_list (Explode.trees ts)) [] in let cf = costs Htmltext.cost rs in if compare ci cf < 0 then begin if !Emisc.verbose > 1 then begin prerr_endline "*********** Pessimization ***********" ; Pp.ptrees stderr ts ; prerr_endline "*********** Into ***********" ; Pp.trees stderr rs end ; Pp.ptrees chan ts end else begin if !Emisc.verbose > 2 then begin eprintf "** Ultra output **\n" ; Pp.trees stderr rs ; eprintf "** Ultra end**\n%!" ; () end ; Pp.trees chan rs end hevea-2.09/htmlCommon.ml0000644004317100512160000013442312017660721015242 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Output function for a strange html model : - Text elements can occur anywhere and are given as in latex - A new grouping construct is given (open_group () ; close_group ()) *) open Misc open Element open MyStack open Length open Printf type block = | H1 | H2 | H3 | H4 | H5 | H6 | PRE | TABLE | TR | TD | DISPLAY of bool | DFLOW | QUOTE | BLOCKQUOTE | DIV | UL | OL | DL | LI | DD | DT | GROUP | AFTER | DELAY | FORGET | INTERN | P | NADA | OTHER of string let string_of_block = function | H1 -> "h1" | H2 -> "h2" | H3 -> "h3" | H4 -> "h4" | H5 -> "h5" | H6 -> "h6" | PRE -> "pre" | TABLE -> "table" | TR -> "tr" | TD -> "td" | DISPLAY false -> "display" | DISPLAY true -> "display (center)" | DFLOW -> "dflow" | QUOTE -> "quote" | BLOCKQUOTE -> "blockquote" | DIV -> "div" | UL -> "ul" | OL -> "ol" | DL -> "dl" | GROUP -> "" | AFTER -> "after" | DELAY -> "delay" | FORGET -> "forget" | P -> "p" | NADA -> "nada" | INTERN -> "intern" | LI -> "li" | DD -> "dd" | DT -> "dt" | OTHER s -> s let block_t = Hashtbl.create 17 let no_opt = false let add b = Hashtbl.add block_t (string_of_block b) b and add_verb s b = Hashtbl.add block_t s b let () = add H1 ; add H2 ; add H3 ; add H4 ; add H5 ; add H6 ; add PRE ; add TABLE ; add TR ; add TD ; add (DISPLAY false) ; add QUOTE ; add BLOCKQUOTE ; add DIV ; add UL ; add OL ; add DL ; begin if no_opt then Hashtbl.add block_t "" INTERN else add GROUP end ; add AFTER ; add DELAY ; add FORGET ; add P ; add NADA let failclose s b1 b2= raise (Misc.Close (s^": '"^string_of_block b1^"' closes '"^ string_of_block b2^"'")) let find_block s = let s = String.lowercase s in try Hashtbl.find block_t s with | Not_found -> OTHER s let eq_tags t1 t2 = match t1, t2 with | DISPLAY _, DISPLAY _ -> true | _, _ -> t1=t2 let check_block_closed opentag closetag = if not (eq_tags opentag closetag) && not (opentag = AFTER && closetag = GROUP) then failclose "html" closetag opentag let display_arg centering _verbose = let cl = if !displayverb then "vdisplay" else "display" in let cl = if centering then cl^(if !displayverb then " vdcenter" else " dcenter") else cl in let arg = "class=\""^cl^"\"" in arg (* output globals *) type t_env = {here : bool ; env : text} type t_top = {top_pending : text list ; top_active : t_env list ;} type style_info = | Nothing of t_top | Activate of t_top | Closed of t_top * int | ActivateClosed of t_top | NotMe | Insert of bool * text list let get_top_lists = function | Nothing x -> x | Activate x -> x | _ -> raise Not_found let do_pretty_mods stderr f mods = let rec do_rec stderr = function [x] -> f stderr x | x::xs -> Printf.fprintf stderr "%a; %a" f x do_rec xs | [] -> () in Printf.fprintf stderr "[%a]" do_rec mods let tbool = function | true -> "+" | false -> "-" let pretty_mods stderr = do_pretty_mods stderr (fun stderr text -> Printf.fprintf stderr "%s" (pretty_text text)) and pretty_tmods stderr = do_pretty_mods stderr (fun stderr {here=here ; env = env} -> Printf.fprintf stderr "%s%s" (tbool here) (pretty_text env)) let pretty_top_styles stderr {top_pending = pending ; top_active = active} = Printf.fprintf stderr "{top_pending=%a, top_active=%a}" pretty_mods pending pretty_tmods active let tbool = function | true -> "+" | false -> "-" let pretty_top stderr = function | Nothing x -> Printf.fprintf stderr "Nothing %a" pretty_top_styles x | Activate x -> Printf.fprintf stderr "Activate %a" pretty_top_styles x | Closed _ -> Printf.fprintf stderr "Closed" | ActivateClosed _ -> Printf.fprintf stderr "ActivateClosed" | NotMe -> Printf.fprintf stderr "NotMe" | Insert (b,active) -> Printf.fprintf stderr "Insert %s %a" (tbool b) pretty_mods active type status = { mutable nostyle : bool ; mutable pending : text list ; mutable active : t_env list ; mutable top : style_info ; mutable out : Out.t} let as_env {env=env} = env let as_envs tenvs r = List.fold_right (fun x r -> as_env x::r) tenvs r let to_pending pending active = pending @ as_envs active [] let with_new_out out = {out with out = Out.create_buff ()} let cur_out = ref {nostyle=false ; pending = [] ; active = [] ; top = NotMe ; out = Out.create_null ()} type stack_item = Normal of block * string * status | Freeze of (unit -> unit) exception PopFreeze let push_out s (a,b,c) = push s (Normal (a,b,c)) let pretty_stack s = MyStack.pretty (function Normal (s,args,_) -> "["^string_of_block s^"]-{"^args^"}" | Freeze _ -> "Freeze") s let pop_out s = match pop s with | Normal (a,b,c) -> a,b,c | Freeze _ -> raise PopFreeze and top_out s = match top s with | Normal (a,b,c) -> a,b,c | Freeze _ -> raise PopFreeze let out_stack = MyStack.create_init "out_stack" (Normal (NADA,"",!cur_out)) type saved_out = status * stack_item MyStack.saved let save_out () = !cur_out, MyStack.save out_stack and restore_out (a,b) = if !cur_out != a then begin MyStack.finalize out_stack (function | Normal (_,_,x) -> x == a | _ -> false) (function | Normal (_,_,_out) -> () | _ -> ()) end ; cur_out := a ; MyStack.restore out_stack b let pblock () = match MyStack.top out_stack with | Normal (s,_,_) -> s | _ -> NADA and p2block () = MyStack.top2 out_stack let do_put_char c = if !verbose > 3 then prerr_endline ("put_char: |"^String.escaped (String.make 1 c)^"|"); Out.put_char !cur_out.out c and do_put s = if !verbose > 3 then prerr_endline ("put: |"^String.escaped s^"|"); Out.put !cur_out.out s ; () (* Flags section *) (* Style information for caller *) type flags_t = { mutable table_inside:bool; mutable in_math : bool; mutable ncols:int; mutable empty:bool; mutable blank:bool; mutable saw_par: bool ; mutable vsize:int; mutable nrows:int; mutable table_vsize:int; mutable nitems:int; mutable dt:string; mutable dcount:string; mutable in_pre:bool; mutable insert: (block * string) option; mutable insert_attr: (block * string) option; } let pretty_cur {pending = pending ; active = active ; top = top} = Printf.fprintf stderr "pending=%a, active=%a\n" pretty_mods pending pretty_tmods active ; Printf.fprintf stderr "top = %a" pretty_top top ; prerr_endline "" let activate_top out = match out.top with | Nothing x -> out.top <- Activate x | _ -> () and close_top n out = match out.top with | Nothing top -> out.top <- Closed (top, n+Out.get_pos out.out) | Activate top -> out.top <- ActivateClosed top | _ -> () let debug_attr stderr = function | None -> Printf.fprintf stderr "None" | Some (tag,attr) -> Printf.fprintf stderr "'%s' '%s'" (string_of_block tag) attr let debug_flags f = Printf.fprintf stderr "attr=%a\n" debug_attr f.insert_attr ; flush stderr let flags = { table_inside = false; ncols = 0; in_math = false; empty = true; blank = true; saw_par = false ; vsize = 0; nrows = 0; table_vsize = 0; nitems = 0; dt = ""; dcount = ""; in_pre = false; insert = None; insert_attr = None; } let copy_flags { table_inside = table_inside; ncols = ncols; in_math = in_math; empty = empty; blank = blank; saw_par = saw_par ; vsize = vsize; nrows = nrows; table_vsize = table_vsize; nitems = nitems; dt = dt; dcount = dcount; in_pre = in_pre; insert = insert; insert_attr = insert_attr; } = { table_inside = table_inside; ncols = ncols; in_math = in_math; empty = empty; blank = blank; saw_par = saw_par ; vsize = vsize; nrows = nrows; table_vsize = table_vsize; nitems = nitems; dt = dt; dcount = dcount; in_pre = in_pre; insert = insert; insert_attr = insert_attr; } and set_flags f { table_inside = table_inside ; ncols = ncols; in_math = in_math; empty = empty; blank = blank; saw_par = saw_par ; vsize = vsize; nrows = nrows; table_vsize = table_vsize; nitems = nitems; dt = dt; dcount = dcount; in_pre = in_pre; insert = insert; insert_attr = insert_attr; } = f.table_inside <- table_inside; f.ncols <- ncols; f.in_math <- in_math; f.empty <- empty; f.blank <- blank; f.saw_par <- saw_par ; f.vsize <- vsize; f.nrows <- nrows; f.table_vsize <- table_vsize; f.nitems <- nitems; f.dt <- dt; f.dcount <- dcount; f.in_pre <- in_pre; f.insert <- insert ; f.insert_attr <- insert_attr ; (* Independant stacks for flags *) type stack_t = { s_table_inside : bool MyStack.t ; s_saved_inside : bool MyStack.t ; s_in_math : bool MyStack.t ; s_ncols : int MyStack.t ; s_empty : bool MyStack.t ; s_blank : bool MyStack.t ; s_saw_par : bool MyStack.t ; s_vsize : int MyStack.t ; s_nrows : int MyStack.t ; s_table_vsize : int MyStack.t ; s_nitems : int MyStack.t ; s_dt : string MyStack.t ; s_dcount : string MyStack.t ; s_insert : (block * string) option MyStack.t ; s_insert_attr : (block * string) option MyStack.t ; (* Other stacks, not corresponding to flags *) s_active : Out.t MyStack.t ; s_after : (string -> string) MyStack.t } let stacks = { s_table_inside = MyStack.create "inside" ; s_saved_inside = MyStack.create "saved_inside" ; s_in_math = MyStack.create_init "in_math" false ; s_ncols = MyStack.create "ncols" ; s_empty = MyStack.create_init "empty" false; s_blank = MyStack.create_init "blank" false ; s_saw_par = MyStack.create "saw_par" ; s_vsize = MyStack.create "vsize" ; s_nrows = MyStack.create_init "nrows" 0 ; s_table_vsize = MyStack.create_init "table_vsize" 0 ; s_nitems = MyStack.create_init "nitems" 0 ; s_dt = MyStack.create_init "dt" "" ; s_dcount = MyStack.create_init "dcount" "" ; s_insert = MyStack.create_init "insert" None; s_insert_attr = MyStack.create_init "insert_attr" None; s_active = MyStack.create "Html.active" ; s_after = MyStack.create "Html.after" } type saved_stacks = { ss_table_inside : bool MyStack.saved ; ss_saved_inside : bool MyStack.saved ; ss_in_math : bool MyStack.saved ; ss_ncols : int MyStack.saved ; ss_empty : bool MyStack.saved ; ss_blank : bool MyStack.saved ; ss_saw_par : bool MyStack.saved ; ss_vsize : int MyStack.saved ; ss_nrows : int MyStack.saved ; ss_table_vsize : int MyStack.saved ; ss_nitems : int MyStack.saved ; ss_dt : string MyStack.saved ; ss_dcount : string MyStack.saved ; ss_insert : (block * string) option MyStack.saved ; ss_insert_attr : (block * string) option MyStack.saved ; (* Other stacks, not corresponding to flags *) ss_active : Out.t MyStack.saved ; ss_after : (string -> string) MyStack.saved } let save_stacks () = { ss_table_inside = MyStack.save stacks.s_table_inside ; ss_saved_inside = MyStack.save stacks.s_saved_inside ; ss_in_math = MyStack.save stacks.s_in_math ; ss_ncols = MyStack.save stacks.s_ncols ; ss_empty = MyStack.save stacks.s_empty ; ss_blank = MyStack.save stacks.s_blank ; ss_saw_par = MyStack.save stacks.s_saw_par ; ss_vsize = MyStack.save stacks.s_vsize ; ss_nrows = MyStack.save stacks.s_nrows ; ss_table_vsize = MyStack.save stacks.s_table_vsize ; ss_nitems = MyStack.save stacks.s_nitems ; ss_dt = MyStack.save stacks.s_dt ; ss_dcount = MyStack.save stacks.s_dcount ; ss_insert = MyStack.save stacks.s_insert ; ss_insert_attr = MyStack.save stacks.s_insert_attr ; ss_active = MyStack.save stacks.s_active ; ss_after = MyStack.save stacks.s_after } and restore_stacks { ss_table_inside = saved_table_inside ; ss_saved_inside = saved_saved_inside ; ss_in_math = saved_in_math ; ss_ncols = saved_ncols ; ss_empty = saved_empty ; ss_blank = saved_blank ; ss_saw_par = saved_saw_par ; ss_vsize = saved_vsize ; ss_nrows = saved_nrows ; ss_table_vsize = saved_table_vsize ; ss_nitems = saved_nitems ; ss_dt = saved_dt ; ss_dcount = saved_dcount ; ss_insert = saved_insert ; ss_insert_attr = saved_insert_attr ; ss_active = saved_active ; ss_after = saved_after } = MyStack.restore stacks.s_table_inside saved_table_inside ; MyStack.restore stacks.s_saved_inside saved_saved_inside ; MyStack.restore stacks.s_in_math saved_in_math ; MyStack.restore stacks.s_ncols saved_ncols ; MyStack.restore stacks.s_empty saved_empty ; MyStack.restore stacks.s_blank saved_blank ; MyStack.restore stacks.s_saw_par saved_saw_par ; MyStack.restore stacks.s_vsize saved_vsize ; MyStack.restore stacks.s_nrows saved_nrows ; MyStack.restore stacks.s_table_vsize saved_table_vsize ; MyStack.restore stacks.s_nitems saved_nitems ; MyStack.restore stacks.s_dt saved_dt ; MyStack.restore stacks.s_dcount saved_dcount ; MyStack.restore stacks.s_insert saved_insert ; MyStack.restore stacks.s_insert_attr saved_insert_attr ; MyStack.restore stacks.s_active saved_active ; MyStack.restore stacks.s_after saved_after let check_stack what = if not (MyStack.empty what) && not !silent then begin prerr_endline ("Warning: stack "^MyStack.name what^" is non-empty in Html.finalize") ; end let check_stacks () = match stacks with { s_table_inside = s_table_inside ; s_saved_inside = s_saved_inside ; s_in_math = s_in_math ; s_ncols = s_ncols ; s_empty = s_empty ; s_blank = s_blank ; s_saw_par = s_saw_par ; s_vsize = s_vsize ; s_nrows = s_nrows ; s_table_vsize = s_table_vsize ; s_nitems = s_nitems ; s_dt = s_dt ; s_dcount = s_dcount ; s_insert = s_insert ; s_insert_attr = s_insert_attr ; s_active = s_active ; s_after = s_after } -> check_stack s_table_inside ; check_stack s_saved_inside ; check_stack s_in_math ; check_stack s_ncols ; check_stack s_empty ; check_stack s_blank ; check_stack s_saw_par ; check_stack s_vsize ; check_stack s_nrows ; check_stack s_table_vsize ; check_stack s_nitems ; check_stack s_dt ; check_stack s_dcount ; check_stack s_insert ; check_stack s_insert_attr ; check_stack s_active ; check_stack s_after (* Full state saving *) type saved = flags_t * saved_stacks * saved_out let check () = let saved_flags = copy_flags flags and saved_stacks = save_stacks () and saved_out = save_out () in saved_flags, saved_stacks, saved_out and hot (f,s,o) = set_flags flags f ; restore_stacks s ; restore_out o let sbool = function true -> "true" | _ -> "false" let prerr_flags s = prerr_endline ("<"^string_of_int (MyStack.length stacks.s_empty)^"> "^s^ " empty="^sbool flags.empty^ " blank="^sbool flags.blank^ " table="^sbool flags.table_inside) let is_header = function | H1 | H2 | H3 | H4 | H5 | H6 -> true | _ -> false let is_list = function UL | DL | OL -> true | _ -> false let string_of_into = function | Some n -> "+"^string_of_int n | None -> "-" (* styles *) let trim_quotes s = (* used for ensuring colors are passed without "" *) let (i, l) = if s.[0] = '"' then (1, String.length s - 2) else (0, String.length s) in String.sub s i l (* '"' *) let size_html5 = function | 1 -> "xx-small" | 2 -> "small" | 3 -> "medium" | 4 -> "large" | 5 -> "x-large" | 6 -> "xx-large" | 7 -> "xx-large" | _ -> raise (Misc.fatal "size_html5") let do_close_mod = function | Style m -> if flags.in_math && !Parse_opts.mathml then if m="mtext" then do_put ("") else do_put "" else do_put ("") | StyleAttr (t,_) -> if flags.in_math && !Parse_opts.mathml then () else do_put ("") | (Color _ | Font _) -> if flags.in_math && !Parse_opts.mathml then do_put "" else do_put "" and do_open_mod e = if !verbose > 3 then prerr_endline ("do_open_mod: "^pretty_text e) ; match e with | Style m -> if flags.in_math && !Parse_opts.mathml then if m="mtext" then do_put ("<"^m^">") else do_put (" "font-weight: bold " | "i" -> "font-style: italic " | "tt" -> "font-family: monospace " | "em" -> "font-style: italic " | _ -> m)^ "\">") else do_put ("<"^m^">") | StyleAttr (t,a) -> if flags.in_math && !Parse_opts.mathml then () else do_put ("<"^t^" "^a^">") | Font i -> if flags.in_math && !Parse_opts.mathml then do_put ("") else (* Convert size from 1 to 7 in percentage, following standard *) do_put (sprintf "" (size_html5 i)) | Color s -> if flags.in_math && !Parse_opts.mathml then do_put ("") else do_put (sprintf "" (trim_quotes s)) let do_close_tmod = function | {here = true ; env = env} -> do_close_mod env | _ -> () let close_active_mods active = List.iter do_close_tmod active let do_close_mods () = close_active_mods !cur_out.active ; !cur_out.active <- [] ; !cur_out.pending <- [] let do_close_mods_pred pred same_constr = let tpred {env=env} = pred env in let rec split_again = function | [] -> [],None,[] | {here = false ; env=env} :: rest when same_constr env && not (pred env) -> [],Some env,rest | m :: rest -> let to_close,to_open,to_keep = split_again rest in match to_open with | Some _ -> m::to_close,to_open,to_keep | None -> to_close,to_open,m::to_keep in let rec split = function | [] -> [],None,[] | m :: rest -> let to_close,close,to_keep = split rest in match close with | None -> if tpred m then if m.here then [],Some m.env,to_keep else [],None,to_keep else [], None, m::to_keep | Some _ -> m::to_close,close,to_keep in let rec filter_pred = function | [] -> [] | x :: rest -> if pred x then filter_pred rest else x::filter_pred rest in let to_close,close,to_keep = split !cur_out.active in filter_pred (match close with | None -> [] | Some env -> List.iter do_close_tmod to_close ; do_close_mod env ; let (to_close_open,to_open,to_keep) = split_again to_keep in begin match to_open with | None -> !cur_out.active <- to_keep ; as_envs to_close [] | Some env -> !cur_out.active <- to_keep ; List.iter do_close_tmod to_close_open ; as_envs to_close (as_envs to_close_open [env]) end), close let close_mods () = do_close_mods () let is_style = function | Style _|StyleAttr (_,_) -> true | _ -> false and is_font = function Font _ -> true | _ -> false and is_color = function Color _ -> true | _ -> false let do_open_these_mods do_open_mod pending = let rec do_rec color size = function | [] -> [] | Color _ as e :: rest -> if color then let rest = do_rec true size rest in {here=false ; env=e}::rest else begin let rest = do_rec true size rest in do_open_mod e ; {here=true ; env=e}::rest end | Font _ as e :: rest -> if size then let rest = do_rec color true rest in {here=false ; env=e}::rest else let rest = do_rec color true rest in do_open_mod e ; {here=true ; env=e}::rest | e :: rest -> let rest = do_rec color size rest in do_open_mod e ; {here=true ; env=e} :: rest in do_rec false false pending let activate caller pending = let r = do_open_these_mods (fun _ -> ()) pending in if !verbose > 2 then begin prerr_string ("activate: ("^caller^")") ; pretty_mods stderr pending ; prerr_string " -> " ; pretty_tmods stderr r ; prerr_endline "" end ; r let get_top_active = function | Nothing {top_active = active} -> active | Activate {top_pending = pending ; top_active = active} -> activate "get_top_active" pending @ active | _ -> [] let all_to_pending out = try let top = get_top_lists out.top in to_pending out.pending out.active @ to_pending top.top_pending top.top_active with | Not_found -> to_pending out.pending out.active let all_to_active out = activate "all_to_active" (all_to_pending out) (* Clear styles *) let clearstyle () = close_active_mods !cur_out.active ; close_active_mods (get_top_active !cur_out.top) ; close_top 0 !cur_out ; !cur_out.pending <- [] ; !cur_out.active <- [] (* Avoid styles *) let nostyle () = clearstyle () ; !cur_out.nostyle <- true (* Create new statuses, with appropriate pending lists *) let create_status_from_top out = match out.top with | NotMe|Closed _|ActivateClosed _|Insert (_,_) -> {nostyle=out.nostyle ; pending = [] ; active = [] ; top = Nothing {top_pending = out.pending ; top_active = out.active} ; out = Out.create_buff ()} | Nothing {top_pending = top_pending ; top_active=top_active} -> assert (out.active=[]) ; {nostyle=out.nostyle ; pending = [] ; active = [] ; top = Nothing {top_pending = out.pending @ top_pending ; top_active = top_active} ; out = Out.create_buff ()} | Activate {top_pending = top_pending ; top_active=top_active} -> {nostyle=out.nostyle ; pending = [] ; active = [] ; top= Nothing {top_pending = out.pending ; top_active = out.active @ activate "top" top_pending @ top_active} ; out=Out.create_buff ()} let create_status_from_scratch nostyle pending = {nostyle=nostyle ; pending =pending ; active = [] ; top=NotMe ; out = Out.create_buff ()} let do_open_mods () = if !verbose > 2 then begin prerr_string "=> do_open_mods: " ; pretty_cur !cur_out end ; let now_active = do_open_these_mods do_open_mod !cur_out.pending in activate_top !cur_out ; !cur_out.active <- now_active @ !cur_out.active ; !cur_out.pending <- [] ; if !verbose > 2 then begin prerr_string "<= do_open_mods: " ; pretty_cur !cur_out end let do_pending () = do_open_mods () let one_cur_size pending active = let rec cur_size_active = function | [] -> raise Not_found | {here=true ; env=Font i}::_ -> i | _::rest -> cur_size_active rest in let rec cur_size_pending = function | [] -> cur_size_active active | Font i::_ -> i | _::rest -> cur_size_pending rest in cur_size_pending pending let cur_size out = try one_cur_size out.pending out.active with Not_found -> try let top_out = get_top_lists out.top in one_cur_size top_out.top_pending top_out.top_active with Not_found -> 3 let one_first_same x same_constr pending active = let rec same_active = function | {here=true ; env=y} :: rest -> if same_constr y then x=y else same_active rest | _::rest -> same_active rest | [] -> raise Not_found in let rec same_pending = function | [] -> same_active active | y::rest -> if same_constr y then x=y else same_pending rest in same_pending pending let first_same x same_constr out = try one_first_same x same_constr out.pending out.active with Not_found -> try let top_out = get_top_lists out.top in one_first_same x same_constr top_out.top_pending top_out.top_active with | Not_found -> false let already_here = function | Font i -> i = cur_size !cur_out | x -> first_same x (match x with Style _|StyleAttr (_,_) -> is_style | Font _ -> is_font | Color _ -> is_color) !cur_out let ok_pre x = match x with | Color _ | Font _ | Style "sub" | Style "sup" -> not !Parse_opts.pedantic | _ -> true let rec filter_pre = function [] -> [] | e::rest -> if ok_pre e then e::filter_pre rest else filter_pre rest let ok_mod e = (not flags.in_pre || ok_pre e) && (not (already_here e)) let get_fontsize () = cur_size !cur_out let rec erase_rec pred = function [] -> None | s::rest -> if pred s then Some rest else match erase_rec pred rest with | Some rest -> Some (s::rest) | None -> None let erase_mod_pred pred same_constr = if not !cur_out.nostyle then begin match erase_rec pred !cur_out.pending with | Some pending -> !cur_out.pending <- pending | None -> let re_open,closed = do_close_mods_pred pred same_constr in match closed with | Some _ -> !cur_out.pending <- !cur_out.pending @ re_open | None -> activate_top !cur_out ; try let tops = get_top_lists !cur_out.top in !cur_out.active <- !cur_out.active @ activate "erase" tops.top_pending @ tops.top_active ; close_top 0 !cur_out ; let re_open,_ = do_close_mods_pred pred same_constr in !cur_out.pending <- !cur_out.pending @ re_open with | Not_found -> () end let same_env = function | Style s1 -> (function | Style s2 -> s1 = s2 | _ -> false) | StyleAttr (t1,a1) -> (function | StyleAttr (t2,a2)-> t1 = t2 && a1=a2 | _ -> false) | Font i1 -> (function | Font i2 -> i1 = i2 | _ -> false) | Color s1 -> (function | Color s2 -> s1 = s2 | _ -> false) and same_constr = function | Color _ -> is_color | Font _ -> is_font | Style _|StyleAttr (_,_) -> is_style let erase_mods ms = let rec erase_rec = function | [] -> () | m :: ms -> erase_mod_pred (same_env m) (same_constr m) ; erase_rec ms in erase_rec ms let open_mod m = if not !cur_out.nostyle then begin if !verbose > 3 then begin prerr_endline ("=> open_mod: "^pretty_text m^" ok="^sbool (ok_mod m)) ; pretty_cur !cur_out end ; begin match m with | Style "em" -> if already_here m then erase_mods [m] else !cur_out.pending <- m :: !cur_out.pending | _ -> if ok_mod m then begin !cur_out.pending <- m :: !cur_out.pending end end ; if !verbose > 3 then begin prerr_endline ("<= open_mod: "^pretty_text m) ; pretty_cur !cur_out end ; end let rec open_mods = function m::rest -> open_mods rest ; open_mod m | [] -> () let has_mod m = already_here m (* Blocks *) let pstart = function | H1 | H2 | H3 | H4 | H5 | H6 | PRE | DIV | BLOCKQUOTE | UL | OL | DL | TABLE -> true | _ -> false let transmit_par s = match s with | GROUP|AFTER|INTERN|DFLOW|P|LI -> false | _ -> true let is_group = function | GROUP -> true | _ -> false and transmit_par_or_par = function | P -> true | s -> transmit_par s and is_pre = function | PRE -> true | _ -> false let rec do_try_open_block s = if !verbose > 2 then prerr_flags ("=> try open '"^string_of_block s^"'"); begin match s with | DISPLAY _ -> do_try_open_block TABLE ; do_try_open_block TR | _ -> push stacks.s_empty flags.empty ; push stacks.s_blank flags.blank ; push stacks.s_insert flags.insert ; push stacks.s_saw_par flags.saw_par ; flags.empty <- true ; flags.blank <- true ; flags.insert <- None ; flags.saw_par <- false ; begin match s with | PRE -> flags.in_pre <- true (* No stack, cannot nest *) | TABLE -> push stacks.s_table_vsize flags.table_vsize ; push stacks.s_vsize flags.vsize ; push stacks.s_nrows flags.nrows ; flags.table_vsize <- 0 ; flags.vsize <- 0 ; flags.nrows <- 0 | TR -> flags.vsize <- 1 | TD -> push stacks.s_vsize flags.vsize ; flags.vsize <- 1 | _ -> if is_list s then begin push stacks.s_nitems flags.nitems; flags.nitems <- 0 ; if s = DL then begin push stacks.s_dt flags.dt ; push stacks.s_dcount flags.dcount; flags.dt <- ""; flags.dcount <- "" end end end end ; if !verbose > 2 then prerr_flags ("<= try open '"^string_of_block s^"'") let try_open_block s _ = push stacks.s_insert_attr flags.insert_attr ; begin match flags.insert_attr with | Some (TR,_) when s <> TR -> () | _ -> flags.insert_attr <- None end ; do_try_open_block s let do_do_open_block s args = do_put_char '<' ; do_put (string_of_block s) ; if args <> "" then begin if args.[0] <> ' ' then do_put_char ' ' ; do_put args end ; do_put_char '>' let rec do_open_block insert s args = match s with | GROUP|DELAY|FORGET|AFTER|INTERN|DFLOW -> begin match insert with | Some (tag,iargs) -> do_do_open_block tag iargs | _ -> () end | DISPLAY centering -> do_open_block insert TABLE (display_arg centering !verbose) ; do_open_block None TR args | _ -> begin match insert with | Some (tag,iargs) -> if is_list s || s = TABLE || s = P then begin do_do_open_block tag iargs ; do_do_open_block s args end else begin do_do_open_block s args ; do_do_open_block tag iargs end | _ -> do_do_open_block s args end let rec do_try_close_block s = if !verbose > 2 then prerr_flags ("=> try close '"^string_of_block s^"'") ; begin match s with | DISPLAY _ -> do_try_close_block TR ; do_try_close_block TABLE | _ -> let ehere = flags.empty and ethere = pop stacks.s_empty in flags.empty <- (ehere && ethere) ; let bhere = flags.blank and bthere = pop stacks.s_blank in flags.blank <- (bhere && bthere) ; flags.insert <- pop stacks.s_insert ; flags.saw_par <- pop stacks.s_saw_par ; begin match s with | PRE -> flags.in_pre <- false (* PRE cannot nest *) | TABLE -> let p_vsize = pop stacks.s_vsize in flags.vsize <- max (flags.table_vsize + (flags.nrows+1)/3) p_vsize ; flags.nrows <- pop stacks.s_nrows ; flags.table_vsize <- pop stacks.s_table_vsize | TR -> if ehere then begin flags.vsize <- 0 end ; flags.table_vsize <- flags.table_vsize + flags.vsize; if not ehere then flags.nrows <- flags.nrows + 1 | TD -> let p_vsize = pop stacks.s_vsize in flags.vsize <- max p_vsize flags.vsize | _ -> if is_list s then begin flags.nitems <- pop stacks.s_nitems ; if s = DL then begin flags.dt <- pop stacks.s_dt ; flags.dcount <- pop stacks.s_dcount end end end end ; if !verbose > 2 then prerr_flags ("<= try close '"^string_of_block s^"'") let try_close_block s = begin match flags.insert_attr with | Some (tag,_) when tag = s -> flags.insert_attr <- pop stacks.s_insert_attr | _ -> match pop stacks.s_insert_attr with | None -> () | Some (_,_) as x -> flags.insert_attr <- x end ; do_try_close_block s let do_do_close_block s = do_put "' ; match s with TR -> do_put_char '\n' | _ -> () let rec do_close_block insert s = match s with | GROUP|DELAY|FORGET|AFTER|INTERN|DFLOW -> begin match insert with | Some (tag,_) -> do_do_close_block tag | _ -> () end | DISPLAY _ -> do_close_block None TR ; do_close_block insert TABLE | s -> begin match insert with | Some (tag,_) -> if is_list s || s = TABLE || s = P then begin do_do_close_block s; do_do_close_block tag end else begin do_do_close_block tag; do_do_close_block s end | _ -> do_do_close_block s end let check_empty () = flags.empty and make_empty () = flags.empty <- true ; flags.blank <- true ; flags.table_inside <- false ; !cur_out.top <- NotMe ; !cur_out.pending <- to_pending !cur_out.pending !cur_out.active ; !cur_out.active <- [] let check_blank () = flags.blank let no_check () = false let rec open_top_styles = function | NotMe|Insert (_,_) -> (* Real block, inserted block *) begin match !cur_out.top with | Nothing tops -> let mods = to_pending !cur_out.pending !cur_out.active @ to_pending tops.top_pending tops.top_active in assert (!cur_out.active=[]) ; close_active_mods tops.top_active ; !cur_out.top <- Closed (tops,Out.get_pos !cur_out.out); Some mods | Activate tops -> !cur_out.top <- ActivateClosed tops ; let mods = to_pending !cur_out.pending !cur_out.active @ to_pending tops.top_pending tops.top_active in close_active_mods !cur_out.active ; close_active_mods (activate "open_top_styles" tops.top_pending) ; close_active_mods tops.top_active ; Some mods | _ -> let mods = to_pending !cur_out.pending !cur_out.active in close_active_mods !cur_out.active ; Some mods end | Closed (_,n) -> (* Group that closed top_styles (all of them) *) let out = !cur_out in let mods = all_to_pending out in close_top n out ; Some mods | Nothing _ -> (* Group with nothing to do *) None | Activate _ -> (* Just activate styles *) do_open_mods () ; None | ActivateClosed tops -> do_open_mods () ; let r = open_top_styles (Closed (tops,Out.get_pos !cur_out.out)) in r let rec force_block s content = if !verbose > 2 then begin prerr_endline ("=> force_block: ["^string_of_block s^"]"); pretty_stack out_stack ; pretty_cur !cur_out ; Out.debug stderr !cur_out.out ; prerr_newline () end ; let pempty = top stacks.s_empty in if s = FORGET then begin make_empty () ; end else begin begin match s with | TABLE|DISPLAY _ -> flags.table_inside <- true | _ -> () end ; if flags.empty then begin flags.empty <- false; flags.blank <- false ; do_open_mods () ; do_put content end ; (* check pending display material in DFLOW More precisely * closed block s, has a table inside * previous block is DFLOW, with some pending material (pempty = false) A Freeze can be present, then the previous block is DFLOW Then, we need to flush the pending material... *) if not pempty && flags.table_inside then begin let p2 = p2block () in match p2 with | (Normal (DFLOW,_,_)) | Freeze _ -> let _,_,pout = top_out out_stack in if !verbose > 2 then begin Printf.eprintf "CLOSING: '%s': " (string_of_block s) ; Out.debug stderr pout.out ; pretty_stack out_stack ; prerr_endline "" end ; let saved_flags = copy_flags flags in try_close_block s ; let a,b,pout = pop_out out_stack in let saved_out = !cur_out in cur_out := pout ; let fo = match p2 with | Normal (_,_,_) -> force_block DFLOW "" ; None | Freeze f -> let _ = pop out_stack in force_block DFLOW "" ; Some (f) in let _,args,_ = top_out out_stack in force_block TD "" ; open_block TD args ; open_block DFLOW "" ; begin match fo with | Some f -> push out_stack (Freeze f) | None -> () end ; push_out out_stack (a,b,!cur_out) ; try_open_block s b ; cur_out := saved_out ; set_flags flags saved_flags ; flags.ncols <- flags.ncols + 1 | _ -> () end else if !verbose > 2 && not pempty && flags.table_inside then begin Printf.eprintf "NOT CLOSING: '%s': " (string_of_block s) ; pretty_stack out_stack ; let _,_,pout = top_out out_stack in Out.debug stderr pout.out ; prerr_newline () end end ; let true_s = if s = FORGET then pblock() else s in let insert = flags.insert and insert_attr = flags.insert_attr and was_top = !cur_out.top in do_close_mods () ; try_close_block true_s ; do_close_block insert true_s ; let ps,args,pout = pop_out out_stack in check_block_closed ps true_s ; let old_out = !cur_out in cur_out := pout ; if s = FORGET then () else if ps <> DELAY then begin let mods = open_top_styles was_top in do_open_block insert ps (match insert_attr with | Some (this_tag,attr) when this_tag = s -> args^" "^attr | _ -> args) ; begin match was_top with | Insert (_,mods) -> ignore (do_open_these_mods do_open_mod mods) | _ -> () end ; (* prerr_endline "****** NOW *******" ; pretty_cur !cur_out ; Out.debug stderr old_out.out ; prerr_endline "\n**********" ; *) if ps = AFTER then begin let f = pop stacks.s_after in Out.copy_fun f old_out.out !cur_out.out end else begin Out.copy old_out.out !cur_out.out end ; begin match mods with | Some mods -> !cur_out.active <- [] ; !cur_out.pending <- mods | _ -> () end end else begin (* ps = DELAY *) raise (Misc.Fatal ("html: unflushed DELAY")) end ; if !verbose > 2 then begin prerr_endline ("<= force_block: ["^string_of_block s^"]"); pretty_cur !cur_out end and close_block_loc pred s = if !verbose > 2 then prerr_string ("close_block_loc: '"^string_of_block s^"' = "); if not (pred ()) then begin if !verbose > 2 then prerr_endline "do it" ; force_block s ""; true end else begin if !verbose > 2 then prerr_endline "forget it" ; force_block FORGET ""; false end and open_block s args = if !verbose > 2 then begin prerr_endline ("=> open_block '"^string_of_block s^"'"^" arg="^args); pretty_cur !cur_out ; end ; push_out out_stack (s,args,!cur_out) ; cur_out := begin if false && is_group s then create_status_from_top !cur_out else create_status_from_scratch !cur_out.nostyle (let cur_mods = all_to_pending !cur_out in if flags.in_pre || is_pre s then filter_pre cur_mods else cur_mods) end ; try_open_block s args ; if !verbose > 2 then begin prerr_endline ("<= open_block '"^string_of_block s^"'"); pretty_cur !cur_out ; end and close_flow_loc check_empty s = if !verbose > 2 then prerr_endline ("close_flow_loc: "^string_of_block s) ; let active = !cur_out.active and pending = !cur_out.pending in if close_block_loc check_empty s then begin !cur_out.pending <- to_pending pending active ; true end else begin !cur_out.pending <- to_pending pending active ; false end let close_flow s = assert (s <> GROUP) ; if !verbose > 2 then prerr_flags ("=> close_flow '"^string_of_block s^"'"); let _ = close_flow_loc check_empty s in if !verbose > 2 then prerr_flags ("<= close_flow '"^string_of_block s^"'") let insert_block tag arg = begin match !cur_out.top with | Nothing {top_pending=pending ; top_active=active} -> !cur_out.pending <- !cur_out.pending @ to_pending pending active ; assert (!cur_out.active = []) ; !cur_out.top <- Insert (false,[]) | Activate {top_pending=pending ; top_active=active} -> let add_active = activate "insert_block" pending @ active in !cur_out.active <- !cur_out.active @ add_active ; !cur_out.top <- Insert (true,to_pending [] add_active) | Closed (_,n) -> Out.erase_start n !cur_out.out ; !cur_out.top <- Insert (false,[]) | ActivateClosed {top_active=active ; top_pending=pending}-> !cur_out.top <- Insert (false,to_pending pending active) | NotMe -> () | Insert _ -> () end ; flags.insert <- Some (tag,arg) let insert_attr tag attr = match tag,flags.insert_attr with | TD, Some (TR,_) -> () | _, _ -> flags.insert_attr <- Some (tag,attr) let close_block s = let _ = close_block_loc check_empty s in () let erase_block s = if !verbose > 2 then begin Printf.fprintf stderr "erase_block: %s" (string_of_block s); prerr_newline () end ; try_close_block s ; let ts,_,tout = pop_out out_stack in if ts <> s then failclose "erase_block" s ts; cur_out := tout let open_group ss = let e = Style ss in if no_opt || (ss <> "" && (not flags.in_pre || (ok_pre e))) then begin open_block INTERN "" ; if ss <> "" then !cur_out.pending <- !cur_out.pending @ [e] end else open_block GROUP "" and open_aftergroup f = open_block AFTER "" ; flags.empty <- false ; push stacks.s_after f and close_group () = match pblock () with | INTERN -> close_block INTERN | DFLOW -> close_block DFLOW | AFTER -> force_block AFTER "" | _ -> close_block GROUP and erase_group () = match pblock () with | INTERN -> erase_block INTERN | DFLOW -> erase_block DFLOW | AFTER -> erase_block AFTER | _ -> erase_block GROUP (* output requests *) let is_blank = function | ' ' | '\n' -> true | _ -> false let put s = let block = pblock () in match block with | TABLE|TR -> () | _ -> let s_blank = let r = ref true in for i = 0 to String.length s - 1 do r := !r && is_blank (String.unsafe_get s i) done ; !r in do_pending () ; flags.empty <- false; flags.blank <- s_blank && flags.blank ; do_put s let put_char c = let s = pblock () in match s with | TABLE|TR -> () | _ -> let c_blank = is_blank c in do_pending () ; flags.empty <- false; flags.blank <- c_blank && flags.blank ; do_put_char c let flush_out () = Out.flush !cur_out.out let skip_line () = flags.vsize <- flags.vsize + 1 ; put "
\n" let put_length which = function | Pixel x -> put (which^string_of_int x) | Char x -> put (which^string_of_int (Length.font * x)) | Percent x -> put (which ^ string_of_int x ^ "%") | Default -> () | No s -> raise (Misc.Fatal ("No-length '"^s^"' in outManager")) let horizontal_line attr width height = open_block GROUP "" ; nostyle () ; put " () | _ -> put_char ' ' ; put attr end ; begin match width,height with | Default,Default -> put_char '>' | _,_ -> put " style=\""; put_length "width:" width; if width <> Default then put ";"; put_length "height:" height; put "\">" end ; close_block GROUP let line_in_table () = (* put "
" ; *) put "
" ; flags.vsize <- flags.vsize - 1 let freeze f = push out_stack (Freeze f) ; if !verbose > 2 then begin prerr_string "freeze: stack=" ; pretty_stack out_stack end let flush_freeze () = match top out_stack with Freeze f -> let _ = pop out_stack in if !verbose > 2 then begin prerr_string "flush_freeze" ; pretty_stack out_stack end ; f () ; true | _ -> false let pop_freeze () = match top out_stack with Freeze f -> let _ = pop out_stack in f,true | _ -> (fun () -> ()),false let try_open_display () = push stacks.s_ncols flags.ncols ; push stacks.s_table_inside flags.table_inside ; push stacks.s_saved_inside false ; flags.table_inside <- false ; flags.ncols <- 0 and try_close_display () = flags.ncols <- pop stacks.s_ncols ; flags.table_inside <- pop stacks.s_saved_inside || flags.table_inside ; flags.table_inside <- pop stacks.s_table_inside || flags.table_inside let get_block s args = if !verbose > 2 then begin prerr_flags "=> get_block"; end ; do_close_mods () ; let pempty = top stacks.s_empty and pblank = top stacks.s_blank and pinsert = top stacks.s_insert in try_close_block (pblock ()) ; flags.empty <- pempty ; flags.blank <- pblank ; flags.insert <- pinsert; do_close_block None s ; let _,_,pout = pop_out out_stack in let old_out = !cur_out in cur_out := with_new_out pout ; let mods = as_envs !cur_out.active !cur_out.pending in do_close_mods () ; do_open_block None s args ; Out.copy old_out.out !cur_out.out ; !cur_out.pending <- mods ; let r = !cur_out in cur_out := pout ; if !verbose > 2 then begin Out.debug stderr r.out ; prerr_endline ""; prerr_flags "<= get_block" end ; r let hidden_to_string f = (* prerr_string "to_string: " ; Out.debug stderr !cur_out.out ; prerr_endline "" ; *) let old_flags = copy_flags flags in open_block INTERN "" ; f () ; do_close_mods () ; let flags_now = copy_flags flags in let r = Out.to_string !cur_out.out in flags.empty <- true ; close_block INTERN ; set_flags flags old_flags ; r,flags_now let to_string f = let r,_ = hidden_to_string f in r hevea-2.09/.depend0000644004317100512160000002762110565402214014031 0ustar marangetcristalesp.cmi: ./emisc.cmi explode.cmi: ./tree.cmi ./lexeme.cmi ./htmltext.cmi get.cmi: ./lexstate.cmi ./length.cmi htmllex.cmi: ./lexeme.cmi ./emisc.cmi ./css.cmi html.cmi: ./tabular.cmi ./outUnicode.cmi ./out.cmi ./lexstate.cmi \ ./length.cmi ./element.cmi htmlparse.cmi: ./tree.cmi ./lexeme.cmi ./emisc.cmi htmltext.cmi: ./lexeme.cmi info.cmi: ./tabular.cmi ./outUnicode.cmi ./out.cmi ./lexstate.cmi \ ./length.cmi ./element.cmi latexmacros.cmi: ./lexstate.cmi latexscan.cmi: ./outManager.cmi ./lexstate.cmi ./imageManager.cmi lexstate.cmi: ./myStack.cmi ./misc.cmi outManager.cmi: ./tabular.cmi ./outUnicode.cmi ./out.cmi ./lexstate.cmi \ ./length.cmi ./element.cmi package.cmi: ./outManager.cmi ./latexscan.cmi ./imageManager.cmi pp.cmi: ./tree.cmi ./lexeme.cmi ./htmltext.cmi ./css.cmi save.cmi: ./misc.cmi subst.cmi: ./lexstate.cmi tabular.cmi: ./lexstate.cmi ./length.cmi text.cmi: ./tabular.cmi ./outUnicode.cmi ./out.cmi ./lexstate.cmi \ ./length.cmi ./element.cmi ultra.cmi: ./tree.cmi ./lexeme.cmi util.cmi: ./tree.cmi ./htmltext.cmi verb.cmi: ./outManager.cmi ./latexscan.cmi ./imageManager.cmi videoc.cmi: ./outManager.cmi ./latexscan.cmi ./imageManager.cmi zyva.cmi: ./outManager.cmi ./latexscan.cmi ./imageManager.cmi auxx.cmo: ./parse_opts.cmi ./mysys.cmi ./misc.cmi auxx.cmi auxx.cmx: ./parse_opts.cmx ./mysys.cmx ./misc.cmx auxx.cmi buff.cmo: buff.cmi buff.cmx: buff.cmi color.cmo: ./misc.cmi ./colscan.cmi color.cmi color.cmx: ./misc.cmx ./colscan.cmx color.cmi colscan.cmo: ./out.cmi colscan.cmi colscan.cmx: ./out.cmx colscan.cmi counter.cmo: ./misc.cmi ./latexmacros.cmi counter.cmi counter.cmx: ./misc.cmx ./latexmacros.cmx counter.cmi cross.cmo: ./location.cmi cross.cmi cross.cmx: ./location.cmx cross.cmi cut.cmo: ./thread.cmi ./section.cmi ./save.cmi ./myStack.cmi ./misc.cmi \ ./cutOut.cmi ./cross.cmi cut.cmi cut.cmx: ./thread.cmx ./section.cmx ./save.cmx ./myStack.cmx ./misc.cmx \ ./cutOut.cmx ./cross.cmx cut.cmi cutOut.cmo: ./out.cmi cutOut.cmi cutOut.cmx: ./out.cmx cutOut.cmi element.cmo: element.cmi element.cmx: element.cmi emisc.cmo: emisc.cmi emisc.cmx: emisc.cmi entry.cmo: ./save.cmi ./out.cmi entry.cmi entry.cmx: ./save.cmx ./out.cmx entry.cmi esp.cmo: ./ultra.cmi ./pp.cmi ./mysys.cmi ./location.cmi ./htmlparse.cmi \ ./htmllex.cmi ./explode.cmi ./emisc.cmi esp.cmi esp.cmx: ./ultra.cmx ./pp.cmx ./mysys.cmx ./location.cmx ./htmlparse.cmx \ ./htmllex.cmx ./explode.cmx ./emisc.cmx esp.cmi esponja.cmo: ./mysys.cmi ./esp.cmi ./emisc.cmi esponja.cmx: ./mysys.cmx ./esp.cmx ./emisc.cmx explode.cmo: ./util.cmi ./tree.cmi ./lexeme.cmi ./htmltext.cmi explode.cmi explode.cmx: ./util.cmx ./tree.cmi ./lexeme.cmi ./htmltext.cmx explode.cmi foot.cmo: ./section.cmi ./parse_opts.cmi ./myStack.cmi ./misc.cmi foot.cmi foot.cmx: ./section.cmx ./parse_opts.cmx ./myStack.cmx ./misc.cmx foot.cmi get.cmo: ./parse_opts.cmi ./myfiles.cmi ./myStack.cmi ./misc.cmi \ ./lexstate.cmi ./length.cmi ./latexmacros.cmi ./counter.cmi get.cmi get.cmx: ./parse_opts.cmx ./myfiles.cmx ./myStack.cmx ./misc.cmx \ ./lexstate.cmx ./length.cmx ./latexmacros.cmx ./counter.cmx get.cmi hacha.cmo: ./version.cmi ./mysys.cmi ./mylib.cmi ./misc.cmi ./location.cmi \ ./cut.cmi ./cross.cmi hacha.cmx: ./version.cmx ./mysys.cmx ./mylib.cmx ./misc.cmx ./location.cmx \ ./cut.cmx ./cross.cmx hevea.cmo: ./zyva.cmi ./videoc.cmi ./verb.cmi ./text.cmi ./tabular.cmi \ ./save.cmi ./parse_opts.cmi ./package.cmi ./noimage.cmi ./mysys.cmi \ ./mylib.cmi ./myfiles.cmi ./myStack.cmi ./misc.cmi ./location.cmi \ ./lexstate.cmi ./latexscan.cmi ./infoRef.cmo ./info.cmi ./index.cmi \ ./image.cmi ./html.cmi ./hot.cmi ./get.cmi ./esp.cmi ./emisc.cmi \ ./colscan.cmi ./auxx.cmi hevea.cmx: ./zyva.cmx ./videoc.cmx ./verb.cmx ./text.cmx ./tabular.cmx \ ./save.cmx ./parse_opts.cmx ./package.cmx ./noimage.cmx ./mysys.cmx \ ./mylib.cmx ./myfiles.cmx ./myStack.cmx ./misc.cmx ./location.cmx \ ./lexstate.cmx ./latexscan.cmx ./infoRef.cmx ./info.cmx ./index.cmx \ ./image.cmx ./html.cmx ./hot.cmx ./get.cmx ./esp.cmx ./emisc.cmx \ ./colscan.cmx ./auxx.cmx hot.cmo: ./parse_opts.cmi ./misc.cmi ./lexstate.cmi ./latexmacros.cmi \ ./infoRef.cmo ./foot.cmi ./counter.cmi ./color.cmi hot.cmi hot.cmx: ./parse_opts.cmx ./misc.cmx ./lexstate.cmx ./latexmacros.cmx \ ./infoRef.cmx ./foot.cmx ./counter.cmx ./color.cmx hot.cmi htmlCommon.cmo: ./parse_opts.cmi ./out.cmi ./myStack.cmi ./misc.cmi \ ./length.cmi ./latexmacros.cmi ./element.cmi htmlCommon.cmx: ./parse_opts.cmx ./out.cmx ./myStack.cmx ./misc.cmx \ ./length.cmx ./latexmacros.cmx ./element.cmx htmllex.cmo: ./myStack.cmi ./location.cmi ./lexeme.cmi ./emisc.cmi ./css.cmi \ ./buff.cmi htmllex.cmi htmllex.cmx: ./myStack.cmx ./location.cmx ./lexeme.cmi ./emisc.cmx ./css.cmi \ ./buff.cmx htmllex.cmi htmlMath.cmo: ./parse_opts.cmi ./out.cmi ./myStack.cmi ./misc.cmi \ ./lexstate.cmi ./htmlCommon.cmo ./element.cmi htmlMath.cmx: ./parse_opts.cmx ./out.cmx ./myStack.cmx ./misc.cmx \ ./lexstate.cmx ./htmlCommon.cmx ./element.cmx html.cmo: ./tabular.cmi ./parse_opts.cmi ./outUnicode.cmi ./out.cmi \ ./myStack.cmi ./misc.cmi ./mathML.cmo ./lexstate.cmi ./length.cmi \ ./latexmacros.cmi ./htmlMath.cmo ./htmlCommon.cmo html.cmi html.cmx: ./tabular.cmx ./parse_opts.cmx ./outUnicode.cmx ./out.cmx \ ./myStack.cmx ./misc.cmx ./mathML.cmx ./lexstate.cmx ./length.cmx \ ./latexmacros.cmx ./htmlMath.cmx ./htmlCommon.cmx html.cmi htmlparse.cmo: ./tree.cmi ./lexeme.cmi ./htmllex.cmi ./emisc.cmi ./css.cmi \ ./buff.cmi htmlparse.cmi htmlparse.cmx: ./tree.cmi ./lexeme.cmi ./htmllex.cmx ./emisc.cmx ./css.cmi \ ./buff.cmx htmlparse.cmi htmltext.cmo: ./lexeme.cmi ./emisc.cmi htmltext.cmi htmltext.cmx: ./lexeme.cmi ./emisc.cmx htmltext.cmi image.cmo: ./parse_opts.cmi ./out.cmi ./mysys.cmi ./myfiles.cmi ./myStack.cmi \ ./misc.cmi ./location.cmi image.cmi image.cmx: ./parse_opts.cmx ./out.cmx ./mysys.cmx ./myfiles.cmx ./myStack.cmx \ ./misc.cmx ./location.cmx image.cmi index.cmo: ./table.cmi ./parse_opts.cmi ./out.cmi ./mysys.cmi ./misc.cmi \ ./entry.cmi index.cmi index.cmx: ./table.cmx ./parse_opts.cmx ./out.cmx ./mysys.cmx ./misc.cmx \ ./entry.cmx index.cmi info.cmo: ./text.cmi ./parse_opts.cmi ./mysys.cmi ./misc.cmi ./infoRef.cmo \ info.cmi info.cmx: ./text.cmx ./parse_opts.cmx ./mysys.cmx ./misc.cmx ./infoRef.cmx \ info.cmi infoRef.cmo: ./text.cmi ./parse_opts.cmi ./out.cmi ./mysys.cmi ./misc.cmi infoRef.cmx: ./text.cmx ./parse_opts.cmx ./out.cmx ./mysys.cmx ./misc.cmx latexmacros.cmo: ./parse_opts.cmi ./myStack.cmi ./misc.cmi ./lexstate.cmi \ latexmacros.cmi latexmacros.cmx: ./parse_opts.cmx ./myStack.cmx ./misc.cmx ./lexstate.cmx \ latexmacros.cmi latexscan.cmo: ./tabular.cmi ./subst.cmi ./save.cmi ./parse_opts.cmi \ ./outUnicode.cmi ./outManager.cmi ./out.cmi ./mysys.cmi ./mylib.cmi \ ./myfiles.cmi ./myStack.cmi ./misc.cmi ./location.cmi ./lexstate.cmi \ ./length.cmi ./latexmacros.cmi ./imageManager.cmi ./hot.cmi ./get.cmi \ ./foot.cmi ./element.cmi ./counter.cmi ./auxx.cmi latexscan.cmi latexscan.cmx: ./tabular.cmx ./subst.cmx ./save.cmx ./parse_opts.cmx \ ./outUnicode.cmx ./outManager.cmi ./out.cmx ./mysys.cmx ./mylib.cmx \ ./myfiles.cmx ./myStack.cmx ./misc.cmx ./location.cmx ./lexstate.cmx \ ./length.cmx ./latexmacros.cmx ./imageManager.cmi ./hot.cmx ./get.cmx \ ./foot.cmx ./element.cmx ./counter.cmx ./auxx.cmx latexscan.cmi length.cmo: length.cmi length.cmx: length.cmi lexstate.cmo: ./save.cmi ./parse_opts.cmi ./myfiles.cmi ./myStack.cmi \ ./misc.cmi ./location.cmi lexstate.cmi lexstate.cmx: ./save.cmx ./parse_opts.cmx ./myfiles.cmx ./myStack.cmx \ ./misc.cmx ./location.cmx lexstate.cmi location.cmo: ./myStack.cmi location.cmi location.cmx: ./myStack.cmx location.cmi mathML.cmo: ./parse_opts.cmi ./out.cmi ./myStack.cmi ./misc.cmi \ ./lexstate.cmi ./latexmacros.cmi ./htmlCommon.cmo ./element.cmi mathML.cmx: ./parse_opts.cmx ./out.cmx ./myStack.cmx ./misc.cmx \ ./lexstate.cmx ./latexmacros.cmx ./htmlCommon.cmx ./element.cmx misc.cmo: ./location.cmi misc.cmi misc.cmx: ./location.cmx misc.cmi myfiles.cmo: ./parse_opts.cmi ./mylib.cmi ./misc.cmi myfiles.cmi myfiles.cmx: ./parse_opts.cmx ./mylib.cmx ./misc.cmx myfiles.cmi mylib.cmo: mylib.cmi mylib.cmx: mylib.cmi myStack.cmo: myStack.cmi myStack.cmx: myStack.cmi mysys.cmo: mysys.cmi mysys.cmx: mysys.cmi noimage.cmo: noimage.cmi noimage.cmx: noimage.cmi out.cmo: ./misc.cmi out.cmi out.cmx: ./misc.cmx out.cmi outUnicode.cmo: ./parse_opts.cmi ./myfiles.cmi ./misc.cmi outUnicode.cmi outUnicode.cmx: ./parse_opts.cmx ./myfiles.cmx ./misc.cmx outUnicode.cmi package.cmo: ./version.cmi ./subst.cmi ./save.cmi ./parse_opts.cmi \ ./outUnicode.cmi ./outManager.cmi ./mylib.cmi ./myStack.cmi ./misc.cmi \ ./lexstate.cmi ./latexscan.cmi ./latexmacros.cmi ./index.cmi \ ./imageManager.cmi ./get.cmi ./counter.cmi ./color.cmi ./auxx.cmi \ package.cmi package.cmx: ./version.cmx ./subst.cmx ./save.cmx ./parse_opts.cmx \ ./outUnicode.cmx ./outManager.cmi ./mylib.cmx ./myStack.cmx ./misc.cmx \ ./lexstate.cmx ./latexscan.cmx ./latexmacros.cmx ./index.cmx \ ./imageManager.cmi ./get.cmx ./counter.cmx ./color.cmx ./auxx.cmx \ package.cmi parse_opts.cmo: ./version.cmi ./mylib.cmi ./misc.cmi ./location.cmi \ parse_opts.cmi parse_opts.cmx: ./version.cmx ./mylib.cmx ./misc.cmx ./location.cmx \ parse_opts.cmi pp.cmo: ./tree.cmi ./lexeme.cmi ./htmltext.cmi ./css.cmi pp.cmi pp.cmx: ./tree.cmi ./lexeme.cmi ./htmltext.cmx ./css.cmi pp.cmi save.cmo: ./out.cmi ./misc.cmi save.cmi save.cmx: ./out.cmx ./misc.cmx save.cmi section.cmo: ./misc.cmi section.cmi section.cmx: ./misc.cmx section.cmi subst.cmo: ./save.cmi ./out.cmi ./misc.cmi ./lexstate.cmi subst.cmi subst.cmx: ./save.cmx ./out.cmx ./misc.cmx ./lexstate.cmx subst.cmi table.cmo: table.cmi table.cmx: table.cmi tabular.cmo: ./table.cmi ./subst.cmi ./parse_opts.cmi ./myStack.cmi \ ./misc.cmi ./lexstate.cmi ./length.cmi ./latexmacros.cmi ./get.cmi \ tabular.cmi tabular.cmx: ./table.cmx ./subst.cmx ./parse_opts.cmx ./myStack.cmx \ ./misc.cmx ./lexstate.cmx ./length.cmx ./latexmacros.cmx ./get.cmx \ tabular.cmi text.cmo: ./tabular.cmi ./table.cmi ./parse_opts.cmi ./outUnicode.cmi \ ./out.cmi ./myStack.cmi ./misc.cmi ./lexstate.cmi ./length.cmi \ ./latexmacros.cmi ./element.cmi text.cmi text.cmx: ./tabular.cmx ./table.cmx ./parse_opts.cmx ./outUnicode.cmx \ ./out.cmx ./myStack.cmx ./misc.cmx ./lexstate.cmx ./length.cmx \ ./latexmacros.cmx ./element.cmx text.cmi thread.cmo: thread.cmi thread.cmx: thread.cmi ultra.cmo: ./util.cmi ./tree.cmi ./pp.cmi ./htmltext.cmi ./htmllex.cmi \ ./explode.cmi ./emisc.cmi ultra.cmi ultra.cmx: ./util.cmx ./tree.cmi ./pp.cmx ./htmltext.cmx ./htmllex.cmx \ ./explode.cmx ./emisc.cmx ultra.cmi util.cmo: ./tree.cmi ./htmltext.cmi util.cmi util.cmx: ./tree.cmi ./htmltext.cmx util.cmi verb.cmo: ./subst.cmi ./save.cmi ./parse_opts.cmi ./outManager.cmi ./out.cmi \ ./myfiles.cmi ./myStack.cmi ./misc.cmi ./location.cmi ./lexstate.cmi \ ./latexscan.cmi ./latexmacros.cmi ./imageManager.cmi ./get.cmi \ ./counter.cmi verb.cmi verb.cmx: ./subst.cmx ./save.cmx ./parse_opts.cmx ./outManager.cmi ./out.cmx \ ./myfiles.cmx ./myStack.cmx ./misc.cmx ./location.cmx ./lexstate.cmx \ ./latexscan.cmx ./latexmacros.cmx ./imageManager.cmi ./get.cmx \ ./counter.cmx verb.cmi version.cmo: version.cmi version.cmx: version.cmi videoc.cmo: ./subst.cmi ./parse_opts.cmi ./outManager.cmi ./myfiles.cmi \ ./misc.cmi ./lexstate.cmi ./latexscan.cmi ./latexmacros.cmi \ ./imageManager.cmi videoc.cmi videoc.cmx: ./subst.cmx ./parse_opts.cmx ./outManager.cmi ./myfiles.cmx \ ./misc.cmx ./lexstate.cmx ./latexscan.cmx ./latexmacros.cmx \ ./imageManager.cmi videoc.cmi zyva.cmo: ./outManager.cmi ./latexscan.cmi ./imageManager.cmi zyva.cmi zyva.cmx: ./outManager.cmi ./latexscan.cmx ./imageManager.cmi zyva.cmi hevea-2.09/colscan.mli0000644004317100512160000000172607303451221014712 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: colscan.mli,v 1.5 2001-05-25 12:37:20 maranget Exp $ *) (***********************************************************************) exception Error of string val one : Lexing.lexbuf -> float val three : Lexing.lexbuf -> float * float * float val four : Lexing.lexbuf -> float * float * float * float hevea-2.09/outUnicode.mli0000644004317100512160000000555410574257751015431 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet MOSCOVA, INRIA Rocquencourt *) (* *) (* Copyright 2006 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type unichar val show : unichar -> string (* Parse unicode chars given the HTML way *) val parse : string -> unichar (* Set translators from table in subdir 'mappings' *) val set_output_translator : string -> unit val set_input_translator : string -> unit val set_translators : string -> unit (* Translate for output *) exception CannotTranslate val translate_in : char -> (unit -> int) -> unichar val translate_out : unichar -> (char -> unit) -> unit (* Diacritical marks *) val grave : char -> unichar val acute : char -> unichar val circumflex : char -> unichar val tilde : char -> unichar val diaeresis : char -> unichar val ring : char -> unichar val cedilla : char -> unichar val stroke : char -> unichar val macron : char -> unichar val caron : char -> unichar val doubleacute : char -> unichar val doublegrave : char -> unichar val breve : char -> unichar val dotabove : char -> unichar val dotbelow : char -> unichar val linebelow : char -> unichar val ringabove : char -> unichar val ogonek : char -> unichar val circled : char -> unichar val doublestruck : char -> unichar (* Default rendering *) val def_default : unichar -> string -> unit val get_default : unichar -> string (* may raise Not_found *) (* Output unicode char as html *) val html_put : (string -> unit) -> (char -> unit) -> unichar -> unit (* A few constants *) val null : unichar val space : unichar val nbsp : unichar val acute_alone : unichar val grave_alone : unichar val circum_alone : unichar val diaeresis_alone : unichar val cedilla_alone : unichar val tilde_alone : unichar val macron_alone : unichar val doubleacute_alone : unichar val breve_alone : unichar val dotabove_alone : unichar val dotbelow_alone : unichar val linebelow_alone : unichar val ogonek_alone : unichar val ring_alone : unichar val caron_alone : unichar val circled_alone : unichar val eszett : unichar val iques : unichar val iexcl : unichar val minus : unichar val endash : unichar val emdash : 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 hevea-2.09/pub.txt0000644004317100512160000000066612021655445014125 0ustar marangetcristalIt is my pleasure to announce the new, 2.00 release of HEVEA. HEVEA is a LaTeX to HTML translator. The input language is a fairly complete subset of LaTeX2e and the output language is HTML that is (hopefully) correct with respect to version 4.0 (transitional) HEVEA web page is This release is a major one as hevea output has changed from HTML 4.01 transitional to HTML version 5. --Luc hevea-2.09/subst.mli0000644004317100512160000000251612017660721014433 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: subst.mli,v 1.8 2007-06-06 18:24:19 maranget Exp $ *) (***********************************************************************) open Lexstate val do_subst_this : string arg -> string val do_subst_this_list : string list arg -> string val subst_list : string list arg -> string list val subst_this : string -> string val subst_arg : Lexing.lexbuf -> string val subst_expn_arg : Lexing.lexbuf -> string val subst_opt : string -> Lexing.lexbuf -> string list val subst_body : Lexing.lexbuf -> string list val subst_expn_body : Lexing.lexbuf -> string list val subst_arg_list : Lexing.lexbuf -> string list val uppercase : string -> string val lowercase : string -> string hevea-2.09/htmllex.mll0000644004317100512160000002436412017660721014760 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: htmllex.mll,v 1.15 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) { open Lexing open Lexeme open Buff let txt_level = ref 0 and txt_stack = MyStack.create "htmllex" let error msg _lb = raise (Emisc.LexError msg) let init table (s,t)= Hashtbl.add table s t ;; let block = Hashtbl.create 17 ;; List.iter (init block) ["center", () ; "div", (); "blockquote", () ; "h1", () ; "h2", () ;"h3", () ;"h4", () ;"h5", () ;"h6", () ; "pre", () ; "table", () ; "tr",() ; "td", () ; "th",() ; "ol",() ; "ul",(); "p",() ; "li",() ; "dl",() ; "dt", () ; "dd",() ; ] ;; let ptop () = if not (MyStack.empty txt_stack) then begin let pos = MyStack.top txt_stack in Location.print_this_fullpos pos ; prerr_endline "This opening tag is pending" end let warnings = ref true let check_nesting _lb name = try Hashtbl.find block (String.lowercase name) ; if !txt_level <> 0 && !warnings then begin Location.print_fullpos () ; prerr_endline ("Warning, block level element: "^name^" nested inside text-level element") ; ptop () end with | Not_found -> () let text = Hashtbl.create 17 ;; List.iter (init text) ["tt",TT ; "i",I ; "b",B ; "big",BIG ; "small",SMALL ; "strike",STRIKE ; "s",S ; "u",U ; "font",FONT ; "em",EM ; "strong",STRONG ; "dfn",DFN ; "code",CODE ; "samp",SAMP ; "kbd",KBD ; "var",VAR ; "cite",CITE ; "abbr",ABBR ; "acronym",ACRONYM ; "q",Q ; "sub",SUB ; "sup",SUP ; "a", A ; "span", SPAN ; "script", SCRIPT; "style", STYLE; ] ;; let is_textlevel name = try let _ = Hashtbl.find text (String.lowercase name) in true with | Not_found -> false let is_br name = "br" = (String.lowercase name) let is_basefont name = "basefont" = (String.lowercase name) let set_basefont attrs lb = List.iter (fun (name,v,_) -> match String.lowercase name,v with | "size",Some s -> begin try Emisc.basefont := int_of_string s with | _ -> error "BASEFONT syntax" lb end | _ -> ()) attrs let get_value lb = function | Some s -> s | _ -> error "Bad attribute syntax" lb let is_size_relative v = match v with | "xx-small" | "x-small" | "small" | "medium" | "large" | "x-large" | "xx-large" -> false | _ -> true let font_value lb v = let v = get_value lb v in try let k = String.index v ':' in let tag = String.sub v 0 k and v = String.sub v (k+1) (String.length v - (k+1)) in let tag = match String.lowercase tag with | "font-family" -> Ffamily | "font-style" -> Fstyle | "font-variant" -> Fvariant | "font-weight" -> Fweight | "font-size" -> (* Catch case 'font-size:xxx%' which does not commute (with other font-size styles *) if is_size_relative v then raise Exit else Fsize | "color" -> Fcolor | "background-color" -> Fbgcolor | _ -> raise Exit in begin (* checks just one style *) try ignore (String.index v ';') ; raise Exit with | Exit -> raise Exit | _ -> () end ; tag,v with _ -> raise Exit let norm_attrs lb attrs = List.map (fun (name,value,txt) -> match String.lowercase name with | "size" -> SIZE (get_value lb value),txt | "color" -> COLOR (get_value lb value),txt | "face" -> FACE (get_value lb value),txt | "style" -> begin try let st,v = font_value lb value in ASTYLE (st,v),txt with Exit -> OTHER,txt end | _ -> OTHER, txt) attrs let ouvre lb name attrs txt = let uname = String.lowercase name in try let tag = Hashtbl.find text uname in let attrs = norm_attrs lb attrs in incr txt_level ; MyStack.push txt_stack (Location.get_pos ()) ; Open (tag,attrs,txt) with | Not_found -> assert false and ferme _lb name txt = try let tag = Hashtbl.find text (String.lowercase name) in decr txt_level ; begin if not (MyStack.empty txt_stack) then let _ = MyStack.pop txt_stack in () end ; Close (tag,txt) with | Not_found -> Text txt let buff = Buff.create () and abuff = Buff.create () let put s = Buff.put buff s and putc c = Buff.put_char buff c let aput s = Buff.put abuff s } let blank = [' ''\t''\n''\r'] let tag = ['a'-'z''A'-'Z''0'-'9']+ let class_name = ['a'-'z''A'-'Z''0'-'9''-']+ rule main = parse | (blank|" "|"&XA0;")+ as lxm {Blanks lxm} | "" '\n'? {put (lexeme lexbuf)} | _ as c {putc c ; in_comment lexbuf} | eof {error "End of file in comment" lexbuf} and styles = parse | blank+ { styles lexbuf } | eof { [] } | blank* '.' ([^'{'' ''\t''\n']+ as name) blank* ((tag blank*)+ as addname)? ('{' [^'}']* '}' as cl) { Css.Class (name, addname, cl) :: styles lexbuf } | blank* ([^'{']+ '{' [^'}']* '}' as lxm) {Css.Other lxm :: styles lexbuf} (* Extract classes: values of the CLASS attribute *) and extract_classes cls = parse | "" { () } | _ { skip_comment lexbuf } | eof { error "End of file in comment" lexbuf } and skip_tag = parse | [^'>']* '>' { () } | eof { error "End of file in tag" lexbuf } and skip_value = parse | '\'' [^'\'']* '\'' | '"' [^'"']* '"' | '#'?['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+ { () } | "" { error "Attribute syntax" lexbuf } (* '"' *) and extract_value cls = parse | ['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+ as name { Emisc.Strings.add name cls } | '\'' { extract_values_q cls lexbuf } | '"' (* '"' *) { extract_values_qq cls lexbuf } | "" { error "Attribute syntax" lexbuf } and extract_values_q cls = parse | blank+ { extract_values_q cls lexbuf } | class_name as cl { extract_values_q (Emisc.Strings.add cl cls) lexbuf } | '\'' { cls } | "" { error "Class value syntax" lexbuf } and extract_values_qq cls = parse | blank+ { extract_values_qq cls lexbuf } | class_name as cl { extract_values_qq (Emisc.Strings.add cl cls) lexbuf } | '"' { cls } (* '"' *) | "" { error "Class value syntax" lexbuf } and extract_attrs cls = parse (* Blanks or attributes with no value *) | blank+|['a'-'z''A'-'Z''-''0'-'9']+ { extract_attrs cls lexbuf } (* Class attribute *) | ['c''C']['l''L']['a''A']['s''S']['s''S'] blank* '=' blank* { let cls = extract_value cls lexbuf in extract_attrs cls lexbuf } (* Other attributes with a value *) | ['a'-'z''A'-'Z''-''0'-'9']+ blank* '=' blank* { skip_value lexbuf ; extract_attrs cls lexbuf } (* End of tag *) | '/'? '>' { cls } | "" { error "Attribute syntax" lexbuf } { let to_string = function | Open (_,_,txt) | Close (_,txt) | Text txt | Blanks txt -> txt | Eof -> "Eof" let cost = function | {tag=FONT ; attrs=attrs;_} -> (1,List.length attrs) | _ -> (1,0) let tok_buff = ref None ;; let txt_buff = Buff.create () ;; let rec read_tokens blanks lb = let t = main lb in match t with | Text txt -> Buff.put txt_buff txt ; read_tokens false lb | Blanks txt -> Buff.put txt_buff txt ; read_tokens blanks lb | _ -> let txt = Buff.to_string txt_buff in match txt with | "" -> t | _ -> tok_buff := Some t ; if blanks then Blanks txt else Text txt let reset () = txt_level := 0 ; MyStack.reset txt_stack ; Buff.reset txt_buff ; Buff.reset buff ; Buff.reset abuff let next_token lb = try match !tok_buff with | Some t -> tok_buff := None ; t | None -> read_tokens true lb with | e -> reset () ; raise e let classes lexbuf = let r = extract_classes Emisc.Strings.empty lexbuf in r } hevea-2.09/isolatin1.hva0000644004317100512160000000003510404270225015157 0ustar marangetcristal\usepackage[latin1]{inputenc}hevea-2.09/parse_opts.ml0000644004317100512160000001354512017660721015305 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf open Misc type input = File of string | Prog of string let files = ref [] ;; let add_input s = files := File s :: !files and add_program s = files := Prog s :: !files ;; (* use this to create your warnings if you wish to *) let frenchwarning = ref false ;; type destination = Html | Text | Info ;; let mathml = ref false ;; (*to activate advanced entities*) let moreentities = ref false ;; (* NO NEED AFTER BABEL SUPPORT *) (*let language = ref English*) type symbol_mode = SText | Symbol | Entity let symbol_mode = ref Entity and pedantic = ref false and destination = ref Html and fixpoint = ref false and optimize = ref false let width = ref 72 let except = ref [] let path = ref [] let outname = ref "" let small_length = ref 1024 let check_displayverb n = if n > 1 then displayverb := true let _ = Arg.parse [ ("-version", Arg.Unit (fun () -> print_endline ("hevea "^Version.version) ; print_endline ("library directory: "^Mylib.static_libdir) ; exit 0), "show hevea version and library directory") ; ("-v", Arg.Unit (fun () -> readverb := !readverb + 1 ; check_displayverb !readverb), "verbose flag, can be repeated to increase verbosity") ; ("-dv", Arg.Unit (fun () -> displayverb := true), "add borders to some block-level elements, so as to show hevea output structure") ; ("-s", Arg.Unit (fun () -> silent := true), "suppress warnings") ; ("-I", Arg.String (fun s -> path := s :: !path), "dir, add directory 'dir' to search path") ; ("-e", Arg.String (fun s -> except := s :: !except), "filename, prevent file 'filename' from being read") ; ("-fix", Arg.Unit (fun () -> fixpoint := true), "iterate Hevea until fixpoint") ; ("-O", Arg.Unit (fun () -> optimize := true), "call esponja to optimize HTML output") ; ("-exec", Arg.String add_program, "prog , execute external program 'prog', then read its result") ; ("-francais",Arg.Unit (fun () -> frenchwarning := true), "French mode (deprecated)") ; ("-moreentities", Arg.Unit (fun () -> moreentities := true), "Enable the output of some rare entities.") ; ("-entities", Arg.Unit (fun () -> symbol_mode := Entity), "Render symbols by using entities, this is the default") ; ("-textsymbols", Arg.Unit (fun () -> symbol_mode := SText), "Render symbols by english text") ; ("-noiso",Arg.Unit (fun () -> Misc.warning "-noiso is deprecated, by default hevea output is ascii"), "deprecated, does nothing") ; ("-pedantic",Arg.Unit (fun () -> pedantic := true), "be pedantic in interpreting HTML 4.0 transitional definition") ; ("-mathml",Arg.Unit (fun() -> mathml := true), "produces MathML output for equations, very experimental"); ("-text",Arg.Unit (fun () -> symbol_mode := SText ; destination := Text), "output plain text"); ("-info",Arg.Unit (fun () -> symbol_mode := SText ; destination := Info), "output info file(s)"); ("-w", Arg.String (fun s -> width := int_of_string s), "width, set the output width for text or info output"); ("-rsz", Arg.Int (fun i -> small_length := i), (sprintf "size of leaves in rope implementation (default %i)" !small_length)); ("-o", Arg.String (fun s -> outname := s), "filename, make hevea output go into file 'filename'") ] (add_input) ("hevea "^Version.version) ;; let warning s = if not !silent || !verbose > 0 then begin Location.print_pos () ; prerr_string "Warning: " ; prerr_endline s end ;; (* For correcting strange user (-exec prog en dernier) *) let rec ffirst = function | [] -> None,[] | Prog _ as arg::rem -> let file, rest = ffirst rem in file, arg::rest | File _ as arg::rem -> Some arg,rem ;; files := match ffirst !files with | None,rem -> rem | Some arg,rem -> arg::rem let base_in,name_in,styles = match !files with | File x :: rest -> if Filename.check_suffix x ".hva" then "","", !files else let base_file = Filename.basename x in begin try let base = if Filename.check_suffix base_file ".tex" then Filename.chop_extension base_file else base_file in base,x,rest with Invalid_argument _ -> base_file, x,rest end | []|Prog _::_ -> "","",!files let filter = match base_in with "" -> true | _ -> false ;; if filter then begin if !fixpoint then Misc.warning ("No fixpoint in filter mode"); fixpoint := false end ;; let base_out = match !outname with | "" -> begin match base_in with | "" -> "" | _ -> Filename.basename base_in end | name -> let suff = match !destination with | Html -> ".html" | Text -> ".txt" | Info -> ".info" in if Filename.check_suffix name suff then Filename.chop_suffix name suff else try Filename.chop_extension name with Invalid_argument _ -> name let name_out = match !outname with | "" -> begin match base_in with | "" -> "" | x -> begin match !destination with | Html ->x^".html" | Text ->x^".txt" | Info ->x^".info" end end | x -> x let _ = if !frenchwarning then begin warning "-francais option is deprecated, use babel instead" end hevea-2.09/lstlang1.sty0000644004317100512160000025731011524022160015051 0ustar marangetcristal%% %% This is file `lstlang1.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% lstdrvrs.dtx (with options: `lang1') %% %% The listings package is copyright 1996--2004 Carsten Heinz, and %% continued maintenance on the package is copyright 2006--2007 Brooks Moses. %% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004/2006/ %% 2007 any individual author listed in this file. %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. %% Either version 1.3 or, at your option, any later version. %% %% This file is completely free and comes without any warranty. %% %% Send comments and ideas on the package, error reports and additional %% programming languages to Brooks Moses at . %% \ProvidesFile{lstlang1.sty} [2004/09/05 1.3 listings language file] %% %% ACSL definition (c) 2000 by Andreas Matthias %% \lst@definelanguage{ACSL}[90]{Fortran}% {morekeywords={algorithm,cinterval,constant,derivative,discrete,% dynamic,errtag,initial,interval,maxterval,minterval,% merror,xerror,nsteps,procedural,save,schedule,sort,% table,terminal,termt,variable},% sensitive=false,% morecomment=[l]!% }[keywords, comments]% %% %% Ada 95 definition (c) Torsten Neuer %% %% Ada 2005 definition (c) 2006 Santiago Urue\~{n}a Pascual %% %% \lst@definelanguage[2005]{Ada}[95]{Ada}% {morekeywords={interface,overriding,synchronized}}% \lst@definelanguage[95]{Ada}[83]{Ada}% {morekeywords={abstract,aliased,protected,requeue,tagged,until}}% \lst@definelanguage[83]{Ada}% {morekeywords={abort,abs,accept,access,all,and,array,at,begin,body,% case,constant,declare,delay,delta,digits,do,else,elsif,end,entry,% exception,exit,for,function,generic,goto,if,in,is,limited,loop,% mod,new,not,null,of,or,others,out,package,pragma,private,% procedure,raise,range,record,rem,renames,return,reverse,select,% separate,subtype,task,terminate,then,type,use,when,while,with,% xor},% sensitive=f,% morecomment=[l]--,% morestring=[m]",% percent not defined as stringizer so far morestring=[m]'% }[keywords,comments,strings]% %% %% awk definitions (c) Christoph Giess %% \lst@definelanguage[gnu]{Awk}[POSIX]{Awk}% {morekeywords={and,asort,bindtextdomain,compl,dcgettext,gensub,% lshift,mktime,or,rshift,strftime,strtonum,systime,xor,extension}% }% \lst@definelanguage[POSIX]{Awk}% {keywords={BEGIN,END,close,getline,next,nextfile,print,printf,% system,fflush,atan2,cos,exp,int,log,rand,sin,sqrt,srand,gsub,% index,length,match,split,sprintf,strtonum,sub,substr,tolower,% toupper,if,while,do,for,break,continue,delete,exit,function,% return},% sensitive,% morecomment=[l]\#,% morecomment=[l]//,% morecomment=[s]{/*}{*/},% morestring=[b]"% }[keywords,comments,strings]% %% %% Visual Basic definition (c) 2002 Robert Frank %% \lst@definelanguage[Visual]{Basic} {morekeywords={Abs,Array,Asc,AscB,AscW,Atn,Avg,CBool,CByte,CCur,% CDate,CDbl,Cdec,Choose,Chr,ChrB,ChrW,CInt,CLng,Command,Cos,% Count,CreateObject,CSng,CStr,CurDir,CVar,CVDate,CVErr,Date,% DateAdd,DateDiff,DatePart,DateSerial,DateValue,Day,DDB,Dir,% DoEvents,Environ,EOF,Error,Exp,FileAttr,FileDateTime,FileLen,% Fix,Format,FreeFile,FV,GetAllStrings,GetAttr,% GetAutoServerSettings,GetObject,GetSetting,Hex,Hour,IIf,% IMEStatus,Input,InputB,InputBox,InStr,InstB,Int,Integer,IPmt,% IsArray,IsDate,IsEmpty,IsError,IsMissing,IsNull,IsNumeric,% IsObject,LBound,LCase,Left,LeftB,Len,LenB,LoadPicture,Loc,LOF,% Log,Ltrim,Max,Mid,MidB,Min,Minute,MIRR,Month,MsgBox,Now,NPer,% NPV,Oct,Partition,Pmt,PPmt,PV,QBColor,Rate,RGB,Right,RightB,Rnd,% Rtrim,Second,Seek,Sgn,Shell,Sin,SLN,Space,Spc,Sqr,StDev,StDevP,% Str,StrComp,StrConv,String,Switch,Sum,SYD,Tab,Tan,Time,Timer,% TimeSerial,TimeValue,Trim,TypeName,UBound,Ucase,Val,Var,VarP,% VarType,Weekday,Year},% functions morekeywords=[2]{Accept,Activate,Add,AddCustom,AddFile,AddFromFile,% AddFromTemplate,AddItem,AddNew,AddToAddInToolbar,% AddToolboxProgID,Append,AppendChunk,Arrange,Assert,AsyncRead,% BatchUpdate,BeginTrans,Bind,Cancel,CancelAsyncRead,CancelBatch,% CancelUpdate,CanPropertyChange,CaptureImage,CellText,CellValue,% Circle,Clear,ClearFields,ClearSel,ClearSelCols,Clone,Close,Cls,% ColContaining,ColumnSize,CommitTrans,CompactDatabase,Compose,% Connect,Copy,CopyQueryDef,CreateDatabase,CreateDragImage,% CreateEmbed,CreateField,CreateGroup,CreateIndex,CreateLink,% CreatePreparedStatement,CreatePropery,CreateQuery,% CreateQueryDef,CreateRelation,CreateTableDef,CreateUser,% CreateWorkspace,Customize,Delete,DeleteColumnLabels,% DeleteColumns,DeleteRowLabels,DeleteRows,DoVerb,Drag,Draw,Edit,% EditCopy,EditPaste,EndDoc,EnsureVisible,EstablishConnection,% Execute,ExtractIcon,Fetch,FetchVerbs,Files,FillCache,Find,% FindFirst,FindItem,FindLast,FindNext,FindPrevious,Forward,% GetBookmark,GetChunk,GetClipString,GetData,GetFirstVisible,% GetFormat,GetHeader,GetLineFromChar,GetNumTicks,GetRows,% GetSelectedPart,GetText,GetVisibleCount,GoBack,GoForward,Hide,% HitTest,HoldFields,Idle,InitializeLabels,InsertColumnLabels,% InsertColumns,InsertObjDlg,InsertRowLabels,InsertRows,Item,% KillDoc,Layout,Line,LinkExecute,LinkPoke,LinkRequest,LinkSend,% Listen,LoadFile,LoadResData,LoadResPicture,LoadResString,% LogEvent,MakeCompileFile,MakeReplica,MoreResults,Move,MoveData,% MoveFirst,MoveLast,MoveNext,MovePrevious,NavigateTo,NewPage,% NewPassword,NextRecordset,OLEDrag,OnAddinsUpdate,OnConnection,% OnDisconnection,OnStartupComplete,Open,OpenConnection,% OpenDatabase,OpenQueryDef,OpenRecordset,OpenResultset,OpenURL,% Overlay,PaintPicture,Paste,PastSpecialDlg,PeekData,Play,Point,% PopulatePartial,PopupMenu,Print,PrintForm,PropertyChanged,Pset,% Quit,Raise,RandomDataFill,RandomFillColumns,RandomFillRows,% rdoCreateEnvironment,rdoRegisterDataSource,ReadFromFile,% ReadProperty,Rebind,ReFill,Refresh,RefreshLink,RegisterDatabase,% Reload,Remove,RemoveAddInFromToolbar,RemoveItem,Render,% RepairDatabase,Reply,ReplyAll,Requery,ResetCustom,% ResetCustomLabel,ResolveName,RestoreToolbar,Resync,Rollback,% RollbackTrans,RowBookmark,RowContaining,RowTop,Save,SaveAs,% SaveFile,SaveToFile,SaveToolbar,SaveToOle1File,Scale,ScaleX,% ScaleY,Scroll,Select,SelectAll,SelectPart,SelPrint,Send,% SendData,Set,SetAutoServerSettings,SetData,SetFocus,SetOption,% SetSize,SetText,SetViewport,Show,ShowColor,ShowFont,ShowHelp,% ShowOpen,ShowPrinter,ShowSave,ShowWhatsThis,SignOff,SignOn,Size,% Span,SplitContaining,StartLabelEdit,StartLogging,Stop,% Synchronize,TextHeight,TextWidth,ToDefaults,TwipsToChartPart,% TypeByChartType,Update,UpdateControls,UpdateRecord,UpdateRow,% Upto,WhatsThisMode,WriteProperty,ZOrder},% methods morekeywords=[3]{AccessKeyPress,AfterAddFile,AfterChangeFileName,% AfterCloseFile,AfterColEdit,AfterColUpdate,AfterDelete,% AfterInsert,AfterLabelEdit,AfterRemoveFile,AfterUpdate,% AfterWriteFile,AmbienChanged,ApplyChanges,Associate,% AsyncReadComplete,AxisActivated,AxisLabelActivated,% AxisLabelSelected,AxisLabelUpdated,AxisSelected,% AxisTitleActivated,AxisTitleSelected,AxisTitleUpdated,% AxisUpdated,BeforeClick,BeforeColEdit,BeforeColUpdate,% BeforeConnect,BeforeDelete,BeforeInsert,BeforeLabelEdit,% BeforeLoadFile,BeforeUpdate,ButtonClick,ButtonCompleted,% ButtonGotFocus,ButtonLostFocus,Change,ChartActivated,% ChartSelected,ChartUpdated,Click,ColEdit,Collapse,ColResize,% ColumnClick,Compare,ConfigChageCancelled,ConfigChanged,% ConnectionRequest,DataArrival,DataChanged,DataUpdated,DblClick,% Deactivate,DeviceArrival,DeviceOtherEvent,DeviceQueryRemove,% DeviceQueryRemoveFailed,DeviceRemoveComplete,DeviceRemovePending,% DevModeChange,Disconnect,DisplayChanged,Dissociate,% DoGetNewFileName,Done,DonePainting,DownClick,DragDrop,DragOver,% DropDown,EditProperty,EnterCell,EnterFocus,Event,ExitFocus,% Expand,FootnoteActivated,FootnoteSelected,FootnoteUpdated,% GotFocus,HeadClick,InfoMessage,Initialize,IniProperties,% ItemActivated,ItemAdded,ItemCheck,ItemClick,ItemReloaded,% ItemRemoved,ItemRenamed,ItemSeletected,KeyDown,KeyPress,KeyUp,% LeaveCell,LegendActivated,LegendSelected,LegendUpdated,% LinkClose,LinkError,LinkNotify,LinkOpen,Load,LostFocus,% MouseDown,MouseMove,MouseUp,NodeClick,ObjectMove,% OLECompleteDrag,OLEDragDrop,OLEDragOver,OLEGiveFeedback,% OLESetData,OLEStartDrag,OnAddNew,OnComm,Paint,PanelClick,% PanelDblClick,PathChange,PatternChange,PlotActivated,% PlotSelected,PlotUpdated,PointActivated,PointLabelActivated,% PointLabelSelected,PointLabelUpdated,PointSelected,% PointUpdated,PowerQuerySuspend,PowerResume,PowerStatusChanged,% PowerSuspend,QueryChangeConfig,QueryComplete,QueryCompleted,% QueryTimeout,QueryUnload,ReadProperties,Reposition,% RequestChangeFileName,RequestWriteFile,Resize,ResultsChanged,% RowColChange,RowCurrencyChange,RowResize,RowStatusChanged,% SelChange,SelectionChanged,SendComplete,SendProgress,% SeriesActivated,SeriesSelected,SeriesUpdated,SettingChanged,% SplitChange,StateChanged,StatusUpdate,SysColorsChanged,% Terminate,TimeChanged,TitleActivated,TitleSelected,% TitleActivated,UnboundAddData,UnboundDeleteRow,% UnboundGetRelativeBookmark,UnboundReadData,UnboundWriteData,% Unload,UpClick,Updated,Validate,ValidationError,WillAssociate,% WillChangeData,WillDissociate,WillExecute,WillUpdateRows,% WithEvents,WriteProperties},% VB-events morekeywords=[4]{AppActivate,Base,Beep,Call,Case,ChDir,ChDrive,% Const,Declare,DefBool,DefByte,DefCur,DefDate,DefDbl,DefDec,% DefInt,DefLng,DefObj,DefSng,DefStr,Deftype,DefVar,DeleteSetting,% Dim,Do,Else,ElseIf,End,Enum,Erase,Event,Exit,Explicit,FileCopy,% For,ForEach,Friend,Function,Get,GoSub,GoTo,If,Implements,Kill,% Let,LineInput,Lock,Lset,MkDir,Name,Next,OnError,On,Option,% Private,Property,Public,Put,RaiseEvent,Randomize,ReDim,Rem,% Reset,Resume,Return,RmDir,Rset,SavePicture,SaveSetting,% SendKeys,SetAttr,Static,Sub,Then,Type,Unlock,Wend,While,Width,% With,Write},% statements sensitive=false,% keywordcomment=rem,% MoreSelectCharTable=\def\lst@BeginKC@{% chmod \lst@ResetToken \lst@BeginComment\lst@GPmode{{\lst@commentstyle}% \lst@Lmodetrue\lst@modetrue}\@empty},% morecomment=[l]{'},% morecomment=[s]{/*}{*/},% morestring=[b]",% }[keywords,comments,strings,keywordcomments] \lst@definelanguage[ANSI]{C++}[ISO]{C++}{}% \lst@definelanguage[GNU]{C++}[ISO]{C++}% {morekeywords={__attribute__,__extension__,__restrict,__restrict__,% typeof,__typeof__},% }% \lst@definelanguage[Visual]{C++}[ISO]{C++}% {morekeywords={__asm,__based,__cdecl,__declspec,dllexport,% dllimport,__except,__fastcall,__finally,__inline,__int8,__int16,% __int32,__int64,naked,__stdcall,thread,__try,__leave},% }% \lst@definelanguage[ISO]{C++}[ANSI]{C}% {morekeywords={and,and_eq,asm,bad_cast,bad_typeid,bitand,bitor,bool,% catch,class,compl,const_cast,delete,dynamic_cast,explicit,export,% false,friend,inline,mutable,namespace,new,not,not_eq,operator,or,% or_eq,private,protected,public,reinterpret_cast,static_cast,% template,this,throw,true,try,typeid,type_info,typename,using,% virtual,wchar_t,xor,xor_eq},% }% %% %% Objective-C definition (c) 1997 Detlev Droege %% \lst@definelanguage[Objective]{C}[ANSI]{C} {morekeywords={bycopy,id,in,inout,oneway,out,self,super,% @class,@defs,@encode,@end,@implementation,@interface,@private,% @protected,@protocol,@public,@selector},% moredirectives={import}% }% %% %% Handel-C definition, refer http://www.celoxica.com %% \lst@definelanguage[Handel]{C}[ANSI]{C} {morekeywords={assert,chan,chanin,chanout,clock,delay,expr,external,% external_divide,family,ifselect,in,inline,interface,internal,% internal_divid,intwidth,let,macro,mpram,par,part,prialt,proc,ram,% releasesema,reset,rom,select,sema,set,seq,shared,signal,try,% reset,trysema,typeof,undefined,width,with,wom},% }% \lst@definelanguage[ANSI]{C}% {morekeywords={auto,break,case,char,const,continue,default,do,double,% else,enum,extern,float,for,goto,if,int,long,register,return,% short,signed,sizeof,static,struct,switch,typedef,union,unsigned,% void,volatile,while},% sensitive,% morecomment=[s]{/*}{*/},% morecomment=[l]//,% nonstandard morestring=[b]",% morestring=[b]',% moredelim=*[directive]\#,% moredirectives={define,elif,else,endif,error,if,ifdef,ifndef,line,% include,pragma,undef,warning}% }[keywords,comments,strings,directives]% %% %% C-Sharp definition (c) 2002 Martin Brodbeck %% \lst@definelanguage[Sharp]{C}% {morekeywords={abstract,base,bool,break,byte,case,catch,char,checked,% class,const,continue,decimal,default,delegate,do,double,else,% enum,event,explicit,extern,false,finally,fixed,float,for,foreach,% goto,if,implicit,in,int,interface,internal,is,lock,long,% namespace,new,null,object,operator,out,override,params,private,% protected,public,readonly,ref,return,sbyte,sealed,short,sizeof,% static,string,struct,switch,this,throw,true,try,typeof,uint,% ulong,unchecked,unsafe,ushort,using,virtual,void,while,% as,volatile,stackalloc},% Kai K\"ohne sensitive,% morecomment=[s]{/*}{*/},% morecomment=[l]//,% morestring=[b]" }[keywords,comments,strings]% %% %% csh definition (c) 1998 Kai Below %% \lst@definelanguage{csh} {morekeywords={alias,awk,cat,echo,else,end,endif,endsw,exec,exit,% foreach,glob,goto,history,if,logout,nice,nohup,onintr,repeat,sed,% set,setenv,shift,source,switch,then,time,while,umask,unalias,% unset,wait,while,@,env,argv,child,home,ignoreeof,noclobber,% noglob,nomatch,path,prompt,shell,status,verbose,print,printf,% sqrt,BEGIN,END},% morecomment=[l]\#,% morestring=[d]"% }[keywords,comments,strings]% %% %% bash,sh definition (c) 2003 Riccardo Murri %% \lst@definelanguage{bash}[]{sh}% {morekeywords={alias,bg,bind,builtin,command,compgen,complete,% declare,disown,enable,fc,fg,history,jobs,et,local,logout,printf,% pushd,popd,select,set,suspend,shopt,source,times,type,typeset,% ulimit,unalias,wait},% }% \lst@definelanguage{sh}% {morekeywords={awk,break,case,cat,cd,continue,do,done,echo,else,% env,eval,exec,expr,exit,export,false,fi,for,function,getopts,% hash,history,if,kill,nice,nohup,ps,pwd,read,readonly,return,% sed,shift,test,then,times,trap,true,umask,unset,until,while},% morecomment=[l]\#,% morestring=[d]"% }[keywords,comments,strings]% \lst@definelanguage[90]{Fortran}[95]{Fortran}{} \lst@definelanguage[95]{Fortran}[77]{Fortran}% {deletekeywords=SAVE,% morekeywords={ACTION,ADVANCE,ALLOCATE,ALLOCATABLE,ASSIGNMENT,CASE,% CONTAINS,CYCLE,DEALLOCATE,DEFAULT,DELIM,EXIT,INCLUDE,IN,NONE,IN,% OUT,INTENT,INTERFACE,IOLENGTH,KIND,LEN,MODULE,NAME,NAMELIST,NMT,% NULLIFY,ONLY,OPERATOR,OPTIONAL,OUT,PAD,POINTER,POSITION,PRIVATE,% PUBLIC,READWRITE,RECURSIVE,RESULT,SELECT,SEQUENCE,SIZE,STAT,% TARGET,USE,WHERE,WHILE,BLOCKDATA,DOUBLEPRECISION,% ENDBLOCKDATA,ENDFILE,ENDFUNCTION,ENDINTERFACE,% ENDMODULE,ENDPROGRAM,ENDSELECT,ENDSUBROUTINE,ENDTYPE,ENDWHERE,% INOUT,SELECTCASE},% deletecomment=[f],% no fixed comment line: 1998 Magne Rudshaug morecomment=[l]!% }% \lst@definelanguage[77]{Fortran}% {morekeywords={ACCESS,ASSIGN,BACKSPACE,BLANK,BLOCK,CALL,CHARACTER,% CLOSE,COMMON,COMPLEX,CONTINUE,DATA,DIMENSION,DIRECT,DO,DOUBLE,% ELSE,ELSEIF,END,ENDIF,ENDDO,ENTRY,EOF,EQUIVALENCE,ERR,EXIST,EXTERNAL,% FILE,FMT,FORM,FORMAT,FORMATTED,FUNCTION,GO,TO,GOTO,IF,IMPLICIT,% INQUIRE,INTEGER,INTRINSIC,IOSTAT,LOGICAL,NAMED,NEXTREC,NUMBER,% OPEN,OPENED,PARAMETER,PAUSE,PRECISION,PRINT,PROGRAM,READ,REAL,% REC,RECL,RETURN,REWIND,SEQUENTIAL,STATUS,STOP,SUBROUTINE,THEN,% TYPE,UNFORMATTED,UNIT,WRITE,SAVE},% sensitive=f,%% not Fortran-77 standard, but allowed in Fortran-95 %% morecomment=[f]*,% morecomment=[f]C,% morecomment=[f]c,% morestring=[d]",%% not Fortran-77 standard, but allowed in Fortran-95 %% morestring=[d]'% }[keywords,comments,strings]% \lst@definelanguage{HTML}% {morekeywords={A,ABBR,ACRONYM,ADDRESS,APPLET,AREA,B,BASE,BASEFONT,% BDO,BIG,BLOCKQUOTE,BODY,BR,BUTTON,CAPTION,CENTER,CITE,CODE,COL,% COLGROUP,DD,DEL,DFN,DIR,DIV,DL,DOCTYPE,DT,EM,FIELDSET,FONT,FORM,% FRAME,FRAMESET,HEAD,HR,H1,H2,H3,H4,H5,H6,HTML,I,IFRAME,IMG,INPUT,% INS,ISINDEX,KBD,LABEL,LEGEND,LH,LI,LINK,LISTING,MAP,META,MENU,% NOFRAMES,NOSCRIPT,OBJECT,OPTGROUP,OPTION,P,PARAM,PLAINTEXT,PRE,% OL,Q,S,SAMP,SCRIPT,SELECT,SMALL,SPAN,STRIKE,STRING,STRONG,STYLE,% SUB,SUP,TABLE,TBODY,TD,TEXTAREA,TFOOT,TH,THEAD,TITLE,TR,TT,U,UL,% VAR,XMP,% accesskey,action,align,alink,alt,archive,axis,background,bgcolor,% border,cellpadding,cellspacing,charset,checked,cite,class,classid,% code,codebase,codetype,color,cols,colspan,content,coords,data,% datetime,defer,disabled,dir,event,error,for,frameborder,headers,% height,href,hreflang,hspace,http-equiv,id,ismap,label,lang,link,% longdesc,marginwidth,marginheight,maxlength,media,method,multiple,% name,nohref,noresize,noshade,nowrap,onblur,onchange,onclick,% ondblclick,onfocus,onkeydown,onkeypress,onkeyup,onload,onmousedown,% profile,readonly,onmousemove,onmouseout,onmouseover,onmouseup,% onselect,onunload,rel,rev,rows,rowspan,scheme,scope,scrolling,% selected,shape,size,src,standby,style,tabindex,text,title,type,% units,usemap,valign,value,valuetype,vlink,vspace,width,xmlns},% tag=**[s]<>,% sensitive=f,% morestring=[d]",% ??? doubled MoreSelectCharTable=% \lst@CArgX--\relax\lst@DefDelimB{}{}% {\ifnum\lst@mode=\lst@tagmode\else \expandafter\@gobblethree \fi}% \lst@BeginComment\lst@commentmode{{\lst@commentstyle}}% \lst@CArgX--\relax\lst@DefDelimE{}{}{}% \lst@EndComment\lst@commentmode }[keywords,comments,strings,html]% %% %% AspectJ definition (c) Robert Wenner %% \lst@definelanguage[AspectJ]{Java}[]{Java}% {morekeywords={% adviceexecution,after,args,around,aspect,aspectOf,before,% call,cflow,cflowbelow,% execution,get,handler,if,initialization,issingleton,pointcut,% percflow,percflowbelow,perthis,pertarget,preinitialization,% privileged,proceed,returning,set,staticinitialization,strictfp,% target,this,thisEnclosingJoinPoint,thisJoinPoint,throwing,% within,withincode},% MoreSelectCharTable=% \lst@DefSaveDef{`.}\lst@umdot{\lst@umdot\global\let\lst@derefop\@empty}% \ifx\lst@derefinstalled\@empty\else \global\let\lst@derefinstalled\@empty \lst@AddToHook{Output}% {\lst@ifkeywords \ifx\lst@derefop\@empty \global\let\lst@derefop\relax \ifx\lst@thestyle\lst@gkeywords@sty \ifx\lst@currstyle\relax \let\lst@thestyle\lst@identifierstyle \else \let\lst@thestyle\lst@currstyle \fi \fi \fi \fi} \lst@AddToHook{BOL}{\global\let\lst@derefop\relax}% \lst@AddTo\lst@ProcessSpace{\global\let\lst@derefop\relax}% \fi }% \lst@definelanguage{Java}% {morekeywords={abstract,boolean,break,byte,case,catch,char,class,% const,continue,default,do,double,else,extends,false,final,% finally,float,for,goto,if,implements,import,instanceof,int,% interface,label,long,native,new,null,package,private,protected,% public,return,short,static,super,switch,synchronized,this,throw,% throws,transient,true,try,void,volatile,while},% sensitive,% morecomment=[l]//,% morecomment=[s]{/*}{*/},% morestring=[b]",% morestring=[b]',% }[keywords,comments,strings]% %% %% ByteCodeJava definition (c) 2004 Martine Gautier %% \lst@definelanguage{JVMIS}% {morekeywords={aaload,astore,aconst_null,aload,aload_0,aload_1,% aload_2,aload_3,anewarray,areturn,arraylength,astore,astore_0,% astore_1,astore_2,astore_3,athrow,baload,bastore,bipush,caload,% castore,checkcast,d2f,d2i,d2l,dadd,daload,dastore,dcmpg,dcmpl,% dconst_0,dconst_1,ddiv,dload,dload_0,dload_1,dload_2,dload_3,% dmul,dneg,drem,dreturn,dstore,dstore_0,dstore_1,dstore_2,% dstore_3,dsub,dup,dup_x1,dup_x2,dup2,dup2_x1,dup2_x2,f2d,% f2i,f2l,fadd,faload,fastore,fcmpg,fcmpl,fconst_0,fconst_1,% fconst_2,fdiv,fload,fload_0,fload_1,fload_2,fload_3,fmul,% fneg,frem,freturn,fstore,fstore_0,fstore_1,fstore_2,fstore_3,% fsub,getfield,getstatic,goto,goto_w,i2b,i2c,i2d,i2f,i2l,i2s,% iadd,iaload,iand,iastore,iconst_0,iconst_1,iconst_2,iconst_3,% iconst_4,iconst_5,idiv,if_acmpeq,if_acmpne,if_icmpeq,if_icmpne,% if_icmplt,if_cmpge,if_cmpgt,if_cmple,ifeq,ifne,iflt,ifge,ifgt,% ifle,ifnonnull,ifnull,iinc,iload,iload_0,iload_1,iload_2,% iload_3,imul,ineg,instanceof,invokeinterface,invokespecial,% invokestatic,invokevirtual,ior,irem,ireturn,ishl,ishr,istore,% istore_0,istore_1,istore_2,istore_3,isub,iushr,ixor,jsr,jsr_w,% l2d,l2f,l2i,ladd,laload,land,lastore,lcmp,lconst_0,lconst_1,% ldc,ldc_w,ldc2_w,ldiv,lload,lload_0,lload_1,lload_2,lload_3,% lmul,lneg,lookupswitch,lor,lrem,lreturn,lshl,lshr,lstore,% lstore_0,lstore_1,lstore_2,lstore_3,lsub,lushr,lxor,% monitorenter,monitorexit,multianewarray,new,newarray,nop,pop,% pop2,putfield,putstatic,ret,return,saload,sastore,sipush,swap,% tableswitch,wide,limit,locals,stack},% }[keywords]% \lst@definelanguage{Matlab}% {morekeywords={gt,lt,gt,lt,amp,abs,acos,acosh,acot,acoth,acsc,acsch,% all,angle,ans,any,asec,asech,asin,asinh,atan,atan2,atanh,auread,% auwrite,axes,axis,balance,bar,bessel,besselk,bessely,beta,% betainc,betaln,blanks,bone,break,brighten,capture,cart2pol,% cart2sph,caxis,cd,cdf2rdf,cedit,ceil,chol,cla,clabel,clc,clear,% clf,clock,close,colmmd,Colon,colorbar,colormap,ColorSpec,colperm,% comet,comet3,compan,compass,computer,cond,condest,conj,contour,% contour3,contourc,contrast,conv,conv2,cool,copper,corrcoef,cos,% cosh,cot,coth,cov,cplxpair,cputime,cross,csc,csch,csvread,% csvwrite,cumprod,cumsum,cylinder,date,dbclear,dbcont,dbdown,% dbquit,dbstack,dbstatus,dbstep,dbstop,dbtype,dbup,ddeadv,ddeexec,% ddeinit,ddepoke,ddereq,ddeterm,ddeunadv,deblank,dec2hex,deconv,% del2,delete,demo,det,diag,diary,diff,diffuse,dir,disp,dlmread,% dlmwrite,dmperm,dot,drawnow,echo,eig,ellipj,ellipke,else,elseif,% end,engClose,engEvalString,engGetFull,engGetMatrix,engOpen,% engOutputBuffer,engPutFull,engPutMatrix,engSetEvalCallback,% engSetEvalTimeout,engWinInit,eps,erf,erfc,erfcx,erfinv,error,% errorbar,etime,etree,eval,exist,exp,expint,expm,expo,eye,fclose,% feather,feof,ferror,feval,fft,fft2,fftshift,fgetl,fgets,figure,% fill,fill3,filter,filter2,find,findstr,finite,fix,flag,fliplr,% flipud,floor,flops,fmin,fmins,fopen,for,format,fplot,fprintf,% fread,frewind,fscanf,fseek,ftell,full,function,funm,fwrite,fzero,% gallery,gamma,gammainc,gammaln,gca,gcd,gcf,gco,get,getenv,% getframe,ginput,global,gplot,gradient,gray,graymon,grid,griddata,% gtext,hadamard,hankel,help,hess,hex2dec,hex2num,hidden,hilb,hist,% hold,home,hostid,hot,hsv,hsv2rgb,if,ifft,ifft2,imag,image,% imagesc,Inf,info,input,int2str,interp1,interp2,interpft,inv,% invhilb,isempty,isglobal,ishold,isieee,isinf,isletter,isnan,% isreal,isspace,issparse,isstr,jet,keyboard,kron,lasterr,lcm,% legend,legendre,length,lin2mu,line,linspace,load,log,log10,log2,% loglog,logm,logspace,lookfor,lower,ls,lscov,lu,magic,matClose,% matDeleteMatrix,matGetDir,matGetFp,matGetFull,matGetMatrix,% matGetNextMatrix,matGetString,matlabrc,matlabroot,matOpen,% matPutFull,matPutMatrix,matPutString,max,mean,median,menu,mesh,% meshc,meshgrid,meshz,mexAtExit,mexCallMATLAB,mexdebug,% mexErrMsgTxt,mexEvalString,mexFunction,mexGetFull,mexGetMatrix,% mexGetMatrixPtr,mexPrintf,mexPutFull,mexPutMatrix,mexSetTrapFlag,% min,more,movie,moviein,mu2lin,mxCalloc,mxCopyCharacterToPtr,% mxCopyComplex16ToPtr,mxCopyInteger4ToPtr,mxCopyPtrToCharacter,% mxCopyPtrToComplex16,mxCopyPtrToInteger4,mxCopyPtrToReal8,% mxCopyReal8ToPtr,mxCreateFull,mxCreateSparse,mxCreateString,% mxFree,mxFreeMatrix,mxGetIr,mxGetJc,mxGetM,mxGetN,mxGetName,% mxGetNzmax,mxGetPi,mxGetPr,mxGetScalar,mxGetString,mxIsComplex,% mxIsFull,mxIsNumeric,mxIsSparse,mxIsString,mxIsTypeDouble,% mxSetIr,mxSetJc,mxSetM,mxSetN,mxSetName,mxSetNzmax,mxSetPi,% mxSetPr,NaN,nargchk,nargin,nargout,newplot,nextpow2,nnls,nnz,% nonzeros,norm,normest,null,num2str,nzmax,ode23,ode45,orient,orth,% pack,pascal,patch,path,pause,pcolor,pi,pink,pinv,plot,plot3,% pol2cart,polar,poly,polyder,polyeig,polyfit,polyval,polyvalm,% pow2,print,printopt,prism,prod,pwd,qr,qrdelete,qrinsert,quad,% quad8,quit,quiver,qz,rand,randn,randperm,rank,rat,rats,rbbox,% rcond,real,realmax,realmin,refresh,rem,reset,reshape,residue,% return,rgb2hsv,rgbplot,rootobject,roots,rose,rosser,rot90,rotate,% round,rref,rrefmovie,rsf2csf,save,saxis,schur,sec,sech,semilogx,% semilogy,set,setstr,shading,sign,sin,sinh,size,slice,sort,sound,% spalloc,sparse,spaugment,spconvert,spdiags,specular,speye,spfun,% sph2cart,sphere,spinmap,spline,spones,spparms,sprandn,sprandsym,% sprank,sprintf,spy,sqrt,sqrtm,sscanf,stairs,startup,std,stem,% str2mat,str2num,strcmp,strings,strrep,strtok,subplot,subscribe,% subspace,sum,surf,surface,surfc,surfl,surfnorm,svd,symbfact,% symmmd,symrcm,tan,tanh,tempdir,tempname,terminal,text,tic,title,% toc,toeplitz,trace,trapz,tril,triu,type,uicontrol,uigetfile,% uimenu,uiputfile,unix,unwrap,upper,vander,ver,version,view,% viewmtx,waitforbuttonpress,waterfall,wavread,wavwrite,what,% whatsnew,which,while,white,whitebg,who,whos,wilkinson,wk1read,% wk1write,xlabel,xor,ylabel,zeros,zlabel,zoom},% sensitive,% morecomment=[l]\%,% morestring=[m]'% }[keywords,comments,strings]% \lst@definelanguage[5.2]{Mathematica}[3.0]{Mathematica}%% {morekeywords={Above,AbsoluteOptions,AbsoluteTiming,AccountingForm,% AccuracyGoal,Active,ActiveItem,AddOnHelpPath,% AdjustmentBox,AdjustmentBoxOptions,After,AiryAiPrime,% AlgebraicRulesData,Algebraics,Alias,AlignmentMarker,% AllowInlineCells,AllowScriptLevelChange,Analytic,AnimationCycleOffset,% AnimationCycleRepetitions,AnimationDirection,AnimationDisplayTime,ApartSquareFree,% AppellF1,ArgumentCountQ,ArrayDepth,ArrayPlot,% ArrayQ,ArrayRules,AspectRatioFixed,Assuming,% Assumptions,AutoDelete,AutoEvaluateEvents,AutoGeneratedPackage,% AutoIndent,AutoIndentSpacings,AutoItalicWords,AutoloadPath,% AutoOpenNotebooks,AutoOpenPalettes,AutoScroll,AutoSpacing,% AutoStyleOptions,Axis,BackgroundTasksSettings,Backsubstitution,% Backward,Baseline,Before,BeginDialogPacket,% BeginFrontEndInteractionPacket,Below,BezoutMatrix,BinaryFormat,% BinaryGet,BinaryRead,BinaryReadList,BinaryWrite,% BitAnd,BitNot,BitOr,BitXor,% Black,BlankForm,Blue,Boole,% Booleans,Bottom,Bounds,Box,% BoxBaselineShift,BoxData,BoxDimensions,BoxFormFormatTypes,% BoxFrame,BoxMargins,BoxRegion,Brown,% Buchberger,Button,ButtonBox,ButtonBoxOptions,% ButtonCell,ButtonContents,ButtonData,ButtonEvaluator,% ButtonExpandable,ButtonFrame,ButtonFunction,ButtonMargins,% ButtonMinHeight,ButtonNote,ButtonNotebook,ButtonSource,% ButtonStyle,ButtonStyleMenuListing,ByteOrdering,CallPacket,% CarmichaelLambda,Cell,CellAutoOverwrite,CellBaseline,% CellBoundingBox,CellBracketOptions,CellContents,CellDingbat,% CellEditDuplicate,CellElementsBoundingBox,CellElementSpacings,CellEvaluationDuplicate,% CellFrame,CellFrameColor,CellFrameLabelMargins,CellFrameLabels,% CellFrameMargins,CellGroup,CellGroupData,CellGrouping,% CellGroupingRules,CellHorizontalScrolling,CellLabel,CellLabelAutoDelete,% CellLabelMargins,CellLabelPositioning,CellMargins,CellObject,% CellOpen,CellPasswords,CellPrint,CellSize,% CellStyle,CellTags,CellularAutomaton,Center,% CharacterEncoding,CharacterEncodingsPath,CharacteristicPolynomial,CharacterRange,% CheckAll,CholeskyDecomposition,Clip,ClipboardNotebook,% Closed,ClosingAutoSave,CoefficientArrays,CoefficientDomain,% CofactorExpansion,ColonForm,ColorFunctionScaling,ColorRules,% ColorSelectorSettings,Column,ColumnAlignments,ColumnLines,% ColumnsEqual,ColumnSpacings,ColumnWidths,CommonDefaultFormatTypes,% CompileOptimizations,CompletionsListPacket,Complexes,ComplexityFunction,% Compose,ComposeSeries,ConfigurationPath,ConjugateTranspose,% Connect,ConsoleMessage,ConsoleMessagePacket,ConsolePrint,% ContentsBoundingBox,ContextToFileName,ContinuedFraction,ConversionOptions,% ConversionRules,ConvertToBitmapPacket,ConvertToPostScript,ConvertToPostScriptPacket,% Copyable,CoshIntegral,CounterAssignments,CounterBox,% CounterBoxOptions,CounterEvaluator,CounterFunction,CounterIncrements,% CounterStyle,CounterStyleMenuListing,CreatePalettePacket,Cross,% CurrentlySpeakingPacket,Cyan,CylindricalDecomposition,DampingFactor,% DataRange,Debug,DebugTag,Decimal,% DedekindEta,DefaultDuplicateCellStyle,DefaultFontProperties,DefaultFormatType,% DefaultFormatTypeForStyle,DefaultInlineFormatType,DefaultInputFormatType, DefaultNaturalLanguage,% DefaultNewCellStyle,DefaultNewInlineCellStyle,DefaultNotebook,DefaultOutputFormatType,% DefaultStyleDefinitions,DefaultTextFormatType,DefaultTextInlineFormatType,DefaultValues,% DefineExternal,DegreeLexicographic,DegreeReverseLexicographic,Deletable,% DeleteContents,DeletionWarning,DelimiterFlashTime,DelimiterMatching,% Delimiters,DependentVariables,DiacriticalPositioning,DialogLevel,% DifferenceOrder,DigitCharacter,DigitCount,DiracDelta,% Direction,DirectoryName,DisableConsolePrintPacket,DiscreteDelta,% DisplayAnimation,DisplayEndPacket,DisplayFlushImagePacket,DisplayForm,% DisplayPacket,DisplayRules,DisplaySetSizePacket,DisplayString,% DivisionFreeRowReduction,DOSTextFormat,DoubleExponential,DoublyInfinite,% Down,DragAndDrop,DrawHighlighted,DualLinearProgramming,% DumpGet,DumpSave,Edit,Editable,% EditButtonSettings,EditCellTagsSettings,EditDefinition,EditIn,% Element,EliminationOrder,EllipticExpPrime,EllipticNomeQ,% EllipticReducedHalfPeriods,EllipticThetaPrime,Empty,EnableConsolePrintPacket,% Encoding,EndAdd,EndDialogPacket,EndFrontEndInteractionPacket,% EndOfLine,EndOfString,Enter,EnterExpressionPacket,% EnterTextPacket,EqualColumns,EqualRows,EquatedTo,% Erfi,ErrorBox,ErrorBoxOptions,ErrorNorm,% ErrorPacket,ErrorsDialogSettings,Evaluatable,EvaluatePacket,% EvaluationCell,EvaluationCompletionAction,EvaluationMonitor,EvaluationNotebook,% Evaluator,EvaluatorNames,EventEvaluator,ExactNumberQ,% ExactRootIsolation,Except,ExcludedForms,Exists,% ExitDialog,ExponentPosition,ExponentStep,Export,% ExportAutoReplacements,ExportPacket,ExportString,ExpressionPacket,% ExpToTrig,Extension,ExternalCall,ExternalDataCharacterEncoding,% Extract,Fail,FEDisableConsolePrintPacket,FEEnableConsolePrintPacket,% Fibonacci,File,FileFormat,FileInformation,% FileName,FileNameDialogSettings,FindFit,FindInstance,% FindMaximum,FindSettings,FitAll,FlushPrintOutputPacket,% Font,FontColor,FontFamily,FontName,% FontPostScriptName,FontProperties,FontReencoding,FontSize,% FontSlant,FontSubstitutions,FontTracking,FontVariations,% FontWeight,ForAll,FormatRules,FormatTypeAutoConvert,% FormatValues,FormBox,FormBoxOptions,Forward,% ForwardBackward,FourierCosTransform,FourierParameters,FourierSinTransform,% FourierTransform,FractionalPart,FractionBox,FractionBoxOptions,% FractionLine,FrameBox,FrameBoxOptions,FresnelC,% FresnelS,FromContinuedFraction,FromDigits,FrontEndExecute,% FrontEndObject,FrontEndStackSize,FrontEndToken,FrontEndTokenExecute,% FrontEndVersion,Full,FullAxes,FullSimplify,% FunctionExpand,FunctionInterpolation,GaussKronrod,GaussPoints,% GenerateBitmapCaches,GenerateConditions,GeneratedCell,GeneratedParameters,% Generic,GetBoundingBoxSizePacket,GetContext,GetFileName,% GetFrontEndOptionsDataPacket,GetLinebreakInformationPacket,% GetMenusPacket,GetPageBreakInformationPacket,% Glaisher,GlobalPreferences,GlobalSession,Gradient,% GraphicsData,GraphicsGrouping,Gray,Green,% Grid,GridBaseline,GridBox,GridBoxOptions,% GridCreationSettings,GridDefaultElement,GridFrame,GridFrameMargins,% GroupPageBreakWithin,HarmonicNumber,Hash,HashTable,% HeadCompose,HelpBrowserLookup,HelpBrowserNotebook,HelpBrowserSettings,% HessenbergDecomposition,Hessian,HoldAllComplete,HoldComplete,% HoldPattern,Horizontal,HorizontalForm,HorizontalScrollPosition,% HTMLSave,Hypergeometric0F1Regularized,Hypergeometric1F1Regularized,% Hypergeometric2F1Regularized,% HypergeometricPFQ,HypergeometricPFQRegularized,HyperlinkCreationSettings,Hyphenation,% HyphenationOptions,IgnoreCase,ImageCache,ImageCacheValid,% ImageMargins,ImageOffset,ImageRangeCache,ImageRegion,% ImageResolution,ImageRotated,ImageSize,Import,% ImportAutoReplacements,ImportString,IncludeFileExtension,IncludeSingularTerm,% IndentingNewlineSpacings,IndentMaxFraction,IndexCreationOptions,Inequality,% InexactNumberQ,InexactNumbers,Inherited,InitializationCell,% InitializationCellEvaluation,InitializationCellWarning,% InlineCounterAssignments,InlineCounterIncrements,% InlineRules,InputAliases,InputAutoFormat,InputAutoReplacements,% InputGrouping,InputNamePacket,InputNotebook,InputPacket,% InputSettings,InputStringPacket,InputToBoxFormPacket,InputToInputForm,% InputToStandardForm,InsertionPointObject,IntegerExponent,IntegerPart,% Integers,Interactive,Interlaced,InterpolationOrder,% InterpolationPoints,InterpolationPrecision,InterpretationBox,% InterpretationBoxOptions,% InterpretTemplate,InterruptSettings,Interval,IntervalIntersection,% IntervalMemberQ,IntervalUnion,InverseBetaRegularized,InverseEllipticNomeQ,% InverseErf,InverseErfc,InverseFourierCosTransform, InverseFourierSinTransform,% InverseFourierTransform,InverseGammaRegularized,InverseJacobiCD,% InverseJacobiCN,% InverseJacobiCS,InverseJacobiDC,InverseJacobiDN,InverseJacobiDS,% InverseJacobiNC,InverseJacobiND,InverseJacobiNS,InverseJacobiSC,% InverseJacobiSD,InverseLaplaceTransform,InverseWeierstrassP,InverseZTransform,% Jacobian,JacobiCD,JacobiCN,JacobiCS,% JacobiDC,JacobiDN,JacobiDS,JacobiNC,% JacobiND,JacobiNS,JacobiSC,JacobiSD,% JordanDecomposition,K,Khinchin,KleinInvariantJ,% KroneckerDelta,Language,LanguageCategory,LaplaceTransform,% Larger,Launch,LayoutInformation,Left,% LetterCharacter,Lexicographic,LicenseID,LimitsPositioning,% LimitsPositioningTokens,LinearSolveFunction,LinebreakAdjustments,LineBreakWithin,% LineForm,LineIndent,LineSpacing,LineWrapParts,% LinkActivate,LinkClose,LinkConnect,LinkConnectedQ,% LinkCreate,LinkError,LinkFlush,LinkHost,% LinkInterrupt,LinkLaunch,LinkMode,LinkObject,% LinkOpen,LinkOptions,LinkPatterns,LinkProtocol,% LinkRead,LinkReadHeld,LinkReadyQ,Links,% LinkWrite,LinkWriteHeld,ListConvolve,ListCorrelate,% Listen,ListInterpolation,ListQ,LiteralSearch,% LongestMatch,LongForm,Loopback,LUBackSubstitution,% LUDecomposition,MachineID,MachineName,MachinePrecision,% MacintoshSystemPageSetup,Magenta,Magnification,MakeBoxes,% MakeExpression,MakeRules,Manual,MatchLocalNameQ,% MathematicaNotation,MathieuC,MathieuCharacteristicA,MathieuCharacteristicB,% MathieuCharacteristicExponent,MathieuCPrime,MathieuS,MathieuSPrime,% MathMLForm,MathMLText,MatrixRank,Maximize,% MaxIterations,MaxPlotPoints,MaxPoints,MaxRecursion,% MaxStepFraction,MaxSteps,MaxStepSize,Mean,% Median,MeijerG,MenuPacket,MessageOptions,% MessagePacket,MessagesNotebook,MetaCharacters,Method,% MethodOptions,Minimize,MinRecursion,MinSize,% Mode,ModularLambda,MonomialOrder,MonteCarlo,% Most,MousePointerNote,MultiDimensional,MultilaunchWarning,% MultilineFunction,MultiplicativeOrder,Multiplicity,Nand,% NeedCurrentFrontEndPackagePacket,NeedCurrentFrontEndSymbolsPacket,% NestedScriptRules,NestWhile,% NestWhileList,NevilleThetaC,NevilleThetaD,NevilleThetaN,% NevilleThetaS,Newton,Next,NHoldAll,% NHoldFirst,NHoldRest,NMaximize,NMinimize,% NonAssociative,NonPositive,Nor,Norm,% NormalGrouping,NormalSelection,NormFunction,Notebook,% NotebookApply,NotebookAutoSave,NotebookClose,NotebookConvert,% NotebookConvertSettings,NotebookCreate,NotebookCreateReturnObject,NotebookDefault,% NotebookDelete,NotebookDirectory,NotebookFind,NotebookFindReturnObject,% NotebookGet,NotebookGetLayoutInformationPacket,NotebookGetMisspellingsPacket,% NotebookInformation,% NotebookLocate,NotebookObject,NotebookOpen,NotebookOpenReturnObject,% NotebookPath,NotebookPrint,NotebookPut,NotebookPutReturnObject,% NotebookRead,NotebookResetGeneratedCells,Notebooks,NotebookSave,% NotebookSaveAs,NotebookSelection,NotebookSetupLayoutInformationPacket,% NotebooksMenu,% NotebookWrite,NotElement,NProductExtraFactors,NProductFactors,% NRoots,NSumExtraTerms,NSumTerms,NumberMarks,% NumberMultiplier,NumberString,NumericFunction,NumericQ,% NValues,Offset,OLEData,OneStepRowReduction,% Open,OpenFunctionInspectorPacket,OpenSpecialOptions,OptimizationLevel,% OptionInspectorSettings,OptionQ,OptionsPacket,OptionValueBox,% OptionValueBoxOptions,Orange,Ordering,Oscillatory,% OutputAutoOverwrite,OutputFormData,OutputGrouping,OutputMathEditExpression,% OutputNamePacket,OutputToOutputForm,OutputToStandardForm,Over,% Overflow,Overlaps,Overscript,OverscriptBox,% OverscriptBoxOptions,OwnValues,PadLeft,PadRight,% PageBreakAbove,PageBreakBelow,PageBreakWithin,PageFooterLines,% PageFooters,PageHeaderLines,PageHeaders,PalettePath,% PaperWidth,ParagraphIndent,ParagraphSpacing,ParameterVariables,% ParentConnect,ParentForm,Parenthesize,PasteBoxFormInlineCells,% Path,PatternTest,PeriodicInterpolation,Pick,% Piecewise,PiecewiseExpand,Pink,Pivoting,% PixelConstrained,Placeholder,Plain,Plot3Matrix,% PointForm,PolynomialForm,PolynomialReduce,Polynomials,% PowerModList,Precedence,PreferencesPath,PreserveStyleSheet,% Previous,PrimaryPlaceholder,Primes,PrincipalValue,% PrintAction,PrintingCopies,PrintingOptions,PrintingPageRange,% PrintingStartingPageNumber,PrintingStyleEnvironment,PrintPrecision,% PrivateCellOptions,% PrivateEvaluationOptions,PrivateFontOptions,PrivateNotebookOptions,PrivatePaths,% ProductLog,PromptForm,Purple,Quantile,% QuasiMonteCarlo,QuasiNewton,RadicalBox,RadicalBoxOptions,% RandomSeed,RationalFunctions,Rationals,RawData,% RawMedium,RealBlockForm,Reals,Reap,% Red,Refine,Refresh,RegularExpression,% Reinstall,Release,Removed,RenderingOptions,% RepeatedString,ReplaceList,Rescale,ResetMenusPacket,% Resolve,ResumePacket,ReturnExpressionPacket,ReturnInputFormPacket,% ReturnPacket,ReturnTextPacket,Right,Root,% RootReduce,RootSum,Row,RowAlignments,% RowBox,RowLines,RowMinHeight,RowsEqual,% RowSpacings,RSolve,RuleCondition,RuleForm,% RulerUnits,Saveable,SaveAutoDelete,ScreenRectangle,% ScreenStyleEnvironment,ScriptBaselineShifts,ScriptLevel,ScriptMinSize,% ScriptRules,ScriptSizeMultipliers,ScrollingOptions,ScrollPosition,% Second,SectionGrouping,Selectable,SelectedNotebook,% Selection,SelectionAnimate,SelectionCell,SelectionCellCreateCell,% SelectionCellDefaultStyle,SelectionCellParentStyle,SelectionCreateCell,% SelectionDuplicateCell,% SelectionEvaluate,SelectionEvaluateCreateCell,SelectionMove,SelectionSetStyle,% SelectionStrategy,SendFontInformationToKernel,SequenceHold,SequenceLimit,% SeriesCoefficient,SetBoxFormNamesPacket,SetEvaluationNotebook,% SetFileLoadingContext,% SetNotebookStatusLine,SetOptionsPacket,SetSelectedNotebook,% SetSpeechParametersPacket,% SetValue,ShortestMatch,ShowAutoStyles,ShowCellBracket,% ShowCellLabel,ShowCellTags,ShowClosedCellArea,ShowContents,% ShowCursorTracker,ShowGroupOpenCloseIcon,ShowPageBreaks,ShowSelection,% ShowShortBoxForm,ShowSpecialCharacters,ShowStringCharacters,% ShrinkWrapBoundingBox,% SingleLetterItalics,SingularityDepth,SingularValueDecomposition,% SingularValueList,% SinhIntegral,Smaller,Socket,SolveDelayed,% SoundAndGraphics,Sow,Space,SpaceForm,% SpanAdjustments,SpanCharacterRounding,SpanLineThickness,SpanMaxSize,% SpanMinSize,SpanningCharacters,SpanSymmetric,Sparse,% SparseArray,SpeakTextPacket,SpellingDictionaries,SpellingDictionariesPath,% SpellingOptions,SpellingSuggestionsPacket,Spherical,Split,% SqrtBox,SqrtBoxOptions,StandardDeviation,StandardForm,% StartingStepSize,StartOfLine,StartOfString,StartupSound,% StepMonitor,StieltjesGamma,StoppingTest,StringCases,% StringCount,StringExpression,StringFreeQ,StringQ,% StringReplaceList,StringReplacePart,StringSplit,StripBoxes,% StripWrapperBoxes,StructuredSelection,StruveH,StruveL,% StyleBox,StyleBoxAutoDelete,StyleBoxOptions,StyleData,% StyleDefinitions,StyleForm,StyleMenuListing,StyleNameDialogSettings,% StylePrint,StyleSheetPath,Subresultants,SubscriptBox,% SubscriptBoxOptions,Subsets,Subsuperscript,SubsuperscriptBox,% SubsuperscriptBoxOptions,SubtractFrom,SubValues,SugarCube,% SuperscriptBox,SuperscriptBoxOptions,SuspendPacket,SylvesterMatrix,% SymbolName,Syntax,SyntaxForm,SyntaxPacket,% SystemException,SystemHelpPath,SystemStub,Tab,% TabFilling,TabSpacings,TagBox,TagBoxOptions,% TaggingRules,TagStyle,TargetFunctions,TemporaryVariable,% TensorQ,TeXSave,TextAlignment,TextBoundingBox,% TextData,TextJustification,TextLine,TextPacket,% TextParagraph,TextRendering,TextStyle,ThisLink,% TimeConstraint,TimeVariable,TitleGrouping,ToBoxes,% ToColor,ToFileName,Toggle,ToggleFalse,% Tolerance,TooBig,Top,ToRadicals,% Total,Tr,TraceAction,TraceInternal,% TraceLevel,TraditionalForm,TraditionalFunctionNotation,TraditionalNotation,% TraditionalOrder,TransformationFunctions,TransparentColor,Trapezoidal,% TrigExpand,TrigFactor,TrigFactorList,TrigReduce,% TrigToExp,Tuples,UnAlias,Underflow,% Underoverscript,UnderoverscriptBox,UnderoverscriptBoxOptions,Underscript,% UnderscriptBox,UnderscriptBoxOptions,UndocumentedTestFEParserPacket,% UndocumentedTestGetSelectionPacket,% UnitStep,Up,URL,Using,% V2Get,Value,ValueBox,ValueBoxOptions,% ValueForm,Variance,Verbatim,Verbose,% VerboseConvertToPostScriptPacket,VerifyConvergence,VerifySolutions,Version,% VersionNumber,Vertical,VerticalForm,ViewPointSelectorSettings,% Visible,VisibleCell,WeierstrassHalfPeriods,WeierstrassInvariants,% WeierstrassSigma,WeierstrassZeta,White,Whitespace,% WhitespaceCharacter,WindowClickSelect,WindowElements,WindowFloating,% WindowFrame,WindowFrameElements,WindowMargins,WindowMovable,% WindowSize,WindowTitle,WindowToolbars,WindowWidth,% WordBoundary,WordCharacter,WynnDegree,XMLElement},% morendkeywords={$,$AddOnsDirectory,$AnimationDisplayFunction,% $AnimationFunction,% $Assumptions,$BaseDirectory,$BoxForms,$ByteOrdering,% $CharacterEncoding,$ConditionHold,$CurrentLink,$DefaultPath,% $ExportEncodings,$ExportFormats,$FormatType,$FrontEnd,% $HistoryLength,$HomeDirectory,$ImportEncodings,$ImportFormats,% $InitialDirectory,$InstallationDate,$InstallationDirectory,% $InterfaceEnvironment,% $LaunchDirectory,$LicenseExpirationDate,$LicenseID,$LicenseProcesses,% $LicenseServer,$MachineDomain,$MaxExtraPrecision,$MaxLicenseProcesses,% $MaxNumber,$MaxPiecewiseCases,$MaxPrecision,$MaxRootDegree,% $MinNumber,$MinPrecision,$NetworkLicense,$NumberMarks,% $Off,$OutputForms,$ParentLink,$ParentProcessID,% $PasswordFile,$PathnameSeparator,$PreferencesDirectory,$PrintForms,% $PrintLiteral,$ProcessID,$ProcessorType,$ProductInformation,% $ProgramName,$PSDirectDisplay,$RandomState,$RasterFunction,% $RootDirectory,$SetParentLink,$SoundDisplay,$SuppressInputFormHeads,% $SystemCharacterEncoding,$SystemID,$TemporaryPrefix,$TextStyle,% $TopDirectory,$TraceOff,$TraceOn,$TracePattern,% $TracePostAction,$TracePreAction,$UserAddOnsDirectory,$UserBaseDirectory,% $UserName,Constant,Flat,HoldAll,% HoldAllComplete,HoldFirst,HoldRest,Listable,% Locked,NHoldAll,NHoldFirst,NHoldRest,% NumericFunction,OneIdentity,Orderless,Protected,% ReadProtected,SequenceHold},% }% %% %% Mathematica definitions (c) 1999 Michael Wiese %% \lst@definelanguage[3.0]{Mathematica}[1.0]{Mathematica}% {morekeywords={Abort,AbortProtect,AbsoluteDashing,AbsolutePointSize,% AbsoluteThickness,AbsoluteTime,AccountingFormAiry,AiPrime,AiryBi,% AiryBiPrime,Alternatives,AnchoredSearch,AxesEdge,AxesOrigin,% AxesStyle,Background,BetaRegularized,BoxStyle,C,CheckAbort,% Circle,ClebschGordan,CMYKColor,ColorFunction,ColorOutput,Compile,% Compiled,CompiledFunction,ComplexExpand,ComposeList,Composition,% ConstrainedMax,ConstrainedMin,Contexts,ContextToFilename,% ContourLines,Contours,ContourShading,ContourSmoothing,% ContourStyle,CopyDirectory,CopyFile,CosIntegral,CreateDirectory,% Cuboid,Date,DeclarePackage,DefaultColor,DefaultFont,Delete,% DeleteCases,DeleteDirectory,DeleteFile,Dialog,DialogIndent,% DialogProlog,DialogSymbols,DigitQ,Directory,DirectoryStack,Disk,% Dispatch,DownValues,DSolve,Encode,Epilog,Erfc,Evaluate,% ExponentFunction,FaceGrids,FileByteCount,FileDate,FileNames,% FileType,Find,FindList,FixedPointList,FlattenAt,Fold,FoldList,% Frame,FrameLabel,FrameStyle,FrameTicks,FromCharacterCode,% FromDate,FullGraphics,FullOptions,GammaRegularized,% GaussianIntegers,GraphicsArray,GraphicsSpacing,GridLines,% GroebnerBasis,Heads,HeldPart,HomeDirectory,Hue,IgnoreCases,% InputStream,Install,InString,IntegerDigits,InterpolatingFunction,% InterpolatingPolynomial,Interpolation,Interrupt,InverseFunction,% InverseFunctions,JacobiZeta,LetterQ,LinearProgramming,ListPlay,% LogGamma,LowerCaseQ,MachineNumberQ,MantissaExponent,MapIndexed,% MapThread,MatchLocalNames,MatrixExp,MatrixPower,MeshRange,% MeshStyle,MessageList,Module,NDSolve,NSolve,NullRecords,% NullWords,NumberFormat,NumberPadding,NumberSigns,OutputStream,% PaddedForm,ParentDirectory,Pause,Play,PlayRange,PlotRegion,% PolygonIntersections,PolynomialGCD,PolynomialLCM,PolynomialMod,% PostScript,PowerExpand,PrecisionGoal,PrimePi,Prolog,% QRDecomposition,Raster,RasterArray,RealDigits,Record,RecordLists,% RecordSeparators,ReleaseHold,RenameDirectory,RenameFile,% ReplaceHeldPart,ReplacePart,ResetDirectory,Residue,% RiemannSiegelTheta,RiemannSiegelZ,RotateLabel,SameTest,% SampleDepth,SampledSoundFunction,SampledSoundList,SampleRate,% SchurDecomposition,SessionTime,SetAccuracy,SetDirectory,% SetFileDate,SetPrecision,SetStreamPosition,Shallow,SignPadding,% SinIntegral,SixJSymbol,Skip,Sound,SpellingCorrection,% SphericalRegion,Stack,StackBegin,StackComplete,StackInhibit,% StreamPosition,Streams,StringByteCount,StringConversion,% StringDrop,StringInsert,StringPosition,StringReplace,% StringReverse,StringTake,StringToStream,SurfaceColor,% SyntaxLength,SyntaxQ,TableAlignments,TableDepth,% TableDirections,TableHeadings,TableSpacing,ThreeJSymbol,TimeUsed,% TimeZone,ToCharacterCode,ToDate,ToHeldExpression,TokenWords,% ToLowerCase,ToUpperCase,Trace,TraceAbove,TraceBackward,% TraceDepth,TraceDialog,TraceForward,TraceOff,TraceOn,% TraceOriginal,TracePrint,TraceScan,Trig,Unevaluated,Uninstall,% UnsameQ,UpperCaseQ,UpValues,ViewCenter,ViewVertical,With,Word,% WordSearch,WordSeparators},% morendkeywords={Stub,Temporary,$Aborted,$BatchInput,$BatchOutput,% $CreationDate,$DefaultFont,$DumpDates,$DumpSupported,$Failed,% $Input,$Inspector,$IterationLimit,$Language,$Letters,$Linked,% $LinkSupported,$MachineEpsilon,$MachineID,$MachineName,% $MachinePrecision,$MachineType,$MaxMachineNumber,$MessageList,% $MessagePrePrint,$MinMachineNumber,$ModuleNumber,$NewMessage,% $NewSymbol,$Notebooks,$OperatingSystem,$Packages,$PipeSupported,% $PreRead,$ReleaseNumber,$SessionID,$SoundDisplayFunction,% $StringConversion,$StringOrder,$SyntaxHandler,$TimeUnit,% $VersionNumber}% }% \lst@definelanguage[1.0]{Mathematica}% {morekeywords={Abs,Accuracy,AccurayGoal,AddTo,AiryAi,AlgebraicRules,% AmbientLight,And,Apart,Append,AppendTo,Apply,ArcCos,ArcCosh,% ArcCot,ArcCoth,ArcCsc,ArcCsch,ArcSec,ArcSech,ArcSin,ArcSinh,% ArcTan,ArcTanh,Arg,ArithmeticGeometricMean,Array,AspectRatio,% AtomQ,Attributes,Axes,AxesLabel,BaseForm,Begin,BeginPackage,% BernoulliB,BesselI,BesselJ,BesselK,BesselY,Beta,Binomial,Blank,% BlankNullSequence,BlankSequence,Block,Boxed,BoxRatios,Break,Byte,% ByteCount,Cancel,Cases,Catch,Ceiling,CForm,Character,Characters,% ChebyshevT,ChebyshevU,Check,Chop,Clear,ClearAll,ClearAttributes,% ClipFill,Close,Coefficient,CoefficientList,Collect,ColumnForm,% Complement,Complex,CompoundExpression,Condition,Conjugate,% Constants,Context,Continuation,Continue,ContourGraphics,% ContourPlot,Cos,Cosh,Cot,Coth,Count,Csc,Csch,Cubics,Cyclotomic,% D,Dashing,Decompose,Decrement,Default,Definition,Denominator,% DensityGraphics,DensityPlot,Depth,Derivative,Det,DiagonalMatrix,% DigitBlock,Dimensions,DirectedInfinity,Display,DisplayFunction,% Distribute,Divide,DivideBy,Divisors,DivisorSigma,Do,Dot,Drop,Dt,% Dump,EdgeForm,Eigensystem,Eigenvalues,Eigenvectors,Eliminate,% EllipticE,EllipticExp,EllipticF,EllipticK,EllipticLog,EllipticPi,% EllipticTheta,End,EndPackage,EngineeringForm,Environment,Equal,% Erf,EulerE,EulerPhi,EvenQ,Exit,Exp,Expand,ExpandAll,% ExpandDenominator,ExpandNumerator,ExpIntegralE,ExpIntegralEi,% Exponent,Expression,ExtendedGCD,FaceForm,Factor,FactorComplete,% Factorial,Factorial2,FactorInteger,FactorList,FactorSquareFree,% FactorSquareFreeList,FactorTerms,FactorTermsList,FindMinimum,% FindRoot,First,Fit,FixedPoint,Flatten,Floor,FontForm,For,Format,% FormatType,FortranForm,Fourier,FreeQ,FullDefinition,FullForm,% Function,Gamma,GCD,GegenbauerC,General,Get,Goto,Graphics,% Graphics3D,GrayLevel,Greater,GreaterEqual,Head,HermiteH,% HiddenSurface,Hold,HoldForm,Hypergeometric0F1,Hypergeometric1F1,% Hypergeometric2F1,HypergeometricU,Identity,IdentityMatrix,If,Im,% Implies,In,Increment,Indent,Infix,Information,Inner,Input,% InputForm,InputString,Insert,Integer,IntegerQ,Integrate,% Intersection,Inverse,InverseFourier,InverseJacobiSN,% InverseSeries,JacobiAmplitude,JacobiP,JacobiSN,JacobiSymbol,Join,% Label,LaguerreL,Last,LatticeReduce,LCM,LeafCount,LegendreP,% LegendreQ,LegendreType,Length,LerchPhi,Less,LessEqual,Level,% Lighting,LightSources,Limit,Line,LinearSolve,LineBreak,List,% ListContourPlot,ListDensityPlot,ListPlot,ListPlot3D,Literal,Log,% LogicalExpand,LogIntegral,MainSolve,Map,MapAll,MapAt,MatchQ,% MatrixForm,MatrixQ,Max,MaxBend,MaxMemoryUsed,MemberQ,% MemoryConstrained,MemoryInUse,Mesh,Message,MessageName,Messages,% Min,Minors,Minus,Mod,Modulus,MoebiusMu,Multinomial,N,NameQ,Names,% NBernoulliB,Needs,Negative,Nest,NestList,NIntegrate,% NonCommutativeMultiply,NonConstants,NonNegative,Normal,Not,% NProduct,NSum,NullSpace,Number,NumberForm,NumberPoint,NumberQ,% NumberSeparator,Numerator,O,OddQ,Off,On,OpenAppend,OpenRead,% OpenTemporary,OpenWrite,Operate,Optional,Options,Or,Order,% OrderedQ,Out,Outer,OutputForm,PageHeight,PageWidth,% ParametricPlot,ParametricPlot3D,Part,Partition,PartitionsP,% PartitionsQ,Pattern,Permutations,Plot,Plot3D,PlotDivision,% PlotJoined,PlotLabel,PlotPoints,PlotRange,PlotStyle,Pochhammer,% Plus,Point,PointSize,PolyGamma,Polygon,PolyLog,PolynomialQ,% PolynomialQuotient,PolynomialRemainder,Position,Positive,Postfix,% Power,PowerMod,PrecedenceForm,Precision,PreDecrement,Prefix,% PreIncrement,Prepend,PrependTo,Prime,PrimeQ,Print,PrintForm,% Product,Protect,PseudoInverse,Put,PutAppend,Quartics,Quit,% Quotient,Random,Range,Rational,Rationalize,Raw,Re,Read,ReadList,% Real,Rectangle,Reduce,Remove,RenderAll,Repeated,RepeatedNull,% Replace,ReplaceAll,ReplaceRepeated,Rest,Resultant,Return,Reverse,% RGBColor,Roots,RotateLeft,RotateRight,Round,RowReduce,Rule,% RuleDelayed,Run,RunThrough,SameQ,Save,Scaled,Scan,ScientificForm,% Sec,Sech,SeedRandom,Select,Sequence,SequenceForm,Series,% SeriesData,Set,SetAttributes,SetDelayed,SetOptions,Shading,Share,% Short,Show,Sign,Signature,Simplify,Sin,SingularValues,Sinh,% Skeleton,Slot,SlotSequence,Solve,SolveAlways,Sort,% SphericalHarmonicY,Splice,Sqrt,StirlingS1,StirlingS2,String,% StringBreak,StringForm,StringJoin,StringLength,StringMatchQ,% StringSkeleton,Subscript,Subscripted,Subtract,SubtractForm,Sum,% Superscript,SurfaceGraphics,Switch,Symbol,Table,TableForm,TagSet,% TagSetDelayed,TagUnset,Take,Tan,Tanh,ToString,TensorRank,TeXForm,% Text,TextForm,Thickness,Thread,Through,Throw,Ticks,% TimeConstrained,Times,TimesBy,Timing,ToExpression,Together,% ToRules,ToString,TotalHeight,TotalWidth,Transpose,TreeForm,TrueQ,% Unequal,Union,Unique,Unprotect,Unset,Update,UpSet,UpSetDelayed,% ValueQ,Variables,VectorQ,ViewPoint,WeierstrassP,% WeierstrassPPrime,Which,While,WorkingPrecision,Write,WriteString,% Xor,ZeroTest,Zeta},% morendkeywords={All,Automatic,Catalan,ComplexInfinity,Constant,% Degree,E,EndOfFile,EulerGamma,False,Flat,GoldenRatio,HoldAll,% HoldFirst,HoldRest,I,Indeterminate,Infinity,Listable,Locked,% Modular,None,Null,OneIdentity,Orderless,Pi,Protected,% ReadProtected,True,$CommandLine,$Context,$ContextPath,$Display,% $DisplayFunction,$Echo,$Epilog,$IgnoreEOF,$Line,$Messages,% $Output,$Path,$Post,$Pre,$PrePrint,$RecursionLimit,$System,% $Urgent,$Version},% sensitive,% morecomment=[s]{(*}{*)},% morestring=[d]"% }[keywords,comments,strings]% %% %% Octave definition (c) 2001,2002 Ulrich G. Wortmann %% \lst@definelanguage{Octave}% {morekeywords={gt,lt,amp,abs,acos,acosh,acot,acoth,acsc,acsch,% all,angle,ans,any,asec,asech,asin,asinh,atan,atan2,atanh,auread,% auwrite,axes,axis,balance,bar,bessel,besselk,bessely,beta,% betainc,betaln,blanks,bone,break,brighten,capture,cart2pol,% cart2sph,caxis,cd,cdf2rdf,cedit,ceil,chol,cla,clabel,clc,clear,% clf,clock,close,colmmd,Colon,colorbar,colormap,ColorSpec,colperm,% comet,comet3,compan,compass,computer,cond,condest,conj,contour,% contour3,contourc,contrast,conv,conv2,cool,copper,corrcoef,cos,% cosh,cot,coth,cov,cplxpair,cputime,cross,csc,csch,csvread,% csvwrite,cumprod,cumsum,cylinder,date,dbclear,dbcont,dbdown,% dbquit,dbstack,dbstatus,dbstep,dbstop,dbtype,dbup,ddeadv,ddeexec,% ddeinit,ddepoke,ddereq,ddeterm,ddeunadv,deblank,dec2hex,deconv,% del2,delete,demo,det,diag,diary,diff,diffuse,dir,disp,dlmread,% dlmwrite,dmperm,dot,drawnow,echo,eig,ellipj,ellipke,else,elseif,% end,engClose,engEvalString,engGetFull,engGetMatrix,engOpen,% engOutputBuffer,engPutFull,engPutMatrix,engSetEvalCallback,% engSetEvalTimeout,engWinInit,eps,erf,erfc,erfcx,erfinv,% errorbar,etime,etree,eval,exist,exp,expint,expm,expo,eye,fclose,% feather,feof,ferror,feval,fft,fft2,fftshift,fgetl,fgets,figure,% fill,fill3,filter,filter2,find,findstr,finite,fix,flag,fliplr,% flipud,floor,flops,fmin,fmins,fopen,for,format,fplot,fprintf,% fread,frewind,fscanf,fseek,ftell,full,function,funm,fwrite,fzero,% gallery,gamma,gammainc,gammaln,gca,gcd,gcf,gco,get,getenv,% getframe,ginput,global,gplot,gradient,gray,graymon,grid,griddata,% gtext,hadamard,hankel,help,hess,hex2dec,hex2num,hidden,hilb,hist,% hold,home,hostid,hot,hsv,hsv2rgb,if,ifft,ifft2,imag,image,% imagesc,Inf,info,input,int2str,interp1,interp2,interpft,inv,% invhilb,isempty,isglobal,ishold,isieee,isinf,isletter,isnan,% isreal,isspace,issparse,isstr,jet,keyboard,kron,lasterr,lcm,% legend,legendre,length,lin2mu,line,linspace,load,log,log10,log2,% loglog,logm,logspace,lookfor,lower,ls,lscov,lu,magic,matClose,% matDeleteMatrix,matGetDir,matGetFp,matGetFull,matGetMatrix,% matGetNextMatrix,matGetString,matlabrc,matlabroot,matOpen,% matPutFull,matPutMatrix,matPutString,max,mean,median,menu,mesh,% meshc,meshgrid,meshz,mexAtExit,mexCallMATLAB,mexdebug,% mexErrMsgTxt,mexEvalString,mexFunction,mexGetFull,mexGetMatrix,% mexGetMatrixPtr,mexPrintf,mexPutFull,mexPutMatrix,mexSetTrapFlag,% min,more,movie,moviein,mu2lin,mxCalloc,mxCopyCharacterToPtr,% mxCopyComplex16ToPtr,mxCopyInteger4ToPtr,mxCopyPtrToCharacter,% mxCopyPtrToComplex16,mxCopyPtrToInteger4,mxCopyPtrToReal8,% mxCopyReal8ToPtr,mxCreateFull,mxCreateSparse,mxCreateString,% mxFree,mxFreeMatrix,mxGetIr,mxGetJc,mxGetM,mxGetN,mxGetName,% mxGetNzmax,mxGetPi,mxGetPr,mxGetScalar,mxGetString,mxIsComplex,% mxIsFull,mxIsNumeric,mxIsSparse,mxIsString,mxIsTypeDouble,% mxSetIr,mxSetJc,mxSetM,mxSetN,mxSetName,mxSetNzmax,mxSetPi,% mxSetPr,NaN,nargchk,nargin,nargout,newplot,nextpow2,nnls,nnz,% nonzeros,norm,normest,null,num2str,nzmax,ode23,ode45,orient,orth,% pack,pascal,patch,path,pause,pcolor,pi,pink,pinv,plot,plot3,% pol2cart,polar,poly,polyder,polyeig,polyfit,polyval,polyvalm,% pow2,print,printopt,prism,prod,pwd,qr,qrdelete,qrinsert,quad,% quad8,quit,quiver,qz,rand,randn,randperm,rank,rat,rats,rbbox,% rcond,real,realmax,realmin,refresh,rem,reset,reshape,residue,% return,rgb2hsv,rgbplot,rootobject,roots,rose,rosser,rot90,rotate,% round,rref,rrefmovie,rsf2csf,save,saxis,schur,sec,sech,semilogx,% semilogy,set,setstr,shading,sign,sin,sinh,size,slice,sort,sound,% spalloc,sparse,spaugment,spconvert,spdiags,specular,speye,spfun,% sph2cart,sphere,spinmap,spline,spones,spparms,sprandn,sprandsym,% sprank,sprintf,spy,sqrt,sqrtm,sscanf,stairs,startup,std,stem,% str2mat,str2num,strcmp,strings,strrep,strtok,subplot,subscribe,% subspace,sum,surf,surface,surfc,surfl,surfnorm,svd,symbfact,% symmmd,symrcm,tan,tanh,tempdir,tempname,terminal,text,tic,title,% toc,toeplitz,trace,trapz,tril,triu,type,uicontrol,uigetfile,% uimenu,uiputfile,unix,unwrap,upper,vander,ver,version,view,% viewmtx,waitforbuttonpress,waterfall,wavread,wavwrite,what,% whatsnew,which,while,white,whitebg,who,whos,wilkinson,wk1read,% stderr,stdout,plot,set,endif,wk1write,xlabel,xor,ylabel,zeros,% zlabel,zoom,endwhile,endfunction,printf,case,switch,otherwise,% system,lsode,endfor,error,ones,oneplot,__gnuplot_set__,do,until},% sensitive=t,% morecomment=[l]\#,% morecomment=[l]\#\#,% morecomment=[l]\%,% morestring=[m]',% morestring=[m]"% }[keywords,comments,strings]% \lst@definelanguage[XSC]{Pascal}[Standard]{Pascal} {deletekeywords={alfa,byte,pack,unpack},% 1998 Andreas Stephan morekeywords={dynamic,external,forward,global,module,nil,operator,% priority,sum,type,use,dispose,mark,page,release,cimatrix,% cinterval,civector,cmatrix,complex,cvector,dotprecision,imatrix,% interval,ivector,rmatrix,rvector,string,im,inf,re,sup,chr,comp,% eof,eoln,expo,image,ival,lb,lbound,length,loc,mant,maxlength,odd,% ord,pos,pred,round,rval,sign,substring,succ,trunc,ub,ubound}% }% \lst@definelanguage[Borland6]{Pascal}[Standard]{Pascal} {morekeywords={asm,constructor,destructor,implementation,inline,% interface,nil,object,shl,shr,string,unit,uses,xor},% morendkeywords={Abs,Addr,ArcTan,Chr,Concat,Copy,Cos,CSeg,DiskFree,% DiskSize,DosExitCode,DosVersion,DSeg,EnvCount,EnvStr,Eof,Eoln,% Exp,FExpand,FilePos,FileSize,Frac,FSearch,GetBkColor,GetColor,% GetDefaultPalette,GetDriverName,GetEnv,GetGraphMode,GetMaxMode,% GetMaxX,GetMaxY,GetModeName,GetPaletteSize,GetPixel,GetX,GetY,% GraphErrorMsg,GraphResult,Hi,ImageSize,InstallUserDriver,% InstallUserFont,Int,IOResult,KeyPressed,Length,Lo,MaxAvail,% MemAvail,MsDos,Odd,Ofs,Ord,OvrGetBuf,OvrGetRetry,ParamCount,% ParamStr,Pi,Pos,Pred,Ptr,Random,ReadKey,Round,SeekEof,SeekEoln,% Seg,SetAspectRatio,Sin,SizeOf,Sound,SPtr,Sqr,Sqrt,SSeg,Succ,% Swap,TextHeight,TextWidth,Trunc,TypeOf,UpCase,WhereX,WhereY,% Append,Arc,Assign,AssignCrt,Bar,Bar3D,BlockRead,BlockWrite,ChDir,% Circle,ClearDevice,ClearViewPort,Close,CloseGraph,ClrEol,ClrScr,% Dec,Delay,Delete,DelLine,DetectGraph,Dispose,DrawPoly,Ellipse,% Erase,Exec,Exit,FillChar,FillEllipse,FillPoly,FindFirst,FindNext,% FloodFill,Flush,FreeMem,FSplit,GetArcCoords,GetAspectRatio,% GetDate,GetDefaultPalette,GetDir,GetCBreak,GetFAttr,% GetFillSettings,GetFTime,GetImage,GetIntVec,GetLineSettings,% GetMem,GetPalette,GetTextSettings,GetTime,GetVerify,% GetViewSettings,GoToXY,Halt,HighVideo,Inc,InitGraph,Insert,% InsLine,Intr,Keep,Line,LineRel,LineTo,LowVideo,Mark,MkDir,Move,% MoveRel,MoveTo,MsDos,New,NormVideo,NoSound,OutText,OutTextXY,% OvrClearBuf,OvrInit,OvrInitEMS,OvrSetBuf,PackTime,PieSlice,% PutImage,PutPixel,Randomize,Rectangle,Release,Rename,% RestoreCrtMode,RmDir,RunError,Sector,Seek,SetActivePage,% SetAllPalette,SetBkColor,SetCBreak,SetColor,SetDate,SetFAttr,% SetFillPattern,SetFillStyle,SetFTime,SetGraphBufSize,% SetGraphMode,SetIntVec,SetLineStyle,SetPalette,SetRGBPalette,% SetTextBuf,SetTextJustify,SetTextStyle,SetTime,SetUserCharSize,% SetVerify,SetViewPort,SetVisualPage,SetWriteMode,Sound,Str,% SwapVectors,TextBackground,TextColor,TextMode,Truncate,% UnpackTime,Val,Window}% }% \lst@definelanguage[Standard]{Pascal}% {morekeywords={alfa,and,array,begin,boolean,byte,case,char,const,div,% do,downto,else,end,false,file,for,function,get,goto,if,in,% integer,label,maxint,mod,new,not,of,or,pack,packed,page,program,% put,procedure,read,readln,real,record,repeat,reset,rewrite,set,% text,then,to,true,type,unpack,until,var,while,with,write,% writeln},% sensitive=f,% morecomment=[s]{(*}{*)},% morecomment=[s]{\{}{\}},% morestring=[d]'% }[keywords,comments,strings]% \lst@definelanguage{Perl}% {morekeywords={abs,accept,alarm,atan2,bind,binmode,bless,caller,% chdir,chmod,chomp,chop,chown,chr,chroot,close,closedir,connect,% continue,cos,crypt,dbmclose,dbmopen,defined,delete,die,do,dump,% each,else,elsif,endgrent,endhostent,endnetent,endprotoent,% endpwent,endservent,eof,eval,exec,exists,exit,exp,fcntl,fileno,% flock,for,foreach,fork,format,formline,getc,getgrent,getgrgid,% getgrnam,gethostbyaddr,gethostbyname,gethostent,getlogin,% getnetbyaddr,getnetbyname,getnetent,getpeername,getpgrp,% getppid,getpriority,getprotobyname,getprotobynumber,getprotoent,% getpwent,getpwnam,getpwuid,getservbyname,getservbyport,% getservent,getsockname,getsockopt,glob,gmtime,goto,grep,hex,if,% import,index,int,ioctl,join,keys,kill,last,lc,lcfirst,length,% link,listen,local,localtime,log,lstat,m,map,mkdir,msgctl,msgget,% msgrcv,msgsnd,my,next,no,oct,open,opendir,ord,pack,package,pipe,% pop,pos,print,printf,prototype,push,q,qq,quotemeta,qw,qx,rand,% read,readdir,readlink,recv,redo,ref,rename,require,reset,return,% reverse,rewinddir,rindex,rmdir,s,scalar,seek,seekdir,select,% semctl,semget,semop,send,setgrent,sethostent,setnetent,setpgrp,% setpriority,setprotoent,setpwent,setservent,setsockopt,shift,% shmctl,shmget,shmread,shmwrite,shutdown,sin,sleep,socket,% socketpair,sort,splice,split,sprintf,sqrt,srand,stat,study,sub,% substr,symlink,syscall,sysopen,sysread,system,syswrite,tell,% telldir,tie,tied,time,times,tr,truncate,uc,ucfirst,umask,undef,% unless,unlink,unpack,unshift,untie,until,use,utime,values,vec,% wait,waitpid,wantarray,warn,while,write,y},% sensitive,% morecomment=[l]\#,% morestring=[b]",% morestring=[b]',% MoreSelectCharTable=% \lst@ReplaceInput{\$\#}{\lst@ProcessOther\$\lst@ProcessOther\#}% }[keywords,comments,strings]% %% %% POV definition (c) 1999 Berthold H\"ollmann %% \lst@definelanguage{POV}% {morekeywords={abs,absorption,acos,acosh,adaptive,adc_bailout,agate,% agate_turb,all,alpha,ambient,ambient_light,angle,aperture,append,% arc_angle,area_light,array,asc,asin,asinh,assumed_gamma,atan,% atan2,atanh,average,background,bezier_spline,bicubic_patch,% black_hole,blob,blue,blur_samples,bounded_by,box,boxed,bozo,% break,brick,brick_size,brightness,brilliance,bumps,bump_map,% bump_size,camera,case,caustics,ceil,checker,chr,clipped_by,clock,% clock_delta,color,color_map,colour,colour_map,component,% composite,concat,cone,confidence,conic_sweep,control0,control1,% cos,cosh,count,crackle,crand,cube,cubic,cubic_spline,cubic_wave,% cylinder,cylindrical,debug,declare,default,defined,degrees,% density,density_file,density_map,dents,difference,diffuse,% dimensions,dimension_size,direction,disc,distance,% distance_maximum,div,eccentricity,else,emission,end,error,% error_bound,exp,extinction,fade_distance,fade_power,falloff,% falloff_angle,false,fclose,file_exists,filter,finish,fisheye,% flatness,flip,floor,focal_point,fog,fog_alt,fog_offset,fog_type,% fopen,frequency,gif,global_settings,gradient,granite,% gray_threshold,green,height_field,hexagon,hf_gray_16,hierarchy,% hollow,hypercomplex,if,ifdef,iff,ifndef,image_map,include,int,% interior,interpolate,intersection,intervals,inverse,ior,irid,% irid_wavelength,jitter,julia_fractal,lambda,lathe,leopard,% light_source,linear_spline,linear_sweep,local,location,log,% looks_like,look_at,low_error_factor,macro,mandel,map_type,marble,% material,material_map,matrix,max,max_intersections,max_iteration,% max_trace_level,media,media_attenuation,media_interaction,merge,% mesh,metallic,min,minimum_reuse,mod,mortar,nearest_count,no,% normal,normal_map,no_shadow,number_of_waves,object,octaves,off,% offset,omega,omnimax,on,once,onion,open,orthographic,panoramic,% perspective,pgm,phase,phong,phong_size,pi,pigment,pigment_map,% planar,plane,png,point_at,poly,polygon,poly_wave,pot,pow,ppm,% precision,prism,pwr,quadratic_spline,quadric,quartic,quaternion,% quick_color,quick_colour,quilted,radial,radians,radiosity,radius,% rainbow,ramp_wave,rand,range,ratio,read,reciprocal,% recursion_limit,red,reflection,reflection_exponent,refraction,% render,repeat,rgb,rgbf,rgbft,rgbt,right,ripples,rotate,roughness,% samples,scale,scallop_wave,scattering,seed,shadowless,sin,% sine_wave,sinh,sky,sky_sphere,slice,slope_map,smooth,% smooth_triangle,sor,specular,sphere,spherical,spiral1,spiral2,% spotlight,spotted,sqr,sqrt,statistics,str,strcmp,strength,strlen,% strlwr,strupr,sturm,substr,superellipsoid,switch,sys,t,tan,tanh,% text,texture,texture_map,tga,thickness,threshold,tightness,tile2,% tiles,torus,track,transform,translate,transmit,triangle,% triangle_wave,true,ttf,turbulence,turb_depth,type,u,% ultra_wide_angle,undef,union,up,use_color,use_colour,use_index,% u_steps,v,val,variance,vaxis_rotate,vcross,vdot,version,vlength,% vnormalize,vrotate,v_steps,warning,warp,water_level,waves,while,% width,wood,wrinkles,write,x,y,yes,z},% moredirectives={break,case,debug,declare,default,else,end,fclose,% fopen,local,macro,read,render,statistics,switch,undef,version,% warning,write},% moredelim=*[directive]\#,% sensitive,% morecomment=[l]//,% morecomment=[s]{/*}{*/},% morestring=[d]",% }[keywords,directives,comments,strings]% %% %% Python definition (c) 1998 Michael Weber %% \lst@definelanguage{Python}% {morekeywords={access,and,break,class,continue,def,del,elif,else,% except,exec,finally,for,from,global,if,import,in,is,lambda,not,% or,pass,print,raise,return,try,while},% sensitive=true,% morecomment=[l]\#,% morestring=[b]',% morestring=[b]",% morecomment=[s]{'''}{'''},% used for documentation text morecomment=[s]{"""}{"""}% added by Philipp Matthias Hahn }% %% %% Scilab definition (c) 2002,2003 Jean-Philippe Grivet %% \lst@definelanguage{Scilab}% {morekeywords={abcd,abinv,abort,abs,acoshm,acosh,acosm,acos,addcolor,% addf,addinter,addmenu,add_edge,add_node,adj2sp,adj_lists,aff2ab,% amell,analpf,analyze,ans,apropos,arc_graph,arc_number,argn,arhnk,% arl2,arma2p,armac,armax1,armax,arma,arsimul,artest,articul,ascii,% asinhm,asinh,asinm,asin,atanhm,atanh,atanm,atan,augment,auread,% auwrite,balanc,balreal,bandwr,basename,bdiag,besseli,besselj,% besselk,bessely,best_match,bezout,bifish,bilin,binomial,black,% bloc2exp,bloc2ss,bode,bool2s,boolean,boucle,break,bstap,buttmag,% bvode,cainv,calerf,calfrq,call,canon,casc,case,ccontrg,cdfbet,% cdfbin,cdfchi,cdfchn,cdffnc,cdff,cdfgam,cdfnbn,cdfnor,cdfpoi,% cdft,ceil,center,cepstrum,chaintest,chain_struct,champ1,champ,% chart,chdir,cheb1mag,cheb2mag,check_graph,check_io,chepol,chfact,% chol,chsolve,circuit,classmarkov,clean,clearfun,clearglobal,% clear,close,cls2dls,cmb_lin,cmndred,cmoment,code2str,coeff,coffg,% coff,colcompr,colcomp,colinout,colormap,colregul,companion,comp,% cond,conj,connex,contour2di,contour2d,contourf,contour,% contract_edge,contrss,contr,cont_frm,cont_mat,convex_hull,convol,% convstr,con_nodes,copfac,copy,correl,corr,coshm,cosh,cosm,cos,% cotg,cothm,coth,covar,csim,cspect,ctr_gram,cumprod,cumsum,% curblock,cycle_basis,czt,c_link,dasrt,dassl,datafit,date,dbphi,% dcf,ddp,debug,dec2hex,deff,definedfields,degree,delbpt,% delete_arcs,delete_nodes,delete,delip,delmenu,demos,denom,% derivative,derivat,des2ss,des2tf,determ,detr,det,dft,dhinf,% dhnorm,diag,diary,diff,diophant,dirname,dispbpt,dispfiles,disp,% dlgamma,double,dragrect,drawaxis,drawlater,drawnow,draw,driver,% dscr,dsearch,dsimul,dtsi,dt_ility,duplicate,edge_number,% edit_curv,edit_graph_menus,edit_graph,edit,eigenmarkov,ell1mag,% elseif,else,emptystr,endfunction,end,eqfir,eqiir,equil1,equil,% ereduc,erfcx,erfc,erf,errbar,errcatch,errclear,error,eval3dp,% eval3d,eval,evans,evstr,excel2sci,execstr,exec,exists,exit,expm,% exp,external,eye,fac3d,factors,faurre,fchamp,fcontour2d,fcontour,% fec,feedback,feval,ffilt,fftshift,fft,fgrayplot,figure,fileinfo,% file,filter,findm,findobj,findx0BD,find_freq,find_path,find,% findABCD,findAC,findBD,findBDK,findR,fit_dat,fix,floor,flts,foo,% formatman,format,fort,for,fourplan,fplot2d,fplot3d1,fplot3d,% fprintf,fprintfMat,frep2tf,freq,freson,frexp,frfit,frmag,fscanf,% fscanfMat,fsfirlin,fsolve,fspecg,fstabst,fstair,ftest,ftuneq,% fullrfk,fullrf,full,fun2string,funcprot,functions,function,% funptr,fusee,gainplot,gamitg,gammaln,gamma,gcare,gcd,gcf,% genfac3d,genlib,genmarkov,gen_net,geom3d,geomean,getblocklabel,% getcolor,getcurblock,getcwd,getdate,getd,getenv,getfield,getfont,% getf,getio,getlinestyle,getmark,getpid,getscicosvars,getsymbol,% getvalue,getversion,get_function_path,get,gfare,gfrancis,girth,% givens,glever,glist,global,glue,gpeche,graduate,grand,% graphics_entities,graph_2_mat,graph_center,graph_complement,% graph_diameter,graph_power,graph_simp,graph_sum,graph_union,% graph-list,graycolormap,grayplot,graypolarplot,grep,group,% gr_menu,gschur,gsort,gspec,gstacksize,gtild,g_margin,h2norm,halt,% hamilton,hankelsv,hank,harmean,havewindow,help,hermit,hess,% hex2dec,hilb,hinf,hist3d,histplot,horner,host,hotcolormap,% householder,hrmt,htrianr,hypermat,h_cl,h_inf_st,h_inf,h_norm,% iconvert,icon_edit,ieee,if,iirgroup,iirlp,iir,ilib_build,% ilib_compile,ilib_for_link,ilib_gen_gateway,ilib_gen_loader,% ilib_gen_Make,imag,impl,imrep2ss,imult,im_inv,inistate,input,% int16,int2d,int32,int3d,int8,intc,intdec,integrate,interpln,% interp,intersci,intersect,intg,intl,intppty,intsplin,inttrap,% inttype,int,invr,invsyslin,inv_coeff,inv,iqr,isdef,isdir,isequal,% iserror,isglobal,isinf,isnan,isoview,isreal,is_connex,jmat,% justify,kalm,karmarkar,kernel,keyboard,knapsack,kpure,krac2,% kroneck,kron,lasterror,lattn,lattp,lcf,lcmdiag,lcm,ldivf,ldiv,% leastsq,legends,length,leqr,levin,lev,lex_sort,lft,lgfft,library,% lib,lin2mu,lincos,lindquist,lines,line_graph,linfn,linf,link,% linmeq,linpro,linsolve,linspace,lin,listfiles,list,lmisolver,% lmitool,loadmatfile,loadplots,loadwave,load_graph,load,locate,% log10,log1p,log2,logm,logspace,log,lotest,lqe,lqg2stan,lqg_ltr,% lqg,lqr,lsq,lsslist,lstcat,lstsize,ltitr,ludel,lufact,luget,% lusolve,lu,lyap,macglov,macr2lst,macrovar,macro,mad,make_graph,% make_index,manedit,man,mapsound,markp2ss,matfile2sci,matrix,% mat_2_graph,maxi,max_cap_path,max_clique,max_flow,max,mclearerr,% mclose,meanf,mean,median,meof,mese,mesh2d,mfft,mfile2sci,mgeti,% mgetl,mgetstr,mget,milk_drop,mine,mini,minreal,minss,% min_lcost_cflow,min_lcost_flow1,min_lcost_flow2,min_qcost_flow,% min_weight_tree,min,mlist,mode,modulo,moment,mopen,move,% mps2linpro,mputl,mputstr,mput,mrfit,msd,mseek,mtell,mtlb_load,% mtlb_mode,mtlb_save,mtlb_sparse,mu2lin,mulf,mvvacov,m_circle,% names,nand2mean,nanmax,nanmeanf,nanmean,nanmedian,nanmin,% nanstdev,nansum,narsimul,ndims,nearfloat,nehari,neighbors,% netclose,netwindows,netwindow,newest,newfun,nextpow2,nf3d,nfreq,% nlev,nnz,nodes_2_path,nodes_degrees,node_number,noisegen,norm,% null,numdiff,numer,nyquist,obscont1,obscont,observer,obsvss,% obsv_mat,obs_gram,odedc,odedi,odeoptions,ode_discrete,ode_root,% ode,oldload,oldsave,ones,optim,orth,param3d1,param3d,% paramfplot2d,parrot,part,pathconvert,path_2_nodes,pause,pbig,% pdiv,pen2ea,pencan,penlaur,perctl,perfect_match,pertrans,pfss,% phasemag,phc,pinv,pipe_network,playsnd,plot2d1,plot2d2,plot2d3,% plot2d4,plot2d,plot3d1,plot3d2,plot3d3,plot3d,plotframe,% plotprofile,plot_graph,plot,plzr,pmodulo,pol2des,pol2str,pol2tex,% polarplot,polar,polfact,poly,portr3d,portrait,power,ppol,prbs_a,% predecessors,predef,printf,printing,print,prod,profile,projsl,% projspec,proj,psmall,pspect,pvm_addhosts,pvm_barrier,pvm_bcast,% pvm_bufinfo,pvm_config,pvm_delhosts,pvm_error,pvm_exit,% pvm_f772sci,pvm_getinst,pvm_gettid,pvm_get_timer,pvm_gsize,% pvm_halt,pvm_joingroup,pvm_kill,pvm_lvgroup,pvm_mytid,pvm_parent,% pvm_probe,pvm_recv,pvm_reduce,pvm_sci2f77,pvm_send,pvm_set_timer,% pvm_spawn_independent,pvm_spawn,pvm_start,pvm_tasks,% pvm_tidtohost,pvm,pwd,p_margin,qassign,qr,quapro,quart,quaskro,% quit,randpencil,rand,range,rankqr,rank,rat,rcond,rdivf,read4b,% readb,readc_,readmps,read,real,recur,reglin,regress,remezb,remez,% repfreq,replot,residu,resume,return,riccati,riccsl,ricc,ric_desc,% rlist,roots,rotate,round,routh_t,rowcompr,rowcomp,rowinout,% rowregul,rowshuff,rpem,rref,rtitr,rubberbox,salesman,savewave,% save_graph,save,scaling,scanf,schur,sci2exp,sci2for,sci2map,% sciargs,scicosim,scicos,scifunc_block,sd2sci,secto3d,select,% semidef,sensi,setbpt,seteventhandler,setfield,setmenu,% setscicosvars,set,sfact,sgrid,shortest_path,showprofile,% show_arcs,show_graph,show_nodes,sident,signm,sign,simp_mode,simp,% sincd,sinc,sinc,sinhm,sinh,sinm,sin,size,sm2des,sm2ss,smooth,% solve,sorder,sort,sound,sp2adj,spaninter,spanplus,spantwo,sparse,% spchol,spcompack,specfact,spec,speye,spget,splin,split_edge,% spones,sprand,sprintf,spzeros,sqroot,sqrtm,sqrt,squarewave,% square,srfaur,srkf,ss2des,ss2ss,ss2tf,sscanf,sskf,ssprint,ssrand,% stabil,stacksize,standard_define,standard_draw,standard_input,% standard_origin,standard_output,startup,stdevf,stdev,steadycos,% str2code,strange,strcat,strindex,strings,string,stripblanks,% strong_connex,strong_con_nodes,strsubst,st_deviation,st_ility,% subf,subgraph,subplot,successors,sum,supernode,sva,svd,svplot,% sylm,sylv,sysconv,sysdiag,sysfact,syslin,syssize,systems,system,% systmat,tabul,tangent,tanhm,tanh,tanm,tan,tdinit,testmatrix,% texprint,tf2des,tf2ss,then,thrownan,timer,time_id,titlepage,% tk_getdir,tk_getfile,tlist,toeplitz,tokenpos,tokens,trace,% translatepaths,trans_closure,trans,trfmod,trianfml,tril,trimmean,% trisolve,triu,trzeros,typename,typeof,type,uicontrol,uimenu,% uint16,uint32,uint8,ui_observer,ulink,unglue,union,unique,unix_g,% unix_s,unix_w,unix_x,unix,unobs,unsetmenu,user,varargin,% varargout,variancef,variance,varn,warning,wavread,wavwrite,% wcenter,wfir,what,whereami,whereis,where,while,whos,who_user,who,% wiener,wigner,window,winsid,with_gtk,with_pvm,with_texmacs,% with_tk,writb,write4b,write,xarcs,xarc,xarrows,xaxis,xbasc,% xbasimp,xbasr,xchange,xclear,xclea,xclick,xclip,xdel,xend,xfarcs,% xfarc,xfpolys,xfpoly,xfrect,xgetech,xgetfile,xgetmouse,xget,% xgraduate,xgrid,xinfo,xinit,xlfont,xload,xname,xnumb,xpause,% xpolys,xpoly,xrects,xrect,xrpoly,xs2fig,xs2gif,xs2ppm,xs2ps,% xsave,xsegs,select,xsetech,xsetm,xset,xstringb,xstringl,xstring,% xtape,xtitle,x_choices,x_choose,x_dialog,x_matrix,x_mdialog,% x_message_modeless,x_message,yulewalk,zeropen,zeros,zgrid,zpbutt,% zpch1,zpch2,zpell,mfprintf,mfscanf,mprintf,mscanf,msprintf,% msscanf,mucomp,% ABSBLK_f,AFFICH_f,ANDLOG_f,ANIMXY_f,BIGSOM_f,CLINDUMMY_f,CLKIN_f,% CLKINV_f,CLKOUT_f,CLKOUTV_f,CLKSOM_f,CLKSOMV_f,CLKSPLIT_f,% CLOCK_f,CLR_f,CLSS_f,CONST_f,COSBLK_f,CURV_f,DELAY_f,DELAYV_f,% DEMUX_f,DLR_f,DLRADAPT_f,DLSS_f,EVENTSCOPE_f,EVTDLY_f,EVTGEN_f,% EXPBLK_f,G_make,GAIN_f,GAINBLK_f,GENERAL_f,GENERIC_f,GENSIN_f,% GENSQR_f,HALT_f,IFTHEL_f,IN_f,INTEGRAL_f,INTRP2BLK_f,INTRPLBLK_f,% INVBLK_f,LOGBLK_f,LOOKUP_f,Matplot1,Matplot,MAX_f,MCLOCK_f,% MFCLCK_f,MIN_f,MUX_f,NDcost,NEGTOPOS_f,OUT_f,POSTONEG_f,POWBLK_f,% PROD_f,QUANT_f,RAND_f,READC_f,REGISTER_f,RELAY_f,RFILE_f,% ScilabEval,Sfgrayplot,Sgrayplot,SAMPLEHOLD_f,SAT_f,SAWTOOTH_f,% SCOPE_f,SCOPXY_f,SELECT_f,SINBLK_f,SOM_f,SPLIT_f,STOP_f,SUPER_f,% TANBLK_f,TCLSS_f,TEXT_f,TIME_f,TK_EvalFile,TK_EvalStr,TK_GetVar,% TK_SetVar,TRASH_f,WFILE_f,WRITEC_f,ZCROSS_f,% \%asn,\%helps,\%k,\%sn},% alsoletter=\%,% chmod sensitive,% morecomment=[l]//,% morestring=[b]",% morestring=[m]'% }[keywords,comments,strings]% %% %% SQL definition (c) 1998 Christian Haul %% (c) 2002 Neil Conway %% (c) 2002 Robert Frank %% (c) 2003 Dirk Jesko %% \lst@definelanguage{SQL}% {morekeywords={ABSOLUTE,ACTION,ADD,ALLOCATE,ALTER,ARE,AS,ASSERTION,% AT,BETWEEN,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,% CATALOG,CHAR_LENGTH,CHARACTER_LENGTH,CLUSTER,COALESCE,% COLLATE,COLLATION,COLUMN,CONNECT,CONNECTION,CONSTRAINT,% CONSTRAINTS,CONVERT,CORRESPONDING,CREATE,CROSS,CURRENT_DATE,% CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,DAY,DEALLOCATE,% DEC,DEFERRABLE,DEFERED,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,% DISCONNECT,DOMAIN,DROP,ELSE,END,EXEC,EXCEPT,EXCEPTION,EXECUTE,% EXTERNAL,EXTRACT,FALSE,FIRST,FOREIGN,FROM,FULL,GET,GLOBAL,% GRAPHIC,HAVING,HOUR,IDENTITY,IMMEDIATE,INDEX,INITIALLY,INNER,% INPUT,INSENSITIVE,INSERT,INTO,INTERSECT,INTERVAL,% ISOLATION,JOIN,KEY,LAST,LEADING,LEFT,LEVEL,LIMIT,LOCAL,LOWER,% MATCH,MINUTE,MONTH,NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NOT,NULL,% NULLIF,OCTET_LENGTH,ON,ONLY,ORDER,ORDERED,OUTER,OUTPUT,OVERLAPS,% PAD,PARTIAL,POSITION,PREPARE,PRESERVE,PRIMARY,PRIOR,READ,% RELATIVE,RESTRICT,REVOKE,RIGHT,ROWS,SCROLL,SECOND,SELECT,SESSION,% SESSION_USER,SIZE,SPACE,SQLSTATE,SUBSTRING,SYSTEM_USER,% TABLE,TEMPORARY,THEN,TIMEZONE_HOUR,% TIMEZONE_MINUTE,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,% TRUE,UNIQUE,UNKNOWN,UPPER,USAGE,USING,VALUE,VALUES,% VARGRAPHIC,VARYING,WHEN,WHERE,WRITE,YEAR,ZONE,% AND,ASC,avg,CHECK,COMMIT,count,DECODE,DESC,DISTINCT,GROUP,IN,% FF LIKE,NUMBER,ROLLBACK,SUBSTR,sum,VARCHAR2,% FF MIN,MAX,UNION,UPDATE,% RF ALL,ANY,CUBE,CUBE,DEFAULT,DELETE,EXISTS,GRANT,OR,RECURSIVE,% DJ ROLE,ROLLUP,SET,SOME,TRIGGER,VIEW},% DJ morendkeywords={BIT,BLOB,CHAR,CHARACTER,CLOB,DATE,DECIMAL,FLOAT,% DJ INT,INTEGER,NUMERIC,SMALLINT,TIME,TIMESTAMP,VARCHAR},% moved here sensitive=false,% DJ morecomment=[l]--,% morecomment=[s]{/*}{*/},% morestring=[d]',% morestring=[d]"% }[keywords,comments,strings]% %% %% VHDL definition (c) 1997 Kai Wollenweber %% \lst@definelanguage{VHDL}% {morekeywords={ALL,ARCHITECTURE,ABS,AND,ASSERT,ARRAY,AFTER,ALIAS,% ACCESS,ATTRIBUTE,BEGIN,BODY,BUS,BLOCK,BUFFER,CONSTANT,CASE,% COMPONENT,CONFIGURATION,DOWNTO,ELSE,ELSIF,END,ENTITY,EXIT,% FUNCTION,FOR,FILE,GENERIC,GENERATE,GUARDED,GROUP,IF,IN,INOUT,IS,% INERTIAL,IMPURE,LIBRARY,LOOP,LABEL,LITERAL,LINKAGE,MAP,MOD,NOT,% NOR,NAND,NULL,NEXT,NEW,OUT,OF,OR,OTHERS,ON,OPEN,PROCESS,PORT,% PACKAGE,PURE,PROCEDURE,POSTPONED,RANGE,REM,ROL,ROR,REPORT,RECORD,% RETURN,REGISTER,REJECT,SIGNAL,SUBTYPE,SLL,SRL,SLA,SRA,SEVERITY,% SELECT,THEN,TYPE,TRANSPORT,TO,USE,UNITS,UNTIL,VARIABLE,WHEN,WAIT,% WHILE,XOR,XNOR,% DISCONNECT,ELIF,WITH},% Arnaud Tisserand sensitive=f,% 1998 Gaurav Aggarwal morecomment=[l]--,% morestring=[d]{"}% }[keywords,comments,strings]% %% %% VHDL-AMS definition (c) Steffen Klupsch %% \lst@definelanguage[AMS]{VHDL}[]{VHDL}% {morekeywords={ACROSS,ARRAY,BREAK,DISCONNECT,NATURE,NOISE,PORT,% PROCEDURAL,QUANTITY,SHARED,SPECTRUM,SUBNATURE,TERMINAL,THROUGH,% TOLERANCE,UNAFFACTED,UNITS}} \lst@definelanguage{XSLT}[]{XML}% {morekeywords={% % main elements xsl:stylesheet,xsl:transform,% % childs of the main element xsl:apply-imports,xsl:attribute-set,xsl:decimal-format,xsl:import,% xsl:include,xsl:key,xsl:namespace-alias,xsl:output,xsl:param,% xsl:preserve-space,xsl:strip-space,xsl:template,xsl:variable,% % 21 directives xsl:apply-imports,xsl:apply-templates,xsl:attribute,% xsl:call-template,xsl:choose,xsl:comment,xsl:copy,xsl:copy-of,% xsl:element,xsl:fallback,xsl:for-each,xsl:if,xsl:message,% xsl:number,xsl:otherwise,xsl:processing-instruction,xsl:text,% xsl:value-of,xsl:variable,xsl:when,xsl:with-param},% alsodigit={-},% }% \lst@definelanguage{Ant}[]{XML}% {morekeywords={% project,target,patternset,include,exclude,excludesfile,includesfile,filterset,% filter,filtersfile,libfileset,custom,classpath,fileset,none,depend,mapper,% filename,not,date,contains,selector,depth,or,and,present,majority,size,dirset,% filelist,pathelement,path,param,filterreader,extension,filterchain,linecontainsregexp,% regexp,classconstants,headfilter,tabstospaces,striplinebreaks,tailfilter,stripjavacomments,% expandproperties,linecontains,replacetokens,token,striplinecomments,comment,prefixlines,% classfileset,rootfileset,root,description,xmlcatalog,entity,dtd,substitution,% extensionSet,propertyfile,entry,vsscheckin,sql,transaction,cvspass,csc,% dirname,wlrun,wlclasspath,p4label,replaceregexp,get,jjtree,sleep,jarlib,% dependset,targetfileset,srcfileset,srcfilelist,targetfilelist,zip,zipgroupfileset,zipfileset,% patch,jspc,webapp,style,test,arg,jvmarg,sysproperty,testlet,env,tstamp,% format,unwar,vsshistory,icontract,cvschangelog,user,p4submit,ccmcheckin,% p4change,bzip2,vssadd,javadoc,bottom,source,doctitle,header,excludepackage,bootclasspath,% doclet,taglet,packageset,sourcepath,link,footer,package,group,title,tag,% translate,signjar,vajload,vajproject,jarlib,extensionset,WsdlToDotnet,buildnumber,% jpcovmerge,tomcat,ejbjar,weblogictoplink,jboss,borland,weblogic,iplanet,jonas,% support,websphere,wasclasspath,war,manifest,attribute,section,metainf,lib,% classes,webinf,rename,sequential,serverdeploy,generic,property,move,% copydir,cccheckin,wljspc,fixcrlf,sosget,pathconvert,map,record,p4sync,exec,% p4edit,maudit,rulespath,searchpath,antlr,netrexxc,jpcovreport,reference,filters,% coveragepath,execon,targetfile,srcfile,ccmcheckout,ant,xmlvalidate,xslt,% iplanet,ccmcheckintask,gzip,native2ascii,starteam,ear,archives,input,% rmic,extdirs,compilerarg,checksum,mail,bcc,message,cc,to,from,loadfile,vsscheckout,% stylebook,soscheckin,mimemail,stlabel,gunzip,concat,cab,touch,parallel,splash,% antcall,cccheckout,typedef,p4have,xmlproperty,copy,tomcat,antstructure,ccmcreatetask,% rpm,delete,replace,replacefilter,replacetoken,replacevalue,mmetrics,waitfor,isfalse,% equals,available,filepath,os,filesmatch,istrue,isset,socket,http,uptodate,srcfiles,% untar,loadproperties,echoproperties,vajexport,stcheckout,bunzip2,copyfile,vsscreate,% ejbc,unjar,tomcat,wsdltodotnet,mkdir,condition,cvs,commandline,marker,argument,% tempfile,junitreport,report,taskdef,echo,ccupdate,java,renameext,vsslabel,basename,% javadoc2,vsscp,tar,tarfileset,tomcat,vajimport,setproxy,wlstop,p4counter,ilasm,% soscheckout,apply,ccuncheckout,jarlib,location,url,cvstagdiff,jlink,mergefiles,% addfiles,javacc,pvcs,pvcsproject,jarlib,options,depends,chmod,jar,sound,fail,% success,mparse,blgenclient,genkey,dname,javah,class,ccmreconfigure,unzip,javac,% src,p4add,soslabel,jpcoverage,triggers,method,vssget,deltree,ddcreator}, deletekeywords={default},% } \lst@definelanguage{XML}% {keywords={,CDATA,DOCTYPE,ATTLIST,termdef,ELEMENT,EMPTY,ANY,ID,% IDREF,IDREFS,ENTITY,ENTITIES,NMTOKEN,NMTOKENS,NOTATION,% INCLUDE,IGNORE,SYSTEM,PUBLIC,NDATA,PUBLIC,% PCDATA,REQUIRED,IMPLIED,FIXED,%%% preceded by # xml,xml:space,xml:lang,version,standalone,default,preserve},% alsoother=$,% alsoletter=:,% tag=**[s]<>,% morestring=[d]",% ??? doubled morestring=[d]',% ??? doubled MoreSelectCharTable=% \lst@CArgX--\relax\lst@DefDelimB{}{}% {\ifnum\lst@mode=\lst@tagmode\else \expandafter\@gobblethree \fi}% \lst@BeginComment\lst@commentmode{{\lst@commentstyle}}% \lst@CArgX--\relax\lst@DefDelimE{}{}{}% \lst@EndComment\lst@commentmode \lst@CArgX[CDATA[\relax\lst@CDef{}% {\ifnum\lst@mode=\lst@tagmode \expandafter\lst@BeginCDATA \else \expandafter\lst@CArgEmpty \fi}% \@empty \lst@CArgX]]\relax\lst@CDef{}% {\ifnum\lst@mode=\lst@GPmode \expandafter\lst@EndComment \else \expandafter\lst@CArgEmpty \fi}% \@empty }[keywords,comments,strings,html]% \endinput %% %% End of file `lstlang1.sty'. hevea-2.09/makeidx.hva0000644004317100512160000000123712073025332014704 0ustar marangetcristal\@primitives{index} \newsavebox{\@indexbox} %%%% index citations that point to index commands \newcommand{\@index@loc}[1] {\if@refs% \sbox{\@indexbox}{\@indexwrite[default]{#1}{\@indexlabel}}%force evaluation \@locname{\usebox{\@indexbox}}{}% \fi} %%%% index citations that point to section titles. \newcommand{\@index@sec}[1] {\if@refs% \@@indexwrite[default]{#1}{\@currentlabel}{\@fmt@sec}%force evaluation \fi} \newif\ifindexsec\indexsecfalse \newcommand{\index}[1]{\ifindexsec\@index@sec{#1}\else\@index@loc{#1}} \newcommand{\printindex}{\@printindex[default]} \newcommand{\makeindex}{\newindex{default}{idx}{ind}{Index}} \newcommand{\see}[2]{\seename\ \textit{#1}} hevea-2.09/hot.mli0000644004317100512160000000156307303451221014061 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: hot.mli,v 1.3 2001-05-25 12:37:23 maranget Exp $ *) (***********************************************************************) type saved val checkpoint : unit -> saved val start : saved -> unit hevea-2.09/counter.mli0000644004317100512160000000210010423155262014735 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type saved val checkpoint : unit -> saved val hot_start : saved -> unit val value_counter : string -> int val def_counter: string -> string -> unit val set_counter: string -> int -> unit val add_counter:string -> int -> unit val step_counter: string -> unit val addtoreset: string -> string -> unit val removefromreset: string -> string -> unit hevea-2.09/entry.mli0000644004317100512160000000162607010411403014421 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type key = string list * string list exception NoGood exception Fini val read_key : Lexing.lexbuf -> key * string option val read_indexentry : Lexing.lexbuf -> string * string hevea-2.09/videoc.mll0000644004317100512160000003445312017660721014554 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* Christian Queinnec, Universite Paris IV *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* The plugin for HeVeA that implements the VideoC style. *) { open Printf module type T = sig end;; module Make (Dest : OutManager.S) (Image : ImageManager.S) (Scan : Latexscan.S) = struct open Misc open Lexing open Lexstate open Latexmacros open Subst open Scan let _header = "$Id: videoc.mll,v 1.32 2012-06-05 14:55:39 maranget Exp $" (* So I can synchronize my changes from Luc's ones *) let _qnc_header = "30 oct 2000" exception EndSnippet ;; exception EndTeXInclusion ;; (* Re-link with these variables inserted in latexscan. *) let withinSnippet = ref false;; let withinTeXInclusion = ref false;; let endSnippetRead = ref false;; (* Snippet global defaults *) let snippetLanguage = ref "";; let enableLispComment = ref false;; let enableSchemeCharacters = ref false;; (* Snippet Environment: run a series of hooks provided they exist as user macros. *) let runHook prefix parsing name = let run name = begin if !verbose > 2 then prerr_endline ("Trying to run hook " ^ name); if Latexmacros.exists name then begin Lexstate.scan_this parsing name; () end end in let rec iterate name suffix = run name; if suffix <> "" then iterate (name ^ (String.make 1 (String.get suffix 0))) (String.sub suffix 1 ((String.length suffix) - 1)) in iterate (prefix ^ name ^ "Hook") !snippetLanguage;; let snippetRunHook parsing name = runHook "\\snippet" parsing name;; let snipRunHook parsing name = runHook "\\snip" parsing name;; (* Hack for mutual recursion between modules: *) (* Convert a reference to a hint such as "3" "annote.ann" "premier indice" into "3_annote_ann". This is needed for the annote tool. *) let compute_hint_id number filename _notename = let result = number ^ "_" ^ filename in let rec convert i = begin if i begin counter := !counter + 1; !counter end;; } let command_name = '\\' ((['@''A'-'Z' 'a'-'z']+ '*'?) | [^ 'A'-'Z' 'a'-'z'] | "\\*") rule snippetenv = parse | eof { () } | command_name {let csname = lexeme lexbuf in let pat,body = Latexmacros.find csname in begin match pat with | [],[] -> let args = make_stack csname pat lexbuf in let cur_subst = get_subst () in let exec = function | Subst body -> if !verbose > 2 then eprintf "user macro in snippet: [%a]\n" pretty_body body ; Lexstate.scan_this_list_may_cont Scan.main lexbuf cur_subst (string_to_arg body) | Toks l -> List.iter (fun s -> scan_this Scan.main s) (List.rev l) | CamlCode f -> f lexbuf in scan_body exec body args | _ -> raise (Misc.ScanError ("Command with arguments inside snippet")) end ; snippetenv lexbuf} | '\n' {Dest.put_tag "
"; Dest.put_char '\n'; snippetRunHook Scan.main "AfterLine"; snippetRunHook Scan.main "BeforeLine"; snippetenv lexbuf} | ' '|'\t' {Dest.put_nbsp (); snippetenv lexbuf} | ';' + {Dest.put (lexeme lexbuf); Dest.put_char ' '; if !enableLispComment then begin if !verbose > 1 then prerr_endline "Within snippet: Lisp comment entered"; Lexstate.withinLispComment := true; Scan.top_open_block "SPAN" ("class=\"" ^ !snippetLanguage ^ "Comment\""); snippetRunHook Scan.main "BeforeComment"; try Scan.main lexbuf with (* until a \n is read *) | exc -> begin snippetRunHook Scan.main "AfterComment"; Scan.top_close_block "SPAN"; Lexstate.withinLispComment := false; (* re-raise every exception but EndOfLispComment *) try raise exc with | Misc.EndOfLispComment nlnum -> begin let addon = (if !endSnippetRead then "\\endsnippet" else "") in if !verbose > 1 then Printf.fprintf stderr "%d NL after LispComment %s\n" nlnum ((if !endSnippetRead then "and " else "")^addon); let _ = Lexstate.scan_this snippetenv ((String.make (1+nlnum) '\n')^addon) in () end; end; end; snippetenv lexbuf} | '#' {Dest.put_char '#'; if !enableSchemeCharacters then begin if !verbose > 1 then prerr_endline "Within snippet: scheme characters enabled"; schemecharacterenv lexbuf end; snippetenv lexbuf} | _ as lxm {Scan.translate_put_unicode lxm (fun () -> read_lexbuf lexbuf) ; snippetenv lexbuf} and read_lexbuf = parse | _ as lxm { Char.code lxm } | eof { -1 } (* Scheme characters are written as #\A or #\Newspace *) and schemecharacterenv = parse | command_name {let csname = lexeme lexbuf in Dest.put csname} | "" { () } (* Swallow characters until the end of the line. *) and skip_blanks_till_eol_included = parse | ' ' + {skip_blanks_till_eol_included lexbuf} | '\n' { () } | "" { () } (* Parse a succession of things separated by commas. *) and comma_separated_values = parse | [ ^ ',' ] * ',' {let lxm = lexeme lexbuf in let s = String.sub lxm 0 (String.length lxm - 1) in if !verbose > 2 then prerr_endline ("CSV" ^ s); s :: comma_separated_values lexbuf} | eof { [] } (* Trailer: Register local macros as global. *) { let caml_print s = CamlCode (fun _ -> Dest.put s) let snippet_def name d = Latexmacros.def name zero_pat (CamlCode d) let rec do_endsnippet _ = if !Lexstate.withinLispComment then begin endSnippetRead := true; raise (Misc.EndOfLispComment 0) end; if !Scan.cur_env = "snippet" then raise EndSnippet else raise (Misc.ScanError ("\\endsnippet without opening \\snippet")) and do_texinclusion lexbuf = Scan.top_open_block "SPAN" ("class=\"" ^ !snippetLanguage ^ "Inclusion\""); snippetRunHook Scan.main "BeforeTeX"; withinTeXInclusion := true; begin (* Until a \] is read *) try Scan.main lexbuf with | exc -> begin snippetRunHook Scan.main "AfterTeX"; Scan.top_close_block "SPAN"; snippetRunHook Scan.main "Restart"; (* Re-raise every thing but EndTeXInclusion *) try raise exc with | EndTeXInclusion -> () end; end ; and do_texexclusion _ = if !withinSnippet then begin if !verbose > 2 then prerr_endline "\\] caught within TeX escape"; withinTeXInclusion := false; raise EndTeXInclusion end else raise (Misc.ScanError ("\\] without opening \\[ in snippet")) and do_backslash_newline _ = Dest.put "\\\n"; Lexstate.scan_this snippetenv "\n" and do_four_backslashes _ = Dest.put "\\" (* HACK: Define a macro with a body that is obtained via substitution. This is a kind of restricted \edef as in TeX. Syntax: \@EDEF\macroName{#2#1..} *) and do_edef _lxm lexbuf = let name = Scan.get_csname lexbuf in let body = subst_arg lexbuf in if Scan.echo_toimage () then Image.put ("\\def"^name^"{"^body^"}\n") ; Latexmacros.def name zero_pat (caml_print body); () (* Syntax: \@MULEDEF{\macroName,\macroName,...}{#1#3...} This is an awful hack extending the \@EDEF command. It locally rebinds the (comma-separated) \macronames to the corresponding (comma-separated) expansion of second argument. All \macronames should be a zero-ary macro. *) and do_muledef lxm lexbuf = let names = subst_arg lexbuf in let bodies = subst_arg lexbuf in let rec bind lasti lastj = try let i = String.index_from names lasti ',' in try let j = String.index_from bodies lastj ',' in let name = String.sub names lasti (i - lasti) in let body = String.sub bodies lastj (j - lastj) in if !verbose > 2 then prerr_endline (lxm ^ name ^ ";" ^ body); Latexmacros.def name zero_pat (caml_print body); bind (i+1) (j+1) with Not_found -> failwith "Missing bodies for \\@MULEDEF" with Not_found -> let name = String.sub names lasti (String.length names - lasti) in let body = String.sub bodies lastj (String.length bodies - lastj) in if !verbose > 2 then prerr_endline (lxm ^ name ^ ";" ^ body); Latexmacros.def name zero_pat (caml_print body) ; in bind 0 0; () (* The command that starts the \snippet inner environment: *) and do_snippet lexbuf = if !withinSnippet then raise (Misc.ScanError "No snippet within snippet.") else begin (* Obtain the current TeX value of \snippetDefaultLanguage *) let snippetDefaultLanguage = "\\snippetDefaultLanguage" in let language = get_prim_opt snippetDefaultLanguage lexbuf in let language = if language = "" then snippetDefaultLanguage else language in skip_blanks_till_eol_included lexbuf; Dest.put "
\n"; Scan.top_open_block "DIV" ("class=\"div" ^ language ^ "\""); Dest.put "\n"; Scan.new_env "snippet"; (* Define commands local to \snippet *) snippet_def "\\endsnippet" do_endsnippet; snippet_def "\\[" do_texinclusion ; snippet_def "\\]" do_texexclusion ; snippet_def "\\\\" do_four_backslashes ; snippet_def "\\\n" do_backslash_newline ; snippetLanguage := language; enableLispComment := false; enableSchemeCharacters := false; withinSnippet := true; snippetRunHook Scan.main "Before"; try snippetenv lexbuf with exc -> begin snippetRunHook Scan.main "AfterLine"; snippetRunHook Scan.main "After"; withinSnippet := false; Scan.close_env "snippet"; Scan.top_close_block "DIV"; (* Re-raise all exceptions but EndSnippet *) try raise exc with EndSnippet -> () end; end and do_enable_backslashed_chars lexbuf = let def_echo s = snippet_def s (fun _ -> Dest.put s) in let chars = subst_arg lexbuf in begin if !verbose > 2 then prerr_endline ("\\enableBackslashedChar "^chars); for i=0 to (String.length chars - 1) do let charcommandname = "\\" ^ (String.sub chars i 1) in def_echo charcommandname; done; end; () and do_enableLispComment _lexbuf = enableLispComment := true; () and do_disableLispComment _lexbuf = enableLispComment := false; () and do_enableSchemeCharacters _lexbuf = enableSchemeCharacters := true; () and do_disableSchemeCharacters _lexbuf = enableSchemeCharacters := false; () and do_snippet_run_hook lexbuf = let name = subst_arg lexbuf in begin snippetRunHook Scan.main name; () end and do_snip_run_hook lexbuf = let name = subst_arg lexbuf in begin snipRunHook Scan.main name; () end (* These macros are defined in Caml since they are not nullary macros. They require some arguments but they cannot get them in the snippet environment. So I code them by hand. *) and do_vicanchor lexbuf = begin let {arg=style} = Lexstate.save_opt "" lexbuf in let {arg=nfn} = Lexstate.save_opt "0,filename,notename" lexbuf in let fields = comma_separated_values (MyLexing.from_list (nfn @ [","])) in match fields with | [number;filename;notename] -> begin let uniqueNumber = (* Would be better: truncate(Unix.gettimeofday()) *) increment_internal_counter() and hintId = compute_hint_id number filename notename in let style = String.concat "" style and nfn = String.concat "" nfn in Dest.put_tag (""); () end | _ -> failwith "Missing comma-separated arguments" end and do_vicendanchor lexbuf = begin let {arg=nfn} = Lexstate.save_opt "0,filename,notename" lexbuf in let nfn = String.concat "" nfn in if !verbose > 2 then prerr_endline ("\\vicendanchor"^nfn); let fields = comma_separated_values (MyLexing.from_string (nfn ^ ",")) in match fields with | [_number;_filename;_notename] -> begin Dest.put_tag (""); () end | _ -> failwith "Missing comma-separated arguments" end and do_vicindex lexbuf = begin let _nfn = Lexstate.save_opt "0,filename,notename" lexbuf in Dest.put_char ' '; () end ;; (* This is the initialization function of the plugin: *) let init = function () -> begin (* Register global TeX macros: *) def_code "\\snippet" do_snippet; def_name_code "\\@EDEF" do_edef; def_name_code "\\@MULEDEF" do_muledef; def_code "\\ViCEndAnchor" do_vicendanchor; def_code "\\ViCAnchor" do_vicanchor; def_code "\\ViCIndex" do_vicindex; def_code "\\enableLispComment" do_enableLispComment; def_code "\\disableLispComment" do_disableLispComment; def_code "\\enableSchemeCharacters" do_enableSchemeCharacters; def_code "\\disableSchemeCharacters" do_disableSchemeCharacters; def_code "\\enableBackslashedChars" do_enable_backslashed_chars; def_code "\\snippetRunHook" do_snippet_run_hook; def_code "\\snipRunHook" do_snip_run_hook; () end;; register_init "videoc" init ;; end} hevea-2.09/section.ml0000644004317100512160000000413712017660721014567 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf type style = Article | Book let style = ref Book let set_style sty = match String.uppercase sty with | "ARTICLE" -> style := Article | "BOOK" -> style := Book | _ -> Misc.warning (sprintf "strange style '%s'" sty) let value_article s = match s with | "DOCUMENT"|""|"NOW" -> 0 | "PART" -> 1 | "SECTION" -> 2 | "SUBSECTION" -> 3 | "SUBSUBSECTION" -> 4 | "PARAGRAPH" -> 5 | "SUBPARAGRAPH" -> 6 | _ -> Misc.warning (sprintf "argument '%s' as section level in article mode" s) ; 7 let value_book s = match s with | "DOCUMENT"|""|"NOW" -> 0 | "PART" -> 1 | "CHAPTER" ->2 | "SECTION" -> 3 | "SUBSECTION" -> 4 | "SUBSUBSECTION" -> 5 | "PARAGRAPH" -> 6 | "SUBPARAGRAPH" -> 7 | _ -> Misc.warning (Printf.sprintf "argument '%s' as section level in book mode" s) ; 8 let value s = (match !style with | Article -> value_article | Book -> value_book) (String.uppercase s) let pretty_article = function | 0 -> "document" | 1 -> "part" | 2 -> "section" | 3 -> "subsection" | 4 -> "subsubsection" | 5 -> "paragraph" | 6 -> "subparagraph" | _ -> assert false let pretty_book = function | 0 -> "document" | 1 -> "part" | 2 -> "chapter" | 3 -> "section" | 4 -> "subsection" | 5 -> "subsubsection" | 6 -> "paragraph" | 7 -> "subparagraph" | _ -> assert false let pretty x = (match !style with | Article -> pretty_article| Book -> pretty_book) x hevea-2.09/element.ml0000644004317100512160000000203512017660721014547 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* For text-level elements *) type text = Style of string | Font of int | Color of string | StyleAttr of string * string let pretty_text = function Style s -> "Style: "^s | Font i -> "Font size: "^string_of_int i | Color s -> "Font color: "^s | StyleAttr (t,a) -> "Style with attributes: "^t^" ["^a^"]" ;; hevea-2.09/alltt.hva0000644004317100512160000000004507135354711014407 0ustar marangetcristal\@primitives{alltt} \alltt@loadedtruehevea-2.09/compat.hva0000644004317100512160000000026607042125057014553 0ustar marangetcristal\@stopoutput\@stopimage% Avoid echo to image file \let\@url\ahref% \def\url#1#2{\@url{#1}{#2}}% \def\oneurl#1{\ahrefurl{\texttt{#1}}} \let\footurl\url \@restartimage\@restartoutput% hevea-2.09/hot.ml0000644004317100512160000000264010461730545013715 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: hot.ml,v 1.6 2006-07-26 18:16:05 maranget Exp $ *) (***********************************************************************) type saved = Misc.saved * Lexstate.saved * Latexmacros.saved * Counter.saved * Color.saved * Foot.saved let checkpoint () = Misc.checkpoint (), Lexstate.checkpoint (), Latexmacros.checkpoint (), Counter.checkpoint (), Color.checkpoint (), Foot.checkpoint () and start (misc, lexstate, latexmacros, counter, color, foot) = Misc.hot_start misc ; Lexstate.hot_start lexstate ; Latexmacros.hot_start latexmacros ; Counter.hot_start counter ; Color.hot_start color ; Foot.hot_start foot ; begin match !Parse_opts.destination with | Parse_opts.Info -> InfoRef.hot_start () | _ -> () end hevea-2.09/table.ml0000644004317100512160000000313007415373521014207 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1999 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) exception Empty type 'a t = {mutable next : int ; mutable data : 'a array} let default_size = 32 ;; let create x = {next = 0 ; data = Array.create default_size x} and reset t = t.next <- 0 ;; let incr_table table new_size = let t = Array.create new_size table.data.(0) in Array.blit table.data 0 t 0 (Array.length table.data) ; table.data <- t let emit table i = let size = Array.length table.data in if table.next >= size then incr_table table (2*size); table.data.(table.next) <- i ; table.next <- table.next + 1 let apply table f = if table.next = 0 then raise Empty ; f table.data.(table.next - 1) let to_array t = Array.sub t.data 0 t.next let trim t = let r = Array.sub t.data 0 t.next in reset t ; r let remove_last table = table.next <- table.next -1; if table.next < 0 then table.next <- 0 ; ;; let get_size table = table.next ;; hevea-2.09/zyva.ml0000644004317100512160000000214110565402214014102 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: zyva.ml,v 1.4 2007-02-16 19:22:52 maranget Exp $ *) (***********************************************************************) module type S = functor (Dest : OutManager.S) -> functor (Image : ImageManager.S) -> functor (Scan : Latexscan.S) -> sig end module Make (Dest: OutManager.S) (Image : ImageManager.S) (Scan : Latexscan.S) (ToMake : S) = struct module Rien = ToMake (Dest) (Image) (Scan) end hevea-2.09/out.mli0000644004317100512160000000136512017660721014103 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Tibault Suzanne, Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) include DoOut.S hevea-2.09/xxdate.exe0000755004317100512160000000132607112222714014565 0ustar marangetcristal#! /bin/sh cat < /dev/null || date | awk '{print $NF}'`} \newcounter{month}\setcounter{month}{`date +"%m"`} \newcounter{day}\setcounter{day}{`date +"%d"`} \newcounter{time}\setcounter{time}{60 * `date +"%H"` + `date +"%M"`} %% Extras \newcounter{hour}\setcounter{hour}{`date +"%H"`} \newcounter{Hour}\setcounter{Hour}{\value{hour}-(\value{hour}/12)*12} \newcounter{weekday}\setcounter{weekday}{`date +"%w"`} \newcounter{minute}\setcounter{minute}{`date +"%M"`} \newcounter{second}\setcounter{second}{`date +"%S"`} \def\ampm{\ifthenelse{\value{hour}>12}{PM}{AM}} \def\timezone{`date +"%Z" 2> /dev/null || date | awk '{print $5}'`} \def\heveadate{`date`} EOFhevea-2.09/lexstate.ml0000644004317100512160000005116712125271032014752 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf open Misc open Lexing open MyStack (* Commands nature *) type action = | Subst of string list | Toks of string list | CamlCode of (Lexing.lexbuf -> unit) let body_to_string = String.concat "" let pretty_body chan = List.iter(fprintf chan "%s") let pretty_action acs = match acs with | Subst s -> eprintf "{%a}" (fun chan -> List.iter (fprintf chan "\"%s\" ")) s | Toks l -> List.iter (fun s -> Printf.fprintf stderr "{%s}, " s) l | CamlCode _ -> prerr_string "*code*" let rec is_empty_list = function | [] -> true | x::xs -> String.length x = 0 && is_empty_list xs type pat = string list * string list let pretty_pat (_,args) = List.iter (fun s -> prerr_string s ; prerr_char ',') args let is_subst body = match body with | CamlCode _ -> false | _ -> true let latex_pat opts n = let n_opts = List.length opts in let rec do_rec r i = if i <= n_opts then r else do_rec (("#"^string_of_int i)::r) (i-1) in opts,do_rec [] n let zero_pat = latex_pat [] 0 and one_pat = latex_pat [] 1 (* Environments *) type subst = Top | Env of string list arg array and 'a arg = {arg : 'a ; subst : subst } let mkarg arg subst = {arg=arg ; subst=subst } type alltt = Not | Inside | Macro let effective = function | Inside -> true | _ -> false let subst = ref Top and alltt = ref Not let stack_subst = MyStack.create "stack_subst" and stack_alltt = MyStack.create_init "stack_alltt" Not let get_subst () = !subst let top_subst = Top let pretty_subst = function | Top -> prerr_endline "Top level" | Env args -> if Array.length args <> 0 then begin prerr_endline "Env: " ; for i = 0 to Array.length args - 1 do prerr_string "\t'" ; eprintf "%a" pretty_body args.(i).arg ; prerr_endline "'" done end let rec pretty_subst_rec indent = function | Top -> prerr_string indent ; prerr_endline "Top level" | Env args -> if Array.length args <> 0 then begin prerr_string indent ; prerr_endline "Env: " ; for i = 0 to Array.length args - 1 do prerr_string indent ; prerr_string (" #"^string_of_int (i+1)^" ``"); pretty_body stderr args.(i).arg ; prerr_endline "''" ; pretty_subst_rec (" "^indent) args.(i).subst done end let full_pretty_subst s = pretty_subst_rec " " s exception Error of string (* Status flags *) let display = ref false and raw_chars = ref false and in_math = ref false and whitepre = ref false and optarg = ref false and styleloaded = ref false and activebrace = ref true and html = ref (match !Parse_opts.destination with | Parse_opts.Html -> true | Parse_opts.Info | Parse_opts.Text -> false) and text = ref (match !Parse_opts.destination with | Parse_opts.Html -> false | Parse_opts.Info | Parse_opts.Text -> true) and alltt_loaded = ref false (* Additional variables for videoc *) and withinLispComment = ref false and afterLispCommentNewlines = ref 0 (* Additional flags for transformations *) ;; type case = Upper | Lower | Neutral let case = ref Neutral ;; let string_to_arg arg = {arg=arg ; subst= !subst } (* Stacks for flags *) let stack_in_math = MyStack.create "stack_in_math" and stack_display = MyStack.create "stack_display" (* Stacks for entry stream *) let stack_lexbuf = MyStack.create "stack_lexbuf" ;; let pretty_lexbuf lb = let pos = lb.lex_curr_pos and len = String.length lb.lex_buffer in prerr_endline "Buff contents:" ; let size = if !verbose > 3 then len-pos else min (len-pos) 80 in if size <> len-pos then begin prerr_string "<<" ; prerr_string (String.sub lb.lex_buffer pos (size/2)) ; prerr_string "... (omitted) ..." ; prerr_string (String.sub lb.lex_buffer (len-size/2-1) (size/2)) ; prerr_endline ">>" end else prerr_endline ("<<"^String.sub lb.lex_buffer pos size^">>"); prerr_endline ("curr_pos="^string_of_int lb.lex_curr_pos); prerr_endline "End of buff" ;; (* arguments inside macros*) type closenv = string array t (* catcodes *) let plain_of_char = function | '{' -> 0 | '}' -> 1 | '$' -> 2 | '&' -> 3 | '#' -> 4 | '^' -> 5 | '_' -> 6 | '~' -> 7 | '\\' -> 8 | '%' -> 9 | '\'' -> 10 | '`' -> 11 | '-' -> 12 | '"' -> 13 (* '"' *) | c -> raise (Fatal ("Internal catcode table error: '"^String.make 1 c^"'")) and plain = Array.create 14 true let is_plain c = plain.(plain_of_char c) and set_plain c = (* if c = '_' then eprintf "set_plain %c\n" c ; *) plain.(plain_of_char c) <- true and unset_plain c = (* if c = '_' then eprintf "unset_plain %c\n" c ; *) plain.(plain_of_char c) <- false and plain_back b c = (* if c = '_' then eprintf "plain_back %c <- %b\n" c b ; *) plain.(plain_of_char c) <- b let top_level () = match !subst with Top -> true | _ -> false and is_top = function | Top -> true | _ -> false let prerr_args () = pretty_subst !subst let scan_arg lexfun i = let args = match !subst with | Top -> [||] | Env args -> args in if i >= Array.length args then begin if !verbose > 1 then begin prerr_string ("Subst arg #"^string_of_int (i+1)^" -> not found") ; pretty_subst !subst end ; raise (Error "Macro argument not found") end; let arg = args.(i) in if !verbose > 1 then begin eprintf "Subst arg #%i -> %a\n" i pretty_body arg.arg end ; let r = lexfun arg in r and scan_body do_exec body args = match body with | CamlCode _|Toks _ -> do_exec body | Subst _ -> let old_subst = !subst in subst := args ; let r = do_exec body in subst := old_subst ; r (* Recoding and restoring lexbufs *) let record_lexbuf lexbuf subst = MyStack.push stack_subst subst ; MyStack.push stack_lexbuf lexbuf ; and previous_lexbuf () = let lexbuf = MyStack.pop stack_lexbuf in subst := MyStack.pop stack_subst ; lexbuf ;; (* Saving and restoring lexing status *) let stack_lexstate = MyStack.create "stack_lexstate" let top_lexstate () = MyStack.empty stack_lexstate let save_lexstate () = let old_stack = MyStack.save stack_subst in MyStack.push stack_subst !subst ; push stack_lexstate (MyStack.save stack_lexbuf, MyStack.save stack_subst) ; MyStack.restore stack_subst old_stack and restore_lexstate () = let lexbufs,substs = pop stack_lexstate in MyStack.restore stack_lexbuf lexbufs ; MyStack.restore stack_subst substs ; subst := MyStack.pop stack_subst (* Flags save and restore *) let save_flags () = push stack_display !display ; push stack_in_math !in_math and restore_flags () = in_math := pop stack_in_math ; display := pop stack_display (* Total ckeckpoint of lexstate *) type saved_lexstate = (Lexing.lexbuf MyStack.saved * subst MyStack.saved) MyStack.saved * bool MyStack.saved * bool MyStack.saved let check_lexstate () = save_lexstate () ; save_flags () ; let r = MyStack.save stack_lexstate, MyStack.save stack_display, MyStack.save stack_in_math in restore_lexstate () ; restore_flags () ; r and hot_lexstate (l,d,m) = MyStack.restore stack_lexstate l ; MyStack.restore stack_display d ; MyStack.restore stack_in_math m ; restore_lexstate () ; restore_flags () ;; (* Blank lexing status *) let start_lexstate () = save_lexstate () ; MyStack.restore stack_lexbuf (MyStack.empty_saved) ; MyStack.restore stack_subst (MyStack.empty_saved) let start_lexstate_subst this_subst = start_lexstate () ; subst := this_subst ;; let flushing = ref false ;; let start_normal this_subst = start_lexstate () ; save_flags () ; display := false ; in_math := false ; subst := this_subst and end_normal () = restore_flags () ; restore_lexstate () ;; let full_peek_char lexbuf = let rec full_peek lexbuf = try Save.peek_next_char lexbuf with Not_found -> if MyStack.empty stack_lexbuf then raise Not_found else full_peek (previous_lexbuf ()) in full_peek lexbuf let full_save_arg eoferror mkarg parg lexfun lexbuf = let rec save_rec lexbuf = try let arg = lexfun lexbuf in mkarg arg !subst with Save.Eof -> begin if MyStack.empty stack_lexbuf then eoferror () else begin let lexbuf = previous_lexbuf () in if !verbose > 1 then begin prerr_endline "popping stack_lexbuf in full_save_arg"; pretty_lexbuf lexbuf ; prerr_args () end; save_rec lexbuf end end in let start_pos = Location.get_pos () in try Save.seen_par := false ; save_lexstate () ; let r = save_rec lexbuf in restore_lexstate () ; if !verbose > 2 then prerr_endline ("Arg parsed: '"^parg r^"'") ; r with | (Save.Error _ | Error _) as e -> restore_lexstate () ; Save.seen_par := false ; Location.print_this_pos start_pos ; prerr_endline "Parsing of argument failed" ; raise e | e -> restore_lexstate () ; raise e ;; let full_save_arg_limits eoferror parg lexfun lexbuf = let rec save_rec opt lexbuf = try lexfun opt lexbuf with Save.LimitEof r -> begin if MyStack.empty stack_lexbuf then match r with | None -> eoferror () | _ -> r else begin let lexbuf = previous_lexbuf () in if !verbose > 1 then begin prerr_endline "popping stack_lexbuf in full_save_arg_limits"; pretty_lexbuf lexbuf ; prerr_args () end; save_rec r lexbuf end end in let start_pos = Location.get_pos () in try Save.seen_par := false ; save_lexstate () ; let r = save_rec None lexbuf in restore_lexstate () ; if !verbose > 2 then prerr_endline ("Arg parsed: '"^parg r^"'") ; r with | (Save.Error _ | Error _) as e -> restore_lexstate () ; Save.seen_par := false ; Location.print_this_pos start_pos ; prerr_endline "Parsing of argument failed" ; raise e | e -> restore_lexstate () ; raise e ;; type ok = No of string | Yes of string list ;; let parg {arg=arg} = arg and pargs {arg=args} = String.concat ", " args and parg_list {arg=xs} = body_to_string xs and pok = function | {arg=Yes s} -> String.concat "" s | {arg=No s} -> "* default arg: ["^s^"] *" let eof_arg () = Save.empty_buffs () ; raise (Error "Eof while looking for argument") let save_arg lexbuf = full_save_arg eof_arg mkarg parg Save.arg lexbuf and save_body lexbuf = full_save_arg eof_arg mkarg parg_list Save.arg_list lexbuf and save_arg_with_delim delim lexbuf = full_save_arg eof_arg mkarg parg (Save.with_delim delim) lexbuf and save_filename lexbuf = full_save_arg eof_arg mkarg parg Save.filename lexbuf and save_verbatim lexbuf = full_save_arg eof_arg mkarg parg Save.arg_verbatim lexbuf and save_xy_arg lexbuf = full_save_arg eof_arg mkarg parg Save.xy_arg lexbuf and save_cite_arg lexbuf = full_save_arg eof_arg mkarg pargs Save.cite_arg lexbuf type sup_sub = { limits : Misc.limits option ; sup : string arg ; sub : string arg ; } let plimits = function | Some Limits -> "\\limits" | Some NoLimits -> "\\nolimits" | Some IntLimits -> "\\intlimits" | None -> "*no limit info*" exception Over let eof_over () = raise Over let save_limits lexbuf = let rec do_rec res = try let r = full_save_arg_limits eof_over plimits Save.get_limits lexbuf in match r with | None -> res | Some _ -> do_rec r with | Over -> res in do_rec None let mkoptionarg opt subst = match opt with | None -> None | Some s -> Some (mkarg s subst) and poptionarg = function | None -> "*None*" | Some a -> a.arg let save_sup lexbuf = try full_save_arg eof_over mkoptionarg poptionarg Save.get_sup lexbuf with | Over -> None and save_sub lexbuf = try full_save_arg eof_over mkoptionarg poptionarg Save.get_sub lexbuf with | Over -> None let unoption = function | None -> {arg="" ; subst=top_subst } | Some a -> a let save_sup_sub lexbuf = let limits = save_limits lexbuf in match save_sup lexbuf with | None -> let sub = save_sub lexbuf in let sup = save_sup lexbuf in {limits=limits ; sup = unoption sup ; sub = unoption sub} | Some sup -> let sub = save_sub lexbuf in {limits=limits ; sup = sup ; sub = unoption sub} let protect_save_string lexfun lexbuf = full_save_arg eof_arg (fun s _ -> s) (fun s -> s) lexfun lexbuf let eof_opt default () = {arg=No default ; subst=Top } let save_arg_opt default lexbuf = let r = full_save_arg (eof_opt default) mkarg pok (fun lexbuf -> try Yes (Save.opt_list lexbuf) with | Save.NoOpt -> No default) lexbuf in match r.arg with | Yes _ -> r | No _ -> mkarg (No default) !subst ;; let from_ok okarg = match okarg.arg with | Yes s -> optarg := true ; mkarg s okarg.subst | No s -> optarg := false ; mkarg [s] okarg.subst let pretty_ok = function Yes s -> "+"^String.concat "" s^"+" | No s -> "-"^s^"-" ;; let norm_arg s = String.length s = 2 && s.[0] = '#' && ('0' <= s.[1] && s.[1] <= '9') let list_arg a = { a with arg = [a.arg] } let rec parse_args_norm pat lexbuf = match pat with | [] -> [] | s :: (ss :: _ as pat) when norm_arg s && norm_arg ss -> let arg = save_body lexbuf in let r = parse_args_norm pat lexbuf in arg :: r | s :: ss :: pat when norm_arg s && not (norm_arg ss) -> let arg = save_arg_with_delim ss lexbuf in list_arg arg :: parse_args_norm pat lexbuf | s :: pat when not (norm_arg s) -> Save.skip_delim s lexbuf ; parse_args_norm pat lexbuf | _ :: pat -> let arg = save_body lexbuf in let r = parse_args_norm pat lexbuf in arg :: r ;; let skip_csname lexbuf = let _ = Save.csname (fun x -> x) (fun x -> x) lexbuf in () let skip_opt lexbuf = let _ = save_arg_opt "" lexbuf in () and save_opt def lexbuf = from_ok (save_arg_opt def lexbuf) ;; let rec save_opts pat lexbuf = match pat with [] -> [] | def::rest -> let arg = save_arg_opt def lexbuf in let r = save_opts rest lexbuf in arg :: r ;; let parse_args (popt,pat) lexbuf = Save.seen_par := false ; let opts = save_opts popt lexbuf in begin match pat with | s :: ss :: _ when norm_arg s && not (norm_arg ss) -> Save.skip_blanks_init lexbuf | _ -> () end ; let args = parse_args_norm pat lexbuf in (opts,args) ;; let make_stack name pat lexbuf = try let (opts,args) = parse_args pat lexbuf in let args = Array.of_list (List.map from_ok opts@args) in if !verbose > 1 then begin Printf.fprintf stderr "make_stack for macro: %s " name ; pretty_pat pat ; prerr_endline ""; for i = 0 to Array.length args-1 do Printf.fprintf stderr "\t#%d = %a\n" (i+1) pretty_body args.(i).arg ; pretty_subst (args.(i).subst) done end ; Env args with Save.Delim delim -> raise (Error ("Use of "^name^ " does not match its definition (delimiter: "^delim^")")) ;; let scan_this lexfun s = start_lexstate (); if !verbose > 1 then begin Printf.fprintf stderr "scan_this : [%s]" s ; prerr_endline "" end ; let lexbuf = MyLexing.from_string s in let r = lexfun lexbuf in if !verbose > 1 then begin Printf.fprintf stderr "scan_this : over" ; prerr_endline "" end ; restore_lexstate (); r and scan_this_list lexfun xs = start_lexstate (); if !verbose > 1 then begin eprintf "scan_this_list : [%a]" pretty_body xs ; prerr_endline "" end ; let lexbuf = MyLexing.from_list xs in let r = lexfun lexbuf in if !verbose > 1 then begin Printf.fprintf stderr "scan_this_list : over" ; prerr_endline "" end ; restore_lexstate (); r and scan_this_arg lexfun {arg=s ; subst=this_subst } = start_lexstate () ; subst := this_subst ; if !verbose > 1 then begin Printf.fprintf stderr "scan_this_arg : [%s]" s ; prerr_endline "" end ; let lexbuf = MyLexing.from_string s in let r = lexfun lexbuf in if !verbose > 1 then begin Printf.fprintf stderr "scan_this_arg : over" ; prerr_endline "" end ; restore_lexstate (); r and scan_this_arg_list lexfun {arg=xs ; subst=this_subst } = start_lexstate () ; subst := this_subst ; if !verbose > 1 then begin Printf.fprintf stderr "scan_this_arg_list : [%a]\n%!" pretty_body xs end ; let lexbuf = MyLexing.from_list xs in let r = lexfun lexbuf in if !verbose > 1 then begin Printf.fprintf stderr "scan_this_arg : over\n%!" end ; restore_lexstate (); r ;; let scan_this_may_cont lexfun lexbuf cur_subst {arg=s ; subst=env } = if !verbose > 1 then begin Printf.fprintf stderr "scan_this_may_cont : [%s]" s ; prerr_endline "" ; if !verbose > 1 then begin prerr_endline "Pushing lexbuf and env" ; pretty_lexbuf lexbuf ; pretty_subst !subst end end ; save_lexstate (); record_lexbuf lexbuf cur_subst ; subst := env ; let lexer = MyLexing.from_string s in let r = lexfun lexer in restore_lexstate (); if !verbose > 1 then begin Printf.fprintf stderr "scan_this_may_cont : over" ; prerr_endline "" end ; r let scan_this_list_may_cont lexfun lexbuf cur_subst {arg=s ; subst=env } = if !verbose > 1 then begin eprintf "scan_this_list_may_cont : [%a]\n%!" pretty_body s ; if !verbose > 1 then begin prerr_endline "Pushing lexbuf and env" ; pretty_lexbuf lexbuf ; pretty_subst !subst end end ; save_lexstate (); record_lexbuf lexbuf cur_subst ; subst := env ; let lexer = MyLexing.from_list s in let r = lexfun lexer in restore_lexstate (); if !verbose > 1 then begin Printf.fprintf stderr "scan_this_list_may_cont : over" ; prerr_endline "" end ; r let real_input_file loc_verb main filename input = if !verbose > 0 then prerr_endline ("Input file: "^filename) ; let buf = Lexing.from_channel input in Location.set filename buf ; let old_verb = !verbose in verbose := loc_verb ; if !verbose > 1 then prerr_endline ("scanning: "^filename) ; start_lexstate () ; let old_lexstate = MyStack.save stack_lexstate in subst := Top ; begin try main buf with | Misc.EndInput -> MyStack.restore stack_lexstate old_lexstate | e -> MyStack.restore stack_lexstate old_lexstate ; restore_lexstate (); close_in input ; verbose := old_verb ; (* NO Location.restore () ; for proper error messages *) raise e end ; restore_lexstate (); if !verbose > 1 then prerr_endline ("scanning over: "^filename) ; close_in input ; verbose := old_verb ; Location.restore () let input_file loc_verb main filename = try let filename,input = Myfiles.open_tex filename in real_input_file loc_verb main filename input with Myfiles.Except -> begin if !verbose > 0 then prerr_endline ("Not opening file: "^filename) ; raise Myfiles.Except end | Myfiles.Error m as x -> begin Misc.warning m ; raise x end (* Hot start *) type saved = (string * bool ref) list * bool list let cell_list = ref [] let checkpoint () = !cell_list, List.map (fun (_,cell) -> !cell) !cell_list ; and hot_start (cells, values) = let rec start_rec cells values = match cells, values with | [],[] -> () | (name,cell)::rcells, value :: rvalues -> if !verbose > 1 then begin prerr_endline ("Restoring "^name^" as "^if value then "true" else "false") end ; cell := value ; start_rec rcells rvalues | _,_ -> Misc.fatal ("Trouble in Lexstate.hot_start") in start_rec cells values ; cell_list := cells let register_cell name cell = cell_list := (name,cell) :: !cell_list and unregister_cell name = let rec un_rec = function | [] -> Misc.warning ("Cannot unregister cell: "^name) ; [] | (xname,cell) :: rest -> if xname = name then rest else (xname,cell) :: un_rec rest in cell_list := un_rec !cell_list hevea-2.09/lexstyle.mll0000644004317100512160000001040612017660721015144 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Extract/abstract style attributes *) { open Printf open Emisc let error msg _lb = raise (Emisc.LexError msg) } let blank = [' ''\t''\n''\r'] let tag = ['a'-'z''A'-'Z''0'-'9']+ let class_name = ['a'-'z''A'-'Z''0'-'9''-']+ let attr_name = ['a'-'z''A'-'Z''-''0'-'9']+ rule extract styles = parse (* TOC comments are scanned *) | "" '\n'? { } | _ {skip_comment lexbuf} | eof {error "End of file in comment" lexbuf} and dump m out = parse | "' '\n'? as lxm { fprintf out "%s" lxm ; Emisc.StringMap.iter (fun st cl -> Emisc.dump_class out cl st) m ; dump m out lexbuf } | "" '\n'? as lxm { output_string out lxm } | _ as c { output_char out c ; dump_comment out lexbuf } | eof {error "End of file in comment" lexbuf} and dump_tag out = parse | [^'>']* '>' as lxm { output_string out lxm } | "" { error "dump_tag" lexbuf } and abstract_tag cl attrs m out = parse | '>' { let cl = match cl with | [] -> [] | _ -> [sprintf "class=\"%s\"" (String.concat " " (List.rev cl))] in let na = cl @ List.rev attrs in List.iter (fprintf out " %s") na ; output_char out '>' } | blank+ { abstract_tag cl attrs m out lexbuf } | ("style"|"STYLE") blank* "=" blank* (('\'' ([^'\'']* as v) '\'' | '"' ([^'"']* as v) '"' | ('#'?['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+ as v))) as a (* '"' *) { try let tcl = Emisc.StringMap.find v m in abstract_tag (tcl::cl) attrs m out lexbuf with Not_found -> abstract_tag cl (a::attrs) m out lexbuf } | ("class"|"CLASS") blank* "=" blank* (('\'' ([^'\'']* as v) '\'' | '"' ([^'"']* as v) '"' | ('#'?['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+ as v))) (* '"' *) { abstract_tag (v::cl) attrs m out lexbuf } | attr_name ( blank* "=" blank* ('\'' ([^'\'']*) '\'' | '"' ([^'"']*) '"' | '#'?['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+))? as a (* '"' *) { abstract_tag cl (a::attrs) m out lexbuf } | "" { error "abstract_tag" lexbuf } { let get lexbuf = extract StringCount.empty lexbuf let set m out lexbuf = dump m out lexbuf } hevea-2.09/get.mll0000644004317100512160000003272312017660721014060 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) { open Printf open Misc open Lexing open Latexmacros open Lexstate open MyStack open Length (* Compute functions *) exception Error of string let sbool = function | true -> "true" | false -> "false" let get_this = ref (fun _ -> assert false) and get_fun = ref (fun _f _lexbuf -> assert false) and open_env = ref (fun _ -> ()) and close_env = ref (fun _ -> ()) and get_csname = ref (fun _ -> assert false) and main = ref (fun _ -> assert false) ;; let bool_out = ref false and int_out = ref false let int_stack = MyStack.create "int_stack" and bool_stack = MyStack.create "bool_stack" and group_stack = MyStack.create "group_stack" and just_opened = ref false type saved = bool * bool MyStack.saved * bool * int MyStack.saved * (unit -> unit) MyStack.saved * bool let check () = !bool_out, MyStack.save bool_stack, !int_out, MyStack.save int_stack, MyStack.save group_stack, !just_opened and hot (b,bs,i,is,gs,j) = bool_out := b ; MyStack.restore bool_stack bs ; int_out := i ; MyStack.restore int_stack is ; MyStack.restore group_stack gs ; just_opened := j let push_int x = if !verbose > 2 then prerr_endline ("PUSH INT: "^string_of_int x) ; just_opened := false ; push int_stack x let open_ngroups n = let rec open_ngroups_rec = function | 0 ->() | n -> push group_stack (fun () -> ()) ; open_ngroups_rec (n-1) in if !verbose > 2 then prerr_endline ("OPEN NGROUPS: "^string_of_int n) ; if n > 0 then begin just_opened := true ; open_ngroups_rec n end let close_ngroups n = let rec close_ngroups_rec = function | 0 -> () | n -> let f = pop group_stack in f() ; close_ngroups_rec (n-1) in if !verbose > 2 then prerr_endline ("CLOSE NGROUPS: "^string_of_int n); close_ngroups_rec n let open_aftergroup f s = if !verbose > 2 then prerr_endline ("OPEN AFTER: "^s) ; just_opened := true ; push group_stack f } let command_name = '\\' ((['@''A'-'Z' 'a'-'z']+ '*'?) | [^ '@' 'A'-'Z' 'a'-'z'] | "\\*") rule result = parse (* Skip comments and spaces *) | '%' [^ '\n'] * '\n' {result lexbuf} | [' ' '\n']+ {result lexbuf} (* Integers *) | ['0'-'9']+ {let lxm = Lexing.lexeme lexbuf in push_int (int_of_string lxm) ; result lexbuf} | '\'' ['0'-'7']+ {let lxm = lexeme lexbuf in push_int (int_of_string ("0o"^String.sub lxm 1 (String.length lxm-1))) ; result lexbuf} | "\"" ['0'-'9' 'a'-'f' 'A'-'F']+ {let lxm = lexeme lexbuf in push_int (int_of_string ("0x"^String.sub lxm 1 (String.length lxm-1))) ; result lexbuf} | '`' {let token = !get_csname lexbuf in after_quote (MyLexing.from_string token) ; result lexbuf} | "true" {push bool_stack true ; result lexbuf} | "false" {push bool_stack false ; result lexbuf} (* Operands *) | '+' | '-' as lxm {let unary = !just_opened in if unary then begin let f = pop group_stack in open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline ("UNARY: "^String.make 1 lxm) ; MyStack.pretty string_of_int int_stack end ; let x1 = pop int_stack in let r = match lxm with | '+' -> x1 | '-' -> 0 - x1 | _ -> assert false in push_int r ; f()) "UNARY" end else begin close_ngroups 2 ; open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline ("OPPADD: "^String.make 1 lxm) ; MyStack.pretty string_of_int int_stack end ; let x2 = pop int_stack in let x1 = pop int_stack in let r = match lxm with | '+' -> x1 + x2 | '-' -> x1 - x2 | _ -> assert false in push_int r) "ADD"; open_ngroups 1 ; end ; result lexbuf} | '/' | '*' {let lxm = lexeme_char lexbuf 0 in close_ngroups 1 ; open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline ("MULTOP"^String.make 1 lxm) ; MyStack.pretty string_of_int int_stack end ; let x2 = pop int_stack in let x1 = pop int_stack in let r = match lxm with | '*' -> x1 * x2 | '/' -> x1 / x2 | _ -> assert false in push_int r) "MULT"; result lexbuf} (* boolean openrands *) | '<' | '>' | '=' {let lxm = Lexing.lexeme_char lexbuf 0 in close_ngroups 3 ; open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline ("COMP: "^String.make 1 lxm) ; MyStack.pretty string_of_int int_stack end ; let x2 = pop int_stack in let x1 = pop int_stack in push bool_stack (match lxm with | '<' -> x1 < x2 | '>' -> x1 > x2 | '=' -> x1 = x2 | _ -> assert false) ; if !verbose > 2 then MyStack.pretty sbool bool_stack) "COMP" ; open_ngroups 2 ; result lexbuf} (* Parenthesis for integer computing *) | '('|'{' {open_ngroups 2 ; result lexbuf} | ')'|'}' {close_ngroups 2 ; result lexbuf} (* Commands *) | '#' ['1'-'9'] {let lxm = lexeme lexbuf in let i = Char.code (lxm.[1]) - Char.code '1' in scan_arg (scan_this_arg_list result) i ; result lexbuf} | command_name as lxm {let pat,body = Latexmacros.find lxm in let args = make_stack lxm pat lexbuf in scan_body (function | Subst body -> scan_this_list result body | Toks l -> List.iter (scan_this result) (List.rev l) | CamlCode f -> let rs = !get_fun f lexbuf in scan_this result rs) body args ; result lexbuf} | _ {raise (Error ("Bad character in Get.result: ``"^lexeme lexbuf^"''"))} | eof {()} and after_quote = parse | '\\' [^ 'A'-'Z' 'a'-'z'] eof {let lxm = lexeme lexbuf in push_int (Char.code lxm.[1]); result lexbuf} | _ eof {let lxm = lexeme lexbuf in push_int (Char.code lxm.[0]); result lexbuf} | "" {Misc.fatal "Cannot understand `-like numerical argument"} { let init latexget latexgetfun latexopenenv latexcloseenv latexcsname latexmain = get_this := latexget ; get_fun := latexgetfun ; open_env := latexopenenv ; close_env := latexcloseenv ; get_csname := latexcsname ; main := latexmain ;; let def_loc name f = Latexmacros.def name zero_pat (CamlCode f) ; ;; let def_commands l = List.map (fun (name,f) -> name,Latexmacros.replace name (Some (zero_pat,CamlCode f))) l let def_commands_int () = def_commands ["\\value", (fun lexbuf -> let name = !get_this (save_arg lexbuf) in push_int (Counter.value_counter name)) ; "\\@lengthtonchar", (fun lexbuf -> let length = Length.main (MyLexing.from_string (!get_this (save_arg lexbuf))) in let r = match length with | Length.Char x -> x | Length.Pixel x -> pixel_to_char x | _ -> 2 in push_int r) ; "\\pushint", (fun lexbuf -> let s = !get_this (save_arg lexbuf) in scan_this result s)] let def_commands_bool () = let old_ints = def_commands_int () in let old_commands = def_commands ["\\(", (fun _ -> open_ngroups 7) ; "\\)", (fun _ -> close_ngroups 7) ; "\\@fileexists", (fun lexbuf -> let name = !get_this (save_arg lexbuf) in push bool_stack (try let _,chan = Myfiles.open_tex name in begin try close_in chan with Sys_error _ -> () end ; true with Myfiles.Except | Myfiles.Error _ -> false)) ; "\\@commandexists", (fun lexbuf -> let name = !get_csname lexbuf in (* Printf.eprintf "EXISTS? '%s'\n" name ; *) push bool_stack (Latexmacros.exists name)) ; "\\or", (fun _ -> close_ngroups 7 ; open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline "OR" ; MyStack.pretty sbool bool_stack end ; let b1 = pop bool_stack in let b2 = pop bool_stack in push bool_stack (b1 || b2)) "OR"; open_ngroups 6) ; "\\and", (fun _ -> close_ngroups 6 ; open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline "AND" ; MyStack.pretty sbool bool_stack end ; let b1 = pop bool_stack in let b2 = pop bool_stack in push bool_stack (b1 && b2)) "AND"; open_ngroups 5) ; "\\not", (fun _ -> close_ngroups 4 ; open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline "NOT" ; MyStack.pretty sbool bool_stack end ; let b1 = pop bool_stack in push bool_stack (not b1)) "NOT"; open_ngroups 3) ; "\\boolean", (fun lexbuf -> let name = !get_this (save_arg lexbuf) in let b = try let r = !get_this (string_to_arg ("\\if"^name^" true\\else false\\fi")) in match r with | "true" -> true | "false" -> false | _ -> raise (Misc.Fatal ("boolean value: "^r)) with Latexmacros.Failed -> true in push bool_stack b) ; "\\isodd", (fun _lexbuf -> close_ngroups 3 ; open_aftergroup (fun () -> if !verbose > 2 then begin prerr_endline ("ISODD") ; MyStack.pretty string_of_int int_stack end ; let x = pop int_stack in push bool_stack (x mod 2 = 1) ; if !verbose > 2 then MyStack.pretty sbool bool_stack) "ISODD" ; open_ngroups 2) ] in let old_equal = try Some (Latexmacros.find_fail "\\equal") with Failed -> None in def_loc "\\equal" (fun lexbuf -> let arg1 = save_arg lexbuf in let arg2 = save_arg lexbuf in scan_this !main "\\begin{@norefs}" ; let again = List.map (fun (name,x) -> name,Latexmacros.replace name x) ((("\\equal",old_equal)::old_ints)@old_commands) in push bool_stack (!get_this arg1 = !get_this arg2) ; let _ = List.map (fun (name,x) -> Latexmacros.replace name x) again in scan_this !main "\\end{@norefs}") type 'a funs = { pp : out_channel -> 'a -> unit ; to_string : 'a -> string ; scan_this : (Lexing.lexbuf -> unit) -> 'a -> unit; } let string_funs = { pp = output_string ; to_string = (fun x -> x) ; scan_this = scan_this; } let list_funs = { pp = pretty_body ; to_string = String.concat ""; scan_this = scan_this_list; } let do_get_int f {arg=expr ; subst=subst} = if !verbose > 1 then eprintf "get_int : '%a'\n%!" f.pp expr ; let r = let old_int = !int_out in int_out := true ; start_normal subst ; !open_env "*int*" ; let _ = def_commands_int () in open_ngroups 2 ; begin try f.scan_this result expr with | x -> begin eprintf "Error while scanning '%a' for integer result\n%!" f.pp expr ; raise x end end ; close_ngroups 2 ; !close_env "*int*" ; end_normal () ; if MyStack.empty int_stack then raise (Error (sprintf "'%s'' has no value as an integer" (f.to_string expr))) ; let r = pop int_stack in int_out := old_int ; r in if !verbose > 1 then eprintf "get_int: '%a' -> %i\n%!" f.pp expr r ; r let get_int_string a = do_get_int string_funs a let get_int a = do_get_int list_funs a let get_bool {arg=expr ; subst=subst} = if !verbose > 1 then prerr_endline ("get_bool : "^expr) ; let old_bool = !bool_out in bool_out := true ; start_normal subst ; !open_env "*bool*" ; def_commands_bool () ; open_ngroups 7 ; begin try scan_this result expr with | x -> begin prerr_endline ("Error while scanning ``"^expr^"'' for boolean result"); raise x end end ; close_ngroups 7 ; !close_env "*bool*" ; end_normal () ; if MyStack.empty bool_stack then raise (Error ("``"^expr^"'' has no value as a boolean")); let r = pop bool_stack in if !verbose > 1 then prerr_endline ("get_bool: "^expr^" = "^sbool r); bool_out := old_bool ; r let get_length arg = if !verbose > 1 then prerr_endline ("get_length : "^arg) ; let r = Length.main (MyLexing.from_string arg) in if !verbose > 2 then begin prerr_string ("get_length : "^arg^" -> ") ; prerr_endline (Length.pretty r) end ; r } hevea-2.09/hyperref.hva0000644004317100512160000000441712113070517015111 0ustar marangetcristal\ProvidesPackage{hyperref} \RequirePackage{url} \RequirePackage{labeltype} \@primitives{hyperref} \newcommand{\@hr@expand}[1] {\begingroup\catcode`\%=12\catcode`\~=12#1\endgroup} \newcommand{\texorpdfstring}[2]{#1} \newcommand{\hyperlink}[2]{\ahrefloc{#1}{#2}} \newcommand{\hypertarget}[2]{\aname{#1}{#2}} \newcommand{\hyperdef}[3]{\hypertarget{#1.#2}{#3}} \newcommand{\hyperbaseurl}[1]{} \newcommand{\@hyperreflabel}[2]{\ahrefloc{\@getprint{#1}}{{\let\ref\@auxread#2}}} \newcommand{\hyperref}[1][] {\ifoptarg\let\hyper@next\@hyperreflabel\else \let\hyper@next\@hyperref\fi \hyper@next{#1}} \def\url{\begingroup \def\UrlLeft##1\UrlRight{\ahrefurl{##1}}% \urlstyle{tt}% \Url} \newcommand{\hypersetup}[1]{} %%%%%%%%%%%%%%%%% %%Autoref stuff%% %%%%%%%%%%%%%%%%% %%Load list of words according to language \input{hrlang.hva} \newcommand{\HyLang@DeclareLang}[3] {\DeclareOption{#1}{\csname HyLang@#2\endcsname}} \HyLang@DeclareLang{english}{english}{} \HyLang@DeclareLang{UKenglish}{english}{} \HyLang@DeclareLang{british}{english}{} \HyLang@DeclareLang{USenglish}{english}{} \HyLang@DeclareLang{american}{english}{} \HyLang@DeclareLang{german}{german}{} \HyLang@DeclareLang{austrian}{german}{} \HyLang@DeclareLang{ngerman}{german}{} \HyLang@DeclareLang{naustrian}{german}{} \HyLang@DeclareLang{brazil}{portuges}{} \HyLang@DeclareLang{brazilian}{portuges}{} \HyLang@DeclareLang{portuguese}{portuges}{} \HyLang@DeclareLang{spanish}{spanish}{} \HyLang@DeclareLang{afrikaans}{afrikaans}{} \HyLang@DeclareLang{french}{french}{} \HyLang@DeclareLang{frenchb}{french}{} \HyLang@DeclareLang{francais}{french}{} \HyLang@DeclareLang{acadian}{french}{} \HyLang@DeclareLang{canadien}{french}{} \HyLang@DeclareLang{italian}{italian}{} \HyLang@DeclareLang{magyar}{magyar}{} \HyLang@DeclareLang{hungarian}{magyar}{} %%English default \HyLang@english %%Get the right sectionname macro from type \newcommand{\@hr@name}[1] {\ifu\csname #1autorefname\endcsname\csname #1name\endcsname\else \csname #1autorefname\endcsname\fi} \let\@hr@deflabeltype\@deflabeltype \def\@deflabeltype#1#2{% \@hr@deflabeltype{#1}{#2} \def\csname @hr@#1@name\endcsname{\@hr@name{#2}}% } %%expand \ref so as to include section name in link. \newcommand{\autoref}[1]{% \@locref{\@check@anchor@label{#1}}{\csname @hr@#1@name\endcsname~\@auxread{#1}}} \ProcessOptions* hevea-2.09/imagen.std0000755004317100512160000000461711330060611014540 0ustar marangetcristal#! /bin/sh LATEX=latex DVIPS=dvips GS=gs RESOLUTION=100 # resolution in dpi PNMCROP="pnmcrop -white" PNMEXTRA="" PNMMARGIN="pnmmargin -white 1" PPMQUANT="" #PPMTOEXT="pnmtopng -transparent '#ffffff'" #EXT=png PPMTOEXT="ppmtogif -transparent '#ffffff'" EXT=gif TODIR="." RM="/bin/rm -f" while true do case $1 in -todir) shift TODIR="$1" mkdir -p ${TODIR} 2> /dev/null || : ;; -gif) PPMTOEXT="ppmtogif -transparent '#ffffff'" EXT=gif ;; -png) PPMTOEXT="pnmtopng -transparent '#ffffff'" EXT=png ;; -pnm) PPMTOEXT=cat EXT=pnm ;; -quant) shift PPMQUANT="ppmquant $1 2>/dev/null |" ;; -extra) shift PNMEXTRA="$1 |" ;; -mag) shift RESOLUTION="$( expr '(' "$1" '*' 72 '+' 999 ')' '/' 1000)" ;; -res) shift RESOLUTION="$1" ;; -t) shift TPAPER="-t $1" ;; -pdflatex|-pdf) LATEX=pdflatex DVIPS=cat ;; *) break ;; esac shift done echo "RESOLUTION: $RESOLUTION" #always quantize for gifs (ppmtogif ouputs non valid files when colors >= 256) if [ "$EXT" = "gif" -a -z "$PPMQUANT" ] then PPMQUANT="ppmquant 255 2>/dev/null |" fi case $1 in '') BASE=image ;; *) BASE=$1 ;; esac NAME=${BASE}.image trap "${RM} ${NAME}.dvi ${NAME}.pdf `basename ${NAME}.log` `basename ${NAME}.aux` head.tmp body.tmp ; exit 2" 1 2 3 8 10 13 15 DVIPSOPTS="-Z $TPAPER" GSOPTS="-q -dNOPAUSE -dBATCH -DNOPROMPT -sDEVICE=ppmraw \ -r$RESOLUTION -dAutoRotatePages=/None \ -dTextAlphaBits=4 -dGraphicsAlphaBits=4" if [ "${TODIR}" = "." ] then FINAL=${BASE}%03d.${EXT} else FINAL=${TODIR}/${BASE}%03d.${EXT} fi test -f ${NAME}.tex ||\ { echo "Failure: no ${NAME}.tex file!" 2>&1 ; exit 2 ; } ${LATEX} ${NAME}.tex NAMEDIR=`dirname ${NAME}` if [ "${LATEX}" = "pdflatex" ] then if [ ${NAMEDIR} != "." ] then mv `basename ${NAME}.pdf` ${NAME}.pdf fi cat ${NAME}.pdf else if [ ${NAMEDIR} != "." ] then mv `basename ${NAME}.dvi` ${NAME}.dvi fi ${DVIPS} ${DVIPSOPTS} -o - ${NAME}.dvi fi |\ ${GS} ${GSOPTS} -sOutputFile="|\ ${PNMCROP} | ${PNMEXTRA} \ ${PNMMARGIN} | ${PPMQUANT} \ ${PPMTOEXT} 2>/dev/null > ${FINAL}" - ${RM} ${NAME}.dvi ${NAME}.pdf head.tmp body.tmp ${RM} `basename ${NAME}.log` `basename ${NAME}.aux`hevea-2.09/contents_motif.gif0000644004317100512160000000047406537544364016331 0ustar marangetcristalGIF89ap!" Imported from XPM image: toc.xpm!,@6313c B0 0 A0 0 0 0 `0@`0 `  `0@`0 `0@`0000000000 0000000000 00000000 000000 0000 000000000 00000000000 00000000000000` ;hevea-2.09/image.ml0000644004317100512160000000460012017660721014200 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Misc let base = Parse_opts.base_out ;; let count = ref 0 ;; let buff = ref (Out.create_null ()) ;; let active = ref false ;; let start () = active := true ; count := 0 ; buff := Out.create_buff () ;; let active_stack = MyStack.create "Image.active" let stop () = MyStack.push active_stack !active ; active := false and restart () = if MyStack.empty active_stack then active := true else active := MyStack.pop active_stack let put s = if !active then Out.put !buff s and put_char c = if !active then Out.put_char !buff c let tmp_name = if Parse_opts.filter then "" else base ^ ".image.tex.new" let open_chan () = let chan = open_out tmp_name in Out.to_chan chan !buff ; buff := Out.create_chan chan and close_chan () = Out.close !buff let page () = let n = !count in if !verbose > 0 then begin Location.print_pos (); Printf.fprintf stderr "dump image number %d" (n+1) ; prerr_endline "" end ; if n = 0 then open_chan () ; incr count ; put ("\n\\clearpage% page: "^string_of_int n^"\n") ;; let dump s_open image lexbuf = Out.put !buff s_open ; image lexbuf ;; let finalize check = active := false ; if !count > 0 then begin close_chan() ; if check then begin let true_name = Filename.chop_suffix tmp_name ".new" in if Myfiles.changed tmp_name true_name then begin Mysys.rename tmp_name true_name ; Misc.message ("HeVeA Warning: images may have changed, run 'imagen "^ Misc.get_image_opt ()^" "^base^"'"); true end else begin Mysys.remove tmp_name ; false end end else false end else false hevea-2.09/foot.mli0000644004317100512160000000202610504772141014235 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type saved val checkpoint : unit -> saved val hot_start : saved -> unit val step_anchor : int -> unit val get_anchor : int -> int val register : int -> string -> string -> unit val sub_notes : unit -> unit val flush : bool -> (string -> unit) -> string -> string -> unit val end_notes : unit -> unit hevea-2.09/info/0000755004317100512160000000000012204704150013510 5ustar marangetcristalhevea-2.09/info/book.hva0000644004317100512160000000114112122274007015141 0ustar marangetcristal\ifstyleloaded\relax\else % << slight change from text/ included below % emacs info mode does not fontify level 1 headers if they're not % underlined by a line of *s \@makesection {\section}{0}{section} % {\@forcenewline\@open{head}{*=}} {\@forcenewline\@open{head}{*}} {\thesection}{\quad} {\@forcenewline\@close{head}} % >> end \input{text/book.hva} \setcounter{menudepth}{2} \newcommand{\sectionname}{Section} \newcommand{\subsectionname}{Subsection} \newcommand{\subsubsectionname}{Subsubsection} \renewcommand{\@indexsection}[1]{\chapter{#1}} \renewcommand{\@bibliosection}[1]{\chapter{#1}} \fihevea-2.09/info/hevea.hva0000644004317100512160000000443412122274007015307 0ustar marangetcristal\input{text/hevea.hva} % << slight change from text/ % emacs info mode does not fontify title if it's not flushed left % redefine \maketitle without env align{center} \renewcommand{\maketitle}{% \bgroup \newcommand{\checkcmd}[2] {\@ifundefined{@##1} {\hva@warn{No ##1 given}} {\usebox{\csname @##1\endcsname}##2}}% % \@open{align}{center}% \@open{head}{*}% \usebox{\@title}\\% \@close{head}% \@open{head}{=}%H3 \checkcmd{author}{\par}% \checkcmd{date}{}% \@close{head}% % \@close{align}% \egroup% \global\let\maketitle\relax} %>> \renewcommand{\@locname}[2]{\@infoname{#1}#2} \renewcommand{\@locref}[2] {#2{\@nostyle\@print{\@reference}\{#1\}}} \renewcommand{\@locnameref}[3] {\@infoname{#1}#3{{\@nostyle\@print{\@reference}\{#2\}}}} \let\textdocument=\document \let\endtextdocument=\enddocument \renewenvironment{document} {\textdocument\@infonode{Top}{Racine}} {\newboolean{infofoot}\setboolean{infofoot}{\boolean{footer}}\footerfalse \endtextdocument\setboolean{footer}{\boolean{infofoot}}} %%%%%%%%%%% Footnotes %%%% References only from text to note \renewcommand{\@noteref}[4] {\ifthenelse{\equal{#2}{text}} {\@locref{#1#3}{#4}} {\@locname{#2#3}{#4}}} \renewcommand{\@notepointer}[3]{\@locref{#1#2}{#3}} %%%% Number footnote nodes \newcounter{footnotesflush} \newcommand{\theflush}{Notes \arabic{footnotesflush}} \newsavebox{\footflushed} \renewenvironment{thefootnotes}[1] {\begin{lrbox}{\footflushed} \footnoterule% \begin{list}{}{\renewcommand{\makelabel}[1]{##1}}} {\end{list}\end{lrbox}% \@infoextranode{\theflush}{Notes}{\usebox{\footflushed}}% \stepcounter{footnotesflush}} %%%%%%%%%%%%%%Menus are introduced by redefining \@makesection %% #1 is section name, #2 is section depth number \newcounter{menudepth} \newcounter{lastnode}\setcounter{lastnode}{-1000} \newcommand{\@insertmenu}[3] {\ifthenelse{\value{menudepth} > #2} {\ifthenelse{#2 > \value{lastnode}} {\@infomenu{#1}} {}% \setcounter{lastnode}{#2}% \@infonode[#1] {\csname #1name\endcsname\ \csname the#1\endcsname} {#3}} {}}% \renewcommand{\@makesection}[7]{% \newcommand{#1}[2][!*!] {\@checkdepth{#2}{\refstepcounter{#3}}% \@footnoteflush{#3}% \@insertmenu{#3}{#2}{\begin{@norefs}##2\end{@norefs}}% #4\@checkdepth{#2}{#5#6} ##2#7\@secend}% \newcommand{#1*}[1]{#4##1#7\@secend}} hevea-2.09/info/report.hva0000644004317100512160000000002006714547664015543 0ustar marangetcristal\input{book.hva}hevea-2.09/info/article.hva0000644004317100512160000000114412122274007015635 0ustar marangetcristal\ifstyleloaded\relax\else % << slight change from text/ included below % emacs info mode does not fontify level 1 headers if they're not % underlined by a line of *s \@makesection {\section}{0}{section} % {\@forcenewline\@open{head}{*=}} {\@forcenewline\@open{head}{*}} {\thesection}{\quad} {\@forcenewline\@close{head}} % >> end \input{text/article.hva} \setcounter{menudepth}{2} \newcommand{\sectionname}{Section} \newcommand{\subsectionname}{Subsection} \newcommand{\subsubsectionname}{Subsubsection} \renewcommand{\@indexsection}[1]{\section{#1}} \renewcommand{\@bibliosection}[1]{\section{#1}} \fihevea-2.09/info/seminar.hva0000644004317100512160000000220106736142076015661 0ustar marangetcristal\ifstyleloaded\relax \else %%%% Landscape and portrait \iffrench \newcommand{\slidename}{Planche~:} \else \newcommand{\slidename}{Slide:} \fi \newcounter{slide} \newenvironment{slide}[1][]{% \stepcounter{slide}% \cuthere{section}{\slidename{} \theslide}% \infonode{}{\slidename{} \theslide}% \@printHR{}{100}% \@open{ALIGN}{RIGHT}% \@open{HEAD}{*=}\slidename{} \theslide\@close{HEAD}%H2 \@close{ALIGN} \@printHR{}{100}% }{} \newenvironment{slide*}[1][]{\begin{slide}}{\end{slide}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% All seminar-specific commandes are null macros %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\landscapeonly}{} \newcommand{\portraitonly}{} \newcommand{\twoup}{} %% Margins \newif\ifcenterslides \newcommand{\raggedslides}[1][]{} %% Page breaking \newcommand{\extraslideheight}[1]{} \newcommand{\newslide}{} \newcommand{\slidefuzz}{} %% Magnification \newcommand{\slidemag}[1]{} \newcommand{\semin}{in} \newcommand{\semcm}{cm} \newcommand{\ptsize}[1]{} %% FRAMES \newcommand{\slideframe}[2][]{} \newcommand{\newslideframe}[1]{\slideframe} %%%% load the article style file \input{article.hva} \fihevea-2.09/moreverb.hva0000644004317100512160000000076412017660721015114 0ustar marangetcristal\usepackage{verbatim} \@primitives{moreverb} \newcommand{\verbatimtabsize}{8} \newenvironment{boxedverbatim} {\@open{table}{style="border:1px;border-spacing:0" class="cellpadding1"}\@open{tr}{}\@open{td}{style="text-align:left"}\verbatim} {\endverbatim\@close{td}\@close{tr}\@close{table}} \newcommand{\verbatimtabinput}[2][\verbatimtabsize] {\@scaninput{\begin{verbatimtab}[#1] }{#2}{\end{verbatimtab}}} \newcommand{\listinginput}[3][1] {\@scaninput{\begin{listing}[#1]{#2}}{#3}{\end{listing}}} hevea-2.09/myStack.ml0000644004317100512160000000427212017651434014537 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: myStack.ml,v 1.1 2007-02-08 17:48:28 maranget Exp $ *) (***********************************************************************) exception Fatal of string type 'a t = {mutable l : 'a list ; name : string ; bottom : 'a option} let create name = {l = [] ; name=name ; bottom = None} let create_init name x = {l = [] ; name=name ; bottom = Some x} let reset s = s.l <- [] let bottom msg s = match s.bottom with | None -> raise (Fatal (msg^": "^s.name)) | Some x -> x let name {name=name;_} = name and push s x = s.l <- x :: s.l and pop s = match s.l with | [] -> bottom "pop" s | x :: r -> s.l <- r ; x and top s = match s.l with | [] -> bottom "top" s | x :: _ -> x and top2 s = match s.l with | []|[_] -> bottom "top2" s | _ :: x :: _ -> x and length s = List.length s.l and empty s = match s.l with | [] -> true | _ -> false let pretty f stack = prerr_string stack.name ; prerr_string ": <<" ; let rec do_rec = function | [] -> prerr_endline ">>" | [x] -> prerr_string ("'"^f x^"'") ; prerr_endline ">>" | x :: r -> prerr_string "'" ; prerr_string (f x) ; prerr_string "'" ; do_rec r in do_rec stack.l let rev s = s.l <- List.rev s.l let map s f = s.l <- List.map f s.l type 'a saved = 'a list let empty_saved = [] and save {l=l;_} = l and restore s x = s.l <- x let finalize {l=now;_} p f = let rec f_rec = function | [] -> () | nx::n -> if p nx then () else begin f nx ; f_rec n end in f_rec now hevea-2.09/saver.mll0000644004317100512160000000731612017660721014421 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) { open Lexing open SaveUtils module type Config = sig type t val of_string : string -> t val of_out : Out.t -> t end module type S = sig type out val opt : Lexing.lexbuf -> out val arg : Lexing.lexbuf -> out val arg2 : Lexing.lexbuf -> out end module Make(C:Config) = struct type out = C.t } let command_name = '\\' (( ['@''A'-'Z' 'a'-'z']+ '*'?) | [^ 'A'-'Z' 'a'-'z'] | "\\*") let space = [' ''\t''\r'] rule opt = parse | space* '\n'? space* '[' {put_echo (lexeme lexbuf) ; opt2 lexbuf} | eof {raise Eof} | "" {raise NoOpt} and opt2 = parse | '{' {incr brace_nesting; put_both_char '{' ; opt2 lexbuf} | '}' { decr brace_nesting; if !brace_nesting >= 0 then begin put_both_char '}' ; opt2 lexbuf end else begin error "Bad brace nesting in optional argument" end} | ']' {if !brace_nesting > 0 then begin put_both_char ']' ; opt2 lexbuf end else begin put_echo_char ']' ; C.of_out arg_buff end} | command_name as lxm {put_both lxm ; opt2 lexbuf } | _ as lxm {put_both_char lxm ; opt2 lexbuf } and skip_comment = parse | eof {()} | '\n' space* {()} | _ {skip_comment lexbuf} and arg = parse space+ | '\n'+ {put_echo (lexeme lexbuf) ; arg lexbuf} | '{' {incr brace_nesting; put_echo_char '{' ; arg2 lexbuf} | '%' {skip_comment lexbuf ; arg lexbuf} | "\\box" '\\' (['A'-'Z' 'a'-'z']+ '*'? | [^ 'A'-'Z' 'a'-'z']) {let lxm = lexeme lexbuf in put_echo lxm ; C.of_string lxm} | command_name {blit_both lexbuf ; skip_blanks lexbuf} | '#' ['1'-'9'] {let lxm = lexeme lexbuf in put_echo lxm ; C.of_string lxm} | [^ '}'] {let c = lexeme_char lexbuf 0 in put_both_char c ; C.of_out arg_buff} | eof {raise Eof} | "" {error "Argument expected"} and skip_blanks = parse | space* '\n' as lxm {seen_par := false ; put_echo lxm ; more_skip lexbuf} | space* as lxm {put_echo lxm ; C.of_out arg_buff} and more_skip = parse (space* '\n' space*)+ as lxm {seen_par := true ; put_echo lxm ; more_skip lexbuf} | space* as lxm { put_echo lxm ; C.of_out arg_buff} and arg2 = parse '{' {incr brace_nesting; put_both_char '{' ; arg2 lexbuf} | '}' {decr brace_nesting; if !brace_nesting > 0 then begin put_both_char '}' ; arg2 lexbuf end else begin put_echo_char '}' ; C.of_out arg_buff end} | "\\{" | "\\}" | "\\\\" | [^'\\''{''}']+ {blit_both lexbuf ; arg2 lexbuf } | _ {let c = lexeme_char lexbuf 0 in put_both_char c ; arg2 lexbuf} | eof {error "End of file in argument"} { end module String = Make (struct type t = string let of_string x = x let of_out = Out.to_string end) module List = Make (struct type t = string list let of_string x = [x] let of_out = Out.to_list end) } hevea-2.09/url.mli0000644004317100512160000000163412017660721014075 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* en Automatique. Distributed only by permission. *) (* *) (* *) (***********************************************************************) (* URL encoding and decoding *) val encode_fragment : (char -> unit) -> (string -> unit) -> string -> unit val decode_fragment : (char -> unit) -> (string -> unit) -> string -> unit hevea-2.09/amsmath.hva0000644004317100512160000002553212017660721014725 0ustar marangetcristal\ProvidesPackage{amsmath} \RequirePackage{amsfonts} \let\numberwithin\@addtoreset \let\text\mbox %% Equation tags \renewcommand{\theequation}{\arabic{equation}} \newif\ifams@star \newcommand{\ams@yesnumber} {\@yesnumber\gdef\ams@currentlabel{\theequation}} \newcommand{\ams@nonumber}{\global\let\@number\@empty} \def\tag#1{\gdef\@number{\eqno{\text{(#1)}}}\gdef\ams@currentlabel{\text{#1}}% \ifams@star\else\addtocounter{equation}{-1}\fi}% \def\tag*#1{\gdef\@number{\eqno{\text{#1}}}\gdef\ams@currentlabel{\text{#1}}% \ifams@star\else\addtocounter{equation}{-1}\fi}% \def\notag {\ams@nonumber \ifams@star\else\addtocounter{equation}{-1}\fi}% \let\nonumber\notag% %%%%% AMS equations \newenvironment{ams@equation}[1] {\[\def\@currentlabel{\ams@currentlabel}#1} {\@number\]} \newenvironment{equation*} {\ams@startrue\begin{ams@equation}{\ams@nonumber}} {\end{ams@equation}} \renewenvironment{equation} {\ams@starfalse\begin{ams@equation}{\ams@yesnumber\stepcounter{equation}}} {\end{ams@equation}} %%%%AMS align \newcounter{@align@col} \newcounter{@align@limit} \newenvironment{ams@alignat}[2] {\setcounter{@align@limit}{2*#1-1}% \@ifundefined{@align@inside}{\def\@align@inside{}}{\hva@warn{Nested align}}% \[\@changelabel\def\@currentlabel{\ams@currentlabel}% \setcounter{@align@col}{0}% #2% \def\@extra{\quad\quad}% \let\@PBS=\@HEVEA@bsbs \let\@PAM=\@HEVEA@amper \newcommand{\@eqna@complete} {\whiledo{\value{@align@col}<\value{@align@limit}}{\def\@extra{}&}} \renewcommand{\@hevea@amper} {\ifthenelse{\value{@align@col}<\value{@align@limit}} {\stepcounter{@align@col}% \ifthenelse{\isodd{\value{@align@col}}}{}{\@extra}% \@PAM} {\hva@warn{Extra column in eqnarray}}} \renewcommand{\\}[1][] {\@eqna@complete% End line \@PAM\@number\@PBS% format equation number #2%step equation number \setcounter{@align@col}{0}} \@array{*{#1}{rl}r}} {\\{}\end@array\]} \newenvironment{alignat}[1] {\ams@starfalse\begin{ams@alignat} {#1} {\ams@yesnumber\stepcounter{equation}}} {\end{ams@alignat}\addtocounter{equation}{-1}} \newenvironment{alignat*}[1] {\ams@startrue\begin{ams@alignat}{#1}{\ams@nonumber}} {\end{ams@alignat}} \newenvironment{align}{\begin{alignat}{5}}{\end{alignat}} \newenvironment{align*}{\begin{alignat*}{5}}{\end{alignat*}} %%%%%%%%AMS gather \newenvironment{ams@gather}[1] {\[\@changelabel\def\@currentlabel{\ams@currentlabel}% \@array{@{#1}c@{\@number}}} {\end@array\]} \newenvironment{gather} {\ams@starfalse\begin{ams@gather}{\ams@yesnumber\stepcounter{equation}}} {\end{ams@gather}} \newenvironment{gather*} {\ams@startrue\begin{ams@gather}{\ams@nonumber}} {\end{ams@gather}} %%%%%%%AMS multline \newcounter{ams@line} \newenvironment{ams@multline}[1] {\@changelabel\def\@currentlabel{\ams@currentlabel}% #1% \setcounter{ams@line}{0}% \let\@PBS=\\% \renewcommand{\\}[1][] {\@close{display}% \ifthenelse{\value{ams@line}>0}{\centering}{\raggedright}\)\endgroup\stepcounter{ams@line}\begingroup\(\@open{display}{}}% \begingroup\(\@open{display}{}} {\@close{display}\)\raggedleft\@number\endgroup} \newenvironment{multline} {\ams@starfalse\begin{ams@multline}{\ams@yesnumber\stepcounter{equation}}} {\end{ams@multline}} \newenvironment{multline*} {\ams@startrue\begin{ams@multline}{\ams@nonumber}} {\end{ams@multline}} %AMS split \newenvironment{split}{\begin{array}{rl}}{\end{array}}% \renewenvironment{cases}{\left\{\begin{array}{ll}}{\end{array}\right.}% \newcommand{\intertext}[1]{\qquad\mbox{#1}\\}% %%Matrices \newcounter{MaxMatrixCols}\setcounter{MaxMatrixCols}{10}% \newenvironment{matrix}{\begin{array}{*{\value{MaxMatrixCols}}{c}}}{\end{array}}% \newenvironment{pmatrix}{\left(\begin{array}{*{\value{MaxMatrixCols}}{c}}}{\end{array}\right)}% \newenvironment{bmatrix}{\left[\begin{array}{*{\value{MaxMatrixCols}}{c}}}{\end{array}\right]}% \newenvironment{vmatrix}{\left|\begin{array}{*{\value{MaxMatrixCols}}{c}}}{\end{array}\right|}% \newenvironment{Vmatrix}{\left|\left|\begin{array}{*{\value{MaxMatrixCols}}{c}}}{\end{array}\right|\right|}% \newcounter{@hdots}% \newcommand{\hdotsfor}[2][]{% \setcounter{@hdots}{#2}% \whiledo{\value{@hdots}>1}{\ldots &\addtocounter{@hdots}{-1}}% \ldots}% \newenvironment{smallmatrix}{\begin{matrix}}{\end{matrix}} %%%%%%%%%%%% Some commands by B. Salvy \newcommand{\binom}[2]{\begin{pmatrix}#1\\#2\end{pmatrix}} \newcommand{\boldmath}{\bf} %%%%%%%%%% AMS extra variable size delimiters \newcommand{\lvert}{|} \newcommand{\csname\delim@name{\lvert}\endcsname}[1] {\process@delim@one{#1}{\mid@vert}} \newcommand{\rvert}{|} \newcommand{\csname\delim@name{\rvert}\endcsname}[1] {\process@delim@one{#1}{\mid@vert}} %%% \DeclareSymbolHtml[||]{\lVert}{X2225} \newcommand{\csname\delim@name{\lVert}\endcsname}[1] {\process@delim@one{#1}{\mid@Vert}} \DeclareSymbolHtml[||]{\rVert}{X2225} \newcommand{\csname\delim@name{\rVert}\endcsname}[1] {\process@delim@one{#1}{\mid@Vert}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Other variants of \frac % % \dfrac makes no estimate of display-style in HEVEA % % \tfrac makes no estimate of text-style in HEVEA % % \cfrac takes an optional argument as well % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \let\dfrac\frac \newcommand{\tfrac}[2]{{#1/#2}} \let\hva@frac\frac \NewcommandHtml{\textfrac}[3][]{\hva@frac{#2}{#3}} \NewcommandHtml{\@frac}[3][] {\@open@display\d@cell{#2}% \@close{tr}\@open{tr}{}% \@open@dcell{}% {\def\@tmp{#1}\ifx\@tmp\@empty\@hbar\else \@hbar[style="height:\@getlength{#1}px;"]\fi}% \@close@dcell% \@close{tr}\@open{tr}{class="bot"}% \d@cell[style="background-color:lime;"]{#3}% \@close@display} \NewcommandHtml{\gfrac}{\DisplayChoose\@frac\textfrac} %%%\cfrac -> vertical alignement on top in denominator \NewcommandHtml{\@@cfrac}[3][] {\@open@display% \d@cell[#1]{#2}% \@close{tr}\@open{tr}{}% \d@cell{\@hbar}\@addvsize{-1}% \@close{tr}\@open{tr}{}% \@open@dcell{}\@open{display}{style="vertical-align:top"}#3\@close{display}\@close@dcell% \@close@display} \NewcommandHtml{\@lcfrac}[2]{\@@cfrac[style="text-align:left;"]{#1}{#2}} \NewcommandHtml{\@rcfrac}[2]{\@@cfrac[style="text-align:right;"]{#1}{#2}} \newcommand{\@cfrac}[3][c] {\ifthenelse{\equal{#1}{c}}{\@@cfrac{#2}{#3}} {\ifthenelse{\equal{#1}{l}}{\@lcfrac{#2}{#3}} {\ifthenelse{\equal{#1}{r}}{\@rcfrac{#2}{#3}} {\hva@warn{Invalid Argument To \cfrac: '#1', ignored}{\@@cfrac{#2}{#3}}}}}} \NewcommandHtml{\textcfrac}[3]{\frac{#2}{#3}} \NewcommandHtml{\cfrac}{\DisplayChoose\@cfrac\textcfrac} \NewcommandHtml{\lcfrac}{\DisplayChoose\@lcfrac\frac} \NewcommandHtml{\rcfrac}{\DisplayChoose\@rcfrac\frac} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\eqref}[1]{(\ref{#1})} %\newcommand{\mathbb}[1]{{\bf #1}} %\newcommand{\mathfrak}[1]{{\green #1}} \newcommand{\mathnormal}[1]{#1} \newcommand{\mod}{\text{mod}} \newcommand{\operatorname}[1]{\text{#1}} \newcommand{\smallint}{\int} \newenvironment{proof}{\par\noindent{\bf Proof.}}{\par\medskip} %%%%%%%%%%%%%%%%% % \boxed command% %%%%%%%%%%%%%%%%% \NewcommandHtml{\boxed}{\DisplayChoose\@@boxed\@boxed} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Table 48: AMS Variable-sized Math Operators % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\MakeInt}[2]{\MakeBigSymbolHtml[\intlimits]{#1}{#2}} \DeclareSymbolHtml{\@iint}{X222C}\MakeInt{\iint}{\@iint} \DeclareSymbolHtml{\@iiint}{X222D}\MakeInt{\iiint}{\@iiint} \DeclareSymbolHtml{\@iiiint}{X2A0C}\MakeInt{\iiiint}{\@iiiint} \NewcommandHtml{\idotsint}{\int\cdots\int} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Table 97: AMS Log-Like symbols % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \@defl\injlim{inj lim} \@defl\projlim{proj lim} \@defl\varliminf{\underline{lim}} \@defl\varlimsup{\overline{lim}} %%%%%%%%%%%%%%%%%%%%%% % Table 39: AMS Dots % %%%%%%%%%%%%%%%%%%%%%% \@Let\dotsb\cdots \@Let\dotsi\cdots \@Let\dotso\ldots \@Let\dotsc\ldots \@Let\dotsm\cdots %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Table 129: AMS Extensible Accents % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NewcommandHtml{\textoverleftrightarrow}[1] {\hva@warn{\overleftrightarrow outside display mode}#1} \NewcommandHtml{\@overleftrightarrow}[1] {\mathop{\@over@arrow[3] {\d@cell[style="width:1\%;"]{\hva@lefthead}% \d@cell[style="width:98\%;"]{\@hbar}% \d@cell[style="width:1\%;"]{\hva@righthead}} {#1}}\intlimits} \NewcommandHtml{\overleftrightarrow} {\DisplayChoose\@overleftrightarrow\textoverleftrightarrow} %%%%%%%%%%%%%%%%%%%%%%% \NewcommandHtml{\textunderleftrightarrow}[1] {\hva@warn{\underleftrightarrow outside display mode}#1} \NewcommandHtml{\@underleftrightarrow}[1] {\mathop{\@under@arrow[3] {\d@cell[style="width:1\%;"]{\hva@lefthead}% \d@cell[style="width:98\%;"]{\@hbar}% \d@cell[style="width:1\%;"]{\hva@righthead}}{#1}}\intlimits} \NewcommandHtml{\underleftrightarrow} {\DisplayChoose\@underleftrightarrow\textunderleftrightarrow} %%%%%%%%%%%%%%%%%%%%%%% \NewcommandHtml{\textunderrightarrow}[1] {\hva@warn{\underrightarrow outside display mode}#1} \NewcommandHtml{\@underrightarrow}[1] {\mathop{\@under@arrow[2] {\d@cell[style="width:99\%;"]{\@hbar}% \d@cell[style="width:1\%;"]{\hva@righthead}}{#1}}\intlimits} \NewcommandHtml{\underrightarrow} {\DisplayChoose\@underrightarrow\textunderrightarrow} %%%%%%%%%%%%%%%%%%%%%%% \NewcommandHtml{\textunderleftarrow}[1] {\hva@warn{\underleftarrow outside display mode}#1} \NewcommandHtml{\@underleftarrow}[1] {\mathop{\@under@arrow[2] {\d@cell[style="width:1\%;"]{\hva@lefthead}% \d@cell[style="width:100\%;"]{\@hbar}}{#1}}\intlimits} \NewcommandHtml{\underleftarrow} {\DisplayChoose\@underleftarrow\textunderleftarrow} %%%%%%%%%%%%%% New generic function for accents both below and above \NewcommandHtml{\@both@arrow}[4][2] {\@open@sizer\@open@display% \d@cell[colspan="#1" style="font-size:smaller;"]{#2}% \@close{tr}\@open{tr}{}% #3% \@close{tr}\@open{tr}{}% \d@cell[colspan="#1" style="font-size:smaller;"]{#4}% \@close@display\@close@sizer} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NewcommandHtml{\textxleftarrow}[2][] {\hva@warn{\xleftarrow outside display mode}\leftarrow^{#2}_{#1}} \NewcommandHtml{\@xleftarrow}[2][~] {\mathop {\@both@arrow[2]{\quad{}#2\quad} {\d@cell[style="width:1\%;"]{\hva@lefthead}% \d@cell[style="width:99\%;"]{\@hbar}} {\quad{}#1\quad}% }\intlimits} \NewcommandHtml{\xleftarrow}{\DisplayChoose\@xleftarrow\textxleftarrow} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NewcommandHtml{\textxrightarrow}[2][] {\hva@warn{\xrightarrow outside display mode}\rightarrow^{#2}_{#1}} \NewcommandHtml{\@xrightarrow}[2][~] {\mathop {\@both@arrow[2]{\quad{}#2\quad} {\d@cell[style="width:99\%;"]{\@hbar}% \d@cell[style="width:1\%;"]{\hva@righthead}} {\quad{}#1\quad}}\intlimits} \NewcommandHtml{\xrightarrow}{\DisplayChoose\@xrightarrow\textxrightarrow} %%% subarray/substack \NewcommandHtml{\@smaller}{\@span{style="font-size:smaller;"}} \NewcommandText{\@smaller}{} \NewcommandText{\@dclass}{} \newenvironment{subarray}[1]{\@smaller\begin{Array}[\@dclass]{#1}}{\end{Array}} \newcommand{\substack}[1]{\begin{subarray}{c}#1\end{subarray}} hevea-2.09/booktabs.hva0000644004317100512160000000131510757523076015102 0ustar marangetcristal\ProvidesPackage{booktabs} %Rather awfull way to read the (...) argument arg of \cmidrule %A better solution would be for \cmidrule to follow %usual LaTeX conventions. \def\@bt@op{(} \def\@bt@cp{)} \let\@bt@cmi\@gobble \def\@eatcp#1{% \def\@arg{#1}% \ifx\@arg\@bt@cp\let\@step\@bt@cmi\else\let\@step\@eatcp\fi% \@step} %%No-ops for all commands, perhaps style-sheets permit %%acurate rendering? \newcommand{\@btabs@void}[1][]{} \let\toprule\@btabs@void \let\midrule\@btabs@void \let\bottomrule\@btabs@void \newcommand{\@cmidrule}[1] {\def\@arg{#1}\ifx\@arg\@bt@op\@eatcp\else\@bt@cmi{#1}\fi} \newcommand{\cmidrule}[1][]{\@cmidrule} \let\morecmidrules\relax \newcommand{\specialrule}[3]{} \let\addlinespace\@btabs@voidhevea-2.09/simpleRope.ml0000644004317100512160000001312212074006057015233 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Tibault Suzanne, Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf exception Out_of_bounds module type Config = sig val small_length : int end module Make(C:Config) = struct open C (**********) (* Basics *) (**********) type t = | Str of string | App of t * t * int (* String length *) let length = function | Str s -> String.length s | App (_,_,len) -> len let of_string s = Str s let singleton c = of_string (String.make 1 c) let empty = of_string "" (**********) (* Append *) (**********) let app r1 r2 = match r1,r2 with | Str "",t | t,Str "" -> t | Str s1, Str s2 when String.length s1 < small_length && String.length s2 < small_length -> Str (s1^s2) | App (t1,Str s1,len), Str s2 when String.length s1 < small_length && String.length s2 < small_length -> App (t1,Str (s1^s2),len+String.length s2) | Str s1,App (Str s2,t2,len) when String.length s1 < small_length && String.length s2 < small_length -> App (Str (s1^s2),t2,len+String.length s1) | _,_ -> App (r1,r2,length r1+length r2) let append r1 r2 = app r1 r2 let append_string r s = app r (of_string s) and append_char r c = app r (singleton c) (*************) (* Substring *) (*************) (* assumption: 0 <= start < stop <= len(t) *) let rec mksub start stop t = if start = 0 && stop = length t then t else match t with | Str s -> Str (String.sub s start (stop-start)) | App (t1, t2, _) -> let n1 = length t1 in if stop <= n1 then mksub start stop t1 else if start >= n1 then mksub (start-n1) (stop-n1) t2 else app (mksub start n1 t1) (mksub 0 (stop-n1) t2) let sub t ofs len = let stop = ofs + len in if ofs < 0 || len < 0 || stop > length t then raise Out_of_bounds; if len = 0 then empty else mksub ofs stop t (***********************) (* Get a char by index *) (***********************) let rec get_rec t i = match t with | Str s -> String.unsafe_get s i | App (t1, t2, _) -> let n1 = length t1 in if i < n1 then get_rec t1 i else get_rec t2 (i - n1) let get t i = if i < 0 || i >= length t then raise Out_of_bounds; get_rec t i (***********) (* Iterate *) (***********) let iter_string f s = for k=0 to String.length s-1 do f (String.unsafe_get s k) done let rec iter_rec f = function | Str s -> iter_string f s | App (t1,t2,_) -> iter_rec f t1 ; iter_rec f t2 let iter f t = iter_rec f t (**********) (* Output *) (**********) let rec output chan = function | Str s -> output_string chan s | App (t1,t2,_) -> output chan t1 ; output chan t2 let rec debug_rec indent chan = function | Str s -> fprintf chan "%s\"%a\"\n" indent output_string s | App (t1,t2,_) -> let indent2 = indent ^ " " in fprintf chan "%s[\n" indent ; debug_rec indent2 chan t1 ; debug_rec indent2 chan t2 ; fprintf chan "%s]\n" indent ; () let debug = debug_rec "" (*************) (* To string *) (*************) let rec blit t buff pos = match t with | Str s -> String.unsafe_blit s 0 buff pos (String.length s) | App (t1,t2,_) -> blit t1 buff pos ; blit t2 buff (pos+length t1) let to_string t = match t with | Str s -> s | App (_,_,len) -> let buff = String.create len in blit t buff 0 ; buff (***********************) (* To list (of string) *) (***********************) let rec do_to_list k = function | Str s -> if String.length s > 0 then (s::k) else k | App (t1,t2,_) -> let k = do_to_list k t2 in do_to_list k t1 let to_list t = do_to_list [] t let to_list_append t k = do_to_list k t (*******************) (* Index functions *) (*******************) let rec index_from r i c = match r with | Str s -> String.index_from s i c | App (t1,t2,_) -> let n1 = length t1 in if i < n1 then try index_from t1 i c with Not_found -> index_from t2 0 c + n1 else index_from t2 (i-n1) c let index r c = try index_from r 0 c with e -> eprintf "SimpleRope.index failed c='%c'\n" c ; debug stderr r ; raise e let rec rindex_from r i c = match r with | Str s -> String.rindex_from s i c | App (t1,t2,_) -> let n1 = length t1 in if i < n1 then rindex_from t1 i c else try rindex_from t2 (i-n1) c + n1 with Not_found -> rindex_from t1 (n1-1) c let rindex r c = rindex_from r (length r-1) c (* Erase end according to predicate *) let erase t pred = let rec do_rec t = match t with | Str s -> let len = String.length s in let rec find_no k = if k <= 0 then k else let c = String.unsafe_get s (k-1) in if pred c then find_no (k-1) else k in let k_lst = find_no len in if k_lst = len then t else Str (String.sub s 0 len) | App (t1,t2,_) -> let t2 = do_rec t2 in if t2 = empty then do_rec t1 else append t1 t2 in do_rec t end hevea-2.09/lstlang2.sty0000644004317100512160000023515611524022160015056 0ustar marangetcristal%% %% This is file `lstlang2.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% lstdrvrs.dtx (with options: `lang2') %% %% The listings package is copyright 1996--2004 Carsten Heinz, and %% continued maintenance on the package is copyright 2006--2007 Brooks Moses. %% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004/2006/ %% 2007 any individual author listed in this file. %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. %% Either version 1.3 or, at your option, any later version. %% %% This file is completely free and comes without any warranty. %% %% Send comments and ideas on the package, error reports and additional %% programming languages to Brooks Moses at . %% \ProvidesFile{lstlang2.sty} [2004/09/05 1.3 listings language file] %% %% Abap definition by Knut Lickert %% \lst@definelanguage[R/3 6.10]{ABAP}[R/3 4.6C]{ABAP}% {morekeywords={try,endtry},% }[keywords,comments,strings] \lst@definelanguage[R/3 4.6C]{ABAP}[R/3 3.1]{ABAP}% {morekeywords={method,ref,class,create,object,% methods,endmethod,private,protected,public,section,% catch,system-exceptions,endcatch,% },% moreprocnamekeys={class},% literate={->}{{$\rightarrow$}}1{=>}{{$\Rightarrow$}}1,% }[keywords,comments,strings,procnames] \lst@definelanguage[R/3 3.1]{ABAP}[R/2 5.0]{ABAP}{}% \lst@definelanguage[R/2 5.0]{ABAP}% {sensitive=f,% procnamekeys={report,program,form,function,module},% morekeywords={*,add,after,alias,analyzer,and,append,appending,area,assign,at,% authority-check,before,binary,blank,break-point,calendar,call,% case,change,changing,check,clear,cnt,co,collect,commit,common,% component,compute,condense,corresponding,cos,cp,cs,currency-conversion,% cursor,data,database,dataset,decimals,define,delete,deleting,dequeue,% describe,detail,dialog,directory,div,divide,do,documentation,% during,dynpro,else,end-of-page,end-of-selection,endat,endcase,% enddo,endfor,endform,endif,endloop,endmodule,endselect,% endwhile,enqueue,exceptions,exit,exp,export,exporting,extract,% field,fields,field-groups,field-symbols,find,for,form,format,free,% from,function,generating,get,giving,hide,id,if,import,% importing,in,incl,include,initial,initialization,input,insert,% interrupt,into,is,language,leave,leading,left-justified,like,line,lines,line-count, line-selection,list-processing,load,local,log,logfile,loop,% margin,mark,mask,memory,menue,message,mod,modify,module,move,% move-text,multiply,na,new,new-line,new-page,no-gaps,np,ns,% number,obligatory,occurs,of,on,or,others,output,parameter,% parameters,parts,perform,pf-status,places,position,process,% raise,raising,ranges,read,refresh,refresh-dynpro,reject,remote,% replace,report,reserve,reset,restart,right-justified,run,screen,scroll,search,% segments,select,select-options,selection-screen,set,shift,sin,% single,sqrt,start-of-selection,statement,structure,submit,% subtract,summary,summing,suppress,system,table,tables,task,% text,time,to,top-of-page,trace,transaction,transfer,% transfer-dynpro,translate,type,unpack,update,user-command,% using,value,when,where,while,window,with,workfile,write,},% morecomment=[l]",% morecomment=[f][commentstyle][0]*,% morestring=[d]'% }[keywords,comments,strings,procnames] \lst@definelanguage[R/2 4.3]{ABAP}[R/2 5.0]{ABAP}% {deletekeywords={function,importing,exporting,changing,exceptions,% raise,raising}% }[keywords,comments,strings] %% %% Corba IDL definition (c) 1999 Jens T. Berger Thielemann %% \lst@definelanguage[CORBA]{IDL}% {morekeywords={any,attribute,boolean,case,char,const,context,default,% double,enum,exception,fixed,float,in,inout,interface,long,module,% native,Object,octet,oneway,out,raises,readonly,sequence,short,% string,struct,switch,typedef,union,unsigned,void,wchar,wstring,% FALSE,TRUE},% sensitive,% moredirectives={define,elif,else,endif,error,if,ifdef,ifndef,line,% include,pragma,undef,warning},% moredelim=*[directive]\#,% morecomment=[l]//,% morecomment=[s]{/*}{*/},% morestring=[b]"% }[keywords,comments,strings,directives]% %% %% (Objective) Caml definition (c) 1999 Patrick Cousot %% %% Objective CAML and Caml light are freely available, together with a %% reference manual, at URL ftp.inria.fr/lang/caml-light for the Unix, %% Windows and Macintosh OS operating systems. %% \lst@definelanguage[Objective]{Caml}[light]{Caml} {deletekeywords={not,prefix,value,where},% morekeywords={assert,asr,class,closed,constraint,external,false,% functor,include,inherit,land,lazy,lor,lsl,lsr,lxor,method,mod,% module,new,open,parser,private,sig,struct,true,val,virtual,when,% object,ref},% TH }% \lst@definelanguage[light]{Caml} {morekeywords={and,as,begin,do,done,downto,else,end,exception,for,% fun,function,if,in,let,match,mutable,not,of,or,prefix,rec,then,% to,try,type,value,where,while,with},% sensitive,% morecomment=[n]{(*}{*)},% morestring=[b]",% moredelim=*[directive]\#,% moredirectives={open,close,include}% }[keywords,comments,strings,directives]% \lst@definelanguage[ibm]{Cobol}[1985]{Cobol}% {morekeywords={ADDRESS,BEGINNING,COMP-3,COMP-4,COMPUTATIONAL,% COMPUTATIONAL-3,COMPUTATIONAL-4,DISPLAY-1,EGCS,EJECT,ENDING,% ENTRY,GOBACK,ID,MORE-LABELS,NULL,NULLS,PASSWORD,RECORDING,% RETURN-CODE,SERVICE,SKIP1,SKIP2,SKIP3,SORT-CONTROL,SORT-RETURN,% SUPPRESS,TITLE,WHEN-COMPILED},% }% \lst@definelanguage[1985]{Cobol}[1974]{Cobol}% {morekeywords={ALPHABET,ALPHABETIC-LOWER,ALPHABETIC-UPPER,% ALPHANUMERIC,ALPHANUMERIC-EDITED,ANY,CLASS,COMMON,CONTENT,% CONTINUE,DAY-OF-WEEK,END-ADD,END-CALL,END-COMPUTE,END-DELETE,% END-DIVIDE,END-EVALUATE,END-IF,END-MULTIPLY,END-PERFORM,END-READ,% END-RECEIVE,END-RETURN,END-REWRITE,END-SEARCH,END-START,% END-STRING,END-SUBTRACT,END-UNSTRING,END-WRITE,EVALUATE,EXTERNAL,% FALSE,GLOBAL,INITIALIZE,NUMERIC-EDITED,ORDER,OTHER,% PACKED-DECIMAL,PADDING,PURGE,REFERENCE,RELOAD,REPLACE,STANDARD-1,% STANDARD-2,TEST,THEN,TRUE},% }% \lst@definelanguage[1974]{Cobol}% {morekeywords={ACCEPT,ACCESS,ADD,ADVANCING,AFTER,ALL,ALPHABETIC,ALSO,% ALTER,ALTERNATE,AND,ARE,AREA,AREAS,ASCENDING,ASSIGN,AT,AUTHOR,% BEFORE,BINARY,BLANK,BLOCK,BOTTOM,BY,CALL,CANCEL,CD,CF,CH,% CHARACTER,CHARACTERS,CLOCK-UNITS,CLOSE,COBOL,CODE,CODE-SET,% COLLATING,COLUMN,COMMA,COMMUNICATION,COMP,COMPUTE,CONFIGURATION,% CONTAINS,CONTROL,CONTROLS,CONVERTING,COPY,CORR,CORRESPONDING,% COUNT,CURRENCY,DATA,DATE,DATE-COMPILED,DATE-WRITTEN,DAY,DE,% DEBUG-CONTENTS,DEGUB-ITEM,DEBUG-LINE,DEBUG-NAME,DEBUG-SUB1,% DEBUG-SUB2,DEBUG-SUB3,DEBUGGING,DECIMAL-POINT,DECLARATIVES,% DELETE,DELIMITED,DELIMITER,DEPENDING,DESCENDING,DESTINATION,% DETAIL,DISABLE,DISPLAY,DIVIDE,DIVISION,DOWN,DUPLICATES,DYNAMIC,% EGI,ELSE,EMI,ENABLE,END,END-OF-PAGE,ENTER,ENVIRONMENT,EOP,EQUAL,% ERROR,ESI,EVERY,EXCEPTION,EXIT,EXTEND,FD,FILE,FILE-CONTROL,% FILLER,FINAL,FIRST,FOOTING,FOR,FROM,GENERATE,GIVING,GO,GREATER,% GROUP,HEADING,HIGH-VALUE,HIGH-VALUES,I-O,I-O-CONTROL,% IDENTIFICATION,IF,IN,INDEX,INDEXED,INDICATE,INITIAL,INITIATE,% INPUT,INPUT-OUTPUT,INSPECT,INSTALLATION,INTO,INVALID,IS,JUST,% JUSTIFIED,KEY,LABEL,LAST,LEADING,LEFT,LENGTH,LESS,LIMIT,LIMITS,% LINAGE,LINAGE-COUNTER,LINE,LINE-COUNTER,LINES,LINKAGE,LOCK,% LOW-VALUE,LOW-VALUES,MEMORY,MERGE,MESSAGE,MODE,MODULES,MOVE,% MULTIPLE,MULTIPLY,NATIVE,NEGATIVE,NEXT,NO,NOT,NUMBER,NUMERIC,% OBJECT-COMPUTER,OCCURS,OF,OFF,OMITTED,ON,OPEN,OPTIONAL,OR,% ORGANIZATION,OUTPUT,OVERFLOW,PAGE,PAGE-COUNTER,PERFORM,PF,PH,PIC,% PICTURE,PLUS,POINTER,POSITION,PRINTING,POSITIVE,PRINTING,% PROCEDURE,PROCEDURES,PROCEED,PROGRAM,PROGRAM-ID,QUEUE,QUOTE,% QUOTES,RANDOM,RD,READ,RECEIVE,RECORD,RECORDING,RECORDS,REDEFINES,% REEL,REFERENCES,RELATIVE,RELEASE,REMAINDER,REMOVAL,RENAMES,% REPLACING,REPORT,REPORTING,REPORTS,RERUN,RESERVE,RESET,RETURN,% REVERSED,REWIND,REWRITE,RF,RH,RIGHT,ROUNDED,RUN,SAME,SD,SEARCH,% SECTION,SECURITY,SEGMENT,SEGMENT-LIMIT,SELECT,SEND,SENTENCE,% SEPARATE,SEQUENCE,SEQUENTIAL,SET,SIGN,SIZE,SORT,SORT-MERGE,% SOURCE,SOURCE-COMPUTER,SPACE,SPACES,SPECIAL-NAMES,STANDARD,START,% STATUS,STOP,STRING,SUB-QUEUE-1,SUB-QUEUE-2,SUB-QUEUE-3,SUBTRACT,% SUM,SYMBOLIC,SYNC,SYNCHRONIZED,TABLE,TALLYING,TAPE,TERMINAL,% TERMINATE,TEXT,THAN,THROUGH,THRU,TIME,TIMES,TO,TOP,TRAILING,TYPE,% UNIT,UNSTRING,UNTIL,UP,UPON,USAGE,USE,USING,VALUE,VALUES,VARYING,% WHEN,WITH,WORDS,WORKING-STORAGE,WRITE,ZERO,ZEROES,ZEROS},% alsodigit=-,% sensitive=f,% ??? morecomment=[f][commentstyle][6]*,% morestring=[d]"% ??? doubled }[keywords,comments,strings]% \lst@definelanguage{Delphi}% {morekeywords={and,as,asm,array,begin,case,class,const,constructor,% destructor,div,do,downto,else,end,except,exports,file,finally,% for,function,goto,if,implementation,in,inherited,inline,% initialization,interface,is,label,library,mod,nil,not,object,of,% or,packed,procedure,program,property,raise,record,repeat,set,% shl,shr,string,then,to,try,type,unit,until,uses,var,while,with,% xor,% absolute,abstract,assembler,at,cdecl,default,dynamic,export,% external,far,forward,index,name,near,nodefault,on,override,% private,protected,public,published,read,resident,storedDir,% virtual,write},% morendkeywords={Abs,AddExitProc,Addr,AllocMem,AnsiCompareStr,% AnsiCompareText,AnsiLowerCase,AnsiUpperCase,Append,AppendStr,% ArcTan,AssignCrt,Assigned,AssignFile,BlockRead,BlockWrite,Break,% ChangeFileExt,ChDir,Chr,CloseFile,ClrEol,ClrScr,Concat,Continue,% Copy,Cos,CSeg,CursorTo,Date,DateTimeToFileDate,DateTimeToStr,% DateTimeToString,DateToStr,DayOfWeek,Dec,DecodeDate,DecodeTime,% Delete,DeleteFile,DiskFree,DiskSize,Dispose,DisposeStr,% DoneWinCrt,DSeg,EncodeDate,EncodeTime,Eof,Eoln,Erase,Exclude,% Exit,Exp,ExpandFileName,ExtractFileExt,ExtractFileName,% ExtractFilePath,FileAge,FileClose,FileDateToDateTime,FileExists,% FileGetAttr,FileGetDate,FileOpen,FilePos,FileRead,FileSearch,% FileSeek,FileSetAttr,FileSetDate,FileSize,FillChar,FindClose,% FindFirst,FindNext,FloatToDecimal,FloatToStrF,FloatToStr,% FloatToText,FloatToTextFmt,Flush,FmtLoadStr,FmtStr,Format,% FormatBuf,FormatDateTime,FormatFloat,Frac,Free,FreeMem,GetDir,% GetMem,GotoXY,Halt,Hi,High,Inc,Include,InitWinCrt,Insert,Int,% IntToHex,IntToStr,IOResult,IsValidIdent,KeyPressed,Length,Ln,Lo,% LoadStr,Low,LowerCase,MaxAvail,MemAvail,MkDir,Move,New,NewStr,% Now,Odd,Ofs,Ord,ParamCount,ParamStr,Pi,Pos,Pred,Ptr,Random,% Randomize,Read,ReadBuf,ReadKey,Readln,ReAllocMem,Rename,% RenameFile,Reset,Rewrite,RmDir,Round,RunError,ScrollTo,Seek,% SeekEof,SeekEoln,Seg,SetTextBuf,Sin,SizeOf,SPtr,Sqr,Sqrt,SSeg,% Str,StrCat,StrComp,StrCopy,StrDispose,StrECopy,StrEnd,StrFmt,% StrLCat,StrIComp,StrLComp,StrLCopy,StrLen,StrLFmt,StrLIComp,% StrLower,StrMove,StrNew,StrPas,StrPCopy,StrPos,StrScan,StrRScan,% StrToDate,StrToDateTime,StrToFloat,StrToInt,StrToIntDef,% StrToTime,StrUpper,Succ,Swap,TextToFloat,Time,TimeToStr,% TrackCursor,Trunc,Truncate,TypeOf,UpCase,UpperCase,Val,WhereX,% WhereY,Write,WriteBuf,WriteChar,Writeln},% sensitive=f,% morecomment=[s]{(*}{*)},% morecomment=[s]{\{}{\}},% morecomment=[l]{//},% 2001 Christian Gudrian morestring=[d]'% }[keywords,comments,strings]% \lst@definelanguage{Eiffel}% {morekeywords={alias,all,and,as,BIT,BOOLEAN,CHARACTER,check,class,% creation,Current,debug,deferred,do,DOUBLE,else,elseif,end,% ensure,expanded,export,external,false,feature,from,frozen,if,% implies,indexing,infix,inherit,inspect,INTEGER,invariant,is,% like,local,loop,NONE,not,obsolete,old,once,or,POINTER,prefix,% REAL,redefine,rename,require,rescue,Result,retry,select,% separate,STRING,strip,then,true,undefine,unique,until,variant,% when,xor},% sensitive,% morecomment=[l]--,% morestring=[d]",% }[keywords,comments,strings]% %% %% Euphoria definition (c) 1998 Detlef Reimers %% \lst@definelanguage{Euphoria}% {morekeywords={abort,and,and_bits,append,arctan,atom,by,call,% call_proc,call_func,c_proc,c_func,clear_screen,close,% command_line,compare,constant,cos,do,date,else,elsif,end,exit,% find,floor,for,function,getc,getenv,get_key,gets,global,% get_pixel,if,include,integer,length,log,match,machine_func,% machine_proc,mem_copy,mem_set,not,not_bits,or,object,open,% or_bits,procedure,puts,position,prepend,print,printf,power,peek,% poke,pixel,poke4,peek4s,peek4u,return,rand,repeat,remainder,% routine_id,sequence,sqrt,sin,system,sprintf,then,type,to,time,% trace,tan,while,with,without,xor,xor_bits},% sensitive,% morecomment=[l]--,% morestring=[d]',% morestring=[d]"% }[keywords,comments,strings]% %% %% Guarded Command Language (GCL) definition %% (c) 2002 Mark van Eijk %% \lst@definelanguage{GCL}% {morekeywords={const,con,var,array,of,skip,if,fi,do,od,div,mod},% literate={|[}{\ensuremath{|\hskip -0.1em[}}2% {]|}{\ensuremath{]\hskip -0.1em|}}2% {[]}{\ensuremath{[\hskip -0.1em]}}2% {->}{\ensuremath{\rightarrow}~}2% {==}{\ensuremath{\equiv}~}2% {>=}{\ensuremath{\geq}~}2% {<=}{\ensuremath{\leq}~}2% {/\\}{\ensuremath{\land}~}2% {\\/}{\ensuremath{\lor}~}2% {!}{\ensuremath{\lnot}}1% {!=}{\ensuremath{\neq}~}2% {max}{\ensuremath{\uparrow}}1% {min}{\ensuremath{\downarrow}}1,% sensitive=f,% morecomment=[s]{\{}{\}},% morestring=[d]'% }[keywords,comments,strings]% %% %% gnuplot definition (c) Christoph Giess %% \lst@definelanguage{Gnuplot}% {keywords={abs,acos,acosh,arg,asin,asinh,atan,atan2,atanh,besj0,% besj1,besy0,besy1,ceil,cos,cosh,erf,erfc,exp,floor,gamma,ibeta,% inverf,igamma,imag,invnorm,int,lgamma,log,log10,norm,rand,real,% sgn,sin,sinh,sqrt,tan,tanh,column,tm_hour,tm_mday,tm_min,tm_mon,% tm_sec,tm_wday,tm_yday,tm_year,valid,cd,call,clear,exit,fit,% help,if,load,pause,plot,print,pwd,quit,replot,reread,reset,save,% set,show,shell,splot,test,update,angles,arrow,autoscale,border,% boxwidth,clabel,clip,cntrparam,contour,data,dgrid3d,dummy,% format,function,functions,grid,hidden3d,isosamples,key,keytitle,% label,logscale,mapping,offsets,output,parametric,pointsize,% polar,rrange,samples,size,style,surface,terminal,tics,time,% timefmt,title,trange,urange,variables,view,vrange,xdata,xlabel,% xmargin,xrange,xtics,mxtics,mytics,xdtics,xmtics,xzeroaxis,% ydata,ylabel,yrange,ytics,ydtics,ymtics,yzeroaxis,zdata,zero,% zeroaxis,zlabel,zrange,ztics,zdtics,zmtics,timefm,using,title,% with,index,every,thru,smooth},% sensitive,% comment=[l]\#,% morestring=[b]",% morestring=[b]',% }[keywords,comments,strings]% %% %% Haskell98 as implemented in Hugs98. See http://www.haskell.org %% All keywords from Prelude and Standard Libraries %% (c) 1999 Peter Bartke %% \lst@definelanguage{Haskell}% {otherkeywords={=>},% morekeywords={abstype,if,then,else,case,class,data,default,deriving,% hiding,if,in,infix,infixl,infixr,import,instance,let,module,% newtype,of,qualified,type,where,do,AbsoluteSeek,AppendMode,% Array,BlockBuffering,Bool,BufferMode,Char,Complex,Double,Either,% FilePath,Float,Int,Integer,IO,IOError,Ix,LineBuffering,Maybe,% Ordering,NoBuffering,ReadMode,ReadWriteMode,ReadS,RelativeSeek,% SeekFromEnd,SeekMode,ShowS,StdGen,String,Void,Bounded,Enum,Eq,% Eval,ExitCode,exitFailure,exitSuccess,Floating,Fractional,% Functor,Handle,HandlePosn,IOMode,Integral,List,Monad,MonadPlus,% MonadZero,Num,Numeric,Ord,Random,RandomGen,Ratio,Rational,Read,% Real,RealFloat,RealFrac,Show,System,Prelude,EQ,False,GT,Just,% Left,LT,Nothing,Right,WriteMode,True,abs,accum,accumArray,% accumulate,acos,acosh,all,and,any,ap,appendFile,applyM,% approxRational,array,asTypeOf,asin,asinh,assocs,atan,atan2,atanh,% bounds,bracket,bracket_,break,catch,catMaybes,ceiling,chr,cis,% compare,concat,concatMap,conjugate,const,cos,cosh,curry,cycle,% decodeFloat,delete,deleteBy,deleteFirstsBy,denominator,% digitToInt,div,divMod,drop,dropWhile,either,elem,elems,elemIndex,% elemIndices,encodeFloat,enumFrom,enumFromThen,enumFromThenTo,% enumFromTo,error,even,exitFailure,exitWith,exp,exponent,fail,% filter,filterM,find,findIndex,findIndices,flip,floatDigits,% floatRadix,floatRange,floatToDigits,floor,foldl,foldM,foldl1,% foldr,foldr1,fromDouble,fromEnum,fromInt,fromInteger,% fromIntegral,fromJust,fromMaybe,fromRat,fromRational,% fromRealFrac,fst,gcd,genericLength,genericTake,genericDrop,% genericSplitAt,genericIndex,genericReplicate,getArgs,getChar,% getContents,getEnv,getLine,getProgName,getStdGen,getStdRandom,% group,groupBy,guard,hClose,hFileSize,hFlush,hGetBuffering,% hGetChar,hGetContents,hGetLine,hGetPosn,hIsClosed,hIsEOF,hIsOpen,% hIsReadable,hIsSeekable,hIsWritable,hLookAhead,hPutChar,hPutStr,% hPutStrLn,hPrint,hReady,hSeek,hSetBuffering,hSetPosn,head,% hugsIsEOF,hugsHIsEOF,hugsIsSearchErr,hugsIsNameErr,% hugsIsWriteErr,id,ioError,imagPart,index,indices,init,inits,% inRange,insert,insertBy,interact,intersect,intersectBy,% intersperse,intToDigit,ioeGetErrorString,ioeGetFileName,% ioeGetHandle,isAlreadyExistsError,isAlreadyInUseError,isAlpha,% isAlphaNum,isAscii,isControl,isDenormalized,isDoesNotExistError,% isDigit,isEOF,isEOFError,isFullError,isHexDigit,isIEEE,% isIllegalOperation,isInfinite,isJust,isLower,isNaN,% isNegativeZero,isNothing,isOctDigit,isPermissionError,isPrefixOf,% isPrint,isSpace,isSuffixOf,isUpper,isUserError,iterate,ixmap,% join,last,lcm,length,lex,lexDigits,lexLitChar,liftM,liftM2,% liftM3,liftM4,liftM5,lines,listArray,listToMaybe,log,logBase,% lookup,magnitude,makePolar,map,mapAccumL,mapAccumR,mapAndUnzipM,% mapM,mapM_,mapMaybe,max,maxBound,maximum,maximumBy,maybe,% maybeToList,min,minBound,minimum,minimumBy,mkPolar,mkStdGen,% mplus,mod,msum,mzero,negate,next,newStdGen,not,notElem,nub,nubBy,% null,numerator,odd,openFile,or,ord,otherwise,partition,phase,pi,% polar,pred,print,product,properFraction,putChar,putStr,putStrLn,% quot,quotRem,random,randomIO,randomR,randomRIO,randomRs,randoms,% rangeSize,read,readDec,readFile,readFloat,readHex,readInt,readIO,% readList,readLitChar,readLn,readParen,readOct,readSigned,reads,% readsPrec,realPart,realToFrac,recip,rem,repeat,replicate,return,% reverse,round,scaleFloat,scanl,scanl1,scanr,scanr1,seq,sequence,% sequence_,setStdGen,show,showChar,showEFloat,showFFloat,% showFloat,showGFloat,showInt,showList,showLitChar,showParen,% showSigned,showString,shows,showsPrec,significand,signum,sin,% sinh,snd,sort,sortBy,span,split,splitAt,sqrt,stderr,stdin,stdout,% strict,subtract,succ,sum,system,tail,tails,take,takeWhile,tan,% tanh,toEnum,toInt,toInteger,toLower,toRational,toUpper,transpose,% truncate,try,uncurry,undefined,unfoldr,union,unionBy,unless,% unlines,until,unwords,unzip,unzip3,unzip4,unzip5,unzip6,unzip7,% userError,when,words,writeFile,zero,zip,zip3,zip4,zip5,zip6,zip7,% zipWith,zipWithM,zipWithM_,zipWith3,zipWith4,zipWith5,zipWith6,% zipWith7},% sensitive,% morecomment=[l]--,% morecomment=[n]{\{-}{-\}},% morestring=[b]"% }[keywords,comments,strings]% %% %% IDL definition (c) 1998 Juergen Heim %% \lst@definelanguage{IDL}% {morekeywords={and,begin,case,common,do,else,end,endcase,endelse,% endfor,endif,endrep,endwhile,eq,for,function,ge,goto,gt,if,le,lt,% mod,ne,not,of,on_ioerror,or,pro,repeat,return,then,until,while,% xor,on_error,openw,openr,openu,print,printf,printu,plot,read,% readf,readu,writeu,stop},% sensitive=f,% morecomment=[l];,% morestring=[d]'% }[keywords,comments,strings]% %% %% Inform definition (c) 2003 Jonathan Sauer %% \lst@definelanguage{inform}{% % Language keywords morekeywords={breakdo,else,false,for,has,hasnt,if,% in,indirect,jump,notin,nothing,NULL,objectloop,ofclass,% private,property,provides,return,rfalse,rtrue,self,string,% switch,to,true,until,while,with,% creature,held,multiexcept,multiheld,multiinside,noun,number,% scope,topic},% % % Inform functions morekeywords=[2]{box,child,children,font,give,inversion,metaclass,move,% new_line,parent,print,print_ret,read,remove,restore,sibling,% save,spaces,quit,style,bold,underline,reverse,roman remaining,% create,destroy,recreate,copy},% % % Inform definitions morekeywords=[3]{Attribute,Array,Class,Constant,Default,End,Endif,Extend,% Global,Ifdef,Iffalse,Ifndef,Ifnot,Iftrue,Include,Object,% Property,Verb,Release,Serial,Statusline},% % % Library attributes morekeywords=[4]{absent,animate,clothing,concealed,container,door,edible,% enterable,female,general,light,lockable locked,male,moved,% neuter,on,open,openable,pluralname,proper,scenery,scored,% static,supporter,switchable,talkable,transparent,visited,% workflag,worn},% % % Libary properties morekeywords=[5]{n_to,s_to,e_to,w_to,ne_to,nw_to,se_to,sw_to,in_to,% out_to,u_to,d_to,add_to_scope,after,article,articles,before,% cant_go,capacity,daemon,describe,description,door_dir,door_to,% each_turn,found_in,grammar,initial,inside_description,invent,% life,list_together,name number,orders,parse_name,plural,% react_after,react_before,short_name,short_name_indef,time_left,% time_out,when_closed,when_open,when_on,when_off,% with_key}, % % Library routines morekeywords=[6]{Achieved,AfterRoutines,AllowPushDir,Banner,ChangePlayer,% CommonAncestor,DictionaryLookup,GetGNAOfObject,HasLightSource,% IndirectlyContains,IsSeeThrough,Locale,LoopOverScope,LTI_Insert,% MoveFloatingObjects,NextWord,NextWordStopped,NounDomain,% ObjectIsUntouchable OffersLight,ParseToken,PlaceInScope,PlayerTo,% PronounNotice,PronounValue,ScopeWithin,SetPronoun,SetTime,% StartDaemon,StartTimer,StopDaemon,StopTimer,TestScope,TryNumber,% UnsignedCompare,WordAddress,WordInProperty,WordLength,% WriteListFrom,YesOrNo},% % % Library,entry points morekeywords=[7]{AfterLife,AfterPrompt,Amusing,BeforeParsing,ChooseObjects,% DarkToDark,DeathMessage,GamePostRoutine GamePreRoutine,% Initialise,InScope,LookRoutine,NewRoom,ParseNoun,ParseNumber,% ParserError,PrintRank,PrintTaskName,PrintVerb,TimePasses,% UnknownVerb},% % % Library constants morekeywords=[8]{NEWLINE_BIT,INDENT_BIT,FULLINV_BIT,ENGLISH_BIT,RECURSE_BIT,% ALWAYS_BIT,TERSE_BIT,PARTINV_BIT,DEFART_BIT,WORKFLAG_BIT,% ISARE_BIT,CONCEAL_BIT},% % % Library,meta actions morekeywords=[9]{Pronouns,Quit,Restart,Restore,Save,Verify,ScriptOn,ScriptOff,% NotifyOn,NotifyOff,Places,Objects,Score,FullScore,Version,LMode1,% LMode2,Lmode3},% % % Library,main actions morekeywords=[10]{Close,Disrobe,Drop,Eat,Empty,EmptyT,Enter,Examine,Exit,GetOff,% Give,Go,GoIn,Insert,Inv,InvTall,InvWide,Lock,Look,Open,PutOn,Remove,% Search,Show,SwitchOff,SwitchOn,Take,Transfer,Unlock VagueGo,% Wear},% % % Library,stub actions morekeywords=[11]{Answer,Ask,AskFor,Attack,Blow,Burn,Buy,Climb,Consult,Cut,Dig,% Drink,Fill,Jump,JumpOver,Kiss,Listen,LookUnder,Mild,No,Pray,Pull,% Push,PushDir,Rub,Set,SetTo,Sing,Sleep,Smell,,Sleep,Smell,Sorry,% Squeeze,Strong,Swim,Swing,Taste,Tell,Think,ThrowAt,Tie,Touch,Turn,% Wait,Wake,WakeOther,Wave,WaveHands,Yes},% % otherkeywords={->,-->},% sensitive=false,% morestring=[d]{"},% morecomment=[l]{!}% }[keywords,comments,strings]% \lst@definelanguage{Lisp}% {morekeywords={abort,abs,acons,acos,acosh,adjoin,alphanumericp,alter,% append,apply,apropos,aref,arrayp,ash,asin,asinh,assoc,atan,atanh,% atom,bit,boole,boundp,break,butlast,byte,catenate,ceiling,cerror,% char,character,characterp,choose,chunk,cis,close,clrhash,coerce,% collect,commonp,compile,complement,complex,complexp,concatenate,% conjugate,cons,consp,constantp,continue,cos,cosh,cotruncate,% count,delete,denominator,describe,directory,disassemble,% documentation,dpb,dribble,ed,eighth,elt,enclose,endp,eq,eql,% equal,equalp,error,eval,evalhook,evenp,every,exp,expand,export,% expt,fboundp,fceiling,fdefinition,ffloor,fifth,fill,find,first,% float,floatp,floor,fmakunbound,format,fourth,fround,ftruncate,% funcall,functionp,gatherer,gcd,generator,gensym,gentemp,get,getf,% gethash,identity,imagpart,import,inspect,integerp,intern,% intersection,tively,isqrt,keywordp,last,latch,lcm,ldb,ldiff,% length,list,listen,listp,load,log,logand,logbitp,logcount,logeqv,% logior,lognand,lognor,lognot,logtest,logxor,macroexpand,% makunbound,map,mapc,mapcan,mapcar,mapcon,maphash,mapl,maplist,% mask,max,member,merge,min,mingle,minusp,mismatch,mod,namestring,% nbutlast,nconc,nintersection,ninth,not,notany,notevery,nreconc,% nreverse,nsublis,nsubst,nth,nthcdr,null,numberp,numerator,nunion,% oddp,open,packagep,pairlis,pathname,pathnamep,phase,plusp,% position,positions,pprint,previous,princ,print,proclaim,provide,% random,rassoc,rational,rationalize,rationalp,read,readtablep,% realp,realpart,reduce,rem,remhash,remove,remprop,replace,require,% rest,revappend,reverse,room,round,rplaca,rplacd,sbit,scan,schar,% search,second,series,set,seventh,shadow,signal,signum,sin,sinh,% sixth,sleep,some,sort,split,sqrt,streamp,string,stringp,sublis,% subseq,subseries,subsetp,subst,substitute,subtypep,svref,sxhash,% symbolp,tailp,tan,tanh,tenth,terpri,third,truename,truncate,% typep,unexport,unintern,union,until,values,vector,vectorp,warn,% write,zerop,and,assert,case,ccase,cond,ctypecase,decf,declaim,% defclass,defconstant,defgeneric,defmacro,defmethod,defpackage,% defparameter,defsetf,defstruct,deftype,defun,defvar,do,dolist,% dotimes,ecase,encapsulated,etypecase,flet,formatter,gathering,% incf,iterate,labels,let,locally,loop,macrolet,mapping,or,pop,% producing,prog,psetf,psetq,push,pushnew,remf,return,rotatef,% setf,shiftf,step,time,trace,typecase,unless,untrace,when},% sensitive,% ??? alsodigit=-,% morecomment=[l];,% morecomment=[s]{\#|}{|\#},% 1997 Aslak Raanes morestring=[b]"% }[keywords,comments,strings]% %% %% AutoLISP/VisualLISP - Stefan Lagotzki, info@lagotzki.de %% \lst@definelanguage[Auto]{Lisp}% {morekeywords={abs,acad_colordlg,acad_helpdlg,acad_strlsort,% action_tile,add_list,alert,alloc,and,angle,angtof,angtos,append,% apply,arx,arxload,arxunload,ascii,assoc,atan,atof,atoi,atom,% atoms-family,autoarxload,autoload,Boole,boundp,caddr,cadr,car,% cdr,chr,client_data_tile,close,command,cond,cons,cos,cvunit,% defun,defun-q,defun-q-list-ref,defun-q-list-set,dictadd,dictnext,% dictremove,dictrename,dictsearch,dimx_tile,dimy_tile,distance,% distof,done_dialog,end_image,end_list,entdel,entget,entlast,% entmake,entmakex,entmod,entnext,entsel,entupd,eq,equal,*error*,% eval,exit,exp,expand,expt,fill_image,findfile,fix,float,foreach,% function,gc,gcd,get_attr,get_tile,getangle,getcfg,getcname,% getcorner,getdist,getenv,getfiled,getint,getkword,getorient,% getpoint,getreal,getstring,getvar,graphscr,grclear,grdraw,grread,% grtext,grvecs,handent,help,if,initdia,initget,inters,itoa,lambda,% last,layoutlist,length,list,listp,load,load_dialog,log,logand,% logior,lsh,mapcar,max,mem,member,menucmd,menugroup,min,minusp,% mode_tile,namedobjdict,nentsel,nentselp,new_dialog,not,nth,% null,numberp,open,or,osnap,polar,prin1,princ,print,progn,prompt,% quit,quote,read,read-char,read-line,redraw,regapp,rem,repeat,% reverse,rtos,set,set_tile,setcfg,setenv,setfunhelp,setq,% setvar,setview,sin,slide_image,snvalid,sqrt,ssadd,ssdel,ssget,% ssgetfirst,sslength,ssmemb,ssname,ssnamex,sssetfirst,startapp,% start_dialog,start_image,start_list,strcase,strcat,strlen,subst,% substr,tablet,tblnext,tblobjname,tblsearch,term_dialog,terpri,% textbox,textpage,textscr,trace,trans,type,unload_dialog,untrace,% vector_image,ver,vl-acad-defun,vl-acad-undefun,vl-arx-import,% vl-bb-ref,vl-bb-set,vl-catch-all-apply,% vl-catch-all-error-message,vl-catch-all-error-p,vl-cmdf,vl-consp,% vl-directory-files,vl-doc-export,vl-doc-import,vl-doc-ref,% vl-doc-set,vl-every,vl-exit-with-error,vl-exit-with-value,% vl-file-copy,vl-file-delete,vl-file-directory-p,vl-file-rename,% vl-file-size,vl-file-systime,vl-filename-base,% vl-filename-directory,vl-filename-extension,vl-filename-mktemp,% vl-get-resource,vl-list*,vl-list->string,% vl-list-exported-functions,vl-list-length,vl-list-loaded-vlx,% vl-load-all,vl-load-com,vl-load-reactors,vl-member-if,% vl-member-if-not,vl-position,vl-prin1-to-string,% vl-princ-to-string,vl-propagate,vl-registry-delete,% vl-registry-descendents,vl-registry-read,vl-registry-write,% vl-remove,vl-remove-if,vl-remove-if-not,vl-some,vl-sort,% vl-sort-i,vl-string->list,vl-string-elt,vl-string-left-trim,% vl-string-mismatch,vl-string-position,vl-string-right-trim,% vl-string-search,vl-string-subst,vl-string-translate,% vl-string-trim,vl-symbol-name,vl-symbol-value,vl-symbolp,% vl-unload-vlx,vl-vbaload,vl-vbarun,vl-vlx-loaded-p,vlax-3D-point,% vlax-add-cmd,vlax-create-object,vlax-curve-getArea,% vlax-curve-getDistAtParam,vlax-curve-getDistAtPoint,% vlax-curve-getEndParam,vlax-curve-getEndPoint,% vlax-curve-getParamAtDist,vlax-curve-getParamAtPoint,% vlax-curve-getPointAtDist,vlax-curve-getPointAtParam,% vlax-curve-getStartParam,vlax-curve-getStartPoint,% vlax-curve-isClosed,vlax-curve-isPeriodic,vlax-curve-isPlanar,% vlax-curve-getClosestPointTo,% vlax-curve-getClosestPointToProjection,vlax-curve-getFirstDeriv,% vlax-curve-getSecondDeriv,vlax-dump-object,% vlax-ename->vla-object,vlax-erased-p,vlax-for,% vlax-get-acad-object,vlax-get-object,vlax-get-or-create-object,% vlax-get-property,vlax-import-type-library,vlax-invoke-method,% vlax-ldata-delete,vlax-ldata-get,vlax-ldata-list,vlax-ldata-put,% vlax-ldata-test,vlax-make-safearray,vlax-make-variant,% vlax-map-collection,vlax-method-applicable-p,% vlax-object-released-p,vlax-product-key,% vlax-property-available-p,vlax-put-property,vlax-read-enabled-p,% vlax-release-object,vlax-remove-cmd,vlax-safearray-fill,% vlax-safearray-get-dim,vlax-safearray-get-element,% vlax-safearray-get-l-bound,vlax-safearray-get-u-bound,% vlax-safearray-put-element,vlax-safearray-type,% vlax-safearray->list,vlax-tmatrix,vlax-typeinfo-available-p,% vlax-variant-change-type,vlax-variant-type,vlax-variant-value,% vlax-vla-object->ename,vlax-write-enabled-p,vlisp-compile,% vlr-acdb-reactor,vlr-add,vlr-added-p,vlr-beep-reaction,% vlr-command-reactor,vlr-current-reaction-name,vlr-data,% vlr-data-set,vlr-deepclone-reactor,vlr-docmanager-reactor,% vlr-dwg-reactor,vlr-dxf-reactor,vlr-editor-reactor,% vlr-insert-reactor,vlr-linker-reactor,vlr-lisp-reactor,% vlr-miscellaneous-reactor,vlr-mouse-reactor,vlr-notification,% vlr-object-reactor,vlr-owner-add,vlr-owner-remove,vlr-owners,% vlr-pers,vlr-pers-list,vlr-pers-p,vlr-pers-release,% vlr-reaction-names,vlr-reaction-set,vlr-reactions,vlr-reactors,% vlr-remove,vlr-remove-all,vlr-set-notification,% vlr-sysvar-reactor,vlr-toolbar-reactor,vlr-trace-reaction,% vlr-type,vlr-types,vlr-undo-reactor,vlr-wblock-reactor,% vlr-window-reactor,vlr-xref-reactor,vports,wcmatch,while,% write-char,write-line,xdroom,xdsize,zerop},% alsodigit=->,% otherkeywords={1+,1-},% sensitive=false,% morecomment=[l];,% morecomment=[l];;,% morestring=[b]"% }[keywords,comments,strings]% %% %% Make definitions (c) 2000 Rolf Niepraschk %% \lst@definelanguage[gnu]{make}% {morekeywords={SHELL,MAKE,MAKEFLAGS,$@,$\%,$<,$?,$^,$+,$*,% @,^,<,\%,+,?,*,% Markus Pahlow export,unexport,include,override,define,ifdef,ifneq,ifeq,else,% endif,vpath,subst,patsubst,strip,findstring,filter,filter-out,% sort,dir,notdir,suffix,basename,addsuffix,addprefix,join,word,% words,firstword,wildcard,shell,origin,foreach,% @D,@F,*D,*F,\%D,\%F,,-->,--->,:-,==,=>,<=,<=>},% morekeywords={module,include_module,import_module,interface,% end_module,implementation,mode,is,failure,semidet,nondet,det,% multi,erroneous,inst,in,out,di,uo,ui,type,typeclass,instance,% where,with_type,pred,func,lambda,impure,semipure,if,then,else,% some,all,not,true,fail,pragma,memo,no_inline,inline,loop_check,% minimal_model,fact_table,type_spec,terminates,does_not_terminate,% check_termination,promise_only_solution,unsafe_promise_unique,% source_file,obsolete,import,export,c_header_code,c_code,% foreign_code,foreign_proc,may_call_mercury,will_not_call_mercury,% thread_safe,not_thread_safe},% sensitive=t,% morecomment=[l]\%,% morecomment=[s]{/*}{*/},% morestring=[bd]",% morestring=[bd]'% }[keywords,comments,strings]% %% %% Miranda definition (c) 1998 Peter Bartke %% %% Miranda: pure lazy functional language with polymorphic type system, %% garbage collection and functions as first class citizens %% \lst@definelanguage{Miranda}% {morekeywords={abstype,div,if,mod,otherwise,readvals,show,type,where,% with,bool,char,num,sys_message,False,True,Appendfile,Closefile,% Exit,Stderr,Stdout,System,Tofile,\%include,\%export,\%free,% \%insert,abs,and,arctan,cjustify,code,concat,const,converse,cos,% decode,digit,drop,dropwhile,entier,error,exp,filemode,filter,% foldl,foldl1,foldr,foldr1,force,fst,getenv,hd,hugenum,id,index,% init,integer,iterate,last,lay,layn,letter,limit,lines,ljustify,% log,log10,map,map2,max,max2,member,merge,min,min2,mkset,neg,% numval,or,pi,postfix,product,read,rep,repeat,reverse,rjustify,% scan,seq,showfloat,shownum,showscaled,sin,snd,sort,spaces,sqrt,% subtract,sum,system,take,takewhile,tinynum,tl,transpose,undef,% until,zip2,zip3,zip4,zip5,zip6,zip},% sensitive,% morecomment=[l]||,% morestring=[b]"% }[keywords,comments,strings]% %% %% ML definition (c) 1999 Torben Hoffmann %% \lst@definelanguage{ML}% {morekeywords={abstype,and,andalso,as,case,do,datatype,else,end,% eqtype,exception,fn,fun,functor,handle,if,in,include,infix,% infixr,let,local,nonfix,of,op,open,orelse,raise,rec,sharing,sig,% signature,struct,structure,then,type,val,with,withtype,while},% sensitive,% morecomment=[n]{(*}{*)},% morestring=[d]"% }[keywords,comments,strings]% %% %% Oz definition (c) Andres Becerra Sandoval %% \lst@definelanguage{Oz}% {morekeywords={andthen,at,attr,case,catch,choice,class,% cond,declare,define,dis,div,else,elsecase,% elseif,end,export,fail,false,feat,finally,% from,fun,functor,if,import,in,local,% lock,meth,mod,not,of,or,orelse,% prepare,proc,prop,raise,require,self,skip,% then,thread,true,try,unit},% sensitive=true,% morecomment=[l]{\%},% morecomment=[s]{/*}{*/},% morestring=[b]",% morestring=[d]'% }[keywords,comments,strings]% %% %% PHP definition by Luca Balzerani %% \lst@definelanguage{PHP}% {morekeywords={% %--- core language ,::,break,case,continue,default,do,else,% elseif,for,foreach,if,include,require,phpinfo,% switch,while,false,FALSE,true,TRUE,% %--- apache functions apache_lookup_uri,apache_note,ascii2ebcdic,ebcdic2ascii,% virtual,apache_child_terminate,apache_setenv,% %--- array functions array,array_change_key_case,array_chunk,array_count_values,% array_filter,array_flip,array_fill,array_intersect,% array_keys,array_map,array_merge,array_merge_recursive,% array_pad,array_pop,array_push,array_rand,array_reverse,% array_shift,array_slice,array_splice,array_sum,array_unique,% array_values,array_walk,arsort,asort,compact,count,current,each,% extract,in_array,array_search,key,krsort,ksort,list,natsort,% next,pos,prev,range,reset,rsort,shuffle,sizeof,sort,uasort,% usort,% %--- aspell functions aspell_new,aspell_check,aspell_check_raw,aspell_suggest,% %--- bc functions bcadd,bccomp,bcdiv,bcmod,bcmul,bcpow,bcscale,bcsqrt,bcsub,% %--- bzip2 functions bzclose,bzcompress,bzdecompress,bzerrno,bzerror,bzerrstr,% bzopen,bzread,bzwrite,% %--- calendar functions JDToGregorian,GregorianToJD,JDToJulian,JulianToJD,JDToJewish,% JDToFrench,FrenchToJD,JDMonthName,JDDayOfWeek,easter_date,% unixtojd,jdtounix,cal_days_in_month,cal_to_jd,cal_from_jd,% %--- ccvs functions ccvs_init,ccvs_done,ccvs_new,ccvs_add,ccvs_delete,ccvs_auth,% ccvs_reverse,ccvs_sale,ccvs_void,ccvs_status,ccvs_count,% ccvs_report,ccvs_command,ccvs_textvalue,% %--- classobj functions call_user_method,call_user_method_array,class_exists,get_class,% get_class_vars,get_declared_classes,get_object_vars,% is_a,is_subclass_of,method_exists,% %--- com functions COM,VARIANT,com_load,com_invoke,com_propget,com_get,com_propput,% com_set,com_addref,com_release,com_isenum,com_load_typelib,% %--- cpdf functions cpdf_add_annotation,cpdf_add_outline,cpdf_arc,cpdf_begin_text,% cpdf_clip,cpdf_close,cpdf_closepath,cpdf_closepath_fill_stroke,% cpdf_continue_text,cpdf_curveto,cpdf_end_text,cpdf_fill,% cpdf_finalize,cpdf_finalize_page,% cpdf_import_jpeg,cpdf_lineto,cpdf_moveto,cpdf_newpath,cpdf_open,% cpdf_page_init,cpdf_place_inline_image,cpdf_rect,cpdf_restore,% cpdf_rmoveto,cpdf_rotate,cpdf_rotate_text,cpdf_save,% cpdf_scale,cpdf_set_char_spacing,cpdf_set_creator,% cpdf_set_font,cpdf_set_horiz_scaling,cpdf_set_keywords,% cpdf_set_page_animation,cpdf_set_subject,cpdf_set_text_matrix,% cpdf_set_text_rendering,cpdf_set_text_rise,cpdf_set_title,% cpdf_setdash,cpdf_setflat,cpdf_setgray,cpdf_setgray_fill,% cpdf_setlinecap,cpdf_setlinejoin,cpdf_setlinewidth,% cpdf_setrgbcolor,cpdf_setrgbcolor_fill,cpdf_setrgbcolor_stroke,% cpdf_show_xy,cpdf_stringwidth,cpdf_set_font_directories,% cpdf_set_viewer_preferences,cpdf_stroke,cpdf_text,% cpdf_set_action_url,% %--- crack functions crack_opendict,crack_closedict,crack_check,crack_getlastmessage,% %--- ctype functions ctype_alnum,ctype_alpha,ctype_cntrl,ctype_digit,ctype_lower,% ctype_print,ctype_punct,ctype_space,ctype_upper,ctype_xdigit,% %--- curl functions curl_init,curl_setopt,curl_exec,curl_close,curl_version,% curl_error,curl_getinfo,% %--- cybercash functions cybercash_encr,cybercash_decr,cybercash_base64_encode,% %--- cybermut functions cybermut_creerformulairecm,cybermut_testmac,% %--- cyrus functions cyrus_connect,cyrus_authenticate,cyrus_bind,cyrus_unbind,% cyrus_close,% %--- datetime functions checkdate,date,getdate,gettimeofday,gmdate,gmmktime,gmstrftime,% microtime,mktime,strftime,time,strtotime,% %--- dbase functions dbase_create,dbase_open,dbase_close,dbase_pack,dbase_add_record,% dbase_delete_record,dbase_get_record,% dbase_numfields,dbase_numrecords,% %--- dba functions dba_close,dba_delete,dba_exists,dba_fetch,dba_firstkey,% dba_nextkey,dba_popen,dba_open,dba_optimize,dba_replace,% %--- dbm functions dbmopen,dbmclose,dbmexists,dbmfetch,dbminsert,dbmreplace,% dbmfirstkey,dbmnextkey,dblist,% %--- dbx functions dbx_close,dbx_connect,dbx_error,dbx_query,dbx_sort,dbx_compare,% %--- dio functions dio_open,dio_read,dio_write,dio_truncate,dio_stat,dio_seek,% dio_close,% %--- dir functions chroot,chdir,dir,closedir,getcwd,opendir,readdir,rewinddir,% %--- dotnet functions dotnet_load,% %--- errorfunc functions error_log,error_reporting,restore_error_handler,% trigger_error,user_error,% %--- exec functions escapeshellarg,escapeshellcmd,exec,passthru,system,shell_exec,% %--- fbsql functions fbsql_affected_rows,fbsql_autocommit,fbsql_change_user,% fbsql_commit,fbsql_connect,fbsql_create_db,fbsql_create_blob,% fbsql_database_password,fbsql_data_seek,fbsql_db_query,% fbsql_drop_db,fbsql_errno,fbsql_error,fbsql_fetch_array,% fbsql_fetch_field,fbsql_fetch_lengths,fbsql_fetch_object,% fbsql_field_flags,fbsql_field_name,fbsql_field_len,% fbsql_field_table,fbsql_field_type,fbsql_free_result,% fbsql_list_dbs,fbsql_list_fields,fbsql_list_tables,% fbsql_num_fields,fbsql_num_rows,fbsql_pconnect,fbsql_query,% fbsql_read_clob,fbsql_result,fbsql_rollback,fbsql_set_lob_mode,% fbsql_start_db,fbsql_stop_db,fbsql_tablename,fbsql_warnings,% fbsql_get_autostart_info,fbsql_hostname,fbsql_password,% fbsql_username,% %--- fdf functions fdf_open,fdf_close,fdf_create,fdf_save,fdf_get_value,% fdf_next_field_name,fdf_set_ap,fdf_set_status,fdf_get_status,% fdf_get_file,fdf_set_flags,fdf_set_opt,% fdf_set_javascript_action,fdf_set_encoding,fdf_add_template,% %--- filepro functions filepro,filepro_fieldname,filepro_fieldtype,filepro_fieldwidth,% filepro_fieldcount,filepro_rowcount,% %--- filesystem functions basename,chgrp,chmod,chown,clearstatcache,copy,delete,dirname,% diskfreespace,disk_total_space,fclose,feof,fflush,fgetc,fgetcsv,% fgetss,file_get_contents,file,file_exists,fileatime,filectime,% fileinode,filemtime,fileowner,fileperms,filesize,filetype,flock,% fopen,fpassthru,fputs,fread,fscanf,fseek,fstat,ftell,ftruncate,% set_file_buffer,is_dir,is_executable,is_file,is_link,% is_writable,is_writeable,is_uploaded_file,link,linkinfo,mkdir,% parse_ini_file,pathinfo,pclose,popen,readfile,readlink,rename,% rmdir,stat,lstat,realpath,symlink,tempnam,tmpfile,touch,umask,% %--- fribidi functions fribidi_log2vis,% %--- ftp functions ftp_connect,ftp_login,ftp_pwd,ftp_cdup,ftp_chdir,ftp_mkdir,% ftp_nlist,ftp_rawlist,ftp_systype,ftp_pasv,ftp_get,ftp_fget,% ftp_fput,ftp_size,ftp_mdtm,ftp_rename,ftp_delete,ftp_site,% ftp_quit,ftp_exec,ftp_set_option,ftp_get_option,% %--- funchand functions call_user_func_array,call_user_func,create_function,% func_get_args,func_num_args,function_exists,% register_shutdown_function,register_tick_function,% %--- gettext functions bindtextdomain,bind_textdomain_codeset,dcgettext,dcngettext,% dngettext,gettext,ngettext,textdomain,% %--- gmp functions gmp_init,gmp_intval,gmp_strval,gmp_add,gmp_sub,gmp_mul,% gmp_div_r,gmp_div_qr,gmp_div,gmp_mod,gmp_divexact,gmp_cmp,% gmp_com,gmp_abs,gmp_sign,gmp_fact,gmp_sqrt,gmp_sqrtrm,% gmp_pow,gmp_powm,gmp_prob_prime,gmp_gcd,gmp_gcdext,gmp_invert,% gmp_jacobi,gmp_random,gmp_and,gmp_or,gmp_xor,gmp_setbit,% gmp_scan0,gmp_scan1,gmp_popcount,gmp_hamdist,% %--- http functions header,headers_sent,setcookie,% %--- hw functions hw_Array2Objrec,hw_Children,hw_ChildrenObj,hw_Close,hw_Connect,% hw_Deleteobject,hw_DocByAnchor,hw_DocByAnchorObj,% hw_Document_BodyTag,hw_Document_Content,hw_Document_SetContent,% hw_ErrorMsg,hw_EditText,hw_Error,hw_Free_Document,hw_GetParents,% hw_GetChildColl,hw_GetChildCollObj,hw_GetRemote,% hw_GetSrcByDestObj,hw_GetObject,hw_GetAndLock,hw_GetText,% hw_GetObjectByQueryObj,hw_GetObjectByQueryColl,% hw_GetChildDocColl,hw_GetChildDocCollObj,hw_GetAnchors,% hw_Mv,hw_Identify,hw_InCollections,hw_Info,hw_InsColl,hw_InsDoc,% hw_InsertObject,hw_mapid,hw_Modifyobject,hw_New_Document,% hw_Output_Document,hw_pConnect,hw_PipeDocument,hw_Root,% hw_Who,hw_getusername,hw_stat,hw_setlinkroot,hw_connection_info,% hw_insertanchors,hw_getrellink,hw_changeobject,% %--- ibase functions ibase_connect,ibase_pconnect,ibase_close,ibase_query,% ibase_fetch_row,ibase_fetch_object,ibase_field_info,% ibase_free_result,ibase_prepare,ibase_execute,ibase_trans,% ibase_rollback,ibase_timefmt,ibase_num_fields,ibase_blob_add,% ibase_blob_close,ibase_blob_create,ibase_blob_echo,% ibase_blob_import,ibase_blob_info,ibase_blob_open,% %--- icap functions icap_open,icap_close,icap_fetch_event,icap_list_events,% icap_delete_event,icap_snooze,icap_list_alarms,% icap_rename_calendar,icap_delete_calendar,icap_reopen,% %--- iconv functions iconv,iconv_get_encoding,iconv_set_encoding,ob_iconv_handler,% %--- ifx functions ifx_connect,ifx_pconnect,ifx_close,ifx_query,ifx_prepare,ifx_do,% ifx_errormsg,ifx_affected_rows,ifx_getsqlca,ifx_fetch_row,% ifx_fieldtypes,ifx_fieldproperties,ifx_num_fields,ifx_num_rows,% ifx_create_char,ifx_free_char,ifx_update_char,ifx_get_char,% ifx_copy_blob,ifx_free_blob,ifx_get_blob,ifx_update_blob,% ifx_textasvarchar,ifx_byteasvarchar,ifx_nullformat,% ifxus_free_slob,ifxus_close_slob,ifxus_open_slob,% ifxus_seek_slob,ifxus_read_slob,ifxus_write_slob,% %--- iisfunc functions iis_get_server_by_path,iis_get_server_by_comment,iis_add_server,% iis_set_dir_security,iis_get_dir_security,iis_set_server_rights,% iis_set_script_map,iis_get_script_map,iis_set_app_settings,% iis_stop_server,iis_stop_service,iis_start_service,% %--- image functions exif_imagetype,exif_read_data,exif_thumbnail,getimagesize,% imagealphablending,imagearc,imagefilledarc,imageellipse,% imagechar,imagecharup,imagecolorallocate,imagecolordeallocate,% imagecolorclosest,imagecolorclosestalpha,imagecolorclosestthwb,% imagecolorexactalpha,imagecolorresolve,imagecolorresolvealpha,% imagecolorset,imagecolorsforindex,imagecolorstotal,% imagecopy,imagecopymerge,imagecopymergegray,imagecopyresized,% imagecreate,imagecreatetruecolor,imagetruecolortopalette,% imagecreatefromgd2,imagecreatefromgd2part,imagecreatefromgif,% imagecreatefrompng,imagecreatefromwbmp,imagecreatefromstring,% imagecreatefromxpm,imagedashedline,imagedestroy,imagefill,% imagefilledrectangle,imagefilltoborder,imagefontheight,% imagegd,imagegd2,imagegif,imagepng,imagejpeg,imagewbmp,% imageline,imageloadfont,imagepalettecopy,imagepolygon,% imagepsencodefont,imagepsfreefont,imagepsloadfont,% imagepsslantfont,imagepstext,imagerectangle,imagesetpixel,% imagesetstyle,imagesettile,imagesetthickness,imagestring,% imagesx,imagesy,imagettfbbox,imageftbbox,imagettftext,% imagetypes,jpeg2wbmp,png2wbmp,iptcembed,read_exif_data,% %--- imap functions imap_8bit,imap_alerts,imap_append,imap_base64,imap_binary,% imap_bodystruct,imap_check,imap_clearflag_full,imap_close,% imap_delete,imap_deletemailbox,imap_errors,imap_expunge,% imap_fetchbody,imap_fetchheader,imap_fetchstructure,% imap_getmailboxes,imap_getsubscribed,imap_header,% imap_headers,imap_last_error,imap_listmailbox,% imap_mail,imap_mail_compose,imap_mail_copy,imap_mail_move,% imap_mime_header_decode,imap_msgno,imap_num_msg,imap_num_recent,% imap_ping,imap_popen,imap_qprint,imap_renamemailbox,imap_reopen,% imap_rfc822_parse_headers,imap_rfc822_write_address,% imap_search,imap_setacl,imap_set_quota,imap_setflag_full,% imap_status,imap_subscribe,imap_uid,imap_undelete,% imap_utf7_decode,imap_utf7_encode,imap_utf8,imap_thread,% %--- info functions assert,assert_options,extension_loaded,dl,getenv,get_cfg_var,% get_defined_constants,get_extension_funcs,getmygid,% get_loaded_extensions,get_magic_quotes_gpc,% getlastmod,getmyinode,getmypid,getmyuid,get_required_files,% ini_alter,ini_get,ini_get_all,ini_restore,ini_set,phpcredits,% phpversion,php_logo_guid,php_sapi_name,php_uname,putenv,% set_time_limit,version_compare,zend_logo_guid,zend_version,% %--- ircg functions ircg_pconnect,ircg_fetch_error_msg,ircg_set_current,ircg_join,% ircg_msg,ircg_notice,ircg_nick,ircg_topic,ircg_channel_mode,% ircg_whois,ircg_kick,ircg_ignore_add,ircg_ignore_del,% ircg_is_conn_alive,ircg_lookup_format_messages,% ircg_set_on_die,ircg_set_file,ircg_get_username,% ircg_nickname_unescape,% %--- java functions java_last_exception_clear,java_last_exception_get,% %--- ldap functions ldap_add,ldap_bind,ldap_close,ldap_compare,ldap_connect,% ldap_delete,ldap_dn2ufn,ldap_err2str,ldap_errno,ldap_error,% ldap_first_attribute,ldap_first_entry,ldap_free_result,% ldap_get_dn,ldap_get_entries,ldap_get_option,ldap_get_values,% ldap_list,ldap_modify,ldap_mod_add,ldap_mod_del,% ldap_next_attribute,ldap_next_entry,ldap_read,ldap_rename,% ldap_set_option,ldap_unbind,ldap_8859_to_t61,% ldap_next_reference,ldap_parse_reference,ldap_parse_result,% ldap_sort,ldap_start_tls,ldap_t61_to_8859,% %--- mail functions mail,ezmlm_hash,% %--- math functions abs,acos,acosh,asin,asinh,atan,atanh,atan2,base_convert,bindec,% cos,cosh,decbin,dechex,decoct,deg2rad,exp,expm1,floor,% hexdec,hypot,is_finite,is_infinite,is_nan,lcg_value,log,log10,% max,min,mt_rand,mt_srand,mt_getrandmax,number_format,octdec,pi,% rad2deg,rand,round,sin,sinh,sqrt,srand,tan,tanh,% %--- mbstring functions mb_language,mb_parse_str,mb_internal_encoding,mb_http_input,% mb_detect_order,mb_substitute_character,mb_output_handler,% mb_strlen,mb_strpos,mb_strrpos,mb_substr,mb_strcut,mb_strwidth,% mb_convert_encoding,mb_detect_encoding,mb_convert_kana,% mb_decode_mimeheader,mb_convert_variables,% mb_decode_numericentity,mb_send_mail,mb_get_info,% mb_ereg,mb_eregi,mb_ereg_replace,mb_eregi_replace,mb_split,% mb_ereg_search,mb_ereg_search_pos,mb_ereg_search_regs,% mb_ereg_search_getregs,mb_ereg_search_getpos,% %--- mcal functions mcal_open,mcal_popen,mcal_reopen,mcal_close,% mcal_rename_calendar,mcal_delete_calendar,mcal_fetch_event,% mcal_append_event,mcal_store_event,mcal_delete_event,% mcal_list_alarms,mcal_event_init,mcal_event_set_category,% mcal_event_set_description,mcal_event_set_start,% mcal_event_set_alarm,mcal_event_set_class,mcal_is_leap_year,% mcal_date_valid,mcal_time_valid,mcal_day_of_week,% mcal_date_compare,mcal_next_recurrence,% mcal_event_set_recur_daily,mcal_event_set_recur_weekly,% mcal_event_set_recur_monthly_wday,mcal_event_set_recur_yearly,% mcal_event_add_attribute,mcal_expunge,mcal_week_of_year,% %--- mcrypt functions mcrypt_get_cipher_name,mcrypt_get_block_size,% mcrypt_create_iv,mcrypt_cbc,mcrypt_cfb,mcrypt_ecb,mcrypt_ofb,% mcrypt_list_modes,mcrypt_get_iv_size,mcrypt_encrypt,% mcrypt_module_open,mcrypt_module_close,mcrypt_generic_deinit,% mcrypt_generic,mdecrypt_generic,mcrypt_generic_end,% mcrypt_enc_is_block_algorithm_mode,% mcrypt_enc_is_block_mode,mcrypt_enc_get_block_size,% mcrypt_enc_get_supported_key_sizes,mcrypt_enc_get_iv_size,% mcrypt_enc_get_modes_name,mcrypt_module_self_test,% mcrypt_module_is_block_algorithm,mcrypt_module_is_block_mode,% mcrypt_module_get_algo_key_size,% %--- mhash functions mhash_get_hash_name,mhash_get_block_size,mhash_count,mhash,% %--- misc functions connection_aborted,connection_status,connection_timeout,% define,defined,die,eval,exit,get_browser,highlight_file,% ignore_user_abort,iptcparse,leak,pack,show_source,sleep,uniqid,% usleep,% %--- mnogosearch functions udm_add_search_limit,udm_alloc_agent,udm_api_version,% udm_cat_list,udm_clear_search_limits,udm_errno,udm_error,% udm_free_agent,udm_free_ispell_data,udm_free_res,% udm_get_res_field,udm_get_res_param,udm_load_ispell_data,% udm_check_charset,udm_check_stored,udm_close_stored,udm_crc32,% %--- msession functions msession_connect,msession_disconnect,msession_count,% msession_destroy,msession_lock,msession_unlock,msession_set,% msession_uniq,msession_randstr,msession_find,msession_list,% msession_set_array,msession_listvar,msession_timeout,% msession_getdata,msession_setdata,msession_plugin,% %--- msql functions msql,msql_affected_rows,msql_close,msql_connect,msql_create_db,% msql_data_seek,msql_dbname,msql_drop_db,msql_dropdb,msql_error,% msql_fetch_field,msql_fetch_object,msql_fetch_row,% msql_field_seek,msql_fieldtable,msql_fieldtype,msql_fieldflags,% msql_free_result,msql_freeresult,msql_list_fields,% msql_list_dbs,msql_listdbs,msql_list_tables,msql_listtables,% msql_num_rows,msql_numfields,msql_numrows,msql_pconnect,% msql_regcase,msql_result,msql_select_db,msql_selectdb,% %--- mssql functions mssql_close,mssql_connect,mssql_data_seek,mssql_fetch_array,% mssql_fetch_object,mssql_fetch_row,mssql_field_length,% mssql_field_seek,mssql_field_type,mssql_free_result,% mssql_min_error_severity,mssql_min_message_severity,% mssql_num_fields,mssql_num_rows,mssql_pconnect,mssql_query,% mssql_select_db,mssql_bind,mssql_execute,mssql_fetch_assoc,% mssql_guid_string,mssql_init,mssql_rows_affected,% %--- muscat functions muscat_setup,muscat_setup_net,muscat_give,muscat_get,% %--- mysql functions mysql_affected_rows,mysql_change_user,mysql_character_set_name,% mysql_connect,mysql_create_db,mysql_data_seek,mysql_db_name,% mysql_drop_db,mysql_errno,mysql_error,mysql_escape_string,% mysql_fetch_assoc,mysql_fetch_field,mysql_fetch_lengths,% mysql_fetch_row,mysql_field_flags,mysql_field_name,% mysql_field_seek,mysql_field_table,mysql_field_type,% mysql_info,mysql_insert_id,mysql_list_dbs,mysql_list_fields,% mysql_list_tables,mysql_num_fields,mysql_num_rows,% mysql_ping,mysql_query,mysql_unbuffered_query,% mysql_result,mysql_select_db,mysql_tablename,mysql_thread_id,% mysql_get_host_info,mysql_get_proto_info,mysql_get_server_info,% %--- network functions checkdnsrr,closelog,debugger_off,debugger_on,% fsockopen,gethostbyaddr,gethostbyname,gethostbynamel,getmxrr,% getprotobynumber,getservbyname,getservbyport,ip2long,long2ip,% pfsockopen,socket_get_status,socket_set_blocking,% syslog,% %--- nis functions yp_get_default_domain,yp_order,yp_master,yp_match,yp_first,% yp_errno,yp_err_string,yp_all,yp_cat,% %--- oci8 functions OCIDefineByName,OCIBindByName,OCILogon,OCIPLogon,OCINLogon,% OCIExecute,OCICommit,OCIRollback,OCINewDescriptor,OCIRowCount,% OCIResult,OCIFetch,OCIFetchInto,OCIFetchStatement,% OCIColumnName,OCIColumnSize,OCIColumnType,OCIServerVersion,% OCINewCursor,OCIFreeStatement,OCIFreeCursor,OCIFreeDesc,% OCIError,OCIInternalDebug,OCICancel,OCISetPrefetch,% OCISaveLobFile,OCISaveLob,OCILoadLob,OCIColumnScale,% OCIColumnTypeRaw,OCINewCollection,OCIFreeCollection,% OCICollAppend,OCICollAssignElem,OCICollGetElem,OCICollMax,% OCICollTrim,% %--- oracle functions Ora_Bind,Ora_Close,Ora_ColumnName,Ora_ColumnSize,Ora_ColumnType,% Ora_CommitOff,Ora_CommitOn,Ora_Do,Ora_Error,Ora_ErrorCode,% Ora_Fetch,Ora_Fetch_Into,Ora_GetColumn,Ora_Logoff,Ora_Logon,% Ora_Numcols,Ora_Numrows,Ora_Open,Ora_Parse,Ora_Rollback,% %--- outcontrol functions flush,ob_start,ob_get_contents,ob_get_length,ob_get_level,% ob_flush,ob_clean,ob_end_flush,ob_end_clean,ob_implicit_flush,% %--- ovrimos functions ovrimos_connect,ovrimos_close,ovrimos_longreadlen,% ovrimos_execute,ovrimos_cursor,ovrimos_exec,ovrimos_fetch_into,% ovrimos_result,ovrimos_result_all,ovrimos_num_rows,% ovrimos_field_name,ovrimos_field_type,ovrimos_field_len,% ovrimos_free_result,ovrimos_commit,ovrimos_rollback,% %--- pcntl functions pcntl_fork,pcntl_signal,pcntl_waitpid,pcntl_wexitstatus,% pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,% pcntl_exec,% %--- pcre functions preg_match,preg_match_all,preg_replace,preg_replace_callback,% preg_quote,preg_grep,Pattern Modifiers,Pattern Syntax,% %--- pdf functions pdf_add_annotation,pdf_add_bookmark,pdf_add_launchlink,% pdf_add_note,pdf_add_outline,pdf_add_pdflink,pdf_add_thumbnail,% pdf_arc,pdf_arcn,pdf_attach_file,pdf_begin_page,% pdf_begin_template,pdf_circle,pdf_clip,pdf_close,pdf_closepath,% pdf_closepath_stroke,pdf_close_image,pdf_close_pdi,% pdf_concat,pdf_continue_text,pdf_curveto,pdf_delete,% pdf_endpath,pdf_end_pattern,pdf_end_template,pdf_fill,% pdf_findfont,pdf_get_buffer,pdf_get_font,pdf_get_fontname,% pdf_get_image_height,pdf_get_image_width,pdf_get_parameter,% pdf_get_pdi_value,pdf_get_majorversion,pdf_get_minorversion,% pdf_initgraphics,pdf_lineto,pdf_makespotcolor,pdf_moveto,% pdf_open,pdf_open_CCITT,pdf_open_file,pdf_open_gif,% pdf_open_image_file,pdf_open_jpeg,pdf_open_memory_image,% pdf_open_pdi_page,pdf_open_png,pdf_open_tiff,pdf_place_image,% pdf_rect,pdf_restore,pdf_rotate,pdf_save,pdf_scale,pdf_setcolor,% pdf_setflat,pdf_setfont,pdf_setgray,pdf_setgray_fill,% pdf_setlinecap,pdf_setlinejoin,pdf_setlinewidth,pdf_setmatrix,% pdf_setpolydash,pdf_setrgbcolor,pdf_setrgbcolor_fill,% pdf_set_border_color,pdf_set_border_dash,pdf_set_border_style,% pdf_set_duration,pdf_set_font,pdf_set_horiz_scaling,% pdf_set_info_author,pdf_set_info_creator,pdf_set_info_keywords,% pdf_set_info_title,pdf_set_leading,pdf_set_parameter,% pdf_set_text_rendering,pdf_set_text_rise,pdf_set_text_matrix,% pdf_set_word_spacing,pdf_show,pdf_show_boxed,pdf_show_xy,% pdf_stringwidth,pdf_stroke,pdf_translate,% %--- pfpro functions pfpro_init,pfpro_cleanup,pfpro_process,pfpro_process_raw,% %--- pgsql functions pg_close,pg_affected_rows,pg_connect,pg_dbname,pg_end_copy,% pg_query,pg_fetch_array,pg_fetch_object,pg_fetch_row,% pg_field_name,pg_field_num,pg_field_prtlen,pg_field_size,% pg_free_result,pg_last_oid,pg_host,pg_last_notice,pg_lo_close,% pg_lo_export,pg_lo_import,pg_lo_open,pg_lo_read,pg_lo_seek,% pg_lo_read_all,pg_lo_unlink,pg_lo_write,pg_num_fields,% pg_options,pg_pconnect,pg_port,pg_put_line,pg_fetch_result,% pg_client_encoding,pg_trace,pg_tty,pg_untrace,pg_get_result,% pg_send_query,pg_cancel_query,pg_connection_busy,% pg_connection_status,pg_copy_from,pg_copy_to,pg_escape_bytea,% pg_result_error,% %--- posix functions posix_kill,posix_getpid,posix_getppid,posix_getuid,% posix_getgid,posix_getegid,posix_setuid,posix_seteuid,% posix_setegid,posix_getgroups,posix_getlogin,posix_getpgrp,% posix_setpgid,posix_getpgid,posix_getsid,posix_uname,% posix_ctermid,posix_ttyname,posix_isatty,posix_getcwd,% posix_getgrnam,posix_getgrgid,posix_getpwnam,posix_getpwuid,% %--- printer functions printer_open,printer_abort,printer_close,printer_write,% printer_set_option,printer_get_option,printer_create_dc,% printer_start_doc,printer_end_doc,printer_start_page,% printer_create_pen,printer_delete_pen,printer_select_pen,% printer_delete_brush,printer_select_brush,printer_create_font,% printer_select_font,printer_logical_fontheight,% printer_draw_rectangle,printer_draw_elipse,printer_draw_text,% printer_draw_chord,printer_draw_pie,printer_draw_bmp,% %--- pspell functions pspell_add_to_personal,pspell_add_to_session,pspell_check,% pspell_config_create,pspell_config_ignore,pspell_config_mode,% pspell_config_repl,pspell_config_runtogether,% pspell_new,pspell_new_config,pspell_new_personal,% pspell_store_replacement,pspell_suggest,% %--- qtdom functions qdom_tree,qdom_error,% %--- readline functions readline,readline_add_history,readline_clear_history,% readline_info,readline_list_history,readline_read_history,% %--- recode functions recode_string,recode,recode_file,% %--- regex functions ereg,ereg_replace,eregi,eregi_replace,split,spliti,sql_regcase,% %--- sem functions sem_get,sem_acquire,sem_release,sem_remove,shm_attach,% shm_remove,shm_put_var,shm_get_var,shm_remove_var,ftok,% %--- sesam functions sesam_connect,sesam_disconnect,sesam_settransaction,% sesam_rollback,sesam_execimm,sesam_query,sesam_num_fields,% sesam_diagnostic,sesam_fetch_result,sesam_affected_rows,% sesam_field_array,sesam_fetch_row,sesam_fetch_array,% sesam_free_result,% %--- session functions session_start,session_destroy,session_name,session_module_name,% session_id,session_register,session_unregister,session_unset,% session_get_cookie_params,session_set_cookie_params,% session_encode,session_set_save_handler,session_cache_limiter,% session_write_close,% %--- shmop functions shmop_open,shmop_read,shmop_write,shmop_size,shmop_delete,% %--- snmp functions snmpget,snmpset,snmpwalk,snmpwalkoid,snmp_get_quick_print,% snmprealwalk,% %--- strings functions addcslashes,addslashes,bin2hex,chop,chr,chunk_split,% count_chars,crc32,crypt,echo,explode,get_html_translation_table,% hebrev,hebrevc,htmlentities,htmlspecialchars,implode,join,% localeconv,ltrim,md5,md5_file,metaphone,nl_langinfo,nl2br,ord,% print,printf,quoted_printable_decode,quotemeta,str_rot13,rtrim,% setlocale,similar_text,soundex,sprintf,strncasecmp,strcasecmp,% strcmp,strcoll,strcspn,strip_tags,stripcslashes,stripslashes,% strlen,strnatcmp,strnatcasecmp,strncmp,str_pad,strpos,strrchr,% strrev,strrpos,strspn,strstr,strtok,strtolower,strtoupper,% strtr,substr,substr_count,substr_replace,trim,ucfirst,ucwords,% vsprintf,wordwrap,% %--- swf functions swf_openfile,swf_closefile,swf_labelframe,swf_showframe,% swf_getframe,swf_mulcolor,swf_addcolor,swf_placeobject,% swf_removeobject,swf_nextid,swf_startdoaction,% swf_actiongeturl,swf_actionnextframe,swf_actionprevframe,% swf_actionstop,swf_actiontogglequality,swf_actionwaitforframe,% swf_actiongotolabel,swf_enddoaction,swf_defineline,% swf_definepoly,swf_startshape,swf_shapelinesolid,% swf_shapefillsolid,swf_shapefillbitmapclip,% swf_shapemoveto,swf_shapelineto,swf_shapecurveto,% swf_shapearc,swf_endshape,swf_definefont,swf_setfont,% swf_fontslant,swf_fonttracking,swf_getfontinfo,swf_definetext,% swf_definebitmap,swf_getbitmapinfo,swf_startsymbol,% swf_startbutton,swf_addbuttonrecord,swf_oncondition,% swf_viewport,swf_ortho,swf_ortho2,swf_perspective,swf_polarview,% swf_pushmatrix,swf_popmatrix,swf_scale,swf_translate,swf_rotate,% %--- sybase functions sybase_affected_rows,sybase_close,sybase_connect,% sybase_fetch_array,sybase_fetch_field,sybase_fetch_object,% sybase_field_seek,sybase_free_result,sybase_get_last_message,% sybase_min_error_severity,sybase_min_message_severity,% sybase_num_fields,sybase_num_rows,sybase_pconnect,sybase_query,% sybase_select_db,% %--- uodbc functions odbc_autocommit,odbc_binmode,odbc_close,odbc_close_all,% odbc_connect,odbc_cursor,odbc_do,odbc_error,odbc_errormsg,% odbc_execute,odbc_fetch_into,odbc_fetch_row,odbc_fetch_array,% odbc_fetch_object,odbc_field_name,odbc_field_num,% odbc_field_len,odbc_field_precision,odbc_field_scale,% odbc_longreadlen,odbc_num_fields,odbc_pconnect,odbc_prepare,% odbc_result,odbc_result_all,odbc_rollback,odbc_setoption,% odbc_tableprivileges,odbc_columns,odbc_columnprivileges,% odbc_primarykeys,odbc_foreignkeys,odbc_procedures,% odbc_specialcolumns,odbc_statistics,% %--- url functions base64_decode,base64_encode,parse_url,rawurldecode,rawurlencode,% urlencode,% %--- var functions doubleval,empty,floatval,gettype,get_defined_vars,% import_request_variables,intval,is_array,is_bool,is_double,% is_int,is_integer,is_long,is_null,is_numeric,is_object,is_real,% is_scalar,is_string,isset,print_r,serialize,settype,strval,% unset,var_dump,var_export,is_callable,% %--- vpopmail functions vpopmail_add_domain,vpopmail_del_domain,% vpopmail_add_domain_ex,vpopmail_del_domain_ex,% vpopmail_add_user,vpopmail_del_user,vpopmail_passwd,% vpopmail_auth_user,vpopmail_alias_add,vpopmail_alias_del,% vpopmail_alias_get,vpopmail_alias_get_all,vpopmail_error,% %--- w32api functions w32api_set_call_method,w32api_register_function,% w32api_deftype,w32api_init_dtype,% %--- wddx functions wddx_serialize_value,wddx_serialize_vars,wddx_packet_start,% wddx_add_vars,wddx_deserialize,% %--- xml functions xml_parser_create,xml_set_object,xml_set_element_handler,% xml_set_processing_instruction_handler,xml_set_default_handler,% xml_set_notation_decl_handler,% xml_parse,xml_get_error_code,xml_error_string,% xml_get_current_column_number,xml_get_current_byte_index,% xml_parser_free,xml_parser_set_option,xml_parser_get_option,% utf8_encode,xml_parser_create_ns,% xml_set_start_namespace_decl_handler,% %--- xslt functions xslt_set_log,xslt_create,xslt_errno,xslt_error,xslt_free,% xslt_set_sax_handler,xslt_set_scheme_handler,% xslt_set_base,xslt_set_encoding,xslt_set_sax_handlers,% %--- yaz functions yaz_addinfo,yaz_close,yaz_connect,yaz_errno,yaz_error,yaz_hits,% yaz_database,yaz_range,yaz_record,yaz_search,yaz_present,% yaz_scan,yaz_scan_result,yaz_ccl_conf,yaz_ccl_parse,% yaz_wait,yaz_sort,% %--- zip functions zip_close,zip_entry_close,zip_entry_compressedsize,% zip_entry_filesize,zip_entry_name,zip_entry_open,zip_entry_read,% zip_read,% %--- zlib functions gzclose,gzeof,gzfile,gzgetc,gzgets,gzgetss,gzopen,gzpassthru,% gzread,gzrewind,gzseek,gztell,gzwrite,readgzfile,gzcompress,% gzdeflate,gzinflate,gzencode,},% sensitive,% morecomment=[l]\#,% morecomment=[l]//,% morecomment=[s]{/*}{*/},% morestring=[b]",% morestring=[b]'% }[keywords,comments,strings]% %% %% Prolog definition (c) 1997 Dominique de Waleffe %% \lst@definelanguage{Prolog}% {morekeywords={op,mod,abort,ancestors,arg,ascii,ask,assert,asserta,% assertz,atom,atomic,char,clause,close,concat,consult,ed,ef,em,% eof,fail,file,findall,write,functor,getc,integer,is,length,% listing,load,name,nl,nonvar,not,numbervars,op,or,pp,prin,print,% private,prompt,putc,ratom,read,read_from_this_file,rename,repeat,% retract,retractall,save,see,seeing,seen,sh,skip,statistics,% subgoal_of,system,tab,tell,telling,time,told,trace,true,unload,% untrace,var,write},% sensitive=f,% morecomment=[l]\%,% morecomment=[s]{/*}{*/},% morestring=[bd]",% morestring=[bd]'% }[keywords,comments,strings]% %% %% classic rexx listings definition %% by Patrick TJ McPhee %% \lst@definelanguage{Rexx} {morekeywords={address,arg,call,do,drop,else,end,exit,if,iterate,% interpret,leave,nop,numeric,options,otherwise,parse,% procedure,pull,push,queue,return,say,signal,then,to,% trace,when},% sensitive=false,% morecomment=[n]{/*}{*/},% morestring=[d]{'},% morestring=[d]{"},% }[keywords,comments,strings]% \lst@definelanguage{Ruby}% {morekeywords={__FILE__,__LINE__,BEGIN,END,alias,and,begin,break,% case,class,def,defined?,do,else,elsif,end,ensure,false,for,% if,in,module,next,nil,not,or,redo,rescue,retry,return,self,% super,then,true,undef,unless,until,when,while,yield},% sensitive=true,% morecomment=[l]\#,% morecomment=[l]\#\#,% morecomment=[s]{=BEGIN}{=END},% morestring=[b]',% morestring=[b]",% morestring=[s]{\%q/}{/},% morestring=[s]{\%q!}{!},% morestring=[s]{\%q\{}{\}},% morestring=[s]{\%q(}{)},% morestring=[s]{\%q[}{]},% morestring=[s]{\%q-}{-},% morestring=[s]{\%Q/}{/},% morestring=[s]{\%Q!}{!},% morestring=[s]{\%Q\{}{\}},% morestring=[s]{\%Q(}{)},% morestring=[s]{\%Q[}{]},% morestring=[s]{\%Q-}{-}% }[keywords,comments,strings]% %% %% SHELXL definition (c) 1999 Aidan Philip Heerdegen %% \lst@definelanguage{SHELXL}% {morekeywords={TITL,CELL,ZERR,LATT,SYMM,SFAC,DISP,UNIT,LAUE,% REM,MORE,TIME,END,HKLF,OMIT,SHEL,BASF,TWIN,EXTI,SWAT,% MERG,SPEC,RESI,MOVE,ANIS,AFIX,HFIX,FRAG,FEND,EXYZ,EADP,% EQIV,OMIT,CONN,PART,BIND,FREE,DFIX,BUMP,SAME,SADI,CHIV,% FLAT,DELU,SIMU,DEFS,ISOR,SUMP,L.S.,CGLS,SLIM,BLOC,DAMP,% WGHT,FVAR,BOND,CONF,MPLA,RTAB,LIST,ACTA,SIZE,TEMP,WPDB,% FMAP,GRID,PLAN,MOLE},% sensitive=false,% alsoother=_,% Makes the syntax highlighting ignore the underscores morecomment=[l]{! },% }% %% %% Tcl/Tk definition (c) Gerd Neugebauer %% \lst@definelanguage[tk]{tcl}[]{tcl}% {morekeywords={activate,add,separator,radiobutton,checkbutton,% command,cascade,all,bell,bind,bindtags,button,canvas,canvasx,% canvasy,cascade,cget,checkbutton,config,configu,configur,% configure,clipboard,create,arc,bitmap,image,line,oval,polygon,% rectangle,text,textwindow,curselection,delete,destroy,end,entry,% entrycget,event,focus,font,actual,families,measure,metrics,names,% frame,get,grab,current,release,status,grid,columnconfigure,% rowconfigure,image,image,create,bitmap,photo,delete,height,types,% widt,names,index,insert,invoke,itemconfigure,label,listbox,lower,% menu,menubutton,message,move,option,add,clear,get,readfile,pack,% photo,place,radiobutton,raise,scale,scroll,scrollbar,search,see,% selection,send,stdin,stdout,stderr,tag,bind,text,tk,tkerror,% tkwait,window,variable,visibility,toplevel,unknown,update,winfo,% class,exists,ismapped,parent,reqwidth,reqheight,rootx,rooty,% width,height,wm,aspect,client,command,deiconify,focusmodel,frame,% geometry,group,iconbitmap,iconify,iconmask,iconname,iconposition,% iconwindow,maxsize,minsize,overrideredirect,positionfrom,% protocol,sizefrom,state,title,transient,withdraw,xview,yview,% yposition,% -accelerator,-activebackground,-activeborderwidth,% -activeforeground,-after,-anchor,-arrow,-arrowshape,-aspect,% -async,-background,-before,-bg,-bigincrement,-bitmap,-bordermode,% -borderwidth,-button,-capstyle,-channel,-class,-closeenough,% -colormap,-column,-columnspan,-command,-confine,-container,% -count,-cursor,-data,-default,-detail,-digits,-direction,% -displayof,-disableforeground,-elementborderwidth,-expand,% -exportselection,-extend,-family,-fg,-file,-fill,-focus,-font,% -fontmap,-foreground,-format,-from,-gamma,-global,-height,% -highlightbackground,-highlightcolor,-highlightthickness,-icon,% -image,-in,-insertbackground,-insertborderwidth,-insertofftime,% -insertontime,-imsertwidth,-ipadx,-ipady,-joinstyle,-jump,% -justify,-keycode,-keysym,-label,-lastfor,-length,-maskdata,% -maskfile,-menu,-message,-mode,-offvalue,-onvalue,-orient,% -outlien,-outlinestipple,-overstrike,-override,-padx,-pady,% -pageanchor,-pageheight,-pagewidth,-pagey,-pagey,-palette,% -parent,-place,-postcommand,-relheight,-relief,-relwidth,-relx,% -rely,-repeatdelay,-repeatinterval,-resolution,-root,-rootx,% -rooty,-rotate,-row,-rowspan,-screen,-selectcolor,-selectimage,% -sendevent,-serial,-setgrid,-showvalue,-shrink,-side,-size,% -slant,-sliderlength,-sliderrelief,-smooth,-splinesteps,-state,% -sticky,-stipple,-style,-subsample,-subwindow,-tags,-takefocus,% -tearoff,-tearoffcommand,-text,-textvariable,-tickinterval,-time,% -title,-to,-troughcolor,-type,-underline,-use,-value,-variable,% -visual,-width,-wrap,-wraplength,-x,-xscrollcommand,-y,% -bgstipple,-fgstipple,-lmargin1,-lmargin2,-rmargin,-spacing1,% -spacing2,-spacing3,-tabs,-yscrollcommand,-zoom,% activate,add,addtag,bbox,cget,clone,configure,coords,% curselection,debug,delete,delta,deselect,dlineinfo,dtag,dump,% entrycget,entryconfigure,find,flash,fraction,get,gettags,handle,% icursor,identify,index,insert,invoke,itemcget,itemconfigure,mark,% moveto,own,post,postcascade,postscript,put,redither,ranges,% scale,select,show,tag,type,unpost,xscrollcommand,xview,% yscrollcommand,yview,yposition}% }% \lst@definelanguage[]{tcl}% {alsoletter={.:,*=&-},% morekeywords={after,append,array,names,exists,anymore,donesearch,% get,nextelement,set,size,startsearch,auto_mkindex,binary,break,% case,catch,cd,clock,close,concat,console,continue,default,else,% elseif,eof,error,eval,exec,-keepnewline,exit,expr,fblocked,% fconfigure,fcopy,file,atime,dirname,executable,exists,extension,% isdirectory,isfile,join,lstat,mtime,owned,readable,readlink,% rootname,size,stat,tail,type,writable,-permissions,-group,-owner,% -archive,-hidden,-readonly,-system,-creator,-type,-force,% fileevent,flush,for,foreach,format,gets,glob,global,history,if,% incr,info,argsbody,cmdcount,commands,complete,default,exists,% globals,level,library,locals,patchlevel,procs,script,tclversion,% vars,interp,join,lappend,lindex,linsert,list,llength,lrange,% lreplace,lsearch,-exact,-regexp,-glob,lsort,-ascii,-integer,% -real,-dictionary,-increasing,-decreasing,-index,-command,load,% namespace,open,package,forget,ifneeded,provide,require,unknown,% vcompare,versions,vsatisfies,pid,proc,puts,-nonewline,pwd,read,% regexp,-indices,regsub,-all,-nocaserename,return,scan,seek,set,% socket,source,split,string,compare,first,index,last,length,match,% range,tolower,toupper,trim,trimleft,trimright,subst,switch,tell,% time,trace,variable,vdelete,vinfo,unknown,unset,uplevel,upvar,% vwait,while,acos,asin,atan,atan2,ceil,cos,cosh,exp,floor,fmod,% hypot,log,log10,pow,sin,sinh,sqrt,tan,tanh,abs,double,int,round% },% morestring=[d]",% morecomment=[f]\#,% morecomment=[l]{;\#},% morecomment=[l]{[\#},% morecomment=[l]{\{\#}% }[keywords,comments,strings]% %% %% VBScript definition (c) 2000 Sonja Weidmann %% \lst@definelanguage{VBScript}% {morekeywords={Call,Case,Const,Dim,Do,Each,Else,End,Erase,Error,Exit,% Explicit,For,Function,If,Loop,Next,On,Option,Private,Public,% Randomize,ReDim,Rem,Select,Set,Sub,Then,Wend,While,Abs,Array,Asc,% Atn,CBool,CByte,CCur,CDate,CDbl,Chr,CInt,CLng,Cos,CreateObject,% CSng,CStr,Date,DateAdd,DateDiff,DatePart,DateSerial,DateValue,% Day,Exp,Filter,Fix,FormatCurrency,FormatDateTime,FormatNumber,% FormatPercent,GetObject,Hex,Hour,InputBox,InStr,InStrRev,Int,% IsArray,IsDate,IsEmpty,IsNull,IsNumeric,IsObject,Join,LBound,% LCase,Left,Len,LoadPicture,Log,LTrim,Mid,Minute,Month,MonthName,% MsgBox,Now,Oct,Replace,RGB,Right,Rnd,Round,RTrim,ScriptEngine,% ScriptEngineBuildVersion,ScriptEngineMajorVersion,% ScriptEngineMinorVersion,Second,Sgn,Sin,Space,Split,Sqr,StrComp,% StrReverse,String,Tan,Time,TimeSerial,TimeValue,Trim,TypeName,% UBound,UCase,VarType,Weekday,WeekdayName,Year, And,Eqv,Imp,Is,% Mod,Not,Or,Xor,Add,BuildPath,Clear,Close,Copy,CopyFile,% CopyFolder,CreateFolder,CreateTextFile,Delete,DeleteFile,% DeleteFolder,Dictionary,Drive,DriveExists,Drives,Err,Exists,File,% FileExists,FileSystemObject,Files,Folder,FolderExists,Folders,% GetAbsolutePathName,GetBaseName,GetDrive,GetDriveName,% GetExtensionName,GetFile,GetFileName,GetFolder,% GetParentFolderName,GetSpecialFolder,GetTempName,Items,Keys,Move,% MoveFile,MoveFolder,OpenAsTextStream,OpenTextFile,Raise,Read,% ReadAll,ReadLine,Remove,RemoveAll,Skip,SkipLine,TextStream,Write,% WriteBlankLines,WriteLine,Alias,Archive,CDROM,Compressed,% Directory,Fixed,ForAppending,ForReading,ForWriting,Hidden,Normal,% RAMDisk,ReadOnly,Remote,Removable,System,SystemFolder,% TemporaryFolder,TristateFalse,TristateTrue,TristateUseDefault,% Unknown,Volume,WindowsFolder,vbAbortRetryIgnore,% vbApplicationModal,vbArray,vbBinaryCompare,vbBlack,vbBlue,% vbBoolean,vbByte,vbCr,vbCrLf,vbCritical,vbCurrency,vbCyan,% vbDataObject,vbDate,vbDecimal,vbDefaultButton1,vbDefaultButton2,% vbDefaultButton3,vbDefaultButton4,vbDouble,vbEmpty,vbError,% vbExclamation,vbFirstFourDays,vbFirstFullWeek,vbFirstJan1,% vbFormFeed,vbFriday,vbGeneralDate,vbGreen,vbInformation,% vbInteger,vbLf,vbLong,vbLongDate,vbLongTime,vbMagenta,vbMonday,% vbNewLine,vbNull,vbNullChar,vbNullString,vbOKC,ancel,vbOKOnly,% vbObject,vbObjectError,vbQuestion,vbRed,vbRetryCancel,vbSaturday,% vbShortDate,vbShortTime,vbSingle,vbString,vbSunday,vbSystemModal,% vbTab,vbTextCompare,vbThursday,vbTuesday,vbUseSystem,% vbUseSystemDayOfWeek,vbVariant,vbVerticalTab,vbWednesday,vbWhite,% vbYellow,vbYesNo,vbYesNoCancel},% sensitive=f,% morecomment=[l]',% morestring=[d]"% }[keywords,comments,strings]% %% %% VRML definition (c) 2001 Oliver Baum %% \lst@definelanguage[97]{VRML} {morekeywords={DEF,EXTERNPROTO,FALSE,IS,NULL,PROTO,ROUTE,TO,TRUE,USE,% eventIn,eventOut,exposedField,field,Introduction,Anchor,% Appearance,AudioClip,Background,Billboard,Box,Collision,Color,% ColorInterpolator,Cone,Coordinate,CoordinateInterpolator,% Cylinder,CylinderSensor,DirectionalLight,ElevationGrid,Extrusion,% Fog,FontStyle,Group,ImageTexture,IndexedFaceSet,IndexedLineSet,% Inline,LOD,Material,MovieTexture,NavigationInfo,Normal,% NormalInterpolator,OrientationInterpolator,PixelTexture,% PlaneSensor,PointLight,PointSet,PositionInterpolator,% ProximitySensor,ScalarInterpolator,Script,Shape,Sound,Sphere,% SphereSensor,SpotLight,Switch,Text,TextureCoordinate,% TextureTransform,TimeSensor,TouchSensor,Transform,Viewpoint,% VisibilitySensor,WorldInfo},% morecomment=[l]\#,% bug: starts comment in the first column morestring=[b]"% }[keywords,comments,strings] \endinput %% %% End of file `lstlang2.sty'. hevea-2.09/fmt_map.mll0000644004317100512160000000040110375147225014714 0ustar marangetcristal{ open Printf } rule line = parse | ('#' [^'\n']* '\n' | '\n') {line lexbuf } | [^'#''\n']+ as txt ('#' [^'\n']*) ? '\n' { printf "%s\n" txt ; line lexbuf } | eof { () } { let main () = line (Lexing.from_channel stdin) let _ = main () ; exit 0 } hevea-2.09/info.mli0000644004317100512160000000137111774606345014237 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) include OutManager.S hevea-2.09/myLexing.mli0000644004317100512160000000155312017660721015067 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Additions to the standard Lexing module *) val from_string : string -> Lexing.lexbuf val from_list : string list -> Lexing.lexbuf hevea-2.09/saver.mli0000644004317100512160000000055612017660721014415 0ustar marangetcristalmodule type Config = sig type t val of_string : string -> t val of_out : Out.t -> t end module type S = sig type out val opt : Lexing.lexbuf -> out val arg : Lexing.lexbuf -> out val arg2 : Lexing.lexbuf -> out end module Make(C:Config) : S with type out = C.t module String : S with type out = string module List : S with type out = string list hevea-2.09/libs.def0000644004317100512160000000263612112707235014202 0ustar marangetcristalALLLIB= alltt.hva amsmath.hva articlecommon.hva babel.hva bookcommon.hva booktabs.hva comment.hva compat.hva hyperref.hva hrlang.hva ifthen.hva index.hva iso-symb.hva keyval.hva latexcommon.hva listings.hva lstlang1.hva lstlang2.hva lstlang3.hva makeidx.hva mathop.hva moreverb.hva multibib.hva multind.hva natbib-common.hva packages.hva plain.hva program.hva spaces.hva supertabular.hva underscore.hva url.hva verbatim.hva french-common.hva german-common.hva english.hva czech.hva ragged2e.hva chapterbib.hva deepcut.hva figcut.hva longtable.hva eurosym.hva isolatin1.hva textcomp.hva chngcntr.hva ifpdf.hva theorem.hva xspace.hva latexsym.hva iso-html.hva iso-text.hva winstyles.hva winfonts.hva epsfig.hva inputenc.hva thai.hva import.hva hanging.hva lstlang1.sty lstlang2.sty lstlang3.sty labeltype.hva crlang.hva cleveref.hva HTMLLIB= amssymb.hva amsfonts.hva article.hva austrian.hva book.hva color.hva colortbl.hva commongraphic.hva fancysection.hva fancyvrb.hva french.hva german.hva graphics.hva graphicx.hva hevea.hva common-math.hva mathpartir.hva natbib.hva png.hva gif.hva report.hva seminar.hva sword.hva symb-eng.hva symb-ent.hva symb-fra.hva symb-mathml.hva symb-text.hva urlhref.hva xypic.hva undersection.hva TEXTLIB=article.hva book.hva color.hva colortbl.hva fancysection.hva hevea.hva report.hva seminar.hva french.hva austrian.hva german.hva natbib.hva INFOLIB=article.hva book.hva hevea.hva report.hva seminar.hva hevea-2.09/epsfig.hva0000644004317100512160000000014610563036154014543 0ustar marangetcristal\ProvidesPackage{epsfig} \newcommand{\epsfig}[1]{\begin{toimage}\epsfig{#1}\end{toimage}\imageflush} hevea-2.09/htmlparse.mli0000644004317100512160000000166610512403554015274 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: htmlparse.mli,v 1.5 2006-10-09 08:25:16 maranget Exp $ *) (***********************************************************************) exception Error of string val reset : unit -> unit val main : Emisc.Strings.t option -> Lexing.lexbuf -> Lexeme.style Tree.t list hevea-2.09/myLexing.ml0000644004317100512160000000534012017660721014714 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Additions to the standard Lexing module *) open Lexing open Printf let verbose = false (* Avoid one string copy *) let zero_pos = { pos_fname = ""; pos_lnum = 1; pos_bol = 0; pos_cnum = 0; };; let from_string s = { refill_buff = (fun lexbuf -> lexbuf.lex_eof_reached <- true); lex_buffer = s ; lex_buffer_len = String.length s; lex_abs_pos = 0; lex_start_pos = 0; lex_curr_pos = 0; lex_last_pos = 0; lex_last_action = 0; lex_mem = [||]; lex_eof_reached = true; lex_start_p = zero_pos; lex_curr_p = zero_pos; } type lex_list = { mutable pos : int ; mutable xs : string list ; } let pp_lex_list chan p = fprintf chan "pos=%i, xs=[%s]" p.pos (String.concat "|" p.xs) let show s os len = let s1 = String.sub s 0 os and s2 = String.sub s os len and s3 = String.sub s len (String.length s-len) in sprintf "[%s-%s-%s]" s1 s2 s3 let vblit src os dst od len = if verbose && os > 0 && len <> String.length src then eprintf "BLIT: %s\n" (show src os len) ; String.unsafe_blit src os dst od len let refill_from_list p buff = (* xs : list of string, pos: starting position in xs rem: nchars that remains, r: nchars copied and result. *) let rec do_rec xs pos rem r = match xs with | [] -> p.xs <- [] ; p.pos <- 0 ; r | x::ys -> let len = String.length x in if len-pos < rem then begin (* copy all x and recurse *) let ncpy = len-pos in vblit x pos buff r ncpy ; do_rec ys 0 (rem-ncpy) (r+ncpy) end else begin (* stop now *) vblit x pos buff r rem ; p.pos <- pos+rem ; p.xs <- xs ; r+rem end in (fun n -> if verbose then eprintf "REFILL: n=%i %a\n" n pp_lex_list p ; let r = do_rec p.xs p.pos n 0 in if verbose then eprintf "DONE: r=%i %a\n" r pp_lex_list p ; r) let from_list = function | [] -> from_string "" | [s] -> from_string s | xs -> Lexing.from_function (refill_from_list { pos = 0; xs = xs; }) hevea-2.09/theorem.hva0000644004317100512160000000012210450755375014733 0ustar marangetcristal\newcommand{\theorembodyfont}[1]{\def\th@font{#1}} \newcommand{\theoremstyle}[1]{}hevea-2.09/foot.ml0000644004317100512160000000660012017660721014067 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let some = ref false ;; let anchor = ref 0 ;; let mark_to_anchor = Hashtbl.create 17 and anchor_to_note = Hashtbl.create 17 ;; let fst_stack = MyStack.create_init "fst_stack" 0 and some_stack = MyStack.create "some_stack" type saved = (int, int) Hashtbl.t * (int, int * string * string) Hashtbl.t * int * bool * int MyStack.saved * bool MyStack.saved let checkpoint () = Hashtbl.copy mark_to_anchor, Hashtbl.copy anchor_to_note, !anchor, !some, MyStack.save fst_stack, MyStack.save some_stack and hot_start (t1,t2,i,b,fst_saved,some_saved) = Misc.copy_int_hashtbl t1 mark_to_anchor ; Misc.copy_int_hashtbl t2 anchor_to_note ; anchor := i ; some := b ; MyStack.restore fst_stack fst_saved ; MyStack.restore some_stack some_saved ; () let step_anchor mark = incr anchor ; Hashtbl.remove mark_to_anchor mark ; Hashtbl.add mark_to_anchor mark !anchor ;; let get_anchor mark = let r = try Hashtbl.find mark_to_anchor mark with Not_found -> begin step_anchor mark ; !anchor end in r ;; let register mark themark text = some := true ; let anchor = get_anchor mark in begin try let _ = Hashtbl.find anchor_to_note anchor in Misc.warning "erasing previous footnote" ; Hashtbl.remove anchor_to_note anchor with Not_found -> () end ; Hashtbl.add anchor_to_note anchor (mark,themark,text) ;; let sub_notes () = MyStack.push fst_stack !anchor ; MyStack.push some_stack !some ; some := false let flush sticky lexer sec_notes sec_here = if !some && Section.value sec_here <= Section.value sec_notes then begin (* Misc.warning (Printf.sprintf "NOTES %s (%s)" sec_here sec_notes) ; *) some := false ; let fst = MyStack.top fst_stack in lexer ("\\begin{thefootnotes}" ^ (if sticky then "[STICKY]" else "") ^ "{"^sec_here^"}") ; let all = ref [] in Hashtbl.iter (fun anchor (mark,themark,text) -> if anchor > fst then all := ((mark,anchor),(themark,text)) :: !all) anchor_to_note ; all := Sort.list (fun ((m1,a1),_) ((m2,a2),_) -> (a1 < a2) || ((a1 = a2) && (m1 <= m2))) !all ; List.iter (fun ((_,anchor),(themark,text)) -> lexer ("\\item["^ "\\@noteref{text}{note}{"^ string_of_int anchor^ "}{\\@print{"^themark^"}}]") ; lexer ("\\@print{"^text^"\n}")) !all ; lexer "\\end{thefootnotes}" ; List.iter (fun ((m,a),_) -> Hashtbl.remove mark_to_anchor m ; Hashtbl.remove anchor_to_note a) !all end ;; let end_notes () = some := MyStack.pop some_stack ; ignore (MyStack.pop fst_stack) hevea-2.09/eurosym.hva0000644004317100512160000000105410563036154014770 0ustar marangetcristal\ProvidesPackage{eurosym} %%Hum I have one symbol only for euro! \def\es@euro{\@print@u{X20AC}} \newcommand{\let@euro}[1]{\let#1\es@euro} \let@euro{\officialeuro}\let@euro{\geneuro}\let@euro{\geneuroarrow}% \let@euro{\geneurowide}% \let@euro{\euro}% \newcommand{\es@left}[1]{\euro\,#1} \newcommand{\es@right}[1]{#1\,\euro} \let\EUR\es@left %%Usefull options. \DeclareOption{official}{}\DeclareOption{gen}{}\DeclareOption{genarrow}{} \DeclareOption{genwide}{} \DeclareOption{left}{\let\EUR\es@left} \DeclareOption{right}{\let\EUR\es@right} \ProcessOptions* hevea-2.09/misc.mli0000644004317100512160000000452411770331322014224 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (***************) (* Some errors *) (***************) exception Fatal of string (* A bug *) exception NoSupport of string (* A feature *) exception Purposly of string (* Explicit failure: \@heveafail command *) exception ScanError of string (* Error while reading input *) exception UserError of string (* Users should correct their code *) exception Close of string (* Specific user error: env nesting *) (*******************) (* Some non-errors *) (*******************) exception EndInput (* Stop reading that file *) exception EndDocument (* Document is over *) exception EndOfLispComment of int (* QNC *) exception CannotPut (* Cannot ouput Unicode char (text mode) *) val verbose : int ref val readverb : int ref val displayverb : bool ref val silent : bool ref val column_to_command : string -> string val warning : string -> unit val print_verb : int -> string -> unit val message : string -> unit val fatal : string -> 'a val not_supported : string -> 'a (* Copying hash tables, not very nice at present *) val copy_hashtbl : (string, 'a) Hashtbl.t -> (string, 'a) Hashtbl.t -> unit val copy_int_hashtbl : (int, 'a) Hashtbl.t -> (int, 'a) Hashtbl.t -> unit val start_env : string -> string val end_env : string -> string type limits = Limits | NoLimits | IntLimits val set_image_opt : string -> unit val get_image_opt : unit -> string val dump_index : bool ref type saved val checkpoint : unit -> saved val hot_start : saved -> unit (* Some kind of abstract buffer used by unicode in translator *) val next_of_string : string -> (unit -> int) (* two digit hexa -> int *) val hexa_code : char -> char -> int hevea-2.09/previous_motif.gif0000644004317100512160000000047506537544364016351 0ustar marangetcristalGIF89app!# Imported from XPM image: prev.xpm!,@63333# B 0 A0 0 0 0 `0 `0 A   `0 `00000000000000000000000000000000000000000000  000 0000000000000000000000000000000` ;hevea-2.09/myfiles.ml0000644004317100512160000001066212017660721014573 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Misc exception Error of string ;; exception Except ;; let etable = Hashtbl.create 17 ;; List.iter (fun name -> Hashtbl.add etable name ()) !Parse_opts.except ;; let is_except name = try Hashtbl.find etable name ; true with Not_found -> false ;; let tex_path = "." :: !Parse_opts.path @ Mylib.libdir:: List.map (fun dir -> Filename.concat Mylib.libdir dir) (match !Parse_opts.destination with | Parse_opts.Html -> ["html"] | Parse_opts.Text -> ["text"] | Parse_opts.Info -> ["info" ; "text"]) ;; let import = ref "" ;; let set_import dir = import := dir let try_import f = match !import with "" -> () | dir -> f dir exception Found of (string * in_channel) ;; let do_open_tex filename = let try_open dir = try let full_name = Filename.concat dir filename in if !verbose > 1 then prerr_endline ("Trying: "^full_name) ; let r = open_in full_name in if !verbose > 1 then prerr_endline ("Opening: "^full_name) ; raise (Found (full_name,r)) with Sys_error s -> if !verbose > 1 then prerr_endline ("Failed: "^s) in try List.iter try_open tex_path ; try_import try_open ; raise (Error ("Cannot open file: "^filename)) with Found r -> r ;; let open_tex filename = if !verbose > 1 then prerr_endline ("Searching file: "^filename) ; if is_except filename then raise Except ; if Filename.is_implicit filename then if Filename.check_suffix filename ".tex" || Filename.check_suffix filename ".hva" then do_open_tex filename else try let name = filename^".tex" in if is_except name then raise Except ; do_open_tex name with Error _ -> do_open_tex filename else try if Filename.check_suffix filename ".tex" then filename,open_in filename else try (filename^".tex"),open_in (filename^".tex") with Sys_error _ -> filename,open_in filename with Sys_error _ -> raise (Error ("Cannot open: "^filename)) exception FoundBis of string let do_find name = let try_find dir = let full_name = Filename.concat dir name in if Sys.file_exists full_name then raise (FoundBis full_name) in try List.iter try_find tex_path ; try_import try_find ; raise Not_found with FoundBis r -> r ;; let find_one name = if Sys.file_exists name then name else raise Not_found let find name = if Filename.is_implicit name then if Filename.check_suffix name ".tex" || Filename.check_suffix name ".hva" then do_find name else try let name = name^".tex" in do_find name with Not_found -> do_find name else if Filename.check_suffix name ".tex" then find_one name else try find_one (name^".tex") with | Not_found -> find_one name exception Return of bool let diff_chan chan1 chan2 = try while true do let c1 = try input_char chan1 with End_of_file -> begin try let _ = input_char chan2 in raise (Return true) with End_of_file -> raise (Return false) end in let c2 = try input_char chan2 with End_of_file -> raise (Return true) in if c1 <> c2 then raise (Return true) done ; assert false with Return r -> r let changed tmp_name name = try let true_chan = open_in name in let tmp_chan = try open_in tmp_name with Sys_error _ -> begin close_in true_chan ; raise (Misc.Fatal ("Cannot reopen temporary image file: "^tmp_name)) end in let r = diff_chan true_chan tmp_chan in close_in true_chan ; close_in tmp_chan ; r with Sys_error _ -> true hevea-2.09/videoc.mli0000644004317100512160000000210007303451221014524 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* Christian Queinnec, Universite Paris IV *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* The plugin for HeVeA that implements the VideoC style. $Id: videoc.mli,v 1.7 2001-05-25 12:37:34 maranget Exp $ *) module type T = sig end;; module Make (Dest : OutManager.S) (Image : ImageManager.S) (Scan : Latexscan.S) : T hevea-2.09/hacha.ml0000644004317100512160000000772512017660721014175 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf exception Error of string ;; let filename = ref None let outname = ref "index.html" let log = ref false let toc_style = ref Cut.Normal let cross_links = ref true let verbose = ref 0 let small_length = ref 1024 let main () = let spec = [("-o", Arg.String (fun s -> outname := s), "filename, make hacha output go into file 'filename' (defaults to index.html)"); ("-tocbis", Arg.Unit (fun () -> toc_style := Cut.Both), ", Duplicate table of contents at the begining of files"); ("-tocter", Arg.Unit (fun () -> toc_style := Cut.Special), ", Insert most of table of contents at the beginning of files"); ("-nolinks", Arg.Unit (fun () -> cross_links := false), ", Suppress the prevous/up/next links in generated pages"); ("-hrf", Arg.Unit (fun () -> log := true), ", output a log file showing the association from local anchors to files"); ("-rsz", Arg.Int (fun i -> small_length := i), (sprintf "size of leaves in rope implementation (default %i)" !small_length)); ("-version", Arg.Unit (fun () -> print_endline ("hacha "^Version.version) ; print_endline ("library directory: "^Mylib.static_libdir) ; exit 0), "show hacha version and library directory") ; ("-v", Arg.Unit (fun () -> incr verbose), ", verbose flag") ] and usage = "Usage: hacha [options] htmlfile" in Arg.parse spec (fun s -> filename := Some s) usage ; let filename = match !filename with | None -> raise (Error "No argument given") | Some f -> f in let chan = try open_in filename with Sys_error s -> raise (Error ("File error: "^s)) in let module Config = struct let verbose = !verbose let name_in = filename let name_out = !outname let toc_style = !toc_style let cross_links = !cross_links let small_length = !small_length end in let module C = Cut.Make(Config) in let buf = Lexing.from_channel chan in Location.set filename buf ; C.start_phase () ; ignore (C.do_lex buf) ; close_in chan ; Location.restore () ; let chan = try open_in filename with Sys_error s -> raise (Error ("File error: "^s)) in let buf = Lexing.from_channel chan in Location.set filename buf ; C.start_phase () ; let some_links = C.do_lex buf in close_in chan ; if !log then Cross.dump (C.real_name (C.base^".hrf")) C.check_changed ; if some_links then begin Mysys.copy_from_lib_to_dir Mylib.libdir C.dir "previous_motif.gif" ; Mysys.copy_from_lib_to_dir Mylib.libdir C.dir "next_motif.gif" ; Mysys.copy_from_lib_to_dir Mylib.libdir C.dir "contents_motif.gif" end ;; let _ = try main () ; with | Error s -> prerr_endline s ; prerr_endline "Adios" ; exit 2 | Cut.Error s -> Location.print_pos () ; prerr_endline ("Error while reading HTML: "^s) ; prerr_endline "Adios" ; exit 2 | Misc.Fatal s -> Location.print_pos () ; prerr_endline ("Fatal error: "^s^" (please report to Luc.Maranget@inria.fr)") ; prerr_endline "Adios" ; exit 2 (* | x -> Location.print_pos () ; prerr_endline ("Fatal error: spurious exception "^Printexc.to_string x^ " (please report to Luc.Maranget@inria.fr") ; prerr_endline "Adios" ; exit 2 *) ;; exit 0;; hevea-2.09/explode.mli0000644004317100512160000000156207304505330014730 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: explode.mli,v 1.4 2001-05-28 17:28:55 maranget Exp $ *) (***********************************************************************) val trees : Lexeme.style Tree.t list -> Htmltext.style Tree.t list hevea-2.09/save.mli0000644004317100512160000000457012017660721014233 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val peek_next_char : Lexing.lexbuf -> char val if_next_char : char -> Lexing.lexbuf -> bool val if_next_string : string -> Lexing.lexbuf -> bool exception Error of string exception Delim of string val empty_buffs : unit -> unit val set_verbose : bool -> int -> unit val seen_par : bool ref val gobble_one_char : Lexing.lexbuf -> unit exception Eof exception LimitEof of Misc.limits option exception NoOpt val get_echo : unit -> string val start_echo : unit -> unit val opt : Lexing.lexbuf -> string val opt_list : Lexing.lexbuf -> string list val arg : Lexing.lexbuf -> string val arg_list : Lexing.lexbuf -> string list val arg_verbatim : Lexing.lexbuf -> string (* val arg_verbatim2 : char -> Lexing.lexbuf -> string *) val csname : (string -> string) -> (string -> string) -> Lexing.lexbuf -> string val incsname : Lexing.lexbuf -> string val cite_arg : Lexing.lexbuf -> string list val rest : Lexing.lexbuf -> string val num_arg : Lexing.lexbuf -> (string -> int) -> int val skip_equal : Lexing.lexbuf -> unit val check_equal : Lexing.lexbuf -> bool val filename : Lexing.lexbuf -> string val remain : Lexing.lexbuf -> string (* Superscript and subscripts *) val get_limits : Misc.limits option -> Lexing.lexbuf -> Misc.limits option val get_sup : Lexing.lexbuf -> string option val get_sub : Lexing.lexbuf -> string option val defargs : Lexing.lexbuf -> string list val get_defargs : Lexing.lexbuf -> string val tagout : Lexing.lexbuf -> string val checklimits : Lexing.lexbuf -> bool val skip_delim : string -> Lexing.lexbuf -> unit val with_delim : string -> Lexing.lexbuf -> string val skip_blanks_init : Lexing.lexbuf -> unit val xy_arg : Lexing.lexbuf -> string hevea-2.09/lexattr.mli0000644004317100512160000000167212017660721014760 0ustar marangetcristal(************************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, Thibault Suzanne, projet MOSCOVA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (************************************************************************) (* add_style "name:val" attributes return the attributes with the "name" style having the value "val". The "style=" attribute is added if needed *) val add_style : string -> string -> string hevea-2.09/seminar.sty0000644004317100512160000000214506671014365014773 0ustar marangetcristal\ifstyleloaded\relax \else %%%% Landscape and portrait \iffrench \newcommand{\slidename}{Planche~:} \else \newcommand{\slidename}{Slide:} \fi \newcounter{slide} \newenvironment{slide}[1][]{% \stepcounter{slide}% \@print{}% \cuthere{section}{\slidename{} \theslide}% \@print{
}% \@open{H2}{ALIGN=right}\slidename{} \theslide\@close{H2} \@print{
}% }{} \newenvironment{slide*}[1][]{\begin{slide}}{\end{slide}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% All seminar-specific commandes are null macros %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\landscapeonly}{} \newcommand{\portraitonly}{} \newcommand{\twoup}{} %% Margins \newif\ifcenterslides \newcommand{\raggedslides}[1][]{} %% Page breaking \newcommand{\extraslideheight}[1]{} \newcommand{\newslide}{} \newcommand{\slidefuzz}{} %% Magnification \newcommand{\slidemag}[1]{} \newcommand{\semin}{in} \newcommand{\semcm}{cm} \newcommand{\ptsize}[1]{} %% FRAMES \newcommand{\slideframe}[2][]{} \newcommand{\newslideframe}[1]{\slideframe} %%%% load the article style file \input{article.sty} \fi hevea-2.09/section.mli0000644004317100512160000000146611327337632014747 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val set_style: string -> unit val value: string -> int val pretty: int -> string hevea-2.09/cut.mll0000644004317100512160000006134712202203731014066 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) { open Printf type toc_style = Normal | Both | Special exception Error of string module type Config = sig val verbose : int val name_in : string val name_out : string val toc_style : toc_style val cross_links : bool val small_length : int end module Make (Config : Config) = struct open Config open Lexing open MyStack module Out = CutOut.Make(Config) let count = ref 0 let dir = let dir = Filename.dirname name_out in if dir = "." then None else Some dir and base = let base = Filename.basename name_in in try Filename.chop_extension base with Invalid_argument _ -> base let changed_t = Hashtbl.create 17 let record_changed oldname newname = try let _ = Hashtbl.find changed_t oldname in Hashtbl.replace changed_t oldname newname with Not_found -> Hashtbl.add changed_t oldname newname let check_changed name = try Hashtbl.find changed_t name with Not_found -> name let real_name name = let name = check_changed name in match dir with | None -> name | Some dir -> Filename.concat dir name let real_open_out name = open_out (real_name name) let some_links = ref false let env = Hashtbl.create 17 let imgsrc img alt = Printf.sprintf "\"%s\"" img alt let _ = Hashtbl.add env "UPTXT" (imgsrc "contents_motif.gif" "Up") ; Hashtbl.add env "PREVTXT" (imgsrc "previous_motif.gif" "Previous") ; Hashtbl.add env "NEXTTXT" (imgsrc "next_motif.gif" "Next") ; () let get_env key = try Hashtbl.find env key with Not_found -> assert false (* Accumulate all META, link and similar tags that appear in the preamble in order to output them in the preamble of every generated page. *) let header_buff = Out.create_buff "header-buf" let style_buff = Out.create_buff "style-buf" let common_headers = ref "" and link_style = ref "" let adjoin_to_header s = Out.put header_buff s and adjoin_to_header_char c = Out.put_char header_buff c let finalize_header () = if not (Out.is_empty style_buff) then begin let css_name = Printf.sprintf "%s.css" base in link_style := Printf.sprintf "\n" css_name ; adjoin_to_header !link_style ; let chan = real_open_out css_name in Out.to_chan chan style_buff ; close_out chan end ; common_headers := Out.to_string header_buff let html_buff = Out.create_buff "html-buf" let html_head = ref "" and html_foot = ref "" and html_prefix = ref "" let phase = ref (-1) ;; let body = ref "" and doctype = ref "" and html = ref "" ;; let new_filename _from = incr count ; Printf.sprintf "%s%0.3d.html" base !count let out = ref (Out.create_null ()) and out_prefix = ref (Out.create_null ()) and outname = ref "" and lastclosed = ref "" and otheroutname = ref "" and flowname_stack = (MyStack.create "flowname" : (string * bool) MyStack.t) and flow_stack = (MyStack.create "flow" : Out.t MyStack.t) ;; let toc = ref !out and tocname = ref !outname and otherout = ref !out ;; let close_loc _ctx _name out = Out.close out let dont_change = ref "" let change_name oldname name = if !phase <= 0 && oldname <> !dont_change then begin if verbose > 0 then eprintf "Change '%s' into '%s'\n" oldname name ; record_changed oldname name ; end let start_phase () = incr phase ; if verbose > 0 then prerr_endline ("Starting phase number: "^string_of_int !phase); let base_out = Filename.basename name_out in dont_change := base_out ; outname := base_out ; tocname := base_out ; otheroutname := "" ; count := 0 ; if !phase > 0 then begin out := Out.create_chan (real_name base_out) end ; toc := !out ;; let openlist out = (* Printf.eprintf "OPEN LIST: %s\n" (Out.get_name out) ; *) Out.put out "
    \n" and closelist out = (* Printf.eprintf "CLOSE LIST: %s\n" (Out.get_name out) ; *) Out.put out "
\n" and itemref fst_item filename s out = let filename = check_changed filename in if not fst_item then Out.put out "" ; Out.put out "
  • " ; Out.put out "" ; Out.put out s ; Out.put out "\n" and itemanchor fst_item filename label s out = let filename = check_changed filename in if not fst_item then Out.put out "
  • " ; Out.put out "
  • " ; Out.put out " Out.put_char out c) (fun s -> Out.put out s) label ; Out.put out "\">" ; Out.put out s ; Out.put out "\n" ;; let delayed_anchor = ref false and prev_anchor = ref None let do_putanchor label out = Out.put out "" ;; let putanchor label out = if !delayed_anchor then prev_anchor := Some (label, out) else do_putanchor label out let putlink out name txt = let name = check_changed name in Out.put out "" ; Out.put out txt ; Out.put out "\n" ;; let link_buff = Out.create_buff "link-buf" let putlinks name = let links_there = ref false in if verbose > 0 then prerr_endline ("putlinks: "^name) ; begin try putlink link_buff (Thread.prev name) (get_env "PREVTXT") ; links_there := true with Not_found -> if verbose > 0 then prerr_endline ("No prev link for "^name) end ; begin try putlink link_buff (Thread.up name) (get_env "UPTXT") ; links_there := true with Not_found -> () end ; begin try putlink link_buff (Thread.next name) (get_env "NEXTTXT") ; links_there := true with Not_found -> () end ; if !links_there then Some (Out.to_string link_buff) else None let putlinks_start out outname = if cross_links then match putlinks outname with | Some s -> some_links := true ; Out.put out s ; Out.put out "
    \n" | None -> () let putlinks_end out outname = if cross_links then match putlinks outname with | Some s -> some_links := true ; Out.put out "
    \n" ; Out.put out s | None -> () type file_opt = { with_footer : bool ; with_links : bool ; } let std_file_opt = { with_footer=true; with_links=true ; } let openhtml opt title out outname = Out.put out !doctype ; Out.put_char out '\n' ; Out.put out !html ; Out.put_char out '\n' ; Out.put out "" ; Out.put out !common_headers; Out.put out "" ; let title = let title = !html_prefix^title in try Tagout.tagout title with Tagout.Error -> Location.print_pos () ; eprintf "Warning, cannot erase tags from '%s'\n%!" title ; title in Out.put out title ; Out.put out "\n" ; Out.put out "\n" ; Out.put out !body; Out.put out "\n" ; if opt.with_links then putlinks_start out outname ; if opt.with_footer then Out.put out !html_head and closehtml opt name out = if opt.with_footer then Out.put out !html_foot ; if opt.with_links then putlinks_end out name ; Out.put out "\n" ; Out.put out "\n" ; close_loc "closehtml" name out ;; let put s = Out.put !out s and put_char c = Out.put_char !out c ;; let cur_level = ref (Section.value "DOCUMENT") and chapter = ref (Section.value "CHAPTER") and depth = ref 2 ;; (* Open all lists in toc from chapter to sec, with sec > chapter *) let rec do_open l1 l2 = if l1 < l2 then begin begin match toc_style with | Both -> openlist !toc ; openlist !out_prefix | Special -> openlist !out_prefix | Normal -> openlist !toc end ; do_open (l1+1) l2 end ;; (* close from l1 down to l2 *) let rec do_close l1 l2 = if l1 > l2 then begin begin match toc_style with | Both -> closelist !toc ; closelist !out_prefix | Special -> closelist !out_prefix | Normal -> closelist !toc end ; do_close (l1-1) l2 end else cur_level := l1 ;; let anchor = ref 0 ;; let open_section sec name a = if !phase > 0 then begin let fst_item = if !cur_level > sec then begin do_close !cur_level sec ; false end else if !cur_level < sec then begin do_open !cur_level sec ; true end else false in let label = match a with | Some label -> label | None -> incr anchor ; "toc"^string_of_int !anchor in begin match toc_style with | Normal -> itemanchor fst_item !outname label name !toc ; | Both -> itemanchor fst_item !outname label name !toc ; itemanchor fst_item !outname label name !out_prefix | Special -> itemanchor fst_item !outname label name !out_prefix end ; begin match a with | Some _ -> () | None -> putanchor label !out end ; cur_level := sec end else cur_level := sec and close_section sec = if !phase > 0 then do_close !cur_level sec else cur_level := sec ;; let close_chapter () = if verbose > 0 then prerr_endline ("Close chapter out="^ !outname^" toc="^ !tocname) ; if !phase > 0 then begin if !outname <> !tocname then begin closehtml std_file_opt !outname !out ; let doout out what = if false then begin eprintf "DEBUG:\n" ; Out.debug stderr what ; eprintf "\n" end ; Out.to_chan out what in begin match toc_style with | Both|Special -> let real_out = real_open_out !outname in (* Those hacking try with avoid failure for cuttingsection = document *) begin try doout real_out !out_prefix with Misc.Fatal _ -> () end ; begin try doout real_out !out ; with Misc.Fatal _ -> () end ; close_out real_out | Normal -> () end ; end ; out := !toc end else begin lastclosed := !outname ; outname := !tocname end and open_chapter fst_item name = outname := new_filename ("open_chapter <<"^name^">>") ; if verbose > 0 then prerr_endline ("Open chapter out="^ !outname^" toc="^ !tocname^ " cur_level="^string_of_int !cur_level) ; if !phase > 0 then begin begin match toc_style with | Both|Special -> out_prefix := Out.create_buff (!outname ^ "-prefix") ; out := !out_prefix ; openhtml std_file_opt name !out_prefix !outname | Normal -> out := Out.create_chan (real_name !outname) ; openhtml std_file_opt name !out !outname end ; itemref fst_item !outname name !toc ; cur_level := !chapter end else begin if verbose > 0 then prerr_endline ("link prev="^ !lastclosed^" next="^ !outname) ; Thread.setup !outname !tocname ; Thread.setprevnext !lastclosed !outname ; cur_level := !chapter end ;; let setlink set target = if !phase = 0 && target <> "" then set !outname target let open_notes_pred sec_notes = (sec_notes <> !chapter) || (!cur_level < sec_notes) let open_notes sticky sec_notes = if verbose > 0 && !phase > 0 then Printf.eprintf "Notes flushed as %s (current cut is %s, current level is %s)\n" (Section.pretty sec_notes) (Section.pretty !chapter) (Section.pretty !cur_level) ; if not sticky && open_notes_pred sec_notes then begin otheroutname := !outname ; outname := new_filename "open_notes" ; if !phase > 0 then begin otherout := !out ; out := Out.create_chan (real_name !outname) ; Out.put !out !doctype ; Out.put_char !out '\n' ; Out.put !out !html ; Out.put_char !out '\n' ; Out.put !out "Notes\n" ; Out.put !out !common_headers ; Out.put !out "\n" ; Out.put !out !body ; Out.put !out "\n" end end else otheroutname := "" and close_notes () = if !otheroutname <> "" then begin Out.put !out "\n\n" ; close_loc "notes" !outname !out ; outname := !otheroutname ; out := !otherout ; otheroutname := "" end ;; let toc_buf = Out.create_buff "toc-buf" and arg_buf = Out.create_buff "arg-buf" ;; let stack = MyStack.create "main" ;; let save_state newchapter newdepth = if verbose > 0 then prerr_endline ("New state: "^string_of_int newchapter) ; push stack (!outname, MyStack.save flowname_stack, MyStack.save flow_stack, !chapter,!depth,!toc,!tocname,!cur_level,!lastclosed,!out_prefix) ; chapter := newchapter ; depth := newdepth ; tocname := !outname ; lastclosed := "" ; toc := !out ;; let restore_state () = if verbose > 0 then prerr_endline ("Restore") ; let oldoutname, oldflowname, oldflow, oldchapter,olddepth,oldtoc,oldtocname, oldlevel,_oldlastclosed,oldprefix = pop stack in outname := oldoutname ; MyStack.restore flowname_stack oldflowname ; MyStack.restore flow_stack oldflow ; chapter := oldchapter ; depth := olddepth ; toc := oldtoc ; tocname := oldtocname ; lastclosed := !lastclosed ; cur_level := oldlevel ; out_prefix := oldprefix ;; let hevea_footer = ref false let hevea_footer_buff = Out.create_buff "hevea-footer-buf" let close_top lxm = Out.put !toc !html_foot ; putlinks_end !toc !tocname ; if !hevea_footer then begin Out.put !out "\n" ; Out.copy hevea_footer_buff !out end ; Out.put !toc lxm ; if !tocname = "" then Out.flush !toc else close_loc "top" !tocname !toc ;; let open_toc () = if !phase > 0 then openlist !toc and close_toc () = if !phase > 0 then closelist !toc ;; let close_all () = if !cur_level > !chapter then begin close_section !chapter ; close_chapter () ; close_toc () end else if !cur_level = !chapter then begin close_chapter () ; close_toc () end ; cur_level := (Section.value "DOCUMENT") let openflow with_footer title = let new_outname = new_filename "openflow" in push flowname_stack (!outname,with_footer) ; outname := new_outname ; if !phase > 0 then begin push flow_stack !out ; out := Out.create_chan (real_name !outname) ; let opt = { with_footer=with_footer; with_links=false; } in openhtml opt title !out !outname end and closeflow () = let prev_out, with_footer = pop flowname_stack in if !phase > 0 then begin let opt = { with_links=false; with_footer=with_footer; } in closehtml opt !outname !out; out := pop flow_stack end ; outname := prev_out } let alpha = ['a'-'z' 'A'-'Z'] let secname = alpha+ let blank = [' ''\t''\n'] let tag = ['a'-'z''A'-'Z''0'-'9']+ let anchor = ['a'-'z''A'-'Z''0'-'9']+ let class_name = ['a'-'z''A'-'Z''0'-'9''-']+ let attr_name = ['a'-'z''A'-'Z''-''0'-'9']+ rule main = parse | "" '\n'? {let lxm = lexeme lexbuf in if !phase > 0 then begin put lxm ; put ("\n" end ; main lexbuf} | "" '\n'? {closeflow () ; main lexbuf} | "" {really_putanchor () ; main lexbuf } *) | "" { Section.set_style style ; main lexbuf } | "" blank* {if !phase > 0 then begin put_char '\n' ; match toc_style with | Both|Special when !out == !out_prefix -> out := Out.create_buff "out-buf" | _ -> () end ; main lexbuf} | "" '\n'? {close_all () ; restore_state () ; main lexbuf} | "" '\n'? {if !otheroutname <> "" then close_notes (); main lexbuf} | " 0 then put (lexeme lexbuf) ; aargs lexbuf} | "" '\n' ? {let head = save_html lexbuf in if !phase = 0 then html_head := head else Out.put !out head; main lexbuf} | "" '\n' ? {let foot = save_html lexbuf in if !phase = 0 then begin html_foot := foot end ; main lexbuf} | "" '\n'? {if !phase = 0 then hevea_footer := true ; close_all () ; footer lexbuf} | "']* '>' {let lxm = lexeme lexbuf in if !phase = 0 then doctype := lxm else Out.put !out lxm; main lexbuf} | "']* '>' {let lxm = lexeme lexbuf in if !phase = 0 then html := lxm else Out.put !out lxm; main lexbuf} | "']* '>' {let lxm = lexeme lexbuf in if !phase = 0 then body := lxm else begin Out.put !out lxm ; putlinks_start !out !outname end ; main lexbuf} | "']* '>' {put (lexeme lexbuf); if !phase = 0 then begin if verbose > 0 then prerr_endline "Collect header" ; collect_header lexbuf end else begin repeat_header lexbuf end ; main lexbuf} | "" _ * {let lxm = lexeme lexbuf in close_all () ; if !phase > 0 then begin close_top lxm end} | '<' tag blank+ as lxm { if !phase > 0 then put lxm ; intag lexbuf ; main lexbuf } | _ as lxm {if !phase > 0 then put_char lxm ; main lexbuf} | eof {raise (Error ("No tag in input file"))} and save_html = parse | "" '\n'? {let s = Out.to_string html_buff in if verbose > 0 then eprintf "save_html -> '%s'\n" s; s} | _ {let lxm = lexeme_char lexbuf 0 in Out.put_char html_buff lxm ; save_html lexbuf} | eof {raise (Misc.Fatal ("End of file in save_html"))} and collect_header = parse | "" {finalize_header () ; if verbose > 0 then begin prerr_string "Header is: '" ; prerr_string !common_headers ; prerr_endline "'" end} | '\n'? "']* '>' {skip_title lexbuf ; collect_header lexbuf} | "' '\n'? {collect_style lexbuf ; collect_header lexbuf} | _ as lxm {adjoin_to_header_char lxm; collect_header lexbuf} and repeat_header = parse | "" as lxm {put (!link_style) ; put lxm } | "' {skip_style lexbuf ; repeat_header lexbuf} | _ as lxm {put_char lxm ; repeat_header lexbuf} and collect_style = parse | "" '\n'? { () } | _ as c { Out.put_char style_buff c ; collect_style lexbuf } and skip_style = parse | "" '\n'? { () } | _ { skip_style lexbuf } and skip_title = parse | "" '\n'? {()} | _ {skip_title lexbuf} and footer = parse "" _* as lxm {if !phase > 0 then begin close_top lxm end} | _ as lxm {if !phase = 0 then begin Out.put_char hevea_footer_buff lxm end ; footer lexbuf} | eof {raise (Misc.Fatal ("End of file in footer (no tag)"))} and tocline = parse "-->" '\n' ? {Out.to_string toc_buf} | _ {Out.put_char toc_buf (lexeme_char lexbuf 0) ; tocline lexbuf} and flowline = parse | "" {let title = arg lexbuf in let _,b = flowline lexbuf in title,b} | "" {let yes_no = arg lexbuf in let b = match yes_no with "YES" -> true | _ -> false in let title,_ = flowline lexbuf in title,b} | "-->" '\n'? {"",true} | eof {raise (Misc.Fatal "Unclosed comment")} | _ {flowline lexbuf} and getargs = parse | "-->" '\n'? {[]} | "' {let lxm = lexeme lexbuf in String.sub lxm 0 (String.length lxm-1)} | "" {raise (Misc.Fatal "arg title")} and arg = parse | "" {Out.to_string arg_buf} | _ {Out.put_char arg_buf (Lexing.lexeme_char lexbuf 0) ; arg lexbuf} | eof {raise (Misc.Fatal "Unclosed arg")} and aargs = parse | ("id"|"ID") ' '* '=' ' '* {if !phase = 0 then begin let name = refname lexbuf in Cross.add name !outname end else put (lexeme lexbuf) ; aargs lexbuf} | ("href"|"HREF") ' '* '=' ' '* {if !phase > 0 then begin let lxm = lexeme lexbuf in let name = refname lexbuf in try let newname = if String.length name > 0 && String.get name 0 = '#' then let frag = String.sub name 1 (String.length name-1) in Cross.fullname check_changed !outname frag else name in put lxm ; put "\"" ; put newname ; put "\"" with Not_found -> () end ; aargs lexbuf} | '>' {if !phase > 0 then put_char '>' ; main lexbuf} | _ as c {if !phase > 0 then put_char c ; aargs lexbuf} | eof {raise (Error "Bad tag")} and intag = parse | blank+ as lxm { if !phase > 0 then put lxm ; intag lexbuf } | ("id"|"ID") blank* "=" blank* (('\'' ([^'\'']* as v) '\'' | '"' ([^'"']* as v) '"' | ('#'?['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+ as v))) as lxm (* '"' *) { if !phase = 0 then Cross.add v !outname else put lxm ; intag lexbuf } | attr_name ( blank* "=" blank* ('\'' ([^'\'']*) '\'' | '"' ([^'"']*) '"' | '#'?['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+))? as lxm (* '"' *) { if !phase > 0 then put lxm ; intag lexbuf } | '>' as lxm { if !phase > 0 then put_char lxm } | "" { raise (Error "intag: attribute syntax")} and refname = parse | '"' ([^'"']* as name) '"' | ''' ([^''']* as name) ''' | (['a'-'z''A'-'Z''0'-'9''.''_''-']+ as name) (* '"' *) { name } | "" {raise (Error "Bad reference name syntax")} and skip_endcom = parse ' '* "-->" '\n'? {()} | "" {raise (Error "Bad HTML comment syntax")} { let do_lex lexbuff = main lexbuff ; !some_links end } hevea-2.09/_tags0000644004317100512160000000005512017651434013605 0ustar marangetcristaltrue: annot : pp(../expandlib.sh) hevea-2.09/entry.mll0000644004317100512160000000465612017660721014446 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) { let buff = Out.create_buff () ;; let put s = Out.put buff s and put_char c = Out.put_char buff c ;; type res = | Bang of string * string | Bar of string * string | Eof of string * string ;; let extend r i = match r with | Bang (p,_) -> Bang (i,p) | Bar (p,_) -> Bar (i,p) | Eof (p,_) -> Eof (i,p) ;; type key = string list * string list exception Fini exception NoGood ;; } rule entry = parse | "\\\"" {put "\\\"" ; entry lexbuf} | '"' (_ as lxm) {put_char lxm ; entry lexbuf} | '!' {Bang (Out.to_string buff,"")} | '@' {let s = Out.to_string buff in let r = entry lexbuf in extend r s} | '|' {Bar (Out.to_string buff,"")} | eof {Eof (Out.to_string buff,"")} | _ as lxm {put_char lxm ; entry lexbuf} and idx = parse | "\\indexentry" {let key = Save.arg lexbuf in let value = Save.arg lexbuf in key,value} | eof {raise Fini} | _ {idx lexbuf} { let read_key lexbuf = let bar () = match entry lexbuf with | Eof (s,_) -> begin match s with | ""|"("|")" -> None | s -> if s.[0] = '(' then Some (String.sub s 1 (String.length s - 1)) else Some s end | _ -> raise NoGood in let rec get_rec () = match entry lexbuf with Bang (i,p) -> let l,see = get_rec () in (i,p)::l,see | Bar (i,p) -> let see = bar () in [i,p],see | Eof (i,p) -> [i,p],None in let separe (l,see) = let rec sep_rec = function [] -> [],[] | (x,y)::r -> if x="" then raise NoGood ; let xs,ys = sep_rec r in x::xs,y::ys in let xs,ys = sep_rec l in ((xs,ys),see) in separe (get_rec ()) let read_indexentry lexbuf = idx lexbuf } hevea-2.09/verb.mll0000644004317100512160000014622712017660721014244 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: verb.mll,v 1.94 2009-09-15 15:33:13 maranget Exp $ *) (***********************************************************************) { exception VError of string module type S = sig end ;; module Make (Dest : OutManager.S) (Image : ImageManager.S) (Scan : Latexscan.S) : S = struct open Printf open Misc open Lexing open Save open Lexstate open Latexmacros open MyStack open Scan open Subst exception Eof of string exception ParseError (* For file verbatim scanning *) let input_verb = ref false ;; (* For scanning by line *) let line_buff = Out.create_buff () ;; (* Do not output an possible first empty line *) let wrap_eat_fst_nl process = let first_line = ref true in (fun () -> if not (!first_line && Out.is_empty line_buff) then process () ; first_line := false) (* For scanning the ``listings'' way *) let lst_process_error _ lxm = warning ("listings, unknown character: '"^Char.escaped lxm^"'") let lst_char_table = Array.create 256 lst_process_error ;; let lst_init_char c f = lst_char_table.(Char.code c) <- f let lst_init_chars s f = let last = String.length s - 1 in for i = 0 to last do lst_char_table.(Char.code s.[i]) <- f done let lst_init_save_char c f = let old = lst_char_table.(Char.code c) in lst_char_table.(Char.code c) <- f old let lst_init_save_chars s f = let last = String.length s - 1 in for i = 0 to last do lst_init_save_char s.[i] f done (* Parameters *) type line_limit = | LineNumber of int | Marker of string let pmark = function | LineNumber x -> string_of_int x | Marker tok -> ""^tok^"" let lst_gobble = ref 0 and lst_nlines = ref 0 and lst_first = ref 1 and lst_last = ref 99999 (* infinity *) and lst_linerange = ref [] and lst_print = ref true and lst_includerangemarker = ref true and lst_string_spaces = ref true and lst_texcl = ref false and lst_extended = ref false and lst_sensitive = ref true and lst_mathescape = ref false and lst_directives = ref false and lst_showlines = ref false and lst_tabsize = ref 8 and lst_col = ref 0 let lst_showspaces = ref false (* false => spaces are spaces *) and lst_showtabs = ref false and lst_save_spaces = ref false (* Output functions *) let lst_buff = Out.create_buff () let lst_last_char = ref ' ' let lst_put c = incr lst_col ; lst_last_char := c ; Out.put_char lst_buff c type lst_scan_mode = | Letter | Other | Empty | Start | Directive of bool (* bool flags some letter read *) (* let show_mode = function | Letter -> "Letter" | Other -> "Other" | Empty -> "Empty" | Start -> "Start" | Directive _ -> "Directive" *) let lst_scan_mode = ref Empty type comment_type = | Nested of int | Balanced of (char -> string -> bool) | Line type lst_top_mode = | Skip of lst_top_mode | StartNextLine of lst_top_mode * (bool ref) (* | EndNextLine of lst_top_mode *) | String of (char * (char * (Lexing.lexbuf -> char -> unit)) list) | Normal | Comment of string * comment_type | Delim of int * (char * (Lexing.lexbuf -> char -> unit)) list | Gobble of lst_top_mode * int | Escape of lst_top_mode * char * bool (* bool flags mathescape *) let is_normal = function | Normal -> true | _ -> false let is_outputing = function | Skip _ -> false | _ -> true let string_of_top_mode = function | Delim (i,_) -> sprintf "Delim: %i" i | Skip _ -> "Skip" | StartNextLine (_,_) -> "StartNextLine" (* | EndNextLine (mode) -> sprintf "EndNextLine (%s)" (string_of_top_mode mode) *) | Comment (_, Balanced _) -> "Balanced" | Comment (_, Nested n) -> "(Nested "^string_of_int n^")" | Comment (_, Line) -> "Line" | String _ -> "String" | Normal -> "Normal" | Gobble (_,_) -> "Gobble" | Escape (_,_,_) -> "Escape" let lst_top_mode = ref (Skip Normal) (* let lst_ptok s = prerr_endline (s^": "^Out.to_string lst_buff) *) (* Final ouput, with transformations *) let dest_string = Scan.translate_put_unicode_string (* Echo, with case change *) let dest_case s = Dest.put (match !case with | Upper -> String.uppercase s | Lower -> String.lowercase s | _ -> s) (* Keywords *) let def_print s = Latexmacros.def "\\@tmp@lst" zero_pat (CamlCode (fun _ -> dest_case s)) ; Latexmacros.def "\\@tmp@lst@print" zero_pat (CamlCode (fun _ -> dest_string s)) ;; let lst_output_com com = let com = com^"{\\@tmp@lst}{\\@tmp@lst@print}" in fun () -> if not (Out.is_empty lst_buff) then begin let arg = Out.to_string lst_buff in match !lst_top_mode with | Normal -> def_print arg ; scan_this Scan.main com | Skip _|StartNextLine (_,_) | Gobble (_,_) | Escape (_,_,_) -> assert false | Delim (_, _) | Comment (_,_)|String _ (* | EndNextLine _ *) -> scan_this main "\\@NewLine" ; dest_string arg end let lst_output_other = lst_output_com "\\lst@output@other" and lst_output_letter = lst_output_com "\\lst@output" and lst_output_directive = lst_output_com "\\lst@output@directive" let lst_output_token () = match !lst_scan_mode with | Letter -> lst_output_letter () | Other -> lst_output_other () | Directive _ -> lst_output_directive () | Empty|Start -> scan_this main "\\@NewLine" (*********************) (* Delay some action *) (*********************) let chars_string c s = let rec do_rec r i = if i < String.length s then if List.mem s.[i] r then do_rec r (i+1) else do_rec (s.[i]::r) (i+1) else r in do_rec [c] 0 let init_char_table_delim chars wrapper = List.map (fun c -> let old_process = lst_char_table.(Char.code c) in lst_init_save_char c wrapper ; (c,old_process)) chars let restore_char_table to_restore = let rec do_rec = function | [] -> () | (c,f)::rest -> lst_init_char c f ; do_rec rest in do_rec to_restore let do_eat_delim visi k new_mode old_process lb c s = let chars = chars_string c s in let wrapper old_process lb c = match !lst_top_mode with | Delim (n,to_restore) -> if visi then old_process lb c ; if n = 1 then begin lst_output_token () ; lst_top_mode := new_mode ; restore_char_table to_restore ; k () end else lst_top_mode := Delim (n-1,to_restore) | _ -> assert false in let to_restore = init_char_table_delim chars wrapper in lst_top_mode := Delim (1+String.length s, to_restore) ; wrapper old_process lb c let eat_delim = do_eat_delim true (* Typical overkill: processesors are restored/saved at each step *) let delay_action k rmode old_process lb c s = let chars = chars_string c s in let rec wrapper old_process lb c = match !lst_top_mode with | Delim (n,to_restore) -> restore_char_table to_restore ; lst_top_mode := !rmode ; old_process lb c ; rmode := !lst_top_mode ; ignore (init_char_table_delim chars wrapper) ; if n = 1 then begin restore_char_table to_restore ; k () end else lst_top_mode := Delim (n-1,to_restore) | _ -> assert false in let to_restore = init_char_table_delim chars wrapper in lst_top_mode := Delim (1+String.length s, to_restore) ; wrapper old_process lb c (* Process functions *) let lst_do_gobble mode n = if n > 1 then lst_top_mode := Gobble (mode,n-1) else lst_top_mode := mode let lst_do_escape mode endchar math _lb lxm = if lxm = endchar then begin scan_this main "\\begingroup\\lst@escapebegin" ; if math then scan_this main "$" ; scan_this main (Out.to_string lst_buff) ; if math then scan_this main "$" ; scan_this main "\\lst@escapeend\\endgroup" ; lst_top_mode := mode end else Out.put_char lst_buff lxm (* let debug_curline msg = eprintf "%s: %s\n" msg (Scan.get_this_main "\\usebox{\\@curline}") *) (* We put those here since newlines may terminate comments *) let begin_comment () = lst_output_token () ; scan_this Scan.main "\\begin{lrbox}{\\lst@box}" and end_comment sty () = scan_this Scan.main (Printf.sprintf "\\end{lrbox}{%s{\\lst@box}}" sty) let end_string to_restore = scan_this Scan.main "\\end{lrbox}{\\lst@stringstyle{\\lst@box}}" ; restore_char_table to_restore ; lst_showspaces := !lst_save_spaces let rec end_mode mode = match mode with | Comment (style,_) -> end_comment style () | String (_,to_restore) -> end_string to_restore | Skip m|StartNextLine (m,_) -> end_mode m | _ -> () (* Utilities *) let zyva_all xs ys zyva = List.iter (fun x -> List.iter (fun y -> zyva x y) ys) xs let gettoks cmd = match Latexmacros.find_fail cmd with | _,Toks r-> r | _ -> assert false (* Number of (printed) source blocks in a listing *) let lst_nblocks = ref 0 (* Note, at the moment lst_process_newline is the only processor that can start/stop output, 1. Process_newline is fooled by using lst_first/lst_last variables 2. This process_newlines must sometime not increase line numbers, ie, when there is in fact no eol *) let is_comment_line = function | Comment (_, Line) -> true | _ -> false let rec lst_process_newline real_eol lb c = if !verbose > 1 then fprintf stderr "lst_process_newline: mode=%s first=%i last=%i nlines=%i\n" (string_of_top_mode !lst_top_mode) !lst_first !lst_last !lst_nlines ; match !lst_top_mode with | Skip newmode -> if !lst_nlines = !lst_first - 1 then begin lst_top_mode := newmode ; lst_process_newline real_eol lb c ; if !lst_nblocks = 0 then scan_this Scan.main (if !lst_first=1 then "\\let\\lst@br\\lst@@@br" else "\\let\\lst@br\\lst@@br") end else begin if real_eol then begin incr lst_nlines ; scan_this Scan.main "\\lsthk@InitVarEOL" end end | StartNextLine (newmode,to_activate) -> lst_first := !lst_nlines+1 ; lst_top_mode := Skip newmode ; lst_process_newline real_eol lb c ; to_activate := true (* | EndNextLine (mode) -> lst_last := !lst_nlines ; lst_top_mode := mode ; lst_process_newline real_eol lb c *) | Gobble (mode,_) -> lst_top_mode := mode ; lst_process_newline real_eol lb c | Escape (_mode,cc,math) -> lst_do_escape (Comment ("\\@empty",Line)) cc math lb c ; if is_comment_line !lst_top_mode then lst_process_newline real_eol lb c | Comment (style, Line) -> lst_output_token () ; end_comment style () ; lst_top_mode := Normal ; lst_process_newline real_eol lb c | Delim (_, _) -> assert false | String _|Normal|Comment (_,(Balanced _|Nested _)) as mode -> if real_eol then scan_this Scan.main "\\lsthk@InitVarEOL\\lsthk@EOL" ; begin match !lst_scan_mode with | Empty -> lst_scan_mode := Start | Start -> () | _ -> lst_output_token () ; lst_scan_mode := Start end ; let next_line = !lst_nlines+1 in if next_line <= !lst_last then begin lst_col := 0 ; scan_this Scan.main "\\lsthk@InitVarBOL\\lsthk@EveryLine" ; if !lst_gobble > 0 then lst_top_mode := Gobble (mode,!lst_gobble) end else begin incr lst_nblocks ; lst_col := 0 ; scan_this Scan.main "\\lsthk@InitVarBOL\\lsthk@LastLine" ; set_next_linerange mode end ; if real_eol then lst_nlines := next_line (***************) (* Line ranges *) (***************) and process_EMark active rest_E old_process lb c = if !active && if_next_string rest_E lb then begin active := false ; let zyva x () = lst_last := x ; lst_process_newline false lb c in if !lst_includerangemarker then begin delay_action (zyva (!lst_nlines-1)) (ref !lst_top_mode) old_process lb c rest_E end else begin zyva (!lst_nlines-1) () ; old_process lb c end end else old_process lb c and lst_process_BMark active to_activate mark_start old_process lb c = if !active then begin match !lst_top_mode with | Skip newmode when if_next_string mark_start lb -> active := false ; lst_last := 99999 ; if !lst_includerangemarker then begin lst_first := !lst_nlines+1 ; lst_process_newline false lb c ; delay_action (fun () -> to_activate := true) (ref newmode) old_process lb c mark_start end else begin lst_top_mode := StartNextLine (newmode, to_activate) ; old_process lb c end | Escape (_, _, _)|Gobble (_, _)|Delim (_, _)| Comment (_,_)|String _| (* EndNextLine _| *) StartNextLine (_,_)|Skip _|Normal -> old_process lb c end else old_process lb c and init_marker mark_start activate_end = let head_S = mark_start.[0] and rest_S = String.sub mark_start 1 (String.length mark_start-1) in lst_init_save_char head_S (lst_process_BMark (ref true) activate_end rest_S) and set_next_linerange mode = match !lst_linerange with | [] -> lst_first := 99999 ; lst_top_mode := Skip mode | (fst, lst)::rem -> if !verbose > 1 then eprintf "SET LINERANGE: %s %s\n" (pmark fst) (pmark lst) ; lst_linerange := rem ; let activate_end = ref false in begin match lst with | LineNumber x -> lst_last := x | Marker all_E -> lst_last := 99999 ; let zyva pref suf = let all_E = pref ^ all_E ^ suf in let head_E = all_E.[0] and rest_E = String.sub all_E 1 (String.length all_E-1) in lst_init_save_char head_E (process_EMark activate_end rest_E) in zyva_all (gettoks "\\lst@rangeendprefix") (gettoks "\\lst@rangeendprefix") zyva end ; begin match fst with | LineNumber x -> if !verbose > 1 then eprintf "fst=%i, nlines=%i\n" x !lst_nlines ; lst_first := x ; if !lst_nlines+1 < x then begin lst_top_mode := Skip mode end else begin if !lst_nblocks = 0 then scan_this Scan.main "\\let\\lst@br\\lst@@@br" ; lst_top_mode := mode end | Marker tok -> let zyva pref suf = let tok = pref ^ tok ^ suf in lst_first := -1 ; lst_top_mode := Skip mode ; init_marker tok activate_end in zyva_all (gettoks "\\lst@rangebeginprefix") (gettoks "\\lst@rangebeginsuffix") zyva end let lst_process_letter lb lxm = if !verbose > 1 then fprintf stderr "lst_process_letter: %c\n" lxm ; match !lst_top_mode with | Skip _|StartNextLine (_,_) -> () | Gobble (mode,n) -> lst_do_gobble mode n | Escape (mode,c,math) -> lst_do_escape mode c math lb lxm | _ -> match !lst_scan_mode with | Letter -> lst_put lxm | Directive true -> lst_put lxm | Directive false -> lst_scan_mode := Directive true ; lst_put lxm | Empty|Start -> lst_scan_mode := Letter ; lst_put lxm | Other -> lst_output_other () ; lst_scan_mode := Letter ; lst_put lxm let lst_process_digit lb lxm = if !verbose > 1 then fprintf stderr "lst_process_digit: %c\n" lxm ; match !lst_top_mode with | Skip _|StartNextLine (_,_) -> () | Gobble (mode,n) -> lst_do_gobble mode n | Escape (mode,c,math) -> lst_do_escape mode c math lb lxm | _ -> match !lst_scan_mode with | Letter|Other -> lst_put lxm | Directive _ -> lst_output_directive () ; lst_scan_mode := Other ; lst_put lxm | Empty|Start -> lst_scan_mode := Other ; lst_put lxm let lst_process_other lb lxm = if !verbose > 1 then fprintf stderr "process_other: %c\n" lxm ; match !lst_top_mode with | Skip _|StartNextLine (_,_) -> () | Gobble (mode,n) -> lst_do_gobble mode n | Escape (mode,c,math) -> lst_do_escape mode c math lb lxm | _ -> match !lst_scan_mode with | Other -> lst_put lxm | Empty|Start -> lst_scan_mode := Other ; lst_put lxm | Directive _ -> lst_output_directive () ; lst_scan_mode := Other ; lst_put lxm | Letter -> lst_output_letter () ; lst_scan_mode := Other ; lst_put lxm (* Caml code for \stepcounter{lst@space} *) let lst_output_space () = incr lst_col ; Counter.step_counter "lst@spaces" let lst_process_space lb lxm = if !verbose > 1 then fprintf stderr "process_space: '%s'\n" (Char.escaped lxm) ; match !lst_top_mode with | Skip _ |StartNextLine (_,_)-> () | Gobble (mode,n) -> lst_do_gobble mode n | Escape (mode,c,math) -> lst_do_escape mode c math lb lxm | _ -> begin match !lst_scan_mode with | Other -> lst_output_other () ; lst_scan_mode := Empty | Letter|Directive true -> lst_output_token () ; lst_scan_mode := Empty | Empty|Directive false -> () | Start -> lst_scan_mode := Empty end ; lst_output_space () let lst_process_tab lb lxm = if !verbose > 1 then fprintf stderr "process_tab: '%s'\n" (Char.escaped lxm) ; let n = !lst_tabsize - (!lst_col mod !lst_tabsize) in if !lst_showtabs && is_normal !lst_top_mode then begin lst_output_token () ; if Latexmacros.exists "\\lst@tab" then begin for _i = 1 to n-1 do lst_process_space lb lxm done ; let save = !lst_showspaces in lst_showspaces := false ; lst_output_token () ; lst_showspaces := save ; (* Assumes that the tab equivalent is one-char wide *) incr lst_col ; scan_this main "{\\lst@tab}" end else begin for _i = 1 to n do lst_process_space lb lxm done ; let save = !lst_showspaces in lst_showspaces := true ; lst_output_token () ; lst_showspaces := save end end else begin for _i = 1 to n do lst_process_space lb lxm done end let lst_process_start_directive old_process lb lxm = match !lst_top_mode with | Normal -> begin match !lst_scan_mode with | Start -> lst_scan_mode := Directive false | _ -> old_process lb lxm end | _ -> old_process lb lxm exception EndVerb let lst_process_end endstring old_process lb lxm = if !verbose > 1 then fprintf stderr "process_end: %c\n" lxm ; if (not !input_verb || MyStack.empty stack_lexbuf) && if_next_string endstring lb then begin Save.skip_delim endstring lb ; raise EndVerb end else old_process lb lxm let lst_init_char_table inline = lst_init_chars "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_$" lst_process_letter ; lst_init_chars "!\"#%&'()*+,-./:;<=>?[\\]^{}|`~" lst_process_other ; lst_init_chars "0123456789" lst_process_digit ; lst_init_char ' ' lst_process_space ; lst_init_char '\t' lst_process_tab ; if inline then lst_init_char '\n' lst_process_space else lst_init_char '\n' (lst_process_newline true) ;; (* TeX escapes *) let start_escape mode endchar math = lst_output_token () ; lst_top_mode := Escape (mode, endchar, math) let lst_process_escape math ec old_process lb lxm = if !verbose > 1 then fprintf stderr "lst_process_escape: %c\n" lxm ; match !lst_top_mode with | Skip _|StartNextLine (_,_) -> () | Gobble (mode,n) -> lst_do_gobble mode n | Escape _ -> old_process lb lxm | mode -> start_escape mode ec math (* Strings *) let lst_bs_string process_c c old_process lb lxm = if !verbose > 1 then begin eprintf "lst_bs_string: %c\n" lxm end ; (* Processs backslash, as usual *) old_process lb lxm ; (* Change char_tables for backshalsh and c *) let saved = Array.copy lst_char_table in let restore_lst_char_table () = Array.blit saved 0 lst_char_table 0 (Array.length saved) in lst_char_table.(Char.code lxm) <- old_process ; lst_char_table.(Char.code c) <- process_c ; (* Change all entries in char_table, -> restore table once the backslashed char is processed *) for i = 0 to Array.length lst_char_table-1 do let do_process = lst_char_table.(i) in lst_char_table.(i) <- (fun lb lxm -> do_process lb lxm ; restore_lst_char_table ()) done (* c is the character to be quoted *) let lst_init_quote old_process c s = let r = ref [] in for i = 0 to String.length s-1 do if s.[i] = 'b' then begin r := ('\\',lst_char_table.(Char.code '\\')) :: !r ; lst_init_save_char '\\' (lst_bs_string old_process c) end done ; !r let lst_process_stringizer quote old_process lb lxm = match !lst_top_mode with | Normal -> lst_output_token () ; let to_restore = lst_init_quote old_process lxm quote in lst_top_mode := String (lxm, to_restore) ; lst_save_spaces := !lst_showspaces ; lst_showspaces := !lst_string_spaces ; scan_this Scan.main "\\begin{lrbox}{\\lst@box}" ; old_process lb lxm | String (c,to_restore) when lxm = c -> old_process lb lxm ; lst_output_token () ; end_string to_restore ; lst_top_mode := Normal | _ -> old_process lb lxm (* Comment *) let lst_process_BNC visi sty _ s old_process lb c = match !lst_top_mode with | Normal when if_next_string s lb -> begin_comment () ; do_eat_delim visi (fun () -> ()) (Comment (sty,Nested 0)) old_process lb c s | Comment (sty,Nested n) when if_next_string s lb -> eat_delim (fun () -> ()) (Comment (sty,Nested (n+1))) old_process lb c s | _ -> old_process lb c and lst_process_ENC visi s old_process lb c = match !lst_top_mode with | Comment (sty,Nested 0) when if_next_string s lb -> do_eat_delim visi (end_comment sty) Normal old_process lb c s | Comment (sty,Nested n) when if_next_string s lb -> eat_delim (fun () -> ()) (Comment (sty,Nested (n-1))) old_process lb c s | _ -> old_process lb c let lst_process_BBC visi sty check s old_process lb c = match !lst_top_mode with | Normal when if_next_string s lb -> begin_comment () ; do_eat_delim visi (fun () -> ()) (Comment (sty, Balanced check)) old_process lb c s | _ -> old_process lb c and lst_process_EBC visi s old_process lb c = match !lst_top_mode with | Comment (sty,Balanced check) when check c s && if_next_string s lb -> do_eat_delim visi (end_comment sty) Normal old_process lb c s | _ -> old_process lb c let lst_process_LC visi sty s old_process lb c = match !lst_top_mode with | Normal when if_next_string s lb -> begin_comment () ; do_eat_delim visi (fun () -> ()) (if !lst_texcl then Escape (Normal,'\n', false) else Comment (sty,Line)) old_process lb c s | _ -> old_process lb c } let command_name = '\\' (( ['@''A'-'Z' 'a'-'z']+ '*'?) | [^ 'A'-'Z' 'a'-'z'] | "\\*") rule inverb verb_delim put = parse | (_ as c) {if c = verb_delim then begin Dest.close_group () ; end else begin put c (fun () -> read_lexbuf lexbuf) ; inverb verb_delim put lexbuf end} | eof {if not (empty stack_lexbuf) then let lexbuf = previous_lexbuf () in inverb verb_delim put lexbuf else raise (VError ("End of file after \\verb"))} and start_inverb put = parse | (_ as c) {inverb c put lexbuf} | eof {if not (empty stack_lexbuf) then let lexbuf = previous_lexbuf () in start_inverb put lexbuf else raise (VError ("End of file after \\verb"))} and scan_byline process finish = parse | "\\end" [' ''\t']* '{' ([^'}']+ as env) '}' as lxm {if (not !input_verb || MyStack.empty stack_lexbuf) && env = !Scan.cur_env then begin finish () ; scan_this Scan.main ("\\end"^env) ; Scan.top_close_block "" ; Scan.close_env !Scan.cur_env ; Scan.check_alltt_skip lexbuf end else begin Out.put line_buff lxm ; scan_byline process finish lexbuf end} | '\n' {process () ; scan_byline process finish lexbuf} | _ as lxm {Out.put_char line_buff lxm ; scan_byline process finish lexbuf} | eof {if not (MyStack.empty stack_lexbuf) then begin let lexbuf = previous_lexbuf () in scan_byline process finish lexbuf end else begin finish () ; raise (Eof "scan_byline") end} and scan_bycommand out is_cmd = parse | "\\end" [' ''\t']* '{' ([^'}']+ as env) '}' as lxm {if env = !Scan.cur_env then begin Latexmacros.def "\\@tmp@scanned" zero_pat (Toks [Out.to_string out]) ; lxm end else begin Out.blit out lexbuf ; scan_bycommand out is_cmd lexbuf end} | "\\verb" {Out.blit out lexbuf ; Save.start_echo () ; ignore (arg_verbatim lexbuf) ; let a = Save.get_echo () in Out.put out a ; scan_bycommand out is_cmd lexbuf} | command_name as lxm {if is_cmd lxm then begin Latexmacros.def "\\@tmp@scanned" zero_pat (Toks [Out.to_string out]) ; Scan.expand_command lxm lexbuf ; Out.reset out end else begin Out.blit out lexbuf ; end ; scan_bycommand out is_cmd lexbuf} | ('%' [^'\n']* '\n'?) | _ { Out.blit out lexbuf ; scan_bycommand out is_cmd lexbuf } | eof {if not (MyStack.empty stack_lexbuf) then begin let lexbuf = previous_lexbuf () in scan_bycommand out is_cmd lexbuf end else begin raise (Eof "scan_bycommand") end} and listings = parse | eof {if not (MyStack.empty stack_lexbuf) then begin let lexbuf = previous_lexbuf () in listings lexbuf end else begin raise (Eof "listings") end} | (_ as lxm) {lst_char_table.(Char.code lxm) lexbuf lxm ; listings lexbuf} and eat_line = parse | eof {if not (MyStack.empty stack_lexbuf) then begin let lexbuf = previous_lexbuf () in eat_line lexbuf end else begin raise (Eof "eat_line") end} | [^'\n'] {eat_line lexbuf} | '\n' {lst_process_newline true lexbuf '\n'} and get_line = parse | eof {if not (MyStack.empty stack_lexbuf) then begin let lexbuf = previous_lexbuf () in get_line lexbuf end else begin raise (Eof "get_line") end} | [^'\n'] {let lxm = lexeme_char lexbuf 0 in Out.put_char line_buff lxm ; get_line lexbuf} | '\n' {Out.to_string line_buff} and do_escape = parse | eof {()} | "\\esc" {let arg = save_arg lexbuf in scan_this main "\\mbox{" ; scan_this_arg Scan.main arg ; scan_this main "}" ; do_escape lexbuf} | _ as lxm {Scan.translate_put_unicode lxm (fun () -> read_lexbuf lexbuf) ; do_escape lexbuf} and read_lexbuf = parse | eof { -1 } | _ as c { Char.code c } and lst_linearg = parse | '-'? (['0'-'9']+ as n) {LineNumber (int_of_string n)} | '-'? ([^'-'',']+ as tok) {Marker tok} | "" {raise ParseError} and lst_parse_linerange = parse | eof {[]} | ","? {let fst = lst_linearg lexbuf in let lst = lst_linearg lexbuf in (fst,lst)::lst_parse_linerange lexbuf} { let _ = () ;; let put_char_star c next = match c with | ' '|'\t' -> Dest.put_char '_' ; | c -> Scan.translate_put_unicode c next and put_char c next = match c with | '\t' -> Dest.put_char ' ' | c -> Scan.translate_put_unicode c next ;; let open_verb put lexbuf = Dest.open_group "code" ; start_inverb put lexbuf ;; def_code "\\verb" (open_verb put_char) ; def_code "\\verb*" (open_verb put_char_star); ();; let put_line_buff_verb () = Out.iter_next put_char line_buff ; Out.reset line_buff and put_line_buff_verb_star () = Out.iter_next put_char_star line_buff ; Out.reset line_buff ;; let noeof lexer lexbuf = try lexer lexbuf with | Eof s -> raise (Misc.Close ("End of file in environment: ``"^ !Scan.cur_env^"'' ("^s^")")) | EndVerb -> () let getclass env = Scan.get_prim (Printf.sprintf "\\envclass@attr{%s}" env) let open_verbenv star = Scan.top_open_block "pre" (getclass "verbatim") ; let process = wrap_eat_fst_nl (if star then (fun () -> put_line_buff_verb_star () ; Dest.put_char '\n') else (fun () -> put_line_buff_verb () ; Dest.put_char '\n')) and finish = if star then put_line_buff_verb_star else put_line_buff_verb in process, finish and close_verbenv _ = Scan.top_close_block "pre" let put_html () = Out.iter (fun c -> Dest.put_char c) line_buff ; Out.reset line_buff ;; let open_forget lexbuf = let process = (fun () -> Out.reset line_buff) and finish = (fun () -> Out.reset line_buff) in noeof (scan_byline process finish) lexbuf let open_raw lexbuf = let process = (fun () -> put_html () ; Dest.put_char '\n') and finish = put_html in noeof (scan_byline process finish) lexbuf let open_rawhtml lexbuf = match !Parse_opts.destination with | Parse_opts.Html -> open_raw lexbuf | _ -> open_forget lexbuf let open_rawtext lexbuf = match !Parse_opts.destination with | Parse_opts.Text|Parse_opts.Info -> open_raw lexbuf | _ -> open_forget lexbuf let close_nothing _ = () let open_tofile chan lexbuf = let process = (fun () -> output_string chan (Out.to_string line_buff) ; output_char chan '\n') and finish = (fun () -> output_string chan (Out.to_string line_buff) ; close_out chan) in noeof (scan_byline process finish) lexbuf (* and close_tofile _lexbuf = () *) let put_line_buff_image () = Out.iter (fun c -> Image.put_char c) line_buff ; Out.reset line_buff let open_verbimage lexbuf = let process = (fun () -> put_line_buff_image () ; Image.put_char '\n') and finish = put_line_buff_image in noeof (scan_byline process finish) lexbuf (* and close_verbimage _ = () *) ;; def_code "\\verbatim" (fun lexbuf -> let p,f = open_verbenv false in noeof (scan_byline p f) lexbuf) ; def_code "\\endverbatim" close_verbenv ; def_code "\\verbatim*" (fun lexbuf -> let p, f = open_verbenv true in noeof (scan_byline p f) lexbuf) ; def_code "\\endverbatim*" close_verbenv ; def_code "\\rawtext" open_rawtext ; def_code "\\endrawtext" close_nothing ; def_code "\\rawhtml" open_rawhtml ; def_code "\\endrawhtml" close_nothing ; def_code "\\raw" open_raw ; def_code "\\endraw" close_nothing ; def_code "\\verblatex" open_forget ; def_code "\\endverblatex" Scan.check_alltt_skip ; def_code "\\verbimage" open_verbimage ; def_code "\\endverbimage" Scan.check_alltt_skip ; () ;; let init_verbatim () = (* comment clashes with the ``comment'' package *) Latexmacros.def "\\comment" zero_pat (CamlCode open_forget) ; Latexmacros.def "\\endcomment" zero_pat (CamlCode Scan.check_alltt_skip) ; () ;; register_init "verbatim" init_verbatim ;; (* The program package for JJL que j'aime bien *) let look_escape () = let lexbuf = MyLexing.from_string (Out.to_string line_buff) in do_escape lexbuf ;; let init_program () = def_code "\\program" (fun lexbuf -> Scan.top_open_block "pre" "" ; let process = (fun () -> look_escape () ; Dest.put_char '\n') and finish = look_escape in noeof (scan_byline process finish) lexbuf) ; def_code "\\endprogram" close_verbenv ;; register_init "program" init_program ;; (* The moreverb package *) let tab_val = ref 8 let put_verb_tabs () = let char = ref 0 in Out.iter_next (fun c next -> match c with | '\t' -> let limit = !tab_val - !char mod !tab_val in for _j = 1 to limit do Dest.put_char ' ' ; incr char done ; | c -> Scan.translate_put_unicode c next ; incr char) line_buff ; Out.reset line_buff let open_verbenv_tabs () = Scan.top_open_block "pre" "" ; let process = (fun () -> put_verb_tabs () ; Dest.put_char '\n') and finish = put_verb_tabs in process, finish and close_verbenv_tabs lexbuf = Scan.top_close_block "pre" ; Scan.check_alltt_skip lexbuf ;; let line = ref 0 and interval = ref 1 ;; let output_line inter_arg star = if !line = 1 || !line mod inter_arg = 0 then scan_this Scan.main ("\\listinglabel{"^string_of_int !line^"}") else Dest.put " " ; if star then put_line_buff_verb_star () else put_verb_tabs () ; incr line let open_listing start_arg inter_arg star = Scan.top_open_block "pre" "" ; line := start_arg ; let first_line = ref true in let process = (fun () -> if !first_line then begin first_line := false ; if not (Out.is_empty line_buff) then output_line inter_arg star ; end else output_line inter_arg star ; Dest.put_char '\n') and finish = (fun () -> if not (Out.is_empty line_buff) then output_line inter_arg star) in process, finish and close_listing lexbuf = Scan.top_close_block "pre" ; Scan.check_alltt_skip lexbuf ;; register_init "moreverb" (fun () -> def_code "\\verbatimwrite" (fun lexbuf -> let name = Scan.get_prim_arg lexbuf in Scan.check_alltt_skip lexbuf ; let chan = open_out name in open_tofile chan lexbuf) ; def_code "\\endverbatimwrite" Scan.check_alltt_skip ; def_code "\\verbatimtab" (fun lexbuf -> let opt = Get.get_int (save_opt "\\verbatimtabsize" lexbuf) in tab_val := opt ; let p, f = open_verbenv_tabs () in Lexstate.save_lexstate () ; let first = get_line lexbuf in Lexstate.restore_lexstate () ; scan_this Scan.main first ; Dest.put_char '\n' ; noeof (scan_byline p f) lexbuf) ; def_code "\\endverbatimtab" close_verbenv_tabs ; (* def_code "\\verbatimtabinput" (fun lexbuf -> let opt = Get.get_int (save_opt "\\verbatimtabsize" lexbuf) in tab_val := opt ; let name = Scan.get_prim_arg lexbuf in open_verbenv_tabs () ; verb_input scan_byline name ; close_verbenv_tabs lexbuf) ; *) def_code "\\listinglabel" (fun lexbuf -> let arg = Get.get_int (save_body lexbuf) in Dest.put (sprintf "%4d " arg)) ; def_code "\\listing" (fun lexbuf -> let inter = Get.get_int (save_opt "1" lexbuf) in let start = Get.get_int (save_body lexbuf) in interval := inter ; let p, f = open_listing start inter false in noeof (scan_byline p f) lexbuf) ; def_code "\\endlisting" close_listing ; def_code "\\listingcont" (fun lexbuf -> let p, f = open_listing !line !interval false in noeof (scan_byline p f) lexbuf) ; def_code "\\endlistingcont" close_listing ; def_code "\\listing*" (fun lexbuf -> let inter = Get.get_int (save_opt "1" lexbuf) in let start = Get.get_int (save_body lexbuf) in interval := inter ; let p, f = open_listing start inter true in noeof (scan_byline p f) lexbuf) ; def_code "\\endlisting*" close_listing ; def_code "\\listingcont*" (fun lexbuf -> Scan.check_alltt_skip lexbuf ; let p, f = open_listing !line !interval false in noeof (scan_byline p f) lexbuf) ; def_code "\\endlistingcont*" close_listing ; ()) (* The comment package *) let init_comment () = def_code "\\@excludecomment" open_forget ; def_code "\\end@excludecomment" Scan.check_alltt_skip ; ;; register_init "comment" init_comment ;; (* And preview, which is identical, up to interface *) let init_preview () = def_code "\\@prw" open_forget ; def_code "\\end@prw" Scan.check_alltt_skip ; ;; register_init "preview" init_preview ;; (* The listings package *) let default_linerange = [LineNumber 1, LineNumber 99999] let parse_linerange s = let r = try lst_parse_linerange (MyLexing.from_string s) with | ParseError -> warning ("lst: invalid linerange '"^s^"'") ; default_linerange in match r with | [] -> default_linerange | _ -> r (* Caml code for \def\lst@spaces {\whiledo{\value{lst@spaces}>0}{~\addtocounter{lst@spaces}{-1}}} *) let code_spaces _lexbuf = let n = Counter.value_counter "lst@spaces" in if !lst_showspaces then for _i = n-1 downto 0 do Dest.put_char '_' done else begin for _i = n-1 downto 0 do Dest.put_nbsp () done end ; Counter.set_counter "lst@spaces" 0 ;; let check_style sty = if String.length sty > 0 && sty.[0] == '\\' then sty else "\\csname lst@"^sty^"\\endcsname" let check_visi = function | "visible" -> true | "invisible" -> false | _ -> assert false let do_code_double_delim process_B process_E lexbuf = let sty = subst_arg lexbuf in let sty = check_style sty in let lxm_B = get_prim_arg lexbuf in let lxm_E = get_prim_arg lexbuf in if lxm_B <> "" && lxm_E <> "" then begin let head_B = lxm_B.[0] and rest_B = String.sub lxm_B 1 (String.length lxm_B-1) and head_E = lxm_E.[0] and rest_E = String.sub lxm_E 1 (String.length lxm_E-1) in lst_init_save_char head_B (process_B sty (fun c s -> c = head_E && s = rest_E) rest_B) ; lst_init_save_char head_E (process_E rest_E) end let code_double_delim process_B process_E lexbuf = do_code_double_delim (process_B true) (process_E true) lexbuf let code_single_delim process_B process_E lexbuf = let visi = check_visi (get_prim_arg lexbuf) in do_code_double_delim (process_B visi) (process_E visi) lexbuf let do_code_line is_com lexbuf = let visi = check_visi (get_prim_arg lexbuf) in let visi = if is_com && not visi then begin Misc.warning "invisible commments not available" ; true end else visi in let sty = subst_arg lexbuf in let sty = check_style sty in let lxm_LC = get_prim_arg lexbuf in if lxm_LC <> "" then begin let head = lxm_LC.[0] and rest = String.sub lxm_LC 1 (String.length lxm_LC-1) in lst_init_save_char head (lst_process_LC visi sty rest) end let code_line_comment = do_code_line true and code_line_delim = do_code_line false let code_stringizer lexbuf = let mode = Scan.get_prim_arg lexbuf in let _sty = subst_arg lexbuf in let schars = Scan.get_prim_arg lexbuf in lst_init_save_chars schars (lst_process_stringizer mode) ;; let lst_finalize inline = if inline then begin lst_output_token () end else begin if is_outputing !lst_top_mode then begin scan_this main "\\lst@forget@lastline\\lsthk@LastLine" ; end end ; end_mode !lst_top_mode ;; let open_lst_inline keys = scan_this Scan.main "\\lsthk@PreSet" ; scan_this_list Scan.main ("\\lstset{"::keys@["}"]) ; (* scan_this Scan.main "\\lsthk@AfterSetLanguage" ; *) (* For inline *) scan_this Scan.main "\\lsthk@InlineUnsave" ; (* Ignoring output *) lst_gobble := Get.get_int_string (string_to_arg "\\lst@gobble") ; lst_first := Get.get_int_string (string_to_arg "\\lst@first") ; lst_last := Get.get_int_string (string_to_arg "\\lst@last") ; lst_nlines := 0 ; lst_init_char_table true ; scan_this Scan.main "\\lsthk@SelectCharTable" ; if !lst_extended then for i = 128 to 255 do lst_init_char (Char.chr i) lst_process_letter done ; scan_this Scan.main "\\lsthk@Init" ; (* Change char categories *) let alsoletter = Scan.get_prim "\\lst@alsoletter" in if alsoletter <> "" then begin lst_init_chars alsoletter lst_process_letter end ; (* Directives *) if !lst_directives then begin lst_init_save_char '#' lst_process_start_directive end ; (* Print key *) if not !lst_print then begin lst_last := -2 ; lst_first := -1 end ; (* Strings *) (* Escapes to TeX *) if !lst_mathescape then begin lst_init_save_char '$' (lst_process_escape true '$') end ; let begc = Scan.get_this_main "\\@getprintnostyle{\\lst@BET}" and endc = Scan.get_this_main "\\@getprintnostyle{\\lst@EET}" in if begc <> "" && endc <> "" then begin lst_init_save_char begc.[0] (lst_process_escape false endc.[0]) end ; scan_this Scan.main "\\lsthk@InitVar" ; lst_scan_mode := Empty ; lst_top_mode := Normal and close_lst_inline () = lst_finalize true ; while !Scan.cur_env = "command-group" do scan_this Scan.main "\\endgroup" done ; scan_this Scan.main "\\lsthk@DeInit" ;; let lst_user_name name = name^"@lst@user" let close_lst_env name = let com_name = (end_env (lst_user_name name)) in lst_finalize false ; scan_this Scan.main "\\lsthk@DeInit" ; scan_this Scan.main com_name let open_lst_env name = let com_name = (start_env (lst_user_name name)) in (fun lexbuf -> Image.stop () ; scan_this Scan.main "\\lsthk@PreSet" ; expand_command_no_skip com_name lexbuf ; (* scan_this Scan.main "\\lsthk@AfterSetLanguage" ; *) lst_init_char_table false ; scan_this Scan.main "\\lsthk@SelectCharTable" ; if !lst_extended then for i = 128 to 255 do lst_init_char (Char.chr i) lst_process_letter done ; (* Set and exploit command sequence *) scan_this Scan.main "\\lsthk@Init" ; lst_gobble := Get.get_int_string (string_to_arg "\\lst@gobble") ; let linerange = Scan.get_prim "\\lst@linerange" in lst_linerange := parse_linerange linerange ; lst_nlines := 0 ; lst_nblocks := 0 ; lst_tabsize := Get.get_int_string (string_to_arg "\\lst@tabsize") ; (* Change char categories *) let alsoletter = Scan.get_prim "\\lst@alsoletter" in if alsoletter <> "" then begin lst_init_chars alsoletter lst_process_letter end ; (* Directives *) if !lst_directives then begin lst_init_save_char '#' lst_process_start_directive end ; (* Print key *) if not !lst_print then begin lst_last := -2 ; lst_first := -1 end ; (* Escapes to TeX *) if !lst_mathescape then begin lst_init_save_char '$' (lst_process_escape true '$') end ; let begc = Scan.get_this_main "\\@getprintnostyle{\\lst@BET}" and endc = Scan.get_this_main "\\@getprintnostyle{\\lst@EET}" in if begc <> "" && endc <> "" then begin lst_init_save_char begc.[0] (lst_process_escape false endc.[0]) end ; scan_this Scan.main "\\lsthk@InitVar" ; lst_scan_mode := Empty ; set_next_linerange Normal ; scan_this Scan.main "\\lst@pre\\@lst@caption\\@open@lstbox" ; scan_this Scan.main "\\lst@basicstyle" ; (* Eat first line *) save_lexstate () ; noeof eat_line lexbuf ; restore_lexstate () ; if !Misc.verbose > 1 then eprintf "LISTINGS: first line is scanned\n" ; (* For detecting endstring, must be done after eat_line *) lst_init_save_char '\\' (lst_process_end ("end{"^name^"}")) ; noeof listings lexbuf ; if !Misc.verbose > 1 then eprintf "LISTINGS: scanning over\n" ; close_lst_env name ; scan_this Scan.main "\\@close@lstbox\\lst@post" ; Scan.top_close_block "" ; Scan.close_env !Scan.cur_env ; Image.restart () ; Scan.check_alltt_skip lexbuf) ;; let do_newenvironment lexbuf = let name = get_prim_arg lexbuf in let nargs,optdef = match save_opts ["0" ; ""] lexbuf with | [x ; y ] -> x,y | _ -> assert false in let body1 = subst_body lexbuf in let body2 = subst_body lexbuf in if Latexmacros.exists (start_env name) || Latexmacros.exists (end_env name) then warning ("Not (re)-defining environment ``"^name^"'' with \\lstnewenvironment") else begin Latexmacros.def (start_env (lst_user_name name)) (latex_pat (match optdef with | {arg=No _} -> [] | {arg=Yes s ; subst=env} -> [do_subst_this_list (mkarg s env)]) (match nargs with | {arg=No _} -> 0 | {arg=Yes s ; subst=env} -> Get.get_int (mkarg s env))) (Subst body1) ; Latexmacros.def (end_env (lst_user_name name)) zero_pat (Subst body2) ; def_code (start_env name) (open_lst_env name) end let lst_boolean lexbuf = let b = get_prim_arg lexbuf in Dest.put (match b with | "" -> "false" | s when s.[0] = 't' || s.[0] = 'T' -> "true" | _ -> "false") ;; def_code "\\@callopt" (fun lexbuf -> let csname = Scan.get_csname lexbuf in let all_arg = get_prim_arg lexbuf in let lexarg = MyLexing.from_string all_arg in let opt = Subst.subst_opt "" lexarg in let arg = Save.rest lexarg in let exec = csname::"["::opt@["]{";arg;"}"] in scan_this_list Scan.main exec) type css_border = None | Solid | Double (* let echo name n lexbuf = Printf.eprintf "Command %s\n" name ; for i = 1 to n do let arg = subst_arg lexbuf in Printf.eprintf " %i: <<%s>>\n" i arg done *) let init_listings () = Scan.newif_ref "lst@print" lst_print ; Scan.newif_ref "lst@includerangemarker" lst_includerangemarker ; Scan.newif_ref "lst@extendedchars" lst_extended ; Scan.newif_ref "lst@texcl" lst_texcl ; Scan.newif_ref "lst@sensitive" lst_sensitive ; Scan.newif_ref "lst@mathescape" lst_mathescape ; Scan.newif_ref "lst@directives" lst_directives ; Scan.newif_ref "lst@stringspaces" lst_string_spaces ; Scan.newif_ref "lst@showlines" lst_showlines ; Scan.newif_ref "lst@showspaces" lst_showspaces ; Scan.newif_ref "lst@showtabs" lst_showtabs ; def_code "\\lst@spaces" code_spaces ; def_code "\\lst@boolean" lst_boolean ; def_code "\\lst@def@stringizer" code_stringizer ; def_code "\\lst@AddTo" (fun lexbuf -> let sep = Scan.get_prim_arg lexbuf in let name = Scan.get_csname lexbuf in let old = try match Latexmacros.find_fail name with | _, Subst s -> s | _,_ -> [] with | Latexmacros.Failed -> [] in let toadd = get_prim_arg lexbuf in Latexmacros.def name zero_pat (Subst (if is_empty_list old then [toadd] else old@[sep;toadd]))) ; def_code "\\lst@lExtend" (fun lexbuf -> let name = Scan.get_csname lexbuf in try match Latexmacros.find_fail name with | _, Subst body -> let toadd = Subst.subst_arg lexbuf in Latexmacros.def name zero_pat (Subst (body @ ["%\n"^toadd])) | _, _ -> warning ("Cannot \\lst@lExtend ``"^name^"''") with | Latexmacros.Failed -> warning ("Cannot \\lst@lExtend ``"^name^"''")) ; def_code "\\lstnewenvironment" do_newenvironment ; (* Special arg parsing for lstlisting *) def_code (start_env (lst_user_name "lstlisting")) (fun lexbuf -> let keys = Subst.subst_opt "" lexbuf in let lab = if Save.if_next_char '\n' lexbuf then "" else Scan.get_prim_arg lexbuf in let lab = if lab = " " then "" else lab in if lab <> "" then def "\\lst@intname" zero_pat (CamlCode (fun _ -> Dest.put lab)) ; scan_this_list Scan.main ("\\lstset{"::keys@["}"])) ; def_code (end_env (lst_user_name "lstlisting")) (fun _ -> ()) ; def_code (start_env "lstlisting") (open_lst_env "lstlisting") ; (* Init comments from .hva *) def_code "\\lst@balanced@comment" (fun lexbuf -> code_double_delim lst_process_BBC lst_process_EBC lexbuf) ; def_code "\\lst@nested@comment" (fun lexbuf -> code_double_delim lst_process_BNC lst_process_ENC lexbuf) ; def_code "\\lst@line@comment" code_line_comment; (* Idem for delimters *) def_code "\\lst@line@delim" code_line_delim ; def_code "\\lst@single@delim" (fun lexbuf -> code_single_delim lst_process_BBC lst_process_EBC lexbuf) ; def_code "\\lstinline" (fun lexbuf -> Image.stop () ; let keys = Subst.subst_opt "" lexbuf in let {arg=arg} = save_verbatim lexbuf in Scan.new_env "*lstinline*" ; scan_this main "\\mbox{" ; open_lst_inline keys ; Dest.open_group "code" ; begin try scan_this listings arg with | Eof _ -> () end ; close_lst_inline () ; Dest.close_group () ; scan_this main "}" ; Scan.close_env "*lstinline*" ; Image.restart ()) ; def_code "\\lst@definelanguage" (fun lexbuf -> let dialect = get_prim_opt "" lexbuf in let language = get_prim_arg lexbuf in let base_dialect = get_prim_opt "!*!" lexbuf in match base_dialect with | "!*!" -> let keys = subst_arg_list lexbuf in let _ = save_opt "" lexbuf in let xs = "\\lst@definelanguage@{"::language::"}{":: dialect::"}{"::keys@["}"] in scan_this_list main xs | _ -> let base_language = get_prim_arg lexbuf in let keys = subst_arg_list lexbuf in let _ = save_opt "" lexbuf in let xs = "\\lst@derivelanguage@{":: language::"}{"::dialect::"}{":: base_language::"}{"::base_dialect::"}{":: keys@["}"] in scan_this_list main xs) ; (* Interpret 'trblTRBL' subset to yield border-style specifications in CSS2 *) let string_of_border = function | None -> "none" | Solid -> "solid" | Double -> "double" in def_code "\\lst@see@frame" (fun lexbuf -> let arg = get_prim_arg lexbuf in let bs = Array.create 4 None in for i = 0 to String.length arg-1 do match arg.[i] with | 't' -> bs.(0) <- Solid | 'T' -> bs.(0) <- Double | 'r' -> bs.(1) <- Solid | 'R' -> bs.(1) <- Double | 'b' -> bs.(2) <- Solid | 'B' -> bs.(2) <- Double | 'l' -> bs.(3) <- Solid | 'L' -> bs.(3) <- Double | _ -> () done ; let specif = match bs with | [| None ; None ; None ; None |] -> "" | [| Solid ; Solid ; Solid ; Solid |] -> "border-style:solid;" | [| Double ; Double ; Double ; Double |] -> "border-style:double;" | [| bt ; br ; bb ; bl |] when bt=bb && br=bl -> Printf.sprintf "border-style:%s %s;" (string_of_border bt) (string_of_border br) | [| bt ; br ; bb ; bl |] -> Printf.sprintf "border-style:%s %s %s %s;" (string_of_border bt) (string_of_border br) (string_of_border bb) (string_of_border bl) | _ -> assert false in Dest.put specif) ;; register_init "listings" init_listings ;; register_init "fancyvrb" (fun () -> def_code "\\@Verbatim" (fun lexbuf -> let p, f = open_verbenv false in noeof (scan_byline p f) lexbuf) ; def_code "\\@endVerbatim" close_verbenv) ;; let init_longtable () = let is_cmd cmd = Latexmacros.exists (cmd^"@lt@exists") in def_code "\\@longtable" (fun lexbuf -> let out = Out.create_buff () in let again = scan_bycommand out is_cmd lexbuf in scan_this Scan.main again) ; def_code "\\lt@exists" (fun lexbuf -> let cmd = get_csname lexbuf in Latexmacros.def (cmd^"@lt@exists") zero_pat (Subst [])) ; () ;; register_init "longtable" init_longtable ;; def_code "\\@scaninput" (fun lexbuf -> let pre = save_arg lexbuf in let file = get_prim_arg lexbuf in let {arg=post ; subst=post_subst} = save_arg lexbuf in try let true_name,chan = Myfiles.open_tex file in if !verbose > 0 then message ("Scan input file: "^true_name) ; let filebuff = Lexing.from_channel chan in start_lexstate () ; let old_input = !input_verb in if old_input then warning "Nested \\@scaninput" ; input_verb := true ; Location.set true_name filebuff ; begin try record_lexbuf (MyLexing.from_string post) post_subst ; scan_this_may_cont Scan.main filebuff top_subst pre ; with e -> restore_lexstate () ; Location.restore () ; close_in chan ; raise e end ; restore_lexstate () ; Location.restore () ; close_in chan ; input_verb := old_input with | Myfiles.Except -> warning ("Not opening file: "^file) | Myfiles.Error s -> warning s) end } hevea-2.09/mylib.ml0000644004317100512160000000152212017660721014232 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let static_libdir = "LIBDIR" ;; let libdir = try Sys.getenv "HEVEADIR" with Not_found -> static_libdir ;; hevea-2.09/lstlang3.sty0000644004317100512160000024632111524022160015053 0ustar marangetcristal%% %% This is file `lstlang3.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% lstdrvrs.dtx (with options: `lang3') %% %% The listings package is copyright 1996--2004 Carsten Heinz, and %% continued maintenance on the package is copyright 2006--2007 Brooks Moses. %% The drivers are copyright 1997/1998/1999/2000/2001/2002/2003/2004/2006/ %% 2007 any individual author listed in this file. %% %% This file is distributed under the terms of the LaTeX Project Public %% License from CTAN archives in directory macros/latex/base/lppl.txt. %% Either version 1.3 or, at your option, any later version. %% %% This file is completely free and comes without any warranty. %% %% Send comments and ideas on the package, error reports and additional %% programming languages to Brooks Moses at . %% \ProvidesFile{lstlang3.sty} [2004/09/05 1.3 listings language file] \lst@definelanguage[68]{Algol}% {morekeywords={abs,and,arg,begin,bin,bits,bool,by,bytes,case,channel,% char,co,comment,compl,conj,divab,do,down,elem,elif,else,empty,% end,entier,eq,esac,exit,false,fi,file,flex,for,format,from,ge,% goto,gt,heap,if,im,in,int,is,isnt,le,leng,level,loc,long,lt,lwb,% minusab,mod,modab,mode,ne,nil,not,od,odd,of,op,or,ouse,out,over,% overab,par,plusab,plusto,pr,pragmat,prio,proc,re,real,ref,repr,% round,sema,shl,short,shorten,shr,sign,skip,string,struct,then,% timesab,to,true,union,up,upb,void,while},% sensitive=f,% ??? morecomment=[s]{\#}{\#},% keywordcomment={co,comment}% }[keywords,comments,keywordcomments]% \lst@definelanguage[60]{Algol}% {morekeywords={array,begin,Boolean,code,comment,div,do,else,end,% false,for,goto,if,integer,label,own,power,procedure,real,step,% string,switch,then,true,until,value,while},% sensitive=f,% ??? keywordcommentsemicolon={end}{else,end}{comment}% }[keywords,keywordcomments]% %% %% Motorola 68K definition (c) 2006 Michael Franke %% \lst@definelanguage[Motorola68k]{Assembler}% {morekeywords={ABCD,ADD,% ADDA,ADDI,ADDQ,ADDX,AND,ANDI,ASL,ASR,BCC,BLS,BCS,BLT,BEQ,BMI,BF,BNE,BGE,BPL,% BGT,BT,BHI,BVC,BLE,BVS,BCHG,BCLR,BRA,BSET,BSR,BTST,CHK,CLR,CMP,CMPA,CMPI,CMPM,% DBCC,DBLS,DBCS,DBLT,DBEQ,DBMI,DBF,DBNE,DBGE,DBPL,DBGT,DBT,DBHI,DBVC,DBLE,DBVS,DIVS,% DIVU,EOR,EORI,EXG,EXT,ILLEGAL,JMP,JSR,LEA,LINK,LSL,LSR,MOVE,MOVEA,MOVEM,MOVEP,MOVEQ,% MULS,MULU,NBCD,NEG,NEGX,NOP,NOT,OR,ORI,PEA,RESET,ROL,ROR,ROXL,ROXR,RTE,RTR,RTS,SBCD,% SCC,SLS,SCS,SLT,SEQ,SMI,SF,SNE,SGE,SPL,SGT,ST,SHI,SVC,SLE,SVS,STOP,SUB,SUBA,SUBI,SUBQ,% SUBX,SWAP,TAS,TRAP,TRAPV,TST,UNLK},% sensitive=false,% morecomment=[l]*,% morecomment=[l];% }[keywords,comments,strings] %% %% x86masm definition (c) 2002 Andrew Zabolotny %% \lst@definelanguage[x86masm]{Assembler}% {morekeywords={al,ah,ax,eax,bl,bh,bx,ebx,cl,ch,cx,ecx,dl,dh,dx,edx,% si,esi,di,edi,bp,ebp,sp,esp,cs,ds,es,ss,fs,gs,cr0,cr1,cr2,cr3,% db0,db1,db2,db3,db4,db5,db6,db7,tr0,tr1,tr2,tr3,tr4,tr5,tr6,tr7,% st,aaa,aad,aam,aas,adc,add,and,arpl,bound,bsf,bsr,bswap,bt,btc,% btr,bts,call,cbw,cdq,clc,cld,cli,clts,cmc,cmp,cmps,cmpsb,cmpsw,% cmpsd,cmpxchg,cwd,cwde,daa,das,dec,div,enter,hlt,idiv,imul,in,% inc,ins,int,into,invd,invlpg,iret,ja,jae,jb,jbe,jc,jcxz,jecxz,% je,jg,jge,jl,jle,jna,jnae,jnb,jnbe,jnc,jne,jng,jnge,jnl,jnle,% jno,jnp,jns,jnz,jo,jp,jpe,jpo,js,jz,jmp,lahf,lar,lea,leave,lgdt,% lidt,lldt,lmsw,lock,lods,lodsb,lodsw,lodsd,loop,loopz,loopnz,% loope,loopne,lds,les,lfs,lgs,lss,lsl,ltr,mov,movs,movsb,movsw,% movsd,movsx,movzx,mul,neg,nop,not,or,out,outs,pop,popa,popad,% popf,popfd,push,pusha,pushad,pushf,pushfd,rcl,rcr,rep,repe,% repne,repz,repnz,ret,retf,rol,ror,sahf,sal,sar,sbb,scas,seta,% setae,setb,setbe,setc,sete,setg,setge,setl,setle,setna,setnae,% setnb,setnbe,setnc,setne,setng,setnge,setnl,setnle,setno,setnp,% setns,setnz,seto,setp,setpe,setpo,sets,setz,sgdt,shl,shld,shr,% shrd,sidt,sldt,smsw,stc,std,sti,stos,stosb,stosw,stosd,str,sub,% test,verr,verw,wait,wbinvd,xadd,xchg,xlatb,xor,fabs,fadd,fbld,% fbstp,fchs,fclex,fcom,fcos,fdecstp,fdiv,fdivr,ffree,fiadd,ficom,% fidiv,fidivr,fild,fimul,fincstp,finit,fist,fisub,fisubr,fld,fld1,% fldl2e,fldl2t,fldlg2,fldln2,fldpi,fldz,fldcw,fldenv,fmul,fnop,% fpatan,fprem,fprem1,fptan,frndint,frstor,fsave,fscale,fsetpm,% fsin,fsincos,fsqrt,fst,fstcw,fstenv,fstsw,fsub,fsubr,ftst,fucom,% fwait,fxam,fxch,fxtract,fyl2x,fyl2xp1,f2xm1},% morekeywords=[2]{.align,.alpha,assume,byte,code,comm,comment,.const,% .cref,.data,.data?,db,dd,df,dosseg,dq,dt,dw,dword,else,end,endif,% endm,endp,ends,eq,equ,.err,.err1,.err2,.errb,.errdef,.errdif,% .erre,.erridn,.errnb,.errndef,.errnz,event,exitm,extrn,far,% .fardata,.fardata?,fword,ge,group,gt,high,if,if1,if2,ifb,ifdef,% ifdif,ife,ifidn,ifnb,ifndef,include,includelib,irp,irpc,label,% .lall,le,length,.lfcond,.list,local,low,lt,macro,mask,mod,.model,% name,ne,near,offset,org,out,page,proc,ptr,public,purge,qword,.% radix,record,rept,.sall,seg,segment,.seq,.sfcond,short,size,% .stack,struc,subttl,tbyte,.tfcond,this,title,type,.type,width,% word,.xall,.xcref,.xlist},% alsoletter=.,alsodigit=?,% sensitive=f,% morestring=[b]",% morestring=[b]',% morecomment=[l];% }[keywords,comments,strings] %% %% Clean definition (c) 1999 Jos\'e Romildo Malaquias %% %% Clean 1.3 : some standard functional language: pure, lazy, %% polymorphic type system, modules, type classes, %% garbage collection, functions as first class citizens %% \lst@definelanguage{Clean}% {otherkeywords={:,::,=,:==,=:,=>,->,<-,<-:,\{,\},\{|,|\},\#,\#!,|,\&,% [,],!,.,\\\\,;,_},% morekeywords={from,definition,implementation,import,module,system,% case,code,if,in,let,let!,of,where,with,infix,infixl,infixr},% morendkeywords={True,False,Start,Int,Real,Char,Bool,String,World,% File,ProcId},% sensitive,% morecomment=[l]//,% missing comma: Markus Pahlow morecomment=[n]{/*}{*/},% morestring=[b]"% }[keywords,comments,strings]% \lstdefinelanguage{CIL}% {morekeywords=[1]{assembly,beforefieldinit,class,default,cdecl,cil,corflags,% culture,custom,data,entrypoint,fastcall,field,file,% hidebysig,hash,il,imagebase,locals,managed,marshall,% maxstack,mresource,method,module,namespace,publickey,% stdcall,subsystem,thiscall,unmanaged,vararg,ver,vtfixup,% % types bool,char,float32,float64,int,int8,int16,int32,% int64,method,native,object,string,modopt,modreq,pinned,% typedref,valuetype,unsigned,void,% % defining types abstract,ansi,auto,autochar,beforefieldinit,boxed,class,% explicit,extends,implements,interface,famandassem,family,% famorassem,inherits,nested,override,pack,private,property,% public,rtspecialname,sealed,sequential,serializable,size,% specialname,static,unicode,% % postfix algorithm,alignment,extern,init,from,nometadata,with},% morekeywords=[2]{add,and,arglist,beq,bge,bgt,ble,blt,bne,br,break,brfalse,% brtrue,call,calli,ceq,cgt,ckfinite,clt,conv,cpblk,div,% dup,endfilter,endfinally,initblk,jmp,ldarg,ldarga,ldc,% ldftn,ldind,ldloc,ldloca,ldnull,leave,localloc,mul,neg,% nop,not,or,pop,rem,ret,shl,shr,starg,stind,stloc,sub,% switch,xor,% % prefix tail,unaligned,volatile,% % postfix un,s,ovf,% % object box,callvirt,castclass,cpobj,cctor,ctor,initobj,isinst,% ldelem,ldelema,ldfld,ldflda,ldlen,ldobj,ldsfld,ldsflda,% ldstr,ldtoken,ldvirtftn,mkrefany,newarr,newobj,refanytype,% refanyval,rethrow,sizeof,stelem,stfld,stobj,stsfld,throw,% unbox},% sensitive=true,% morecomment=[l]{//},% morestring=[b]"% }[keywords,comments,strings]% \lst@definelanguage{Comal 80}% {morekeywords={AND,AUTO,CASE,DATA,DEL,DIM,DIV,DO,ELSE,ENDCASE,ENDIF,% ENDPROC,ENDWHILE,EOD,EXEC,FALSE,FOR,GOTO,IF,INPUT,INT,LIST,LOAD,% MOD,NEW,NEXT,NOT,OF,OR,PRINT,PROC,RANDOM,RENUM,REPEAT,RND,RUN,% SAVE,SELECT,STOP,TAB,THEN,TRUE,UNTIL,WHILE,ZONE},% sensitive=f,% ??? morecomment=[l]//,% morestring=[d]"% }[keywords,comments,strings]% \lst@definelanguage[WinXP]{command.com}% {morekeywords={assoc,at,attrib,bootcfg,break,cacls,call,cd,chcp,chdir,% chkdsk,chkntfs,cls,cmd,cmdextversion,color,comp,compact,convert,copy,% date,defined,del,dir,diskcomp,diskcopy,do,doskey,echo,else,endlocal,% erase,errorlevel,exist,exit,fc,find,findstr,for,format,ftype,goto,% graftabl,help,if,in,label,md,mkdir,mode,more,move,not,off,path,% pause,popd,print,prompt,pushd,rd,recover,ren,rename,replace,rmdir,% set,setlocal,shift,sort,start,subst,time,title,tree,type,ver,% verify,vol,xcopy},% sensitive=false,% alsoother={@},% alsoletter={\%~:-/},% morecomment=[l]{rem},% morecomment=[l]{reM},% morecomment=[l]{rEm},% morecomment=[l]{rEM},% morecomment=[l]{Rem},% morecomment=[l]{ReM},% morecomment=[l]{REm},% morecomment=[l]{REM},% morestring=[d]"% }[keywords,comments,strings]% \lst@definelanguage{Comsol}% {morekeywords={% adaption,arc1,arc2,arrayr,assemble,asseminit,beziercurve2,block2,% block3,bsplinecurve2,bsplinecurve3,bsplinesurf3,bypassplot,cardg,% ccoeffgroup,chamfer,checkgeom,circ1,circ2,coeff2cell,comsol,% cone2,cone3,Contents,createhexes,createprisms,createquads,csgbl2,% csgbl3,csgcmpbz,csgimplbz,csginitaux,csginitnr,csgproputil,% csgrbconv,csgunique3,csguniquep,csgversion,csgvvovl,curve2,% curve3,cylinder2,cylinder3,dat2str,defastget,display,drawgetobj,% drawreobj,drawsetobj,dst,duplicate,dxflayers,dxfread,dxfwrite,% econe2,econe3,eigloop,elcconstr,elcplbnd,elcplextr,elcplproj,% elcplscalar,elempty,elemreobj,eleqc,eleqw,elevate,elgeom,ellip1,% ellip2,ellipsoid2,ellipsoid3,ellipsoidgen_fl23,elmat,elovar,% elpconstr,elshape,elvar,elvarm,embed,extrude,face3,faceprim3,% fastsetop,fem2jxfem,femblocksu,femdiff,femeig,femexport,femgui,% femimport,femiter,femlab,femlin,femmesh,femmeshexp,femnlin,% femplot,femsfun,femsim,femsimlowlevel,femsimserver,femsol,% femsolver,femstate,femstruct,femtime,femwave,festyle,fieldnames,% fillet,fl1d,fl2d,fl3d,flaction,flafun,flappconvert,flappobj,% flaxisequal,flbase,flbinary,flc1hs,flc2hs,flcanpnt,flcell2draw,% flclear,flcolorbar,flcompact,flconeplot,flcontour2mesh,% flcontour2meshaux,flconvreact,flconvreact1d,flconvreact2d,% flconvreact3d,flcyl,fldc1hs,fldc2hs,fldegree,fldegreer3,% fldegreet3,fldimvarsget,fldisp,fldraw2cell,fldrawnow,fldsmhs,% fldsmsign,flevalmat,flexch,flexchprop,flfastgeom,flform,flgc,% flgcbo,flgdconv,flgeom2cellstr,flgeomadj,flgeomarcize,flgeomec,% flgeomed,flgeomepol,flgeomes,flgeomfc,flgeomfd,flgeomfdp,% flgeomff1,flgeomff2,flgeomfn,flgeomfs,flgeomgetlocalsys,% flgeominit,flgeominitprop,flgeomitransform,flgeomloft,flgeommesh,% flgeomnbs,flgeomnes,flgeomnmr,flgeomnv,flgeompsinv,flgeomrmsing,% flgeomrotp,flgeomsd,flgeomsdim,flgeomse,flgeomsf2,flgeomspm,% flgeomtransform,flgeomud,flgeomvtx,flgetdraw,flheat,flheat1d,% flheat2d,flheat3d,flhelmholtz,flhelmholtz1d,flhelmholtz2d,% flhelmholtz3d,flim2curve,flinterp1,fliscont,flismember,% flisnumeric,fljaction,fllaplace,fllaplace1d,fllaplace2d,% fllaplace3d,flload,flloadfl,flloadmatfile,flloadmfile,% fllobj2cellstr,flmakeevalstr,flmapsoljac,flmat2str,flmatch,% flmesh2spline,flmesh2splineaux,flml65setup,flngdof,flnull,% flnullorth,flpde,flpdeac,flpdec,flpdec1d,flpdec2d,flpdec3d,% flpdedc,flpdedc2d,flpdedc3d,flpdedf,flpdedf1d,flpdedf2d,% flpdedf3d,flpdees,flpdees2d,flpdees3d,flpdeg,flpdeg1d,flpdeg2d,% flpdeg3d,flpdeht,flpdeht1d,flpdeht2d,flpdeht3d,flpdems,flpdems2d,% flpdems3d,flpdens,flpdens2d,flpdens3d,flpdepn,flpdeps,flpdesm3d,% flpdew,flpdew1d,flpdew2d,flpdew3d,flpdewb,flpdewb1d,flpdewb2d,% flpdewb3d,flpdewc,flpdewc1d,flpdewc2d,flpdewc3d,flpdewe,% flpdewe3d,flpdewp,flpdewp2d,flpdewp3d,flplot,flpoisson,% flpoisson1d,flpoisson2d,flpoisson3d,flpric2,flpric3,flreobj,% flreport,flresolvepath,flsave,flschrodinger,flschrodinger1d,% flschrodinger2d,flschrodinger3d,flsde,flsdp,flsdt,flsetalpha,% flsetdraw,flsmhs,flsmsign,flspnull,fltherm_cond1,fltrg,flversion,% flversions,flverver,flwave,flwave1d,flwave2d,flwave3d,% flwriteghist,formstr,gdsread,gencyl2,gencyl3,genextrude,% genextrudeaux,geom,geom0,geom0get,geom1,geom1get,geom2,geom2get,% geom3,geom3get,geom3j2m,geom3m2j,geomaddlblmargin,geomanalyze,% geomarrayr,geomassign,geomcoerce,geomcomp,geomconnect,geomcopy,% geomcsg,geomdel,geomedit,geomexport,geomfile,geomget,% geomgetlabels,geomgetwrkpln,geomimport,geominfo,geominfoaux,% geomlblplot,geomload,geomnumparse,geomobject,geomparse,geomplot,% geomplot1,geomplot2,geomplot3,geomposition,geomproputil,% geomreconstruct,geomreobj,geomserver,geomspline,geomsurf,% geomupdate,get,getfemgeom,getisocurve,getjptr,getmesh,getsdim,% getvmatrixexch,handlesolnumstr,helix1,helix2,helix3,hexahedron2,% hexahedron3,histfrommat,idst,igesread,importplotdata,isempty,% isfield,isfunc,isscript,javaclass,jproputil,jptr2geom,jptrgeom1,% jptrgeom1_fl23,jptrgeom2,jptrgeom2_fl23,jptrgeom3,jptrgeom3_fl23,% keiter,line1,line2,loadobj,loft,matlabinterpdata,mesh2geom,% meshassign,meshcaseadd,meshcasedel,meshcaseutil,meshcheck,% meshembed,meshenrich,meshenrich1,meshenrich2,meshenrich3,% meshexport,meshextend,meshextrude,meshget,meshimport,meshinit,% meshintegrate,meshmap,meshoptim,meshparse,meshplot,meshplot1,% meshplot2,meshplot3,meshplotproputil,meshpoi,meshproputil,% meshptplot,meshqual,meshrefine,meshrevolve,meshsmooth,% meshsmooth2,meshsweep,meshvolume,minus,mirror,mkreflparams,% mmsolve,modetype,move,moveglobalfields,mphproputil,mtimes,% multiphysics,mypostinterp,notscript,onlyelsconstr,outassign,% paramgeom,pde2draw,pde2equ,pde2fem,pde2geom,pdeblxpd,plus,point1,% point2,point3,poisson,poly1,poly2,postanim,postapplysettings,% postarrow,postarrowbnd,postcolorbar,postcont,postcontdomind,% postcoord,postcopyprop,postcrossplot,postdistrprops,posteval,% postflow,postfnd,postgeomplot,postgetfem,postgetstylecolor,% postglobaleval,postglobalplot,postgp,postinit,postint,postinterp,% postiso,postlin,postmakecontcol,postmax,postmaxmin,postmin,% postmkcontbar,postmknormexpr,postmovie,postnewplot,% postoldmaxminprops,postpd2pm,postplot,postplotconstants,% postpm2pd,postprinc,postprincbnd,postprocgui,postproputil,% postslice,postsurf,posttet,posttitle,print2file,pyramid2,% pyramid3,rect1,rect2,restorefields,revolve,rmfield,rotate,% rotmatrix,scale,serialize,set,setmesh,sh2str,sharg_2_5,shbub,% shdisc,shdiv,shherm,shlag,shvec,simplecoerce,simreobj,slblocks,% solassign,solid0,solid1,solid2,solid3,solidprim3,solproputil,% solsize,solveraddcases,sphere2,sphere3,spiceimport,splineaux,% split,splittoprim,square1,square2,stlread,submode,submodes,% subsasgn,subsref,tangent,taucs,tetrahedron2,tetrahedron3,% tobsplines,torus2,torus3,transform,update,updateassoc,% updateassocinfo,updatefem,updateguistruct,updateobj,vrmlread,% xmeshinfo,xmeshinit},% sensitive=false,% morecomment=[l]\%,% morestring=[m]'% }[keywords,comments,strings]% \lst@definelanguage{Elan}% {morekeywords={ABS,AND,BOOL,CAND,CASE,CAT,COLUMNS,CONCR,CONJ,CONST,% COR,DECR,DEFINES,DET,DIV,DOWNTO,ELIF,ELSE,END,ENDIF,ENDOP,% ENDPACKET,ENDPROC,ENDREP,ENDSELECT,FALSE,FI,FILE,FOR,FROM,IF,% INCR,INT,INV,LEAVE,LENGTH,LET,MOD,NOT,OF,OP,OR,OTHERWISE,PACKET,% PROC,REAL,REP,REPEAT,ROW,ROWS,SELECT,SIGN,STRUCT,SUB,TEXT,THEN,% TRANSP,TRUE,TYPE,UNTIL,UPTO,VAR,WHILE,WITH,XOR,% maxint,sign,abs,min,max,random,initializerandom,subtext,code,% replace,text,laenge,pos,compress,change,maxreal,smallreal,floor,% pi,e,ln,log2,log10,sqrt,exp,tan,tand,sin,sind,cos,cosd,arctan,% arctand,int,real,lastconversionok,put,putline,line,page,get,% getline,input,output,sequentialfile,maxlinelaenge,reset,eof,% close,complexzero,complexone,complexi,complex,realpart,imagpart,% dphi,phi,vector,norm,replace,matrix,idn,row,column,sub,% replacerow,replacecolumn,replaceelement,transp,errorsstop,stop},% sensitive,% morestring=[d]"% }[keywords,strings]% %% %% Erlang definition (c) 2003 Daniel Gazard %% \lst@definelanguage{erlang}% {morekeywords={abs,after,and,apply,atom,atom_to_list,band,binary,% binary_to_list,binary_to_term,bor,bsl,bsr,bxor,case,catch,% date,div,element,erase,end,exit,export,float,float_to_list,% get,halt,hash,hd,if,info,import,integer,integer_to_list,% length,link,list,list_to_atom,list_to_float,list_to_integer,% list_to_tuple,module,node,nodes,now,of,or,pid,port,ports,% processes,put,receive,reference,register,registered,rem,% round,self,setelement,size,spawn,throw,time,tl,trace,trunc,% tuple,tuple_to_list,unlink,unregister,whereis,error,false,% infinity,nil,ok,true,undefined,when},% otherkeywords={->,!,[,],\{,\}},% morecomment=[l]\%,% morestring=[b]",% morestring=[b]'% }[keywords,comments,strings]% \lst@definelanguage{ksh} {morekeywords={alias,awk,cat,echo,else,elif,fi,exec,exit,% for,in,do,done,select,case,esac,while,until,function,% time,export,cd,eval,fc,fg,kill,let,pwd,read,return,rm,% glob,goto,history,if,logout,nice,nohup,onintr,repeat,sed,% set,setenv,shift,source,switch,then,umask,unalias,% unset,wait,@,env,argv,child,home,ignoreeof,noclobber,% noglob,nomatch,path,prompt,shell,status,verbose,print,printf,% sqrt,BEGIN,END},% morecomment=[l]\#,% morestring=[d]",% morestring=[d]',% morestring=[d]`% }[keywords,comments,strings]% \lst@definelanguage{Lingo} {morekeywords={abort,after,and,before,do,down,halt,me,new,not,of,% on,or,otherwise,pass,put,result,return,set,tell,the,then,to,with,% repeat,while,case,if,else,true,false,global,property,\_global,\_key,% \_mouse,\_movie,\_player,\_sound,\_system,abbr,abbrev,abbreviated,abs,% actionsenabled,activateapplication,activatewindow,active3drenderer,% activecastlib,activewindow,actorlist,add,addat,addbackdrop,addcamera,% addchild,addmodifier,addoverlay,addprop,addtoworld,addvertex,alert,% alerthook,alignment,allowcustomcaching,allowgraphicmenu,allowsavelocal,% allowtransportcontrol,allowvolumecontrol,allowzooming,alphathreshold,% ambient,ambientcolor,ancestor,angle,anglebetween,animationenabled,% antialias,antialiasthreshold,append,applicationname,applicationpath,% appminimize,atan,attenuation,attributevalue,auto,autoblend,automask,% autotab,axisangle,back,backcolor,backdrop,backgroundcolor,backspace,% beep,beepon,beginrecording,beginsprite,beveldepth,beveltype,bgcolor,% bias,bitand,bitmap,bitmapsizes,bitnot,bitor,bitrate,bitspersample,% bitxor,blend,blendconstant,blendconstantlist,blendfactor,blendfunction,% blendfunctionlist,blendlevel,blendrange,blendsource,blendsourcelist,% blendtime,bone,bonesplayer,border,both,bottom,bottomcap,bottomradius,% bottomspacing,boundary,boundingsphere,box,boxdropshadow,boxtype,% breakconnection,breakloop,brightness,broadcastprops,browsername,% buffersize,build,buttonsenabled,buttonstyle,buttontype,bytesstreamed,% boolean,cachedocverify,cachesize,call,callancestor,camera,cameracount,% cameraposition,camerarotation,cancelidleload,castlib,castlibnum,% castmemberlist,center,centerregpoint,centerstage,changearea,channelcount,% char,characterset,charpostoloc,chars,charspacing,chartonum,% checkboxaccess,checkboxtype,checkmark,checknetmessages,child,chunksize,% clearatrender,clearcache,clearerror,clearframe,clearglobals,clearvalue,% clickloc,clickmode,clickon,clone,clonedeep,clonemodelfromcastmember,% clonemotionfromcastmember,close,closed,closewindow,closexlib,collision,% collisiondata,collisionnormal,color,world,colorbuffer,colorbufferdepth,% colordepth,colorlist,colorrange,colors,colorsteps,commanddown,comments,% compressed,connecttonetserver,constrainh,constraint,constrainv,,% continue,controldown,controller,copypixels,copyrightinfo,copyto,% copytoclipboard,cos,count,cpuhogticks,creaseangle,creases,[contains],% createfolder,createmask,creatematte,creationdate,creator,crop,cross,% crossproduct,cuepassed,cuepointnames,cuepointtimes,currentloopstate,% currentspritenum,currenttime,cursor,cursorsize,curve,cylinder,ate,day,% deactivateapplication,deactivatewindow,debug,debugplaybackenabled,% decaymode,defaultrect,defaultrectmode,delay,delete,deleteall,deleteat,% deletecamera,deletefolder,deleteframe,deletegroup,deletelight,% deletemodel,deletemodelresource,deletemotion,deleteone,deleteprop,% deleteshader,deletetexture,deletevertex,density,depth,depthbufferdepth,% desktoprectlist,diffuse,diffusecolor,diffuselightmap,% digitalvideotimescale,digitalvideotype,direction,directionalcolor,% directionalpreset,directtostage,disableimagingtransformation,displayface,% displaymode,distanceto,distribution,dither,done,doneparsing,dot,% dotproduct,doubleclick,downloadnetthing,drag,draw,drawrect,dropshadow,% duplicate,duplicateframe,duration,editable,editshortcutsenabled,% elapsedtime,emissive,emitter,empty,emulatemultibuttonmouse,enabled,% enablehotspot,end,endangle,endcolor,endframe,endrecording,endsprite,% endtime,enter,enterframe,environment,erase,error,eventpassmode,% exchange,exists,exit,exitframe,exitlock,exp,externalevent,% externalparamcount,externalparamname,externalparamvalue,extractalpha,% extrude3d,face,fadein,fadeout,fadeto,far,field,fieldofview,filename,% fill,fillcolor,fillcycles,filldirection,filled,fillmode,filloffset,% fillscale,findempty,findlabel,findpos,findposnear,finishidleload,% firstindent,fixedlinespace,fixedrate,fixstagesize,flashrect,flashtostage,% flat,fliph,flipv,float,floatp,floatprecision,flush,flushinputevents,% fog,folderchar,font,fontsize,fontstyle,forecolor,forget,frame,% framecount,framelabel,framepalette,framerate,frameready,framescript,% framesound1,framesound2,framestohms,frametempo,frametransition,freeblock,% freebytes,fromcastmember,fromimageobject,front,frontwindow,% generatenormals,getaprop,getat,getbehaviordescription,getbehaviortooltip,% getboneid,geterror,geterrorstring,gethardwareinfo,gethotspotrect,getlast,% getlatestnetid,getnetaddresscookie,getneterrorstring,getnetmessage,% getnetoutgoingbytes,getnettext,getnormalized,getnthfilenameinfolder,% getnumberwaitingnetmessages,getone,getpeerconnectionlist,getpixel,% getplaylist,getpos,getpref,getprop,getpropat,getpropertydescriptionlist,% getrendererservices,getstreamstatus,gettemppath,getworldtransform,globals,% glossmap,go,gotoframe,gotonetmovie,gotonetpage,gradienttype,gravity,% group,handler,handlers,height,heightvertices,high,highlightpercentage,% highlightstrength,hilite,hither,hittest,hmstoframes,hold,hotspot,html,% hyperlink,hyperlinkclicked,hyperlinkrange,hyperlinks,hyperlinkstate,% id3tags,identity,idle,idlehandlerperiod,idleloaddone,idleloadmode,% idleloadperiod,idleloadtag,idlereadchunksize,ilk,image,imagecompression,% imageenabled,imagequality,immovable,importfileinto,inflate,ink,inker,% inlineimeenabled,insertbackdrop,insertframe,insertoverlay,inside,% installmenu,instance,integer,integerp,interface,interpolate,% interpolateto,intersect,index,interval,inverse,invert,invertmask,% isbusy,isinworld,isoktoattach,ispastcuepoint,item,itemdelimiter,kerning,% kerningthreshold,key,keyboardfocussprite,keycode,keydown,keydownscript,% keyframeplayer,keypressed,keyup,keyupscript,label,labellist,last,% lastchannel,lastclick,lastevent,lastframe,lastkey,lastroll,left,% leftindent,length,lengthvertices,level,lifetime,light,line,linearlist,% linecolor,linecount,linedirection,lineheight,lineoffset,linepostolocv,% linesize,linkas,linked,list,listp,loaded,loadfile,loc,loch,locked,% locktranslation,loctocharpos,locv,locvtolinepos,locz,lod,log,long,% loop,loopcount,loopendtime,loopsremaining,loopstarttime,machinetype,% magnitude,map,mapImageToStage,mapmembertostage,mapstagetomember,margin,% marker,markerlist,mask,max,maxinteger,maxspeed,mci,media,mediaready,% member,membernum,members,memorysize,menu,mesh,meshdeform,milliseconds,% min,minspeed,modal,mode,model,modela,modelb,modelresource,% modelsunderloc,modelsunderray,modelunderloc,modified,modifiedby,% modifieddate,modifier,modifiers,month,mostrecentcuepoint,motion,% mousechar,mousedown,mousedownscript,mouseenter,mouseh,mouseitem,% mouseleave,mouselevel,mouseline,mouseloc,mousemember,mouseoverbutton,% mouseup,mouseupoutside,mouseupscript,mousev,mousewithin,mouseword,move,% moveablesprite,movetoback,movetofront,movevertex,movevertexhandle,% movewindow,movie,movieaboutinfo,moviecopyrightinfo,moviefilefreesize,% moviefilesize,moviefileversion,movieimagecompression,movieimagequality,% moviename,moviepath,movierate,movietime,moviextralist,mpeglayer,% multiply,multisound,name,near,nearfiltering,neighbor,netabort,netdone,% neterror,netlastmoddate,netmime,netpresent,netstatus,nettextresult,% netthrottleticks,newcamera,newcurve,newgroup,newlight,newmesh,newmodel,% newmodelresource,newmotion,newshader,newtexture,next,none,normalize,% normallist,normals,nothing,notify,nudge,number,numchannels,% numparticles,numsegments,numtochar,objectp,offset,open,openresfile,% openwindow,openxlib,optiondown,organizationname,originalfont,originh,% originmode,originpoint,originv,orthoheight,overlay,pageheight,palette,% palettemapping,paletteref,paletteindex,pan,paragraph,param,paramcount,% parent,parsestring,particle,pasteclipboardinto,path,pathname,% pathstrength,pattern,pause,pausedatstart,pausestate,percentplayed,% percentstreamed,period,perpendicularto,persistent,pi,picture,picturep,% plane,platform,play,playbackmode,playfile,playing,playlist,playnext,% playrate,point,pointat,pointatorientation,pointinhyperlink,% pointofcontact,pointtochar,pointtoitem,pointtoline,pointtoparagraph,% pointtoword,position,positionreset,posterframe,postnettext,power,% preferred3drenderer,preload,preloadbuffer,preloadeventabort,preloadmember,% preloadmode,preloadmovie,preloadnetthing,preloadram,preloadtime,% premultiply,prepareframe,preparemovie,prerotate,prescale,pretranslate,% previous,primitives,printfrom,productversion,projection,projectionangle,% propList,proxyserver,pttohotspotid,puppet,puppetpalette,puppetsound,% puppetsprite,puppettempo,puppettransition,purgepriority,% qtregisteraccesskey,qtunregisteraccesskey,quad,quality,queue,quit,quote,% radius,ramneeded,random,randomseed,randomvector,rateshift,rawnew,read,% readvalue,recordfont,rect,ref,reflectionmap,reflectivity,region,% registerforevent,registerscript,regpoint,regpointvertex,removebackdrop,% removefromworld,removelast,removemodifier,removeoverlay,rename,renderer,% rendererdevicelist,renderformat,renderstyle,resetworld,resizewindow,% resolution,resolve,resolvea,resolveb,resource,restart,resume,% reverttoworlddefaults,rewind,rgb,rgba4444,rgba5550,rgba5551,rgba5650,% rgba8880,rgba8888,right,rightindent,rightmousedown,rightmouseup,% rollover,romanlingo,rootlock,rootnode,rotate,rotation,rotationreset,% rtf,runmode,runpropertydialog,safeplayer,samplecount,samplerate,% samplesize,save,savedlocal,savemovie,scale,scalemode,score,scorecolor,% scoreselection,script,scriptexecutionstyle,scriptinstancelist,scriptlist,% scriptnum,scriptsenabled,scripttext,scripttype,scrollbyline,scrollbypage,% scrolltop,sds,searchcurrentfolder,searchpath,searchpaths,seconds,% selectedtext,selection,selend,selstart,sendallsprites,sendevent,% sendnetmessage,sendsprite,serialnumber,setalpha,setaprop,setat,% setcollisioncallback,setflashproperty,setnetbufferlimits,% setnetmessagehandler,setpixel,setplaylist,setpref,setprop,setscriptlist,% settrackenabled,setvariable,shader,shaderlist,shadowpercentage,% shadowstrength,shapetype,shiftdown,shininess,shockwave3d,short,% showglobals,showlocals,showprops,showresfile,showxlib,shutdown,% silhouettes,sin,size,sizerange,skew,sleep,smoothness,sort,sound,% soundbusy,soundchannel,sounddevice,sounddevicelist,soundenabled,% soundkeepdevice,soundlevel,soundmixmedia,source,sourcerect,space,% specular,specularcolor,specularlightmap,sphere,spotangle,spotdecay,% sprite,spritenum,spritespacetoworldspace,sqrt,stage,stagebottom,% stagecolor,stageleft,stageright,stagetoflash,stagetop,standard,% startangle,startframe,startmovie,starttime,starttimer,state,static,% status,stepframe,stilldown,stop,stopevent,stopmovie,stoptime,stream,% streammode,streamname,streamsize,streamstatus,string,stringp,% strokecolor,strokewidth,style,subdivision,sweep,swing,switchcolordepth,% symbol,symbolp,systemdate,tab,tabcount,tabs,tan,target,% tellstreamstatus,tension,text,texture,texturecoordinatelist,% texturecoordinates,texturelayer,texturelist,texturemember,texturemode,% texturemodelist,texturerenderformat,texturerepeat,texturerepeatlist,% texturetransform,texturetransformlist,texturetype,thumbnail,ticks,tilt,% time,timeout,timeouthandler,timeoutkeydown,timeoutlapsed,timeoutlength,% timeoutlist,timeoutmouse,timeoutplay,timeoutscript,timer,timescale,% title,titlevisible,toon,top,topcap,topradius,topspacing,trace,% traceload,tracelogfile,trackcount,trackenabled,tracknextkeytime,% tracknextsampletime,trackpreviouskeytime,trackprevioussampletime,% trackstarttime,trackstoptime,tracktext,tracktype,trails,transform,% transitiontype,translate,triggercallback,trimwhitespace,tunneldepth,% tweened,tweenmode,type,[transparent],union,unload,unloadmember,% unloadmovie,unregisterallevents,update,updateframe,updatelock,% updatemovieenabled,updatestage,url,usealpha,usediffusewithtexture,% usefastquads,usehypertextstyles,uselineoffset,userdata,username,value,% vector,version,vertex,vertexlist,vertices,video,videoforwindowspresent,% viewh,viewpoint,viewscale,viewv,visibility,visible,void,voidp,volume,% volumeinfo,wait,waitfornetconnection,warpmode,width,widthvertices,wind,% window,windowlist,windowpresent,windowtype,word,wordwrap,world,% worldposition,worldspacetospritespace,worldtransform,wraptransform,% wraptransformlist,write,writevalue,,xaxis,xtra,xtralist,xtras,,yaxis,% year,yon,zaxis,zoombox,zoomwindow,repeat,Conditional,Boolean,TypeDef,% Statement,Operator,String,Comment,Identifier,Special,x,y,z} sensitive=false, morecomment=[l]{--}, morestring=[b]", }[keywords,comments,strings]% \lst@definelanguage{Logo}% {morekeywords={and,atan,arctan,both,break,bf,bl,butfirst,butlast,% cbreak, close,co,continue,cos,count,clearscreen,cs,debquit,% describe,diff,difference,ed,edit,either,emptyp,equalp,er,erase,% errpause,errquit,fifp,filefprint,fifty,fileftype,fip,fileprint,% fird,fileread,fity,filetype,fiwd,fileword,f,first,or,fp,fprint,% fput,fty,ftype,full,fullscreen,go,bye,goodbye,gprop,greaterp,% help,if,iff,iffalse,ift,iftrue,nth,item,keyp,llast,lessp,list,% local,lput,make,max,maximum,memberp,memtrace,min,minimum,namep,% not,numberp,oflush,openr,openread,openw,openwrite,op,output,% pause,plist,pots,pow,pprop,pps,pr,print,product,quotient,random,% rc,readchar,rl,readlist,remprop,repcount,repeat,request,rnd,run,% se,sentence,sentencep,setc,setcolor,setipause,setqpause,po,show,% sin,split,splitscreen,sqrt,stop,sum,test,text,textscreen,thing,% to,tone,top,toplevel,type,untrace,wait,word,wordp,yaccdebug,is,% mod,remainder,trace,zerop,back,bk,bto,btouch,fd,forward,fto,% ftouch,getpen,heading,hit,hitoot,ht,hideturtle,loff,lampoff,lon,% lampon,lt,left,lot,lotoot,lto,ltouch,penc,pencolor,pd,pendown,pe,% penerase,penmode,pu,penup,px,penreverse,rt,right,rto,rtouch,% scrunch,seth,setheading,setscrun,setscrunch,setxy,shownp,st,% showturtle,towardsxy,clean,wipeclean,xcor,ycor,tur,turtle,% display,dpy},% sensitive=f% ??? }[keywords]% %% %% MetaPost definition (c) 2004 Brooks Moses %% This definition is based on the language specifications %% contained in the _User's Manual for Metapost_, with the core %% language enhancements that are described in the _Drawing %% Graphs with MetaPost_ documentation. %% \lst@definelanguage{MetaPost}% {% keywords[1] = MetaPost primitives (not found in following tables) morekeywords={end,begingroup,endgroup,beginfig,endfig,def,vardef,% primary,secondary,tertiary,primarydef,secondarydef,tertiarydef,% expr,suffix,text,enddef,if,fi,else,elseif,for,forsuffixes,% forever,endfor,upto,downto,stop,until,tension,controls,on,off,% btex,etex,within,input}, % keywords[2] = Operators (Tables 6-9 in MetaPost User's manual) morekeywords=[2]{abs,and,angle,arclength,arctime,ASCII,bbox,bluepart,% boolean,bot,ceiling,center,char,color,cosd,cutafter,cutbefore,% cycle,decimal,dir,direction,directionpoint,directiontime,div,% dotprod,floor,fontsize,greenpart,hex,infont,intersectionpoint,% intersectiontimes,inverse,known,length,lft,llcorner,lrcorner,% makepath,makepen,mexp,mlog,mod,normaldeviate,not,numeric,oct,% odd,or,pair,path,pen,penoffset,picture,point,postcontrol,% precontrol,redpart,reverse,rotated,round,rt,scaled,shifted,% sind,slanted,sqrt,str,string,subpath,substring,top,transform,% transformed,ulcorner,uniformdeviate,unitvector,unknown,% urcorner,whatever,xpart,xscaled,xxpart,xypart,ypart,yscaled,% yxpart,yypart,zscaled,of,reflectedabout,rotatedaround,ulft,urt,% llft,lrt,readfrom,write,stroked,filled,textual,clipped,bounded,% pathpart,penpart,dashpart,textpart,fontpart},% % keywords[3] = Commands (Table 10) morekeywords=[3]{addto,clip,cutdraw,draw,drawarrow,drawdblarrow,% fill,filldraw,interim,let,loggingall,newinternal,pickup,% save,setbounds,shipout,show,showdependencies,showtoken,% showvariable,special,tracingall,tracingnone,undraw,unfill,% unfilldraw,to,also,contour,doublepath,withcolor,withpen,% dashed,randomseed},% % keywords[4] = Function-Like Macros (Table 11) morekeywords=[4]{boxit,boxjoin,bpath,buildcycle,circleit,dashpattern,% decr,dotlabel,dotlabels,drawboxed,drawboxes,drawoptions,% drawunboxed,fixpos,fixsize,incr,interpath,label,labels,max,min,pic,% thelabel,z,image},% % keywords[5] = Internal and Predefined Variables (Tables 3, 4) morekeywords=[5]{ahangle,ahlength,bboxmargin,charcode,circmargin,% day,defaultdx,defaultdy,defaultpen,defaultscale,labeloffset,% linecap,linejoin,miterlimit,month,pausing,prologues,showstopping,% time,tracingcapsules,tracingchoices,tracingcommands,% tracingequations,tracinglostchars,tracingmacros,tracingonline,% tracingoutput,tracingrestores,tracingspecs,tracingstats,% tracingtitles,truecorners,warningcheck,year}, morekeywords=[5]{background,currentpen,currentpicture,cuttings,% defaultfont},% % keywords[6] = Predefined Constants (Table 5) morekeywords=[6]{beveled,black,blue,bp,butt,cc,cm,dd,ditto,down,% epsilon,evenly,false,fullcircle,green,halfcircle,identity,% in,infinity,left,mitered,mm,nullpicture,origin,pc,pencircle,% pt,quartercircle,red,right,rounded,squared,true,unitsquare,% up,white,withdots}, sensitive=false,% alsoother={0123456789$},% morecomment=[l]\%,% morestring=[mf]{input\ },% morestring=[b]"% }[keywords,comments,strings,mf]% %% %% Mizar definition (c) 2003 Adam Grabowski %% %% Mizar is freely available at URL www.mizar.org for the Linux x86, %% Solaris x86, and Windows operating systems. %% \lst@definelanguage{Mizar}% {otherkeywords={->,(\#,\#),.=),\&},% morekeywords={vocabulary,constructors,$1,$1,$2,$3,$4,$5,$6,$7,$8,% @proof,according,aggregate,and,antonym,as,associativity,assume,% asymmetry,attr,be,begin,being,by,canceled,case,cases,cluster,% clusters,coherence,commutativity,compatibility,connectedness,% consider,consistency,constructors,contradiction,correctness,def,% deffunc,define,definition,definitions,defpred,end,environ,equals,% ex,exactly,existence,for,from,func,given,hence,hereby,holds,% idempotence,if,iff,implies,involutiveness,irreflexivity,is,it,% let,means,mode,non,not,notation,now,of,or,otherwise,over,per,% pred,prefix,projectivity,proof,provided,qua,reconsider,redefine,% reflexivity,requirements,reserve,scheme,schemes,section,selector,% set,st,struct,such,suppose,symmetry,synonym,take,that,the,then,% theorem,theorems,thesis,thus,to,transitivity,uniqueness,% vocabulary,where},% sensitive=t,% morecomment=[l]::% }[keywords,comments]% \lst@definelanguage{Modula-2}% {morekeywords={AND,ARRAY,BEGIN,BY,CASE,CONST,DIV,DO,ELSE,ELSIF,END,% EXIT,EXPORT,FOR,FROM,IF,IMPLEMENTATION,IMPORT,IN,MOD,MODULE,NOT,% OF,OR,POINTER,PROCEDURE,QUALIFIED,RECORD,REPEAT,RETURN,SET,THEN,% TYPE,UNTIL,VAR,WHILE,WITH,ABS,BITSET,BOOLEAN,CAP,CARDINAL,CHAR,% CHR,DEC,EXCL,FALSE,FLOAT,HALT,HIGH,INC,INCL,INTEGER,LONGCARD,% LONGINT,LONGREAL,MAX,MIN,NIL,ODD,ORD,PROC,REAL,SIZE,TRUE,TRUNC,% VAL,DEFINITION,LOOP},% added keywords due to Peter Bartke 99/07/22 sensitive,% morecomment=[n]{(*}{*)},% morestring=[d]',% morestring=[d]"% }[keywords,comments,strings]% \lst@definelanguage{MuPAD}{% morekeywords={end,next,break,if,then,elif,else,end_if,case,end_case,% otherwise,for,from,to,step,downto,in,end_for,while,end_while,% repeat,until,end_repeat,or,and,not,xor,div,mod,union,minus,% intersect,subset,proc,begin,end_proc,domain,end_domain,category,% end_category,axiom,end_axiom,quit,delete,frame},% morekeywords=[2]{NIL,FAIL,TRUE,FALSE,UNKNOWN,I,RD_INF,RD_NINF,% RD_NAN,name,local,option,save,inherits,of,do},% otherkeywords={\%if,?,!,:=,<,>,=,<=,<>,>=,==>,<=>,::,..,...,->,% @,@@,\$},% sensitive=true,% morecomment=[l]{//},% morecomment=[n]{/*}{*/},% morestring=[b]",% morestring=[d]{`}% }[keywords,comments,strings] \lst@definelanguage{NASTRAN} {morekeywords={ENDDATA},% morecomment=[l]$,% MoreSelectCharTable=% \lst@CArgX BEGIN\ BULK\relax\lst@CDef{}% {\lst@ifmode\else \ifnum\lst@length=\z@ \lst@EnterMode{\lst@GPmode}{\lst@modetrue \let\lst@currstyle\lst@gkeywords@sty}% \fi \fi}% {\ifnum\lst@mode=\lst@GPmode \lst@XPrintToken \lst@LeaveMode \fi}% }[keywords,comments]% \lst@definelanguage{Oberon-2}% {morekeywords={ARRAY,BEGIN,BOOLEAN,BY,CASE,CHAR,CONST,DIV,DO,ELSE,% ELSIF,END,EXIT,FALSE,FOR,IF,IMPORT,IN,INTEGER,IS,LONGINT,% LONGREAL,LOOP,MOD,MODULE,NIL,OF,OR,POINTER,PROCEDURE,REAL,RECORD,% REPEAT,RETURN,SET,SHORTINT,THEN,TO,TRUE,TYPE,UNTIL,VAR,WHILE,% WITH,ABS,ASH,CAP,CHR,COPY,DEC,ENTIER,EXCL,HALT,INC,INCL,LEN,LONG,% MAX,MIN,NEW,ODD,ORD,SHORT,SIZE},% sensitive,% morecomment=[n]{(*}{*)},% morestring=[d]',% morestring=[d]"% }[keywords,comments,strings]% %% %% OCL definition (c) 2000 Achim D. Brucker %% %% You are allowed to use, modify and distribute this code either under %% the terms of the LPPL (version 1.0 or later) or the GPL (version 2.0 %% or later). %% \lst@definelanguage[decorative]{OCL}[OMG]{OCL} {otherkeywords={@pre},% morendkeywords={name,attributes,associatoinEnds,operations,% supertypes,allSupertypes,allInstances,oclIsKindOf,oclIsTypeOf,% oclAsType,oclInState,oclIsNew,evaluationType,abs,floor,round,max,% min,div,mod,size,concat,toUpper,toLower,substring,includes,% excludes,count,includesAll,exludesAll,isEmpty,notEmpty,sum,% exists,forAll,isUnique,sortedBy,iterate,union,intersection,% including,excluding,symmetricDifference,select,reject,collect,% asSequence,asBag,asSequence,asSet,append,prepend,subSequence,at,% first,last,true,false,isQuery}% }% \lst@definelanguage[OMG]{OCL}% {morekeywords={context,pre,inv,post},% ndkeywords={or,xor,and,not,implies,if,then,else,endif},% morekeywords=[3]{Boolean,Integer,Real,String,Set,Sequence,Bag,% OclType,OclAny,OclExpression,Enumeration,Collection,},% sensitive=t,% morecomment=[l]--,% morestring=[d]'% }[keywords,comments,strings]% \lst@definelanguage{Plasm}% {sensitive=false,% morekeywords={aa,abs,ac,acolor,acos,actor,al,alias,align,and,% animation,animation,appearance,apply,ar,arc,as,asin,assoc,atan,% axialcamera,axialcameras,basehermite,bbox,bbox,bernstein,% bernsteinbasis,bezier,beziercurve,beziermanifold,bezierstripe,% beziersurface,bigger,biggest,bilinearsurface,binormal,% biquadraticsurface,black,blend,blue,bottom,box,brown,bspize,% bspline,bsplinebasis,c,cabinet,camera,cart,case,cat,catch,ceil,% centeredcameras,centralcavalier,char,charseq,choose,circle,% circumference,class,cmap,color,comp,computecoords,cone,% conicalsurface,cons,control,convexcoords,convexhull,coonspatch,% copy,cos,cosh,crease,crosspolytope,cube,cubiccardinal,% cubiccardinalbasis,cubichermite,cubicubspline,cubicubsplinebasis,% cuboid,curl,curvature,curve2cspath,curve2mapvect,cyan,cylinder,% cylindricalsurface,d,deboor,def,depol,depth_sort,depth_test,% derbernstein,derbernsteinbase,derbezier,determinant,difference,% differencepr,dim,dimetric,dirproject,displaygraph,displaynubspline,% displaynurbspline,distl,distr,div,divergence,dodecahedron,dot,down,% dp,drawedges,drawforks,drawtree,ds,dsphere,dump,dumprep,ellipse,% embed,end,eq,ex,exp,explode,export,extract_bodies,extract_polygons,% extract_wires,extrude,extrusion,fact,false,feature,ff,fillcolor,% filter,finitecone,first,flash,flashani,floor,fontcolor,fontheight,% fontspacing,fontwidth,fractalsimplex,frame,frame,frameflash,fromto,% gausscurvature,ge,grad,gradient,gradmap,gray,green,gt,help,hermite,% hermitebasis,hermitesurface,hexahedron,icosahedron,id,idnt,if,in,% inarcs,innerprod,inset,insl,insr,intersection,intersectionpr,% intervals,intmax,intmin,intsto,inv,isa,isanimpol,isbool,ischar,% isclosedshape,iscloseto,isempty,iseven,isfun,isfunvect,isge,isgt,% isint,isintneg,isinto,isintpos,isle,islt,ismat,ismatof,isnat,% isnull,isnum,isnumneg,isnumpos,isodd,isometric,isorthoshape,ispair,% ispoint,ispointseq,ispol,ispoldim,ispolytope,ispurepol,isreal,% isrealneg,isrealpos,isrealvect,isseq,isseqof,isshape,issimplex,% issqrmat,isstring,isvect,iszero,jacobian,join,joints,k,last,le,% left,leftcavalier,len,less,lesseq,lex,lift,light,linecolor,% linesize,list,ln,load,loadlib,loop,lt,lxmy,magenta,map,mapshapes,% markersize,mat,matdotprod,material,mathom,max,mean,meanpoint,med,% merge,mesh,min,minkowski,mirror,mixedprod,mk,mkframe,mkpol,% mkvector,mkversork,mod,model,move,mul,multextrude,mxby,mxmy,mxty,% myfont,n,nat2string,neq,ngon,norm2,normalmap,not,nu_grid,nubspline,% nubsplineknots,nurbspline,nurbsplineknots,octahedron,offset,% onepoint,open,optimize,or,orange,ord,ortho,orthoproject,orthox,% orthoy,orthoz,outarcs,outerloop,outerwarp,pairdiff,parallel,% pascaltriangle,pdiff,pdifference,permutahedron,permutations,% perspective,perspective,pi,pivotop,plane,planemapping,pmap,% points2shape,polar,polyline,polymarker,polypoint,power,powerset,% presort,principalnormal,print,prism,profileprodsurface,% progressivesum,project,projection,purple,pyramid,q,quadarray,% quadmesh,quote,r,raise,range,rationalbezier,rationalblend,% rationalbspline,rationalize,red,rev,reverse,rgbacolor,right,% rightcavalier,ring,rn,rotatedtext,rotationalsurface,rotn,rtail,% ruledsurface,rxmy,s,save,scalarmatprod,scalarvectprod,schlegel2d,% schlegel3d,sdifference,sdifferencepr,segment,sel,setand,setdiff,% setfontcolor,setor,setxor,sex,shape_0,shape_1,shape2points,% shape2pol,shapeclosed,shapecomb,shapediff,shapedist,% shapeinbetweening,shapeinf,shapejoin,shapelen,shapenorm,% shapenormal,shapeprod,shaperot,shapesum,shapesup,shapezero,shift,% showprop,sign,signal,simplex,simplexpile,sin,sinh,size,skeleton,% skew,smaller,smallest,solidifier,solidify,sort,sphere,spline,% splinesampling,splitcells,splitpols,sqr,sqrt,star,string,% stringtokens,struct,sub,svg,sweep,t,tail,tan,tangent,tanh,% tensorprodsurface,tetrahedron,text,texture,textwithattributes,% thinsolid,threepoints,time,tmax,tmin,top,torus,torusmap,trace,% trans,tree,trianglefan,trianglestripe,trimetric,true,truncone,tt,% tube,twopoints,uk,ukpol,ukpolf,union,unionpr,unitvect,unprune,up,% vect2dtoangle,vect2mat,vectdiff,vectnorm,vectprod,vectsum,view,% viewmodel,viewmodel,vrml,warp,warp,where,white,with,xcavalier,xor,% xquadarray,xx,ycavalier,yellow},% moredirectives={loadlib},% otherkeywords={-,+,*,**,/,~,|,..,^,\&,\&\&,\#,\#\#},% morecomment=[s]{\%}{\%},% morestring=[b]',% literate={~}{{$\sim$}}{1} {^}{$\wedge$}{1},% }[keywords,directives,comments,strings]% \lst@definelanguage{PL/I}% {morekeywords={ABS,ATAN,AUTOMATIC,AUTO,ATAND,BEGIN,BINARY,BIN,BIT,% BUILTIN,BY,CALL,CHARACTER,CHAR,CHECK,COLUMN,COL,COMPLEX,CPLX,% COPY,COS,COSD,COSH,DATA,DATE,DECIMAL,DEC,DECLARE,DCL,DO,EDIT,% ELSE,END,ENDFILE,ENDPAGE,ENTRY,EXP,EXTERNAL,EXT,FINISH,FIXED,% FIXEDOVERFLOW,FOFL,FLOAT,FORMAT,GET,GO,GOTO,IF,IMAG,INDEX,% INITIAL,INIT,INTERNAL,INT,LABEL,LENGTH,LIKE,LINE,LIST,LOG,LOG2,% LOG10,MAIN,MAX,MIN,MOD,NOCHECK,NOFIXEDOVERFLOW,NOFOFL,NOOVERFLOW,% NOOFL,NOSIZE,NOUNDERFLOW,NOUFL,NOZERODIVIDE,NOZDIV,ON,OPTIONS,% OVERFLOW,OFL,PAGE,PICTURE,PROCEDURE,PROC,PUT,READ,REPEAT,RETURN,% RETURNS,ROUND,SIN,SIND,SINH,SIZE,SKIP,SQRT,STATIC,STOP,STRING,% SUBSTR,SUM,SYSIN,SYSPRINT,TAN,TAND,TANH,THEN,TO,UNDERFLOW,UFL,% VARYING,WHILE,WRITE,ZERODIVIDE,ZDIV},% sensitive=f,% morecomment=[s]{/*}{*/},% morestring=[d]'% }[keywords,comments,strings]% %% %% PostScript language definition (c) 2005 Christophe Jorssen. %% \lst@definelanguage{PostScript}{% morekeywords={abs,add,aload,anchorsearch,and,arc,arcn,arct,arcto,array,ashow, astore,atan,awidthshow,begin,bind,bitshift,bytesavailable,cachestatus, ceiling,charpath,clear,cleartomark,cleardictstack,clip,clippath,closefile, closepath,colorimage,concat,concatmatrix,condition,copy,copypage,cos,count, countdictstack,countexecstack,counttomark,cshow,currentblackgeneration, currentcacheparams,currentcmykcolor,currentcolor,currentcolorrendering, currentcolorscreen,currentcolorspace,currentcolortransfer,currentcontext, currentdash,currentdevparams,currentdict,currentfile,currentflat,currentfont, currentglobal,currentgray,currentgstate,currenthalftone,currenthalftonephase, currenthsbcolor,currentlinecap,currentlinejoin,currentlinewidth,currentmatrix, currentmiterlimit,currentobjectformat,currentpacking,currentpagedevice, currentpoint,currentrgbcolor,currentscreen,currentshared,currentstrokeadjust, currentsystemparams,currenttransfer,currentundercolorremoval,currentuserparams, curveto,cvi,cvlit,cvn,cvr,cvrs,cvs,cvx,def,defaultmatrix,definefont, defineresource,defineusername,defineuserobject,deletefile,detach,deviceinfo, dict,dictstack,div,dtransform,dup, echo,eexec,end,eoclip,eofill,eoviewclip,eq,erasepage,errordict,exch,exec, execform,execstack,execuserobject,executeonly,executive,exit, exp,false,file,filenameforall,fileposition,fill,filter,findencoding,findfont, findresource,flattenpath,floor,flush,flushfile,FontDirectory,for,forall,fork,ge, get,getinterval,globaldict,GlobalFontDirectory,glyphshow,grestore,grestoreall, gsave,gstate,gt,identmatrix,idiv,idtransform,if,ifelse,image, imagemask,index,ineofill,infill,initclip,initgraphics,initmatrix,initviewclip, instroke,internaldict,inueofill,inufill,inustroke, invertmatrix,ISOLatin1Encoding,itransform,join,kshow, known,languagelevel,le,length,lineto,ln,load,lock,log,loop,lt, makefont,makepattern,mark,matrix,maxlength,mod,monitor,moveto,mul,ne,neg, newpath,noaccess,not,notify,null,nulldevice,or,packedarray, pathbbox,pathforall,pop,print,printobject,product,prompt,pstack,put,putinterval, quit,rand,rcurveto,read,readhexstring,readline,readonly,readstring, realtime,rectclip,rectfill,rectstroke,rectviewclip,renamefile,repeat,resetfile, resourceforall,resourcestatus,restore,reversepath,revision,rlineto,rmoveto,roll, rootfont,rotate,round,rrand,run,save,scale,scalefont,scheck,search,selectfont, serialnumber,setbbox,setblackgeneration,setcachedevice,setcachedevice2, setcachelimit,setcacheparams,setcharwidth,setcmykcolor,setcolor, setcolorrendering,setcolorscreen,setcolorspace,setcolortransfer,setdash, setdevparams,setfileposition,setflat,setfont,setglobal,setgray,setgstate, sethalftone,sethalftonephase,sethsbcolor,setlinecap,setlinejoin,setlinewidth, setmatrix,setmiterlimit,setobjectformat,setoverprint,setpacking,setpagedevice, setpattern,setrgbcolor,setscreen,setshared,setstrokeadjust,setsystemparams, settransfer,setucacheparams,setundercolorremoval,setuserparams,setvmthreshold, shareddict,show,showpage,sin,sqrt,srand,stack, StandardEncoding,start,startjob,status,statusdict,stop,stopped,store,string, stringwidth,stroke,strokepath,sub,systemdict,transform, translate,true,truncate,type,token,uappend,ucache,ucachestatus, ueofill,ufill,undef, upath,userdict,UserObjects, usertime,ustroke,ustrokepath,version,viewclip,viewclippath,vmreclaim, vmstatus,wait,wcheck,where,widthshow,write,writehexstring,writeobject, writestring,wtranslation,xcheck,xor,xshow,xyshow,yield,yshow}, sensitive, morecomment=[l]\%}[keywords,comments] %% %% Promela definition (c) 2004 William Thimbleby %% \lst@definelanguage{Promela} {morekeywords={active,assert,atomic,bit,bool,break,byte,chan,d_step,% Dproctype,do,else,empty,enabled,fi,full,goto,hidden,if,init,int,% len,mtype,nempty,never,nfull,od,of,pcvalue,printf,priority,% proctype,provided,run,short,skip,timeout,typedef,unless,unsigned,% xr,xs,true,false,inline,eval},% moredirectives={define,ifdef,ifndef,if,if,else,endif,undef,include},% moredelim=*[directive]\#,% morecomment=[s]{/*}{*/},% morestring=[b]"% }[keywords,comments,strings,directives]% %% %% PSTricks definition (c) 2006 Herbert Voss %% \lst@definelanguage{PSTricks}% {morekeywords={% begin,end,definecolor,multido,% KillGlue,DontKillGlue,pslbrace,bsrbrace,psscalebox,psset,pstVerb,pstverb,% pst@def,,psframebox,psclip,endclip,endpspicture,psframe, %% pspicture,% multirput,multips,Rput,rput,uput,cput,lput,% newrgbcolor,newgray,newcmykcolor, %% %% pstricks-add psStep,psgraph,psbrace,psPrintValue, %% %% pst-plot psvlabel,pshlabel,psplot,psline,pscustom,pscurve,psccurve,% readdata,savedata,fileplot,dataplot,listplot,% psecurce,psgraph,parametricplot,% psellipse,psaxes,ncline,nccurve,psbezier,parabola,% qdisk,qline,clipbox,endpsclip,% psgrid,pscircle,pscirclebox,psdiabox,pstribox,% newpsfontdot,psdot,psdots,% pspolygon,psdiamond,psoval,pstriangle,% psarc,psarcn,psellipticarc,psellipticarcn,pswedge,psellipticwedge, pcline,pcdiag,pcdiagg,pccurve,pccurve,pcecurve,% scalebox,scaleboxto,psmathboxtrue,everypsbox,psverbboxtrue,overlaybox,% psoverlay,putoverlaybox,% newpsstyle,newpsobject,% moveto,newpath,closepath,stroke,fill,gsave,grestore,msave,mrestore,translate,scale,% swapaxes,rotate,openshadow,closedshadow,movepath,lineto,rlineto,curveto,rcurveto,% code,dim,coor,rcoor,file,arrows,setcolor,% rotateleft,rotateright,rotatedown,% %% %% pst-node nput,naput,nbput,ncput,% ncarc,ncbox,ncangle,ncangles,ncloop,ncdiag,ncdiagg,ncarcbox,ncbar,% cnodeput,nccircle,% pnode,rnode,Rnode,Cnode,cnode,fnode,% circlenode,ovalnode,trinode,dianode,% psmatrix,endpsmatrix,psspan,% %% %% pst-tree pstree,Tcircle,TCircle,Ttri,Tn,TC,Tc,Tfan,TR,Tr,Tdia,Toval,Tdot,Tp,Tf,% skiplevel,skiplevels,endskiplevels,tspace,tlput,% %% %% pst-text pscharpath,pstextpath, %% %% pst-barcode psbarcode, %% %% pst-coil psboxfill,pscoil,psCoil,pszigzag,nccoil, psshadow,pstilt,psTilt,ThreeDput, %% %% pst-gr3d PstGridThreeDNodeProcessor,% %% %% pst-vue3d PstGridThreeD, AxesThreeD,LineThreeD,DieThreeD,FrameThreeD,SphereCircleThreeD,SphereMeridienThreeD, QuadrillageThreeD,TetraedreThreeD,PyramideThreeD,ConeThreeD,CylindreThreeD, DodecahedronThreeD,ConeThreeD,SphereThreeD,SphereInverseThreeD,DemiSphereThreeD, SphereCreuseThreeD,SphereCircledThreeD,PortionSphereThreeD,pNodeThreeD,CubeThreeD,% %% %% pst-3dplot pstThreeDCoor,pstThreeDDot,pstThreeDTriangle,pstThreeDCircle,pstPlanePut,% pstThreeDBox,pstThreeDEllipse,pstThreeDLine,pstThreeDPut,% pstThreeDNode,pstThreeDSquare,psplotThreeD,parametricplotThreeD,fileplotThreeD,% dataplotThreeD,pstScalePoints,% %% %% pst-circ resistor,battery,Ucc,Icc,capacitor,coil,diode,Zener,LED,lamp,switch,wire,tension, circledipole,multidipole,OA,transistor,Tswitch,potentiometer,transformer, optoCoupler,logic, %% %% pst-eucl pstTriangle,pstMediatorAB,pstInterLL,pstMiddleAB,pstProjection,pstCircleOA,pstLineAB,% %% %% pst-func psBessel,psPolynomial,psFourier,psGaussI,psGauss,psSi,pssi,psCi,psci,% %% %% pst-infixplot psPlot, %% %% pst-ob3d PstDie,PstCube, %% %% pst-poly PstPolygon,pspolygonbox, %% %% pst-bar psbarchart,readpsbardata,psbarscale,newpsbarstyle,% %% %% pst-lens PstLens,% %% %% pst-geo WorldMap,WorldMapII,WorldMapThreeD,WorldMapThreeDII,pnodeMap,MapPut,% %% %% pst-autoseg asr,firstnode,merge,massoc,labelmerge,% %% %% gastex node,imark,fmark,rmark,drawqbpedge,drawedge,drawloop,% %% %% pst-labo Distillation,Ballon, %% %% pst-optic lens,Transform,% %% %% pst-light3d PstLightThreeDText,% %% %% calendrier Calendrier,% %% %% pst-osci Oscillo% },% sensitive,% alsoother={0123456789$_},% morecomment=[l]\% % }[keywords,comments]% %% %% Reduce definition (c) 2002 Geraint Paul Bevan %% \lst@definelanguage{Reduce}% {morekeywords={% %% reserved identifiers abs,acos,acosh,acot,acoth,acsc,acsch,% adjprec,algebraic,algint,allbranch,allfac,and,% antisymmetric,append,arglength,array,asec,asech,% asin,asinh,atan,atan2,atanh,begin,bfspace,bye,% card_no,ceiling,clear,clearrules,coeff,coeffn,% cofactor,combineexpt,combinelogs,comment,comp,% complex,conj,cons,cont,cos,cosh,cot,coth,cramer,% cref,csc,csch,decompose,define,defn,deg,demo,den,% depend,det,df,difference,dilog,display,div,do,e,% echo,ed,editdef,ei,end,eps,eq,equal,erf,errcont,% evallhseqp,eval_mode,even,evenp,exp,expandlogs,% expr,expt,ezgcd,factor,factorial,factorize,fexpr,% first,fix,fixp,floor,for,forall,foreach,fort,% fort_width,freeof,fullroots,g,gcd,geq,go,goto,% greaterp,high_pow,hypot,i,if,ifactor,impart,in,% index,infinity,infix,input,int,integer,interpol,% intstr,k,korder,lambda,lcm,lcof,length,leq,lessp,% let,lhs,linear,linelength,lisp,list,listargp,% listargs,ln,load,load_package,log,log10,logb,% low_pow,lterm,macro,mainvar,mass,mat,match,% mateigen,matrix,max,mcd,member,memq,min,minus,mkid,% modular,msg,mshell,multiplicities,nat,neq,nero,% nextprime,nil,nodepend,noncom,nonzero,nosplit,% nospur,nullspace,num,numberp,odd,off,on,operator,% or,order,ordp,out,output,part,pause,period,pf,pi,% plus,precedence,precise,precision,pret,pri,primep,% print_precision,procedure,product,quit,quotient,% random,random_new_seed,rank,rat,ratarg,rational,% rationalize,ratpri,real,rederr,reduct,remainder,% remfac,remind,repart,repeat,rest,resultant,retry,% return,reverse,revpri,rhs,rlisp88,% root_multiplicity,round,roundall,roundbf,rounded,% saveas,savestructr,scalar,sec,sech,second,set,% setmod,setq,share,showrules,showtime,shut,sign,sin,% sinh,smacro,solve,solvesingular,spur,sqrt,structr,% sub,sum,symbolic,symmetric,t,tan,tanh,third,time,% times,tp,tra,trace,trfac,trigform,trint,until,% varname,vecdim,vector,weight,when,where,while,% write,ws,wtlevel,% %% identifiers with spaces %% for all,for each,go to,such that,% },% sensitive=false,% morecomment=[l]\%,% morecomment=[s]{COMMENT}{;},% morecomment=[s]{COMMENT}{$},% morestring="% }[keywords,comments,strings]% %% %% RSL definition (c) 2004 Brian Christensen %% \lst@definelanguage{RSL}% {morekeywords={Bool,Char,devt_relation,Int,Nat,Real,Text,Unit,abs,any,% as,axiom,card,case,channel,chaos,class,do,dom,elems,else,elsif,end,% extend,false,for,hd,hide,if,in,inds,initialise,int,len,let,local,% object,of,out,post,pre,read,real,rng,scheme,skip,stop,swap,% test_case,theory,then,tl,true,type,until,use,value,variable,while,% with,write},% literate=% {<}{$<$}{1}% {>}{$>$}{1}% {[}{$[$}{1}%% {]}{$]$}{1}%% {^}{{\mbox{$\widehat{\;}$}}}{1}%% {'}{{\raisebox{1ex}[1ex][0ex]{\protect\scriptsize$\prime$}}}{1}%% {||}{{\mbox{$\parallel$}}}{2}%% {|-}{$\vdash$}{1}%% {|=|}{{\mbox{$\lceil\!\rceil\!\!\!\!\!\!\;\lfloor\!\rfloor$}}}{1}%% {**}{$\uparrow$}{1}% {/\\}{$\wedge$}{1}%% {inter}{$\cap$}{1}%% {-\\}{$\lambda$}{1}%% {->}{$\rightarrow$}{1}%% {-m->}{{\mbox{$\rightarrow \hspace{-2.5\lst@width} _{m}\;$}}}{1}% {-~m->}{{\mbox{$\stackrel{\sim}{\mbox{$\rightarrow\hspace{-2.5\lst@width} _{m}\;$}}$}}}{1}% {-~->}{{\mbox{$\stackrel{\sim}{\rightarrow}$}}}{1}%% {-set}{\bf{-set}}{4}%% {-list}{{$^{\ast}$}}{1}%% {-inflist}{$^\omega$}{1}% {-infset}{{\mbox{{\bf -infset}}}}{7}% {\#}{$\circ$}{1}% {:-}{{\raisebox{.4ex}{\tiny $\bullet$}}}{1}%% {=}{$=$}{1}%% {==}{$==$}{2}%% {=>}{$\Rightarrow$}{1}%% {\ is\protect\^^M}{{$\;\equiv$}}{2}% {\ is\ }{{$\equiv$}}{3}%% {\ isin\protect\^^M}{$\;\in$}{2}%% {~}{$\sim$}{1}%% {~=}{$\neq$}{1}%% {~isin}{$\notin$}{1}%% {+>}{$\mapsto$}{1}%% {++}{}{1}% {|^|}{{\mbox{$\lceil\!\rceil$}}}{1}%% {\\/}{$\vee$}{1}%% {exists}{$\exists$}{1}%% {union}{$\cup$}{1}%% {>=}{$\geq$}{1}%% {><}{$\times$}{1}%% {>>}{$\supset$}{1}% {>>=}{$\supseteq$}{1}%% {<=}{$\leq$}{1}%% {<<}{$\subset$}{1}% {<.}{$\langle$}{1}%% {<<=}{$\subseteq$}{1}%% {<->}{$\leftrightarrow$}{1}%% {[=}{$\sqsubseteq$}{1}%% {\{=}{$\preceq$}{1}%% {\ all\protect\^^M}{$\forall$}{2}%% {\ all\ }{$\forall$}{3}%% {!!}{$\dagger$}{1}%% {always}{$\Box$}{1}%% {.>}{$\rangle$}{1}%% {`alpha}{$\alpha$}{1}% {`beta}{$\beta$}{1}% {`gamma}{$\gamma$}{1}% {`delta}{$\delta$}{1}% {`epsilon}{$\epsilon$}{1}% {`zeta}{$\zeta$}{1}% {`eta}{$\eta$}{1}% {`theta}{$\theta$}{1}% {`iota}{$\iota$}{1}% {`kappa}{$\kappa$}{1}% {`mu}{$\mu$}{1}% {`nu}{$\nu$}{1}% {`xi}{$\xi$}{1}% {`pi}{$\pi$}{1}% {`rho}{$\rho$}{1}% {`sigma}{$\sigma$}{1}% {`tau}{$\tau$}{1}% {`upsilon}{$\upsilon$}{1}% {`phi}{$\phi$}{1}% {`chi}{$\chi$}{1}% {`psi}{$\psi$}{1}% {`omega}{$\omega$}{1}% {`Gamma}{$\Gamma$}{1}% {`Delta}{$\Delta$}{1}% {`Theta}{$\Theta$}{1}% {`Lambda}{$\Lambda$}{1}% {`Xi}{$\Xi$}{1}% {`Pi}{$\Pi$}{1}% {`Sigma}{$\Sigma$}{1}% {`Upsilon}{$\Upsilon$}{1}% {`Phi}{$\Phi$}{1}% {`Psi}{$\Psi$}{1}% {`Omega}{$\Omega$}{1},% sensitive=true,% morecomment=[l]{--},% morecomment=[s]{/*}{*/}% }[keywords,comments]% \lst@definelanguage[IBM]{Simula}[DEC]{Simula}{}% \lst@definelanguage[DEC]{Simula}[67]{Simula}% {morekeywords={and,eq,eqv,ge,gt,hidden,imp,le,long,lt,ne,not,% options,or,protected,short}% }% \lst@definelanguage[CII]{Simula}[67]{Simula}% {morekeywords={and,equiv,exit,impl,not,or,stop}}% \lst@definelanguage[67]{Simula}% {morekeywords={activate,after,array,at,before,begin,boolean,% character,class,comment,delay,detach,do,else,end,external,false,% for,go,goto,if,in,inner,inspect,integer,is,label,name,new,none,% notext,otherwise,prior,procedure,qua,reactivate,real,ref,resume,% simset,simulation,step,switch,text,then,this,to,true,until,value,% virtual,when,while},% sensitive=f,% keywordcommentsemicolon={end}{else,end,otherwise,when}{comment},% morestring=[d]",% morestring=[d]'% }[keywords,keywordcomments,strings]% %% %% SPARQL definition (c) 2006 Christoph Kiefer %% \lst@definelanguage{SPARQL}% {morekeywords={BASE,PREFIX,SELECT,DISTINCT,CONSTRUCT,DESCRIBE,ASK,% FROM,NAMED,WHERE,ORDER,BY,ASC,DESC,LIMIT,OFFSET,OPTIONAL,% GRAPH,UNION,FILTER,a,STR,LANG,LANGMATCHES,DATATYPE,BOUND,% isIRI,isURI,isBLANK,isLITERAL,REGEX,true,false},% sensitive=false,% morecomment=[l]\#,% morestring=[d]',% morestring=[d]"% }[keywords,comments,strings]% \lst@definelanguage{S}[]{R}{} \lst@definelanguage[PLUS]{S}[]{R}{} \lst@definelanguage{R}% {keywords={abbreviate,abline,abs,acos,acosh,action,add1,add,% aggregate,alias,Alias,alist,all,anova,any,aov,aperm,append,apply,% approx,approxfun,apropos,Arg,args,array,arrows,as,asin,asinh,% atan,atan2,atanh,attach,attr,attributes,autoload,autoloader,ave,% axis,backsolve,barplot,basename,besselI,besselJ,besselK,besselY,% beta,binomial,body,box,boxplot,break,browser,bug,builtins,bxp,by,% c,C,call,Call,case,cat,category,cbind,ceiling,character,char,% charmatch,check,chol,chol2inv,choose,chull,class,close,cm,codes,% coef,coefficients,co,col,colnames,colors,colours,commandArgs,% comment,complete,complex,conflicts,Conj,contents,contour,% contrasts,contr,control,helmert,contrib,convolve,cooks,coords,% distance,coplot,cor,cos,cosh,count,fields,cov,covratio,wt,CRAN,% create,crossprod,cummax,cummin,cumprod,cumsum,curve,cut,cycle,D,% data,dataentry,date,dbeta,dbinom,dcauchy,dchisq,de,debug,% debugger,Defunct,default,delay,delete,deltat,demo,de,density,% deparse,dependencies,Deprecated,deriv,description,detach,% dev2bitmap,dev,cur,deviance,off,prev,,dexp,df,dfbetas,dffits,% dgamma,dgeom,dget,dhyper,diag,diff,digamma,dim,dimnames,dir,% dirname,dlnorm,dlogis,dnbinom,dnchisq,dnorm,do,dotplot,double,% download,dpois,dput,drop,drop1,dsignrank,dt,dummy,dump,dunif,% duplicated,dweibull,dwilcox,dyn,edit,eff,effects,eigen,else,% emacs,end,environment,env,erase,eval,equal,evalq,example,exists,% exit,exp,expand,expression,External,extract,extractAIC,factor,% fail,family,fft,file,filled,find,fitted,fivenum,fix,floor,for,% For,formals,format,formatC,formula,Fortran,forwardsolve,frame,% frequency,ftable,ftable2table,function,gamma,Gamma,gammaCody,% gaussian,gc,gcinfo,gctorture,get,getenv,geterrmessage,getOption,% getwd,gl,glm,globalenv,gnome,GNOME,graphics,gray,grep,grey,grid,% gsub,hasTsp,hat,heat,help,hist,home,hsv,httpclient,I,identify,if,% ifelse,Im,image,\%in\%,index,influence,measures,inherits,install,% installed,integer,interaction,interactive,Internal,intersect,% inverse,invisible,IQR,is,jitter,kappa,kronecker,labels,lapply,% layout,lbeta,lchoose,lcm,legend,length,levels,lgamma,library,% licence,license,lines,list,lm,load,local,locator,log,log10,log1p,% log2,logical,loglin,lower,lowess,ls,lsfit,lsf,ls,machine,Machine,% mad,mahalanobis,make,link,margin,match,Math,matlines,mat,matplot,% matpoints,matrix,max,mean,median,memory,menu,merge,methods,min,% missing,Mod,mode,model,response,mosaicplot,mtext,mvfft,na,nan,% names,omit,nargs,nchar,ncol,NCOL,new,next,NextMethod,nextn,% nlevels,nlm,noquote,NotYetImplemented,NotYetUsed,nrow,NROW,null,% numeric,\%o\%,objects,offset,old,on,Ops,optim,optimise,optimize,% options,or,order,ordered,outer,package,packages,page,pairlist,% pairs,palette,panel,par,parent,parse,paste,path,pbeta,pbinom,% pcauchy,pchisq,pentagamma,persp,pexp,pf,pgamma,pgeom,phyper,pico,% pictex,piechart,Platform,plnorm,plogis,plot,pmatch,pmax,pmin,% pnbinom,pnchisq,pnorm,points,poisson,poly,polygon,polyroot,pos,% postscript,power,ppoints,ppois,predict,preplot,pretty,Primitive,% print,prmatrix,proc,prod,profile,proj,prompt,prop,provide,% psignrank,ps,pt,ptukey,punif,pweibull,pwilcox,q,qbeta,qbinom,% qcauchy,qchisq,qexp,qf,qgamma,qgeom,qhyper,qlnorm,qlogis,qnbinom,% qnchisq,qnorm,qpois,qqline,qqnorm,qqplot,qr,Q,qty,qy,qsignrank,% qt,qtukey,quantile,quasi,quit,qunif,quote,qweibull,qwilcox,% rainbow,range,rank,rbeta,rbind,rbinom,rcauchy,rchisq,Re,read,csv,% csv2,fwf,readline,socket,real,Recall,rect,reformulate,regexpr,% relevel,remove,rep,repeat,replace,replications,report,require,% resid,residuals,restart,return,rev,rexp,rf,rgamma,rgb,rgeom,R,% rhyper,rle,rlnorm,rlogis,rm,rnbinom,RNGkind,rnorm,round,row,% rownames,rowsum,rpois,rsignrank,rstandard,rstudent,rt,rug,runif,% rweibull,rwilcox,sample,sapply,save,scale,scan,scan,screen,sd,se,% search,searchpaths,segments,seq,sequence,setdiff,setequal,set,% setwd,show,sign,signif,sin,single,sinh,sink,solve,sort,source,% spline,splinefun,split,sqrt,stars,start,stat,stem,step,stop,% storage,strstrheight,stripplot,strsplit,structure,strwidth,sub,% subset,substitute,substr,substring,sum,summary,sunflowerplot,svd,% sweep,switch,symbol,symbols,symnum,sys,status,system,t,table,% tabulate,tan,tanh,tapply,tempfile,terms,terrain,tetragamma,text,% time,title,topo,trace,traceback,transform,tri,trigamma,trunc,try,% ts,tsp,typeof,unclass,undebug,undoc,union,unique,uniroot,unix,% unlink,unlist,unname,untrace,update,upper,url,UseMethod,var,% variable,vector,Version,vi,warning,warnings,weighted,weights,% which,while,window,write,\%x\%,x11,X11,xedit,xemacs,xinch,xor,% xpdrows,xy,xyinch,yinch,zapsmall,zip},% otherkeywords={!,!=,~,$,*,\&,\%/\%,\%*\%,\%\%,<-,<<-,_,/},% alsoother={._$},% sensitive,% morecomment=[l]\#,% morestring=[d]",% morestring=[d]'% 2001 Robert Denham }% \lst@definelanguage{SAS}% {procnamekeys={proc},% morekeywords={DATA,AND,OR,NOT,EQ,GT,LT,GE,LE,NE,INFILE,INPUT,DO,BY,% TO,SIN,COS,OUTPUT,END,PLOT,RUN,LIBNAME,VAR,TITLE,FIRSTOBS,OBS,% DELIMITER,DLM,EOF,ABS,DIM,HBOUND,LBOUND,MAX,MIN,MOD,SIGN,SQRT,% CEIL,FLOOR,FUZZ,INT,ROUND,TRUNC,DIGAMMA,ERF,ERFC,EXP,GAMMA,% LGAMMA,LOG,LOG2,LOG10,ARCOS,ARSIN,ATAN,COSH,SINH,TANH,TAN,% POISSON,PROBBETA,PROBBNML,PROBCHI,PROBF,PROBGAM,PROBHYPR,% PROBNEGB,PROBNORM,PROBT,BETAINV,CINV,FINV,GAMINV,PROBIT,TINV,CSS,% CV,KURTOSIS,MEAN,NMISS,RANGE,SKEWNESS,STD,STDERR,SUM,USS,NORMAL,% RANBIN,RANCAU,RANEXP,RANGAM,RANNOR,RANPOI,RANTBL,RANTRI,RANUNI,% UNIFORM,IF,THEN,ELSE,WHILE,UNTIL,DROP,KEEP,LABEL,DEFAULT,ARRAY,% MERGE,CARDS,CARDS4,PUT,SET,UPDATE,ABORT,DELETE,DISPLAY,LIST,% LOSTCARD,MISSING,STOP,WHERE,ARRAY,DROP,KEEP,WINDOW,LENGTH,RENAME,% RETAIN,MEANS,UNIVARIATE,SUMMARY,TABULATE,CORR,FREQ,FOOTNOTE,NOTE,% SHOW},% otherkeywords={!,!=,~,$,*,\&,_,/,<,>=,=<,>},% morestring=[d]'% }[keywords,comments,strings,procnames]% \lst@definelanguage[AlLaTeX]{TeX}[LaTeX]{TeX}% {moretexcs={AtBeginDocument,AtBeginDvi,AtEndDocument,AtEndOfClass,% AtEndOfPackage,ClassError,ClassInfo,ClassWarning,% ClassWarningNoLine,CurrentOption,DeclareErrorFont,% DeclareFixedFont,DeclareFontEncoding,DeclareFontEncodingDefaults,% DeclareFontFamily,DeclareFontShape,DeclareFontSubstitution,% DeclareMathAccent,DeclareMathAlphabet,DeclareMathAlphabet,% DeclareMathDelimiter,DeclareMathRadical,DeclareMathSizes,% DeclareMathSymbol,DeclareMathVersion,DeclareOldFontCommand,% DeclareOption,DeclarePreloadSizes,DeclareRobustCommand,% DeclareSizeFunction,DeclareSymbolFont,DeclareSymbolFontAlphabet,% DeclareTextAccent,DeclareTextAccentDefault,DeclareTextCommand,% DeclareTextCommandDefault,DeclareTextComposite,% DeclareTextCompositeCommand,DeclareTextFontCommand,% DeclareTextSymbol,DeclareTextSymbolDefault,ExecuteOptions,% GenericError,GenericInfo,GenericWarning,IfFileExists,% InputIfFileExists,LoadClass,LoadClassWithOptions,MessageBreak,% OptionNotUsed,PackageError,PackageInfo,PackageWarning,% PackageWarningNoLine,PassOptionsToClass,PassOptionsToPackage,% ProcessOptionsProvidesClass,ProvidesFile,ProvidesFile,% ProvidesPackage,ProvideTextCommand,RequirePackage,% RequirePackageWithOptions,SetMathAlphabet,SetSymbolFont,% TextSymbolUnavailable,UseTextAccent,UseTextSymbol},% morekeywords={array,center,displaymath,document,enumerate,eqnarray,% equation,flushleft,flushright,itemize,list,lrbox,math,minipage,% picture,sloppypar,tabbing,tabular,trivlist,verbatim}% }% \lst@definelanguage[LaTeX]{TeX}[common]{TeX}% {moretexcs={a,AA,aa,addcontentsline,addpenalty,addtocontents,% addtocounter,addtolength,addtoversion,addvspace,alph,Alph,and,% arabic,array,arraycolsep,arrayrulewidth,arraystretch,author,% baselinestretch,begin,bezier,bfseries,bibcite,bibdata,bibitem,% bibliography,bibliographystyle,bibstyle,bigskip,boldmath,% botfigrule,bottomfraction,Box,caption,center,CheckCommand,circle,% citation,cite,cleardoublepage,clearpage,cline,columnsep,% columnseprule,columnwidth,contentsline,dashbox,date,dblfigrule,% dblfloatpagefraction,dblfloatsep,dbltextfloatsep,dbltopfraction,% defaultscriptratio,defaultscriptscriptratio,depth,Diamond,% displaymath,document,documentclass,documentstyle,doublerulesep,% em,emph,endarray,endcenter,enddisplaymath,enddocument,% endenumerate,endeqnarray,endequation,endflushleft,endflushright,% enditemize,endlist,endlrbox,endmath,endminipage,endpicture,% endsloppypar,endtabbing,endtabular,endtrivlist,endverbatim,% enlargethispage,ensuremath,enumerate,eqnarray,equation,% evensidemargin,extracolsep,fbox,fboxrule,fboxsep,filecontents,% fill,floatpagefraction,floatsep,flushbottom,flushleft,flushright,% fnsymbol,fontencoding,fontfamily,fontseries,fontshape,fontsize,% fontsubfuzz,footnotemark,footnotesep,footnotetext,footskip,frac,% frame,framebox,fussy,glossary,headheight,headsep,height,hline,% hspace,I,include,includeonly,index,inputlineno,intextsep,% itemindent,itemize,itemsep,iterate,itshape,Join,kill,label,% labelsep,labelwidth,LaTeX,LaTeXe,leadsto,lefteqn,leftmargin,% leftmargini,leftmarginii,leftmarginiii,leftmarginiv,leftmarginv,% leftmarginvi,leftmark,lhd,lim,linebreak,linespread,linethickness,% linewidth,list,listfiles,listfiles,listparindent,lrbox,% makeatletter,makeatother,makebox,makeglossary,makeindex,% makelabel,MakeLowercase,MakeUppercase,marginpar,marginparpush,% marginparsep,marginparwidth,markboth,markright,math,mathbf,% mathellipsis,mathgroup,mathit,mathrm,mathsf,mathsterling,mathtt,% mathunderscore,mathversion,mbox,mdseries,mho,minipage,% multicolumn,multiput,NeedsTeXFormat,newcommand,newcounter,% newenvironment,newfont,newhelp,newlabel,newlength,newline,% newmathalphabet,newpage,newsavebox,newtheorem,nobreakspace,% nobreakspace,nocite,nocorr,nocorrlist,nofiles,nolinebreak,% nonumber,nopagebreak,normalcolor,normalfont,normalmarginpar,% numberline,obeycr,oddsidemargin,oldstylenums,onecolumn,oval,% pagebreak,pagenumbering,pageref,pagestyle,paperheight,paperwidth,% paragraphmark,parbox,parsep,partopsep,picture,poptabs,pounds,% protect,pushtabs,put,qbezier,qbeziermax,r,raggedleft,raisebox,% ref,refstepcounter,renewcommand,renewenvironment,restorecr,% reversemarginpar,rhd,rightmargin,rightmark,rmfamily,roman,Roman,% rootbox,rule,samepage,sbox,scshape,secdef,section,sectionmark,% selectfont,setcounter,settodepth,settoheight,settowidth,sffamily,% shortstack,showoutput,showoverfull,sloppy,sloppypar,slshape,% smallskip,sqsubset,sqsupset,SS,stackrel,stepcounter,stop,stretch,% subparagraphmark,subsectionmark,subsubsectionmark,sum,% suppressfloats,symbol,tabbing,tabbingsep,tabcolsep,tabular,% tabularnewline,textasciicircum,textasciitilde,textbackslash,% textbar,textbf,textbraceleft,textbraceright,textbullet,% textcircled,textcompwordmark,textdagger,textdaggerdbl,textdollar,% textellipsis,textemdash,textendash,textexclamdown,textfloatsep,% textfraction,textgreater,textheight,textit,textless,textmd,% textnormal,textparagraph,textperiodcentered,textquestiondown,% textquotedblleft,textquotedblright,textquoteleft,textquoteright,% textregistered,textrm,textsc,textsection,textsf,textsl,% textsterling,textsuperscript,texttrademark,texttt,textunderscore,% textup,textvisiblespace,textwidth,thanks,thefootnote,thempfn,% thempfn,thempfootnote,thepage,thepage,thicklines,thinlines,% thispagestyle,title,today,topfigrule,topfraction,topmargin,% topsep,totalheight,tracingfonts,trivlist,ttfamily,twocolumn,% typein,typeout,unboldmath,unitlength,unlhd,unrhd,upshape,usebox,% usecounter,usefont,usepackage,value,vector,verb,verbatim,vline,% vspace,width,% normalsize,small,footnotesize,scriptsize,tiny,large,Large,LARGE,% huge,Huge}% }% \lst@definelanguage[plain]{TeX}[common]{TeX}% {moretexcs={advancepageno,beginsection,bf,bffam,bye,cal,cleartabs,% columns,dosupereject,endinsert,eqalign,eqalignno,fiverm,fivebf,% fivei,fivesy,folio,footline,hang,headline,it,itemitem,itfam,% leqalignno,magnification,makefootline,makeheadline,midinsert,mit,% mscount,nopagenumbers,normalbottom,of,oldstyle,pagebody,% pagecontents,pageinsert,pageno,plainoutput,preloaded,proclaim,rm,% settabs,sevenbf,seveni,sevensy,sevenrm,sl,slfam,supereject,% tabalign,tabs,tabsdone,tabsyet,tenbf,tenex,teni,tenit,tenrm,% tensl,tensy,tentt,textindent,topglue,topins,topinsert,tt,ttfam,% ttraggedright,vfootnote}% }% \lst@definelanguage[common]{TeX}[primitive]{TeX} {moretexcs={active,acute,ae,AE,aleph,allocationnumber,allowbreak,% alpha,amalg,angle,approx,arccos,arcsin,arctan,arg,arrowvert,% Arrowvert,ast,asymp,b,backslash,bar,beta,bgroup,big,Big,bigbreak,% bigcap,bigcirc,bigcup,bigg,Bigg,biggl,Biggl,biggm,Biggm,biggr,% Biggr,bigl,Bigl,bigm,Bigm,bigodot,bigoplus,bigotimes,bigr,Bigr,% bigskip,bigskipamount,bigsqcup,bigtriangledown,bigtriangleup,% biguplus,bigvee,bigwedge,bmod,bordermatrix,bot,bowtie,brace,% braceld,bracelu,bracerd,braceru,bracevert,brack,break,breve,% buildrel,bullet,c,cap,cases,cdot,cdotp,cdots,centering,% centerline,check,chi,choose,circ,clubsuit,colon,cong,coprod,% copyright,cos,cosh,cot,coth,csc,cup,d,dag,dagger,dashv,ddag,% ddagger,ddot,ddots,deg,delta,Delta,det,diamond,diamondsuit,dim,% displaylines,div,do,dospecials,dot,doteq,dotfill,dots,downarrow,% Downarrow,downbracefill,egroup,eject,ell,empty,emptyset,endgraf,% endline,enskip,enspace,epsilon,equiv,eta,exists,exp,filbreak,% flat,fmtname,fmtversion,footins,footnote,footnoterule,forall,% frenchspacing,frown,gamma,Gamma,gcd,ge,geq,gets,gg,goodbreak,% grave,H,hat,hbar,heartsuit,hglue,hideskip,hidewidth,hom,% hookleftarrow,hookrightarrow,hphantom,hrulefill,i,ialign,iff,Im,% imath,in,inf,infty,int,interdisplaylinepenalty,% interfootnotelinepenalty,intop,iota,item,j,jmath,joinrel,jot,% kappa,ker,l,L,lambda,Lambda,land,langle,lbrace,lbrack,lceil,% ldotp,ldots,le,leavevmode,leftarrow,Leftarrow,leftarrowfill,% leftharpoondown,leftharpoonup,leftline,leftrightarrow,% Leftrightarrow,leq,lfloor,lg,lgroup,lhook,lim,liminf,limsup,line,% ll,llap,lmoustache,ln,lnot,log,longleftarrow,Longleftarrow,% longleftrightarrow,Longleftrightarrow,longmapsto,longrightarrow,% Longrightarrow,loop,lor,lq,magstep,magstep,magstephalf,mapsto,% mapstochar,mathhexbox,mathpalette,mathstrut,matrix,max,maxdimen,% medbreak,medskip,medskipamount,mid,min,models,mp,mu,multispan,% nabla,narrower,natural,ne,nearrow,neg,negthinspace,neq,newbox,% newcount,newdimen,newfam,newif,newinsert,newlanguage,newmuskip,% newread,newskip,newtoks,newwrite,next,ni,nobreak,nointerlineskip,% nonfrenchspacing,normalbaselines,normalbaselineskip,% normallineskip,normallineskiplimit,not,notin,nu,null,nwarrow,o,O,% oalign,obeylines,obeyspaces,odot,oe,OE,offinterlineskip,oint,% ointop,omega,Omega,ominus,ooalign,openup,oplus,oslash,otimes,% overbrace,overleftarrow,overrightarrow,owns,P,parallel,partial,% perp,phantom,phi,Phi,pi,Pi,pm,pmatrix,pmod,Pr,prec,preceq,prime,% prod,propto,psi,Psi,qquad,quad,raggedbottom,raggedright,rangle,% rbrace,rbrack,rceil,Re,relbar,Relbar,removelastskip,repeat,% rfloor,rgroup,rho,rhook,rightarrow,Rightarrow,rightarrowfill,% rightharpoondown,rightharpoonup,rightleftharpoons,rightline,rlap,% rmoustache,root,rq,S,sb,searrow,sec,setminus,sharp,showhyphens,% sigma,Sigma,sim,simeq,sin,sinh,skew,slash,smallbreak,smallint,% smallskip,smallskipamount,smash,smile,sp,space,spadesuit,sqcap,% sqcup,sqrt,sqsubseteq,sqsupseteq,ss,star,strut,strutbox,subset,% subseteq,succ,succeq,sum,sup,supset,supseteq,surd,swarrow,t,tan,% tanh,tau,TeX,theta,Theta,thinspace,tilde,times,to,top,tracingall,% triangle,triangleleft,triangleright,u,underbar,underbrace,% uparrow,Uparrow,upbracefill,updownarrow,Updownarrow,uplus,% upsilon,Upsilon,v,varepsilon,varphi,varpi,varrho,varsigma,% vartheta,vdash,vdots,vec,vee,vert,Vert,vglue,vphantom,wedge,% widehat,widetilde,wlog,wp,wr,xi,Xi,zeta}% }% \lst@definelanguage[primitive]{TeX}% {moretexcs={above,abovedisplayshortskip,abovedisplayskip,aftergroup,% abovewithdelims,accent,adjdemerits,advance,afterassignment,atop,% atopwithdelims,badness,baselineskip,batchmode,begingroup,% belowdisplayshortskip,belowdisplayskip,binoppenalty,botmark,box,% boxmaxdepth,brokenpenalty,catcode,char,chardef,cleaders,closein,% closeout,clubpenalty,copy,count,countdef,cr,crcr,csname,day,% deadcycles,def,defaulthyphenchar,defaultskewchar,delcode,% delimiter,delimiterfactor,delimitershortfall,dimen,dimendef,% discretionary,displayindent,displaylimits,displaystyle,% displaywidowpenalty,displaywidth,divide,doublehyphendemerits,dp,% edef,else,emergencystretch,end,endcsname,endgroup,endinput,% endlinechar,eqno,errhelp,errmessage,errorcontextlines,% errorstopmode,escapechar,everycr,everydisplay,everyhbox,everyjob,% everymath,everypar,everyvbox,exhyphenpenalty,expandafter,fam,fi,% finalhypendemerits,firstmark,floatingpenalty,font,fontdimen,% fontname,futurelet,gdef,global,globaldefs,halign,hangafter,% hangindent,hbadness,hbox,hfil,hfill,hfilneg,hfuzz,hoffset,% holdinginserts,hrule,hsize,hskip,hss,ht,hyphenation,hyphenchar,% hyphenpenalty,if,ifcase,ifcat,ifdim,ifeof,iffalse,ifhbox,ifhmode,% ifinner,ifmmode,ifnum,ifodd,iftrue,ifvbox,ifvmode,ifvoid,ifx,% ignorespaces,immediate,indent,input,insert,insertpenalties,% interlinepenalty,jobname,kern,language,lastbox,lastkern,% lastpenalty,lastskip,lccode,leaders,left,lefthyphenmin,leftskip,% leqno,let,limits,linepenalty,lineskip,lineskiplimits,long,% looseness,lower,lowercase,mag,mark,mathaccent,mathbin,mathchar,% mathchardef,mathchoice,mathclose,mathcode,mathinner,mathop,% mathopen,mathord,mathpunct,mathrel,mathsurround,maxdeadcycles,% maxdepth,meaning,medmuskip,message,mkern,month,moveleft,% moveright,mskip,multiply,muskip,muskipdef,newlinechar,noalign,% noboundary,noexpand,noindent,nolimits,nonscript,nonstopmode,% nulldelimiterspace,nullfont,number,omit,openin,openout,or,outer,% output,outputpenalty,over,overfullrule,overline,overwithdelims,% pagedepth,pagefilllstretch,pagefillstretch,pagefilstretch,% pagegoal,pageshrink,pagestretch,pagetotal,par,parfillskip,% parindent,parshape,parskip,patterns,pausing,penalty,% postdisplaypenalty,predisplaypenalty,predisplaysize,pretolerance,% prevdepth,prevgraf,radical,raise,read,relax,relpenalty,right,% righthyphenmin,rightskip,romannumeral,scriptfont,% scriptscriptfont,scriptscriptstyle,scriptspace,scriptstyle,% scrollmode,setbox,setlanguage,sfcode,shipout,show,showbox,% showboxbreadth,showboxdepth,showlists,showthe,skewchar,skip,% skipdef,spacefactor,spaceskip,span,special,splitbotmark,% splitfirstmark,splitmaxdepth,splittopskip,string,tabskip,% textfont,textstyle,the,thickmuskip,thinmuskip,time,toks,toksdef,% tolerance,topmark,topskip,tracingcommands,tracinglostchars,% tracingmacros,tracingonline,tracingoutput,tracingpages,% tracingparagraphs,tracingrestores,tracingstats,uccode,uchyph,% underline,unhbox,unhcopy,unkern,unpenalty,unskip,unvbox,unvcopy,% uppercase,vadjust,valign,vbadness,vbox,vcenter,vfil,vfill,% vfilneg,vfuzz,voffset,vrule,vsize,vskip,vsplit,vss,vtop,wd,% widowpenalty,write,xdef,xleaders,xspaceskip,year},% sensitive,% alsoother={0123456789$_},% morecomment=[l]\%% }[keywords,tex,comments]% %% %% Verilog definition (c) 2003 Cameron H. G. Wright %% Based on the IEEE 1364-2001 Verilog HDL standard %% Ref: S. Palnitkar, "Verilog HDL: A Guide to Digital Design and Synthesis," %% Prentice Hall, 2003. ISBN: 0-13-044911-3 %% \lst@definelanguage{Verilog}% {morekeywords={% reserved keywords always,and,assign,automatic,begin,buf,bufif0,bufif1,case,casex,% casez,cell,cmos,config,deassign,default,defparam,design,disable,% edge,else,end,endcase,endconfig,endfunction,endgenerate,% endmodule,endprimitive,endspecify,endtable,endtask,event,for,% force,forever,fork,function,generate,genvar,highz0,highz1,if,% ifnone,incdir,include,initial,inout,input,instance,integer,join,% large,liblist,library,localparam,macromodule,medium,module,nand,% negedge,nmos,nor,noshowcancelled,not,notif0,notif1,or,output,% parameter,pmos,posedge,primitive,pull0,pull1,pulldown,pullup,% pulsestyle_onevent,pulsestyle_ondetect,rcmos,real,realtime,reg,% release,repeat,rnmos,rpmos,rtran,rtranif0,rtranif1,scalared,% showcancelled,signed,small,specify,specparam,strong0,strong1,% supply0,supply1,table,task,time,tran,tranif0,tranif1,tri,tri0,% tri1,triand,trior,trireg,unsigned,use,vectored,wait,wand,weak0,% weak1,while,wire,wor,xnor,xor},% morekeywords=[2]{% system tasks and functions $bitstoreal,$countdrivers,$display,$fclose,$fdisplay,$fmonitor,% $fopen,$fstrobe,$fwrite,$finish,$getpattern,$history,$incsave,% $input,$itor,$key,$list,$log,$monitor,$monitoroff,$monitoron,% $nokey},% morekeywords=[3]{% compiler directives `accelerate,`autoexpand_vectornets,`celldefine,`default_nettype,% `define,`else,`elsif,`endcelldefine,`endif,`endprotect,% `endprotected,`expand_vectornets,`ifdef,`ifndef,`include,% `no_accelerate,`noexpand_vectornets,`noremove_gatenames,% `nounconnected_drive,`protect,`protected,`remove_gatenames,% `remove_netnames,`resetall,`timescale,`unconnected_drive},% alsoletter=\`,% sensitive,% morecomment=[s]{/*}{*/},% morecomment=[l]//,% nonstandard morestring=[b]"% }[keywords,comments,strings]% \endinput %% %% End of file `lstlang3.sty'. hevea-2.09/mathop.hva0000644004317100512160000000000010401356637014545 0ustar marangetcristalhevea-2.09/url.hva0000644004317100512160000000044307114732007014066 0ustar marangetcristal\@primitives{url}% \def\@urlttstyle{\def\UrlFont{\ttfamily}}% \def\@urlsfstyle{\def\UrlFont{\sffamily}}% \def\@urlrmstyle{\def\UrlFont{\rmfamily}}% \def\urlstyle#1{\csname @url#1style\endcsname}% \urlstyle{tt}% \def\url{\begingroup\urlstyle{tt}\Url}% \let\UrlLeft\relax\let\UrlRight\relax% hevea-2.09/version.ml0000644004317100512160000000165212204704117014603 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let real_version = "2.09" let release_date = "2013-08-20" let version = try let _ = String.index real_version '+' in real_version^" of "^release_date with | Not_found -> real_version hevea-2.09/image.mli0000644004317100512160000000174507021270537014361 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val start : unit -> unit val stop : unit -> unit val restart : unit -> unit val put_char : char -> unit val put : string -> unit val dump : string -> (Lexing.lexbuf -> unit) -> Lexing.lexbuf -> unit val page : unit -> unit val finalize : bool -> bool hevea-2.09/doOut.mli0000644004317100512160000000320012017660721014354 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val verbose : int ref module type Config = sig val small_length : int end module type S = sig type t val create_buff : unit -> t val create_chan : out_channel -> t val create_null : unit -> t val is_null : t -> bool val is_empty : t -> bool val reset : t -> unit val put : t -> string -> unit val blit : t -> Lexing.lexbuf -> unit val put_char : t -> char -> unit val flush : t -> unit val get_pos : t -> int val erase_start : int -> t -> unit val iter : (char -> unit) -> t -> unit val iter_next : (char -> (unit -> int) -> unit) -> t -> unit val to_string : t -> string val to_list : t -> string list val to_chan : out_channel -> t -> unit val copy : t -> t -> unit val copy_fun : (string -> string) -> t -> t -> unit val copy_no_tag : t -> t -> unit val close : t -> unit val debug : out_channel -> t -> unit val unskip : t -> unit end module Make(C:Config) : S hevea-2.09/labeltype.hva0000644004317100512160000000140412113376362015246 0ustar marangetcristal\ProvidesPackage{labeltype} %%%internal package for getting section type info for labels %%Redefinitions of \refstepcounter and \label to catch label types %%NB: label type is counter name \def\currentlabeltype{none} \let\@rt@oldrefstepcounter\refstepcounter \renewcommand{\refstepcounter}[1] {\def\currentlabeltype{#1}\@rt@oldrefstepcounter{#1}} \let\@rt@old@label\label \renewcommand{\label}[2][] {\@rt@old@label[#1]{#2}% \@auxdowrite{\@print{\@deflabeltype}\{#2\}\{\currentlabeltype\}\@print{ }}} %%Hum also redefines \enumerate... \let\@rt@oldenumerate\enumerate \renewcommand{\enumerate}{\def\currentlabeltype{item}\@rt@oldenumerate} %NB:It is up to client packages to % (1) redefine/extend \@deflabeltype % (2) define \@lt@item@type \newcommand{\@deflabeltype}[2]{} hevea-2.09/cross.ml0000644004317100512160000000400512017660721014246 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let verbose = ref 0 ;; let table = Hashtbl.create 37 ;; let add name file = if !verbose > 0 then prerr_endline ("Register "^name^" in "^file) ; try let _ = Hashtbl.find table name in Location.print_pos () ; prerr_endline ("Warning, multiple definitions for anchor: "^name) ; with | Not_found -> Hashtbl.add table name file ;; let decode_fragment frag = let buff = Buff.create () in Url.decode_fragment (Buff.put_char buff) (Buff.put buff) frag ; Buff.to_string buff let fullname change myfilename name = try let filename = Hashtbl.find table (decode_fragment name) in let newname = if myfilename = filename then "#"^name else change filename^"#"^name in if !verbose > 1 then prerr_endline ("From "^name^" to "^newname) ; newname with Not_found -> begin Location.print_pos () ; prerr_endline ("Warning, cannot find anchor: "^name) ; raise Not_found end ;; let dump outname change = try let chan = open_out outname in try Hashtbl.iter (fun k x -> Printf.fprintf chan "%s\t%s\n" k (change x)) table ; close_out chan with | e -> close_out chan ; raise e with | Sys_error msg -> prerr_endline ("Error while dumping "^outname^": "^msg) hevea-2.09/esponja.ml0000644004317100512160000000266712017660721014570 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let arg = ref [] let pess = ref false let move = ref true let () = Arg.parse ["-u", Arg.Set pess, "pessimize" ; "-v", Arg.Unit (fun () -> incr Emisc.verbose),"be verbose" ; "-n", Arg.Unit (fun () -> move := false ; incr Emisc.verbose), "do not change files"] (fun s -> arg := s :: !arg) ("Usage: esponja [option*] files\noptions are:") ;; module E = Esp.Make (struct let pess = !pess let move = !move end) let process name = try E.file name with Esp.Failed -> () let main () = try List.iter process (List.rev !arg) ; exit 0 with | e -> Printf.fprintf stderr "Unexpected exception: %s\n" (Printexc.to_string e) ; exit 2 ;; main () ;; hevea-2.09/length.mll0000644004317100512160000000457612017660721014567 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: length.mll,v 1.16 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) { open Lexing exception Cannot ;; let font = 10 ;; let font_float = float font ;; type t = Char of int | Pixel of int | Percent of int | No of string | Default let pretty = function | Char x -> string_of_int x^" chars" | Pixel x -> string_of_int x^" pxls" | Percent x -> string_of_int x^"%" | Default -> "default" | No s -> "*"^s^"*" let is_zero = function | Char 0|Pixel 0|Percent 0 -> true | _ -> false let pixel_to_char x = (100 * x + 50)/(100 * font) and char_to_pixel x = font * x let mk_char x = Char (truncate (0.5 +. x)) let mk_pixel x = Pixel (truncate (0.5 +. x)) and mk_percent x = Percent (truncate x) ;; let convert unit x = match unit with | "ex"|"em" -> mk_char x | "pt" -> mk_pixel x | "in" -> mk_char ((x *. 72.27) /. font_float) | "cm" -> mk_char ((x *. 28.47) /. font_float) | "mm" -> mk_char ((x *. 2.847) /. font_float) | "pc" -> mk_char ((x *. 12.0) /. font_float) | "@percent" -> mk_percent (100.0 *. x) | _ -> No unit ;; } rule main_rule = parse '-' {let x,unit = positif lexbuf in convert unit (0.0 -. x)} | "" {let x,unit = positif lexbuf in convert unit x} and positif = parse | ['0'-'9']*'.'?['0'-'9']+ {let lxm = lexeme lexbuf in float_of_string lxm,unit lexbuf} | "@percent" {1.0, "@percent"} | "" {raise Cannot} and unit = parse | [' ''\n''\t''\r']+ {unit lexbuf} | [^' ''\n''\t''\r']* {lexeme lexbuf} { open Lexing let main lexbuf = try main_rule lexbuf with | Cannot -> let sbuf = lexbuf.lex_buffer in No (String.sub sbuf 0 lexbuf.lex_buffer_len) } hevea-2.09/iso-symb.hva0000644004317100512160000007004512113215547015033 0ustar marangetcristal%% Escapable special characters \def\%{\@print{%}} \def\${\@print{$}}%$ \def\#{\@print{#}} \def\&{\@print{&}} \def\_{\@print{_}} \def\{{\char123} \def\}{\char125} \def\nobreakspace{~} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 2: Predefined text-mode commands% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\textasciicircum}{\@print{^}} \newcommand{\textasciitilde}{\@print{~}} \DeclareSymbolHtml[*]{\textasteriskcentered}{X2217} \newcommand{\textbackslash}{\char92} \newcommand{\textbar}{|} \let\textbraceleft\{ \let\textbraceright\} \DeclareSymbol[*]{\textbullet}{X2022} \DeclareSymbol[(c)]{\textcopyright}{XA9} \DeclareSymbolHtml{\textdagger}{8224} \DeclareSymbolHtml{\textdaggerdbl}{8225} \let\textdollar\$ \DeclareSymbol[...]{\textellipsis}{X2026} \DeclareSymbolHtml[\@print{--}]{\textemdash}{X2014} \DeclareSymbolHtml[\@print{-}]{\textendash}{X2013} \DeclareSymbol{\textexclamdown}{XA1} \newcommand{\textgreater}{\@print{>}} \newcommand{\textless}{\@print{<}} \DeclareSymbol[\textsup{a}]{\textordfeminine}{XAA} \DeclareSymbol[\textsup{o}]{\textordmasculine}{XBA} \DeclareSymbol{\textparagraph}{XB6} \DeclareSymbol{\textperiodcentered}{XB7} \DeclareSymbol{\textquestiondown}{XBF} \DeclareSymbolHtml[\@print{"}]{\textquotedblleft}{X201C} \DeclareSymbolHtml[\@print{"}]{\textquotedblright}{X201D} \DeclareSymbolHtml[\@print{'}]{\textquoteleft}{X2018} \DeclareSymbolHtml[\@print{'}]{\textquoteright}{X2019} \DeclareSymbol[(R)]{\textregistered}{XAE} \DeclareSymbol{\textsection}{XA7} \DeclareSymbol[pounds]{\textsterling}{XA3} \DeclareSymbolHtml[(TM)]{\texttrademark}{X2122} \newcommand{\textunderscore}{\@print{_}} \DeclareSymbolHtml[\@print{_}]{\textvisiblespace}{X2423} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 3: Commands defined both for math and text% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbol{\P}{XB6} \DeclareSymbol{\S}{XA7} \DeclareSymbol[(c)]{\copyright}{XA9} \DeclareSymbolHtml{\dag}{8224} \DeclareSymbolHtml{\ddag}{8225} \DeclareSymbolHtml[...]{\dots}{X2026} \DeclareSymbol[pounds]{\pounds}{XA3} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 5: Non-ascii letters % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%Those belong to latin9 \DeclareSymbol[oe]{\oe}{X153} \DeclareSymbol[OE]{\OE}{X152} %%And those to latin1 \DeclareSymbol[ae]{\ae}{XE6} \DeclareSymbol[AE]{\AE}{XC6} \DeclareSymbol[aa]{\aa}{XE5} \DeclareSymbol[AA]{\AA}{XC5} \DeclareSymbol[o]{\o}{XF8} \DeclareSymbol[O]{\O}{XD8} \DeclareSymbol[ss]{\ss}{XDF} \newcommand{\SS}{SS} \DeclareSymbol[DH]{\DH}{XD0} \DeclareSymbol[dh]{\dh}{XF0} \DeclareSymbol[DJ]{\DJ}{X110} \DeclareSymbol[dj]{\dj}{X111} \DeclareSymbol[TH]{\TH}{XDE} \DeclareSymbol[th]{\th}{XFE} \DeclareSymbol[ENG]{\NG}{X14A} \DeclareSymbol[eng]{\ng}{X14B} \DeclareSymbol[L]{\L}{X141} \DeclareSymbol[l]{\l}{X142} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Punctuation Marks Not Found in OT1 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbol[<<]{\guillemotleft}{XAB} \DeclareSymbol[>>]{\guillemotright}{XBB} \DeclareSymbolHtml[<]{\guilsinglleft}{X2039} \DeclareSymbolHtml[>]{\guilsinglright}{X203A} \DeclareSymbolHtml[,,]{\quotedblbase}{X201E} \DeclareSymbolHtml[,]{\quotesinglbase}{X201A} \newcommand{\textquotedbl}{\@print{"}}%" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 38: Maths-Mode Versions of Text Symbols % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \let\mathdollar\$ \DeclareSymbolHtml[...]{\mathellipsis}{X2026} \DeclareSymbol{\mathparagraph}{XB6} \DeclareSymbol{\mathsection}{XA7} \DeclareSymbol[pounds]{\mathsterling}{XA3} \let\mathunderscore\_ %%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 39 Binary Operators% %%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml[\mbox{|\_|}]{\amalg}{X2A3F} \DeclareSymbolHtml[*]{\ast}{X2217} \DeclareSymbolHtml[O]{\bigcirc}{X25EF} \DeclareSymbolHtml{\bigtriangledown}{X25BD} \DeclareSymbolHtml{\bigtriangleup}{X25B3} \DeclareSymbolHtml[*]{\bullet}{X2022} \DeclareSymbolHtml{\@cap}{X2229} \DeclareSymbolHtml[\mbox{---\@br| |\@br| |}]{\@display@cap}{X22C2} \newcommand{\cap}{\ifdisplay\@display@cap\else\@cap\fi} \DeclareSymbol{\cdot}{XB7} \DeclareSymbolHtml{\circ}{X2218} \DeclareSymbolHtml{\@cup}{X222A} \DeclareSymbolHtml[\mbox{| |\@br| |\@br---}]{\@display@cup}{X22C3} \newcommand{\cup}{\ifdisplay\@display@cup\else\@cup\fi} \@Let{\dagger}{\dag} \@Let{\ddagger}{\ddag} \DeclareSymbolHtml{\diamond}{X22C4} \DeclareSymbol[/]{\div}{XF7} \DeclareSymbolHtml[-/+]{\mp}{X2213} \DeclareSymbolHtml[(\cdot)]{\odot}{X2299} \DeclareSymbolHtml[(-)]{\ominus}{X2296} \DeclareSymbolHtml[(+)]{\oplus}{X2295} \DeclareSymbolHtml[(\char92)]{\oslash}{X2298} \DeclareSymbolHtml[(\times)]{\otimes}{X2297} \DeclareSymbol[+/-]{\pm}{XB1} \DeclareSymbolHtml[\backslash]{\setminus}{X2216} \DeclareSymbolHtml{\sqcap}{X2293} \DeclareSymbolHtml[\mbox{|\_|}]{\sqcup}{X2294} \DeclareSymbolHtml[*]{\star}{X22C6} \DeclareSymbol[X]{\times}{XD7} \DeclareSymbolHtml[<|]{\triangleleft}{X25C1} \DeclareSymbolHtml[|>]{\triangleright}{X25B7} \DeclareSymbolHtml[\mbox{|\pm|}]{\uplus}{X228E} \DeclareSymbolHtml[\mbox{OR}]{\vee}{X2228} \DeclareSymbolHtml[\mbox{AND}]{\wedge}{X2227} \DeclareSymbolHtml{\wr}{X2240} %%Miscellaneous LaTeX2e Math Symbols \DeclareSymbolHtml[\mbox{aleph}]{\aleph}{X2135} \DeclareSymbolHtml{\angle}{X2220} \newcommand{\backslash}{\char92} \DeclareSymbolHtml{\clubsuit}{X2663} \DeclareSymbolHtml{\diamondsuit}{X2666} \DeclareSymbolHtml[\O]{\emptyset}{X2205} \DeclareSymbolHtml{\flat}{X266D} \DeclareSymbolHtml{\heartsuit}{X2665} \DeclareSymbolHtml[\mbox{oo}]{\infty}{X221E} \DeclareSymbolHtml[\mbox{nabla}]{\nabla}{X2207} \DeclareSymbolHtml{\natural}{X266E} \DeclareSymbol[\mbox{NOT}]{\neg}{XAC} \DeclareSymbol[\@print{'}]{\prime}{X2032} \DeclareSymbolHtml[\@print{#}]{\sharp}{X266F} \DeclareSymbolHtml{\spadesuit}{X2660} \DeclareSymbolHtml{\surd}{X221A} \DeclareSymbolHtml{\triangle}{X25B3} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 47 Variable-sized math operator % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \MakeBigSymbol{\bigcap}{\@cap}{\@cap}{\@display@cap} \MakeBigSymbol{\bigcup}{\@cup}{\@cap}{\@display@cup} \MakeBigSymbol{\bigodot}{\odot}{\odot}{\odot} \newcommand{\@textdisplayuplus}{\mbox{|~~~|\@br|~+~|\@br-----}} \MakeBigSymbol{\biguplus}{\uplus}{\uplus}{\@textdisplayuplus} \MakeBigSymbol{\bigoplus}{\oplus}{\oplus}{\oplus} \MakeBigSymbol{\bigotimes}{\otimes}{\otimes}{\otimes} %\MakeBigSymbol{\bigsqcap}{\@sqcap}{\@sqcap}{\@display@sqcap} \newcommand{\@textdisplaysqcup}{|~~|\@br|~~\@br----} \MakeBigSymbol{\bigsqcup}{\sqcup}{\sqcup}{\@textdisplaysqcup} \newcommand{\@textdisplayvee}{\mbox{\char92{}~~/\@br~\char92/~}} \MakeBigSymbol{\bigvee}{\vee}{\vee}{\@textdisplayvee} \newcommand{\@textdisplaywedge}{\mbox{~/\char92~\@br/~~\char92}} \MakeBigSymbol{\bigwedge}{\wedge}{\wedge}{\@textdisplaywedge} \DeclareSymbolHtml[coprod]{\@coprod}{X2210} \newcommand{\@textdisplaycoprod}{\mbox{---\@br| |\@br| |}} \MakeBigSymbol{\coprod}{\@coprod}{\@coprod}{\@textdisplaycoprod} \DeclareSymbolHtml[prod]{\@prod}{X220F} \newcommand{\@textdisplayprod}{\mbox{| |\@br| |\@br---}} \MakeBigSymbol{\prod}{\@prod}{\@prod}{\@textdisplayprod} \DeclareSymbolHtml[sum]{\@sum}{X2211} \newcommand{\@textdisplaysum}{\mbox{--\@br\char92\@br/\@br--}} \MakeBigSymbol{\sum}{\@sum}{\@sum}{\@textdisplaysum} \DeclareSymbolHtml[\mbox{integral}]{\@int}{X222B} \newcommand{\@textdisplayint}{\mbox{/\@br|\@br|\@br/}} \MakeBigSymbol[\intlimits]{\int}{\@int}{\@int}{\@textdisplayint} \DeclareSymbolHtml[\mbox{oint}]{\@oint}{X222E} \newcommand{\@textdisplayoint}{\mbox{/\@br|\@br{}o\@br|\@br/}} \MakeBigSymbol[\intlimits]{\oint}{\@oint}{\@oint}{\@textdisplayoint} %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 54: Binary relations % %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml[\mbox{approx}]{\approx}{X2248} \DeclareSymbolHtml[\mbox{asymp}]{\asymp}{X224D} \DeclareSymbolHtml[\mbox{bowtie}]{\bowtie}{X22C8} \DeclareSymbolHtml[\mbox{cong}]{\cong}{X2245} \DeclareSymbolHtml[\@print{|-}]{\vdash}{X22A2} \DeclareSymbolHtml[\@print{-|}]{\dashv}{X22A3} \DeclareSymbolHtml[\stackrel{\cdot}{=}]{\doteq}{X2250} \DeclareSymbolHtml[\mbox{equiv}]{\equiv}{X2261} \DeclareSymbolHtml[\mbox{frown}]{\frown}{X2040} \DeclareSymbolHtml[\mbox{|}]{\mid}{X2223} \DeclareSymbolHtml[\mbox{|=}]{\models}{X22A8} \DeclareSymbolHtml[\mbox{||}]{\parallel}{X2225} \DeclareSymbolHtml[\mbox{\@print{_|_}}]{\perp}{X22A5} \DeclareSymbolHtml[\mbox{prec}]{\prec}{X227A} \DeclareSymbolHtml[\mbox{preceq}]{\preceq}{X227C} \DeclareSymbolHtml[\mbox{oc}]{\propto}{X221D} \DeclareSymbolHtml[\@print{~}]{\sim}{X223C} \DeclareSymbolHtml[\textunderline{\sim}]{\simeq}{X2243} \DeclareSymbolHtml[\mbox{smile}]{\smile}{X203F} \DeclareSymbolHtml[\mbox{succ}]{\succ}{X227B} \DeclareSymbolHtml[\mbox{succeq}]{\succeq}{X227D} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Table 65: Subset and Superset Relations % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\@textdisplaysubset}{\mbox{-\@br|\@br-}} \newcommand{\@textdisplaysupset}{\mbox{-\@br~|\@br-}} \newcommand{\@textdisplaysubseteq}{\mbox{-\@br|\@br=}} \newcommand{\@textdisplaysupseteq}{\mbox{-\@br~|\@br=}} \DeclareSymbolHtml[\IfDisplay{\@textdisplysubset}{\mbox{subset}}] {\subset}{X2282} \DeclareSymbolHtml[\IfDisplay{\@textdisplaysubseteq}{\mbox{subseteq}}] {\subseteq}{X2286} \DeclareSymbolHtml[\IfDisplay{\@textdisplaysupset}{\mbox{supset}}] {\supset}{X2283} \DeclareSymbolHtml[\IfDisplay{\@textdisplaysupseteq}{\mbox{supseteq}}] {\supseteq}{X2287} \DeclareSymbolHtml[\IfDisplay{\@textdisplaysubseteq}{\mbox{sqsubseteq}}] {\sqsubseteq}{X2291} \DeclareSymbolHtml[\IfDisplay{\@textdisplaysupseteq}{\mbox{sqsupseteq}}] {\sqsupseteq}{X2292} %%%%%%%%%%%%%%%%%%%%%%%%%% % Table 71: Inequalities % %%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml[<=]{\leq}{X2264} \DeclareSymbolHtml[<<]{\ll}{X226A} \DeclareSymbolHtml[>=]{\geq}{X2265} \DeclareSymbolHtml[>>]{\gg}{X226B} \DeclareSymbolHtml[\mbox{neq}]{\neq}{X2260} %%%%%%%%%%%%%%%%%%%% % Table 79: Arrows % %%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml{\Downarrow}{X21D3} \DeclareSymbolHtml{\downarrow}{X2193} \DeclareSymbolHtml{\hookleftarrow}{X21A9} \DeclareSymbolHtml{\hookrightarrow}{X21AA} \DeclareSymbolHtml[\mbox{<-}]{\leftarrow}{X2190} \DeclareSymbolHtml[\mbox{<=}]{\Leftarrow}{X21D0} \DeclareSymbolHtml[\mbox{<=>}]{\Leftrightarrow}{X21D4} \DeclareSymbolHtml[\mbox{<->}]{\leftrightarrow}{X2194} \DeclareSymbolHtml[\mbox{|->>}]{\mapsto}{X21A6} \DeclareSymbolHtml[\mbox{-}]{\relbar}{X23AF} %EM DASH (better than arrow extension X23AF) \DeclareSymbolHtml[\@print{-}]{\@arrowextension}{X2014} %nothing satisfactory \newcommand{\Relbar}{=} \newcommand{\@Arrowextension}{=} \newcommand{\longleftarrow}{\leftarrow\@arrowextension} \newcommand{\Longleftarrow}{\Leftarrow\@Arrowextension} \newcommand{\longleftrightarrow}{\leftarrow\rightarrow} \newcommand{\Longleftrightarrow}{\Leftarrow\Rightarrow} \newcommand{\longmapsto}{\vdash\rightarrow} \newcommand{\Longrightarrow}{\@Arrowextension\Rightarrow} \newcommand{\longrightarrow}{\@arrowextension\rightarrow} \DeclareSymbolHtml{\nearrow}{X2197} \DeclareSymbolHtml{\nwarrow}{X2196} \DeclareSymbolHtml[\mbox{=>}]{\Rightarrow}{X21D2} \DeclareSymbolHtml[\mbox{->}]{\rightarrow}{X2192} \DeclareSymbolHtml{\searrow}{X2198} \DeclareSymbolHtml{\swarrow}{X2199} \DeclareSymbolHtml{\uparrow}{X2191} \DeclareSymbolHtml{\Uparrow}{X21D1} \DeclareSymbolHtml{\updownarrow}{X2195} \DeclareSymbolHtml{\@textUpdownarrow}{X21D5} \iffalse \NewcommandHtml{\@displayUpdownarrow} {\@open{TABLE}{style="border-spacing:0" class="cellpadding0"}\@open{TR}{}\@open{TD}{}% \Uparrow\@force{TD}\@force{TR}\@open{TR}{}\@open{TD}{}% \Downarrow\@force{TD}\@force{TR}\@force{TABLE}} \fi \NewcommandHtml{\@displayUpdownarrow} {\@itemdisplay\Uparrow\@br\Downarrow\@itemdisplay\int@sup@sub{2}} \NewcommandHtml{\Updownarrow}{\DisplayChoose{\@displayUpdownarrow}{\@textUpdownarrow}} %%%%%%%%%%%%%%%%%%%%% %Table 80: Harpoons % %%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml{\leftharpoondown}{X21BD} \DeclareSymbolHtml{\leftharpoonup}{X21BC} \DeclareSymbolHtml{\rightharpoondown}{X21C1} \DeclareSymbolHtml{\rightharpoonup}{X21C0} \DeclareSymbolHtml{\rightleftharpoons}{X21CC} %%%%%%%%%%%%%%%%%%%%%%%%%%% % Table 98: Greek Letters % %%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml[alpha]{\alpha}{X03B1} \DeclareSymbolHtml[beta]{\beta}{X03B2} \DeclareSymbolHtml[gamma]{\gamma}{X03B3} \DeclareSymbolHtml[delta]{\delta}{X03B4} \DeclareSymbolHtml[epsilon]{\epsilon}{X454} \DeclareSymbolHtml[varepsilon]{\varepsilon}{X03B5} \DeclareSymbolHtml[zeta]{\zeta}{X03B6} \DeclareSymbolHtml[eta]{\eta}{X03B7} \DeclareSymbolHtml[theta]{\theta}{X03B8} \DeclareSymbolHtml[vartheta]{\vartheta}{X3D1} \DeclareSymbolHtml[iota]{\iota}{X3B9} \DeclareSymbolHtml[kappa]{\kappa}{X3BA} \DeclareSymbolHtml[lambda]{\lambda}{X3BB} \DeclareSymbol[mu]{\mu}{XB5} \DeclareSymbolHtml[nu]{\nu}{X3BD} \DeclareSymbolHtml[xi]{\xi}{X3BE} \DeclareSymbolHtml[pi]{\pi}{X3C0} \DeclareSymbolHtml[varpi]{\varpi}{X3D6} \DeclareSymbolHtml[rho]{\rho}{X3C1} \DeclareSymbolHtml[varrho]{\varrho}{X3F1} \DeclareSymbolHtml[sigma]{\sigma}{X3C3} \DeclareSymbolHtml[varsigma]{\varsigma}{X3C2} \DeclareSymbolHtml[tau]{\tau}{X3C4} \DeclareSymbolHtml[upsilon]{\upsilon}{X3C5} \DeclareSymbolHtml[phi]{\phi}{X3C6} \DeclareSymbolHtml[varphi]{\varphi}{X3D5} \DeclareSymbolHtml[chi]{\chi}{X3C7} \DeclareSymbolHtml[psi]{\psi}{X3C8} \DeclareSymbolHtml[omega]{\omega}{X3C9} % Capital Greek Letters \DeclareSymbolHtml[Gamma]{\Gamma}{X393} \DeclareSymbolHtml[Delta]{\Delta}{X394} \DeclareSymbolHtml[Theta]{\Theta}{X398} \DeclareSymbolHtml[Lambda]{\Lambda}{X39B} \DeclareSymbolHtml[Xi]{\Xi}{X39E} \DeclareSymbolHtml[Pi]{\Pi}{X3A0} \DeclareSymbolHtml[Sigma]{\Sigma}{X3A3} \DeclareSymbolHtml[Upsilon]{\Upsilon}{X3A5} \DeclareSymbolHtml[Phi]{\Phi}{X3A6} \DeclareSymbolHtml[Psi]{\Psi}{X3A8} \DeclareSymbolHtml[Omega]{\Omega}{X3A9} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Table 104: Letter-like symbols % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml[\mbox{\@print{_|_}}]{\bot}{X22A5} \DeclareSymbolHtml[\mbox{ell}]{\ell}{X2113} \DeclareSymbolHtml[\mbox{exists}]{\exists}{X2203} \DeclareSymbolHtml[\mbox{forall}]{\forall}{X2200} \DeclareSymbolHtml[\mbox{h}]{\hbar}{X210F} \DeclareSymbolHtml[\mbox{Im}]{\Im}{X2111} \DeclareSymbolHtml[\mbox{in}]{\in}{X2208} \DeclareSymbolHtml[\mbox{contains}]{\ni}{X220B} \DeclareSymbolHtml{\partial}{X2202} \DeclareSymbolHtml[\mbox{Re}]{\Re}{X211C} \DeclareSymbolHtml{\top}{X22A4} \DeclareSymbolHtml{\wp}{X2118} \newcommand{\i}{i}%To have \^{\i} work. (No accent as fct of U-chars yet) \let\imath\i %\DeclareSymbolHtml[i]{\imath}{X131} \newcommand{\j}{j} %\DeclareSymbolHtml[j]{\jmath}{X237} \let\jmath\j %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Table 122: Math-mode Accents % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \let\acute\' \let\bar\= \let\breve\u \let\check\v \let\dot\. \let\grave\` \let\hat\^ \let\mathring\r \let\tilde\~ \newcommand{\@@vec}[1]{{#1}^{\rightarrow}} \newcommand{\@vec}[1]{\mathop{#1}\limits^{\rightarrow}\nolimits} \newcommand{\vec}{\DisplayChoose\@vec\@@vec} %%%%%%%%%%%%%%%%%%% % Table 138: Dots % %%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml[...]{\ldots}{X2026} \newcommand{\text@vdots} {\ifdisplay\mbox{\cdot\\\cdot\\\cdot}\else:\fi} \DeclareSymbolHtml[\text@vdots]{\vdots}{X22EE} \DeclareSymbolHtml[\cdot\cdot\cdot]{\cdots}{X22EF} \newcommand{\text@ddots}{\ifdisplay\mbox{\cdot~~\\~\cdot~\\~~\cdot}\else% \hva@warn{\ddots in text}\mbox{ddots}\fi} \DeclareSymbolHtml[\text@ddots]{\ddots}{X22F1} \let\cdotp\cdot \newcommand{\ldotp}{.} \DeclareSymbolHtml[:]{\colon}{X2236} %%% So called log-like functions \newcommand{\@defl}[2]{\newcommand{#1}{\mathop{\mbox{#2}}}} \newcommand{\@defnl}[2]{\newcommand{#1}{\mathop{\mbox{#2}}\nolimits}} \@defnl\arccos{arccos} \@defnl\arcsin{arcsin} \@defnl\arctan{arctan} \@defnl\arg{arg} \@defnl\cos{cos} \@defnl\cosh{cosh} \@defnl\cot{cot} \@defnl\coth{coth} \@defnl\csc{csc} \@defnl\deg{deg} \@defl\det{det} \@defnl\dim{dim} \@defnl\exp{exp} \@defl\gcd{gcd} \@defnl\hom{hom} \@defl\inf{inf} \@defnl\ker{ker} \@defnl\lg{lg} \@defl\lim{lim} \@defl\liminf{liminf} \@defl\limsup{limsup} \@defnl\ln{ln} \@defnl\log{log} \@defl\max{max} \@defl\min{min} \@defl\Pr{Pr} \@defnl\sec{sec} \@defnl\sin{sin} \@defnl\sinh{sinh} \@defl\sup{sup} \@defnl\tan{tan} \@defnl\tanh{tanh} \@defnl\bmod{mod} %%%%%%%%%%%%%% \def\pmod#1{\mbox{(mod }#1{\@anti{\@style{I}} )}} \def\tth{\textnormal{||-}} \def\frac#1#2{{#1\over #2}} \newcommand{\limits}{} \newcommand{\nolimits}{} %%%TeX definitions \let\le\leq \let\ge\geq %%%%%%%%%%%%%%%%%% %%Defaut accents%% %%%%%%%%%%%%%%%%%% %\@default is the default typesetting cmd, when %translation to unicode fails. %eg by \newcommand{\acute@default}[1]{#1'}, you get postfix accute accents. \ifhtml \newcommand{\macron@default}[1]{\textoverline{#1}} \newcommand{\linebelow@default}[1]{\textunderline{#1}} \fi \newcommand{\text@accent}[4] {\@ifundefined{#1@default} {\hva@warn{Application of '#2' on '#4' failed}#3} {\csname#1@default\endcsname{#3}}} %%%%%%%%%%%%%%%%%%%%%%%%%% % Delimiters (Table 113) % %%%%%%%%%%%%%%%%%%%%%%%%%% \let\@top@br\@br \newcommand{\delim@name}[1]{\string{#1@delimname}} \newcommand{\process@delim}[2] {\@ifundefined{\delim@name{#1}} {\process@delim@one{#2}{#1}} {\csname\delim@name{#1}\endcsname{#2}}} \newcommand{\csname\delim@name{.}\endcsname}[1]{} %%Simple replication \newcommand{\mid@vert@txt}{\@print@u{X7C}} \DeclareSymbolHtml[\mid@vert@txt]{\mid@vert}{X23AA}%curly bracket extension \newcommand{\mid@Vert}{\mid@vert\mid@vert} %\DeclareSymbolHtml[\mid@Vert@txt]{\mid@Vert}{X2225} \newcommand{\vert}{|} \newcommand{\|}{||} \DeclareSymbolHtml[||]{\Vert}{X2225} \newcommand{\csname\delim@name{\vert}\endcsname}[1] {\process@delim@one{#1}{\mid@vert}} \newcommand{\csname\delim@name{\Vert}\endcsname}[1] {\process@delim@one{#1}{\mid@Vert}} \newcommand{\csname\delim@name{|}\endcsname}[1] {\process@delim@one{#1}{\mid@vert}} \newcommand{\csname\delim@name{\|}\endcsname}[1] {\process@delim@one{#1}{\mid@Vert}} %%Left parenthesis \newcommand{\@nbsp}{\@print@u{XA0}} \newcommand{\top@parleft@txt}{\@print@u{X2F}\@nbsp} \newcommand{\mid@parleft@txt}{\@print@u{X7C}\@nbsp} \newcommand{\dow@parleft@txt}{\@print@u{X5C}\@nbsp} \DeclareSymbolHtml[\top@parleft@txt]{\top@parleft}{X239B} \DeclareSymbolHtml[\mid@parleft@txt]{\mid@parleft}{X239C} \DeclareSymbolHtml[\dow@parleft@txt]{\dow@parleft}{X239D} \newcommand{\csname\delim@name(\endcsname}[1] {\process@delim@three{#1}{\top@parleft}{\mid@parleft}{\dow@parleft}} %%Right parenthesis \newcommand{\top@parright@txt}{\@nbsp\@print@u{X5C}} \newcommand{\mid@parright@txt}{\@nbsp\@print@u{X7C}} \newcommand{\dow@parright@txt}{\@nbsp\@print@u{X2F}} \DeclareSymbolHtml[\top@parright@txt]{\top@parright}{X239E} \DeclareSymbolHtml[\mid@parright@txt]{\mid@parright}{X239F} \DeclareSymbolHtml[\dow@parright@txt]{\dow@parright}{X23A0} \newcommand{\csname\delim@name)\endcsname}[1] {\process@delim@three{#1}{\top@parright}{\mid@parright}{\dow@parright}} %%Left square bracket \newcommand{\top@sqbraleft@txt}{--} \newcommand{\mid@sqbraleft@txt}{\@print@u{X7C}\@nbsp} \newcommand{\dow@sqbraleft@txt}{--} \DeclareSymbolHtml[\top@sqbraleft@txt]{\top@sqbraleft}{X23A1} \DeclareSymbolHtml[\mid@sqbraleft@txt]{\mid@sqbraleft}{X23A2} \DeclareSymbolHtml[\dow@sqbraleft@txt]{\dow@sqbraleft}{X23A3} \newcommand{\csname\delim@name{[}\endcsname}[1] {\process@delim@three{#1}{\top@sqbraleft}{\mid@sqbraleft}{\dow@sqbraleft}} %%Right square bracket \newcommand{\top@sqbraright@txt}{--} \newcommand{\mid@sqbraright@txt}{\@nbsp\@print@u{X7C}} \newcommand{\dow@sqbraright@txt}{--} \DeclareSymbolHtml[\top@sqbraright@txt]{\top@sqbraright}{X23A4} \DeclareSymbolHtml[\mid@sqbraright@txt]{\mid@sqbraright}{X23A5} \DeclareSymbolHtml[\dow@sqbraright@txt]{\dow@sqbraright}{X23A6} \newcommand{\csname\delim@name{]}\endcsname}[1] {\process@delim@three{#1}{\top@sqbraright}{\mid@sqbraright}{\dow@sqbraright}} %%Left ceil \DeclareSymbolHtml[\mbox{lceil}]{\lceil}{X2308} \newcommand{\csname\delim@name{\lceil}\endcsname}[1] {\process@delim@top{#1}{\top@sqbraleft}{\mid@sqbraleft}} %%Left floor \DeclareSymbolHtml[\mbox{lfloor}]{\lfloor}{X230A} \newcommand{\csname\delim@name{\lfloor}\endcsname}[1] {\process@delim@dow{#1}{\mid@sqbraleft}{\dow@sqbraleft}} %%Right ceil \DeclareSymbolHtml[\mbox{rceil}]{\rceil}{X2309} \newcommand{\csname\delim@name{\rceil}\endcsname}[1] {\process@delim@top{#1}{\top@sqbraright}{\mid@sqbraright}} %%Right floor \DeclareSymbolHtml[\mbox{rfloor}]{\rfloor}{X230B} \newcommand{\csname\delim@name{\rfloor}\endcsname}[1] {\process@delim@dow{#1}{\mid@sqbraright}{\dow@sqbraright}} %%Left curly bracket \newcommand{\curlybra@ext@txt}{\@print@u{X7C}} \newcommand{\leftcurlybra@ext@txt}{\@nbsp\@print@u{X7C}\@nbsp} \newcommand{\leftcurlybra@top@txt}{\@nbsp\@print@u{X2F}\@nbsp} \newcommand{\leftcurlybra@mid@txt}{<\@nbsp} \newcommand{\leftcurlybra@dow@txt}{\@nbsp\@print@u{X5C}\@nbsp} \DeclareSymbolHtml[\curlybra@ext@txt]{\curlybra@ext}{X23AA} \DeclareSymbolHtml[\leftcurlybra@ext@txt]{\leftcurlybra@ext}{X23AA} \DeclareSymbolHtml[\leftcurlybra@top@txt]{\leftcurlybra@top}{X23A7} \DeclareSymbolHtml[\leftcurlybra@mid@txt]{\leftcurlybra@mid}{X23A8} \DeclareSymbolHtml[\leftcurlybra@dow@txt]{\leftcurlybra@dow}{X23A9} \newcommand{\csname\delim@name{\{}\endcsname}[1] {\process@delim@four{#1} {\leftcurlybra@ext}{\leftcurlybra@top}{\leftcurlybra@mid}{\leftcurlybra@dow}} %%Right curly bracket \newcommand{\rightcurlybra@ext@txt}{\@nbsp\@print@u{X7C}} \newcommand{\rightcurlybra@top@txt}{\@nbsp\@print@u{X5C}} \newcommand{\rightcurlybra@mid@txt}{\@nbsp>} \newcommand{\rightcurlybra@dow@txt}{\@nbsp\@print@u{X2F}} \DeclareSymbolHtml[\rightcurlybra@ext@txt]{\rightcurlybra@ext}{X23AA} \DeclareSymbolHtml[\rightcurlybra@top@txt]{\rightcurlybra@top}{X23AB} \DeclareSymbolHtml[\rightcurlybra@mid@txt]{\rightcurlybra@mid}{X23AC} \DeclareSymbolHtml[\rightcurlybra@dow@txt]{\rightcurlybra@dow}{X23AD} \newcommand{\csname\delim@name{\}}\endcsname}[1] {\process@delim@four{#1} {\rightcurlybra@ext}{\rightcurlybra@top} {\rightcurlybra@mid}{\rightcurlybra@dow}} %%Arrows \DeclareSymbolHtml[|]{\arr@mid}{X23AA}%curly bracket extension \newcommand{\csname\delim@name{\uparrow}\endcsname}[1] {\process@delim@top{#1}{\uparrow}{\arr@mid}} \newcommand{\csname\delim@name{\downarrow}\endcsname}[1] {\process@delim@dow{#1}{\arr@mid}{\downarrow}} \newcommand{\csname\delim@name{\updownarrow}\endcsname}[1] {\process@delim@three{#1}{\uparrow}{\arr@mid}{\downarrow}} %%Arrows \DeclareSymbolHtml[||]{\Arr@mid}{X2225} \newcommand{\csname\delim@name{\Uparrow}\endcsname}[1] {\process@delim@top{#1}{\Uparrow}{\Arr@mid}} \newcommand{\csname\delim@name{\Downarrow}\endcsname}[1] {\process@delim@dow{#1}{\Arr@mid}{\Downarrow}} \newcommand{\csname\delim@name{\Updownarrow}\endcsname}[1] {\process@delim@three{#1}{\Uparrow}{\Arr@mid}{\Downarrow}} %%Those get replicated in \left\right \DeclareSymbolHtml[\mbox{}]{\rangle}{X27E9} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Large Delimiters (Table 113) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml{\lmoustache}{X23B0}%does noyt really exist in latex... \newcommand{\lmous@top@txt}{\@print@u{X2F}\@nbsp} \newcommand{\lmous@mid@txt}{\@print@u{X7C}\@nbsp} \newcommand{\lmous@dow@txt}{\@print@u{X2F}\@nbsp} \DeclareSymbolHtml[\lmous@top@txt]{\lmous@top}{X23A7} \DeclareSymbolHtml[\lmous@mid@txt]{\lmous@mid}{X23AA} \DeclareSymbolHtml[\lmous@dow@txt]{\lmous@dow}{X23AD} \newcommand{\csname\delim@name{\lmoustache}\endcsname}[1] {\process@delim@three{#1} {\lmous@top}{\lmous@mid}{\lmous@dow}} \DeclareSymbolHtml{\rmoustache}{X23B1}%does noyt really exist in latex... \newcommand{\rmous@top@txt}{\@nbsp\@print@u{X5C}} \newcommand{\rmous@mid@txt}{\@nbsp\@print@u{X7C}} \newcommand{\rmous@dow@txt}{\@nbsp\@print@u{X5C}} \DeclareSymbolHtml[\rmous@top@txt]{\rmous@top}{X23AB} \DeclareSymbolHtml[\rmous@mid@txt]{\rmous@mid}{X23AA} \DeclareSymbolHtml[\rmous@dow@txt]{\rmous@dow}{X23A9} \newcommand{\csname\delim@name{\rmoustache}\endcsname}[1] {\process@delim@three{#1} {\rmous@top}{\rmous@mid}{\rmous@dow}} \newcommand{\lgroup}{(} \newcommand{\csname\delim@name\lgroup\endcsname}[1] {\process@delim@three{#1}{\top@parleft}{\mid@parleft}{\dow@parleft}} \newcommand{\rgroup}{)} \newcommand{\csname\delim@name\rgroup\endcsname}[1] {\process@delim@three{#1}{\top@parright}{\mid@parright}{\dow@parright}} \newcommand{\arrowvert}{|} \@Let\Arrowvert\Vert \newcommand{\bracevert}{\textbf{|}} \newcommand{\csname\delim@name{\arrowvert}\endcsname}[1] {\process@delim@one{#1}{\mid@vert}} \newcommand{\csname\delim@name{\Arrowvert}\endcsname}[1] {\process@delim@one{#1}{\mid@Vert}} \newcommand{\csname\delim@name{\bracevert}\endcsname}[1] {\process@delim@one{#1}{\textbf{\mid@vert}}} %%%%%%%%%%%%%%%%%%%%% % Explicit \big etc.% %%%%%%%%%%%%%%%%%%%%% \NewcommandHtml{\@big}[1] {\@itemdisplay\process@delim{#1}{2}\@itemdisplay\int@sup@sub{2}} \NewcommandHtml{\@@big}[1]{\hva@warn{\big in text mode}#1} \NewcommandHtml{\big}{\DisplayChoose\@big\@@big} \NewcommandHtml{\@Big}[1] {\@itemdisplay\process@delim{#1}{3}\@itemdisplay\int@sup@sub{3}} \NewcommandHtml{\@@Big}[1]{\hva@warn{\Big in text mode}#1} \NewcommandHtml{\Big}{\DisplayChoose\@Big\@@Big} \NewcommandHtml{\@bigg}[1] {\@itemdisplay\process@delim{#1}{4}\@itemdisplay\int@sup@sub{4}} \NewcommandHtml{\@@bigg}[1]{\hva@warn{\bigg in text mode}#1} \NewcommandHtml{\bigg}{\DisplayChoose\@bigg\@@bigg} \NewcommandHtml{\@Bigg}[1] {\@itemdisplay\process@delim{#1}{5}\@itemdisplay\int@sup@sub{5}} \NewcommandHtml{\@@Bigg}[1]{\hva@warn{\Bigg in text mode}#1} \NewcommandHtml{\Bigg}{\DisplayChoose\@Bigg\@@Bigg} \@Let\bigl\big\@Let\bigm\big\@Let\bigr\big \@Let\Bigl\Big\@Let\Bigm\Big\@Let\Bigr\Big \@Let\biggl\bigg\@Let\biggm\bigg\@Let\biggr\bigg \@Let\Biggl\Bigg\@Let\Biggm\Bigg\@Let\Biggr\Bigg %%%%%%%%%%%%%%% % Square root % %%%%%%%%%%%%%%% \newcounter{@c} \NewcommandHtml{\@surd}[2] {\ifthenelse{#1 < 5}{{\Large#2}} {\setcounter{@c}{(#1-5)*2}% \@open{TABLE}{style="border-spacing:0" class="cellpadding0"}% \@open{TR}{}\@open{TD}{ALIGN="right"}% \@open{DIV}{CLASS="vbar" STYLE="height:\arabic{@c}em;"}\@force{DIV}% \@close{TD}\@close{TR}% \@open{TR}{}\@open{TD}{}% {\Huge#2}% \@close{TD}\@close{TR}\@close{TABLE}}} \NewcommandHtml{\csname\delim@name{\surd}\endcsname}[1]{\@surd{#1}{\surd}} \DeclareSymbolHtml{\surd@four}{X221C} \NewcommandHtml{\csname\delim@name{\surd@four}\endcsname}[1] {\@surd{#1}{\surd@four}} \DeclareSymbolHtml{\surd@three}{X221B} \NewcommandHtml{\csname\delim@name{\surd@three}\endcsname}[1] {\@surd{#1}{\surd@three}} \NewcommandHtml{\@sqrt}[2][2] {\ifthenelse{\equal{#1}{2}}{\left\surd\overline{#2}\right.}{% \ifthenelse{\equal{#1}{3}}{\left\surd@three\overline{#2}\right.}{% \ifthenelse{\equal{#1}{4}}{\left\surd@four\overline{#2}\right.}{% {\left(#2\right)^{\frac{1}{#1}}}}}}} \NewcommandHtml{\@@sqrt}[2][2] {\ifthenelse{\equal{#1}{2}}{\surd\overlinedbox{#2}}{% \ifthenelse{\equal{#1}{3}}{\surd@three\overlinedbox{#2}}{% \ifthenelse{\equal{#1}{4}}{\surd@four\overlinedbox{#2}}{% {(#2)^{\frac{1}{#1}}}}}}} \NewcommandHtml{\sqrt}{\DisplayChoose\@sqrt\@@sqrt} \NewcommandText{\sqrt}[2][2]{\left(#2\right)^{1/#1}} %%%%%%%%%%%%%%%%%%%%% % Negated relations % %%%%%%%%%%%%%%%%%%%%% % Table 8, p. 436 in TeX book \newcommand{\not@name}[1]{\string{#1@not}} \newcommand{\DeclareNot}[3][\@empty] {\ifu\csname\not@name{#2}\endcsname \DeclareSymbolHtml[\mbox{\neg(#2)}]{\csname\not@name{#2}\endcsname}{#3}\fi} \newcommand{\not}[1] {\@ifundefined{\not@name{#1}} {\hva@warn{Cannot apply '\not' to '#1'}\neg{}#1}% {\csname\not@name{#1}\endcsname}} %% \DeclareSymbolHtml[\mbox{notin}]{\notin}{X2209} \DeclareNot[\mbox{notin}]{\in}{X2209} %% \DeclareNot{<}{X226E} \DeclareNot{>}{X226F} \DeclareNot{=}{X2260} \DeclareNot{\leq}{X2270} \DeclareNot{\geq}{X2271} \DeclareNot{\equiv}{X2262} \DeclareNot{\prec}{X2280} \DeclareNot{\succ}{X2281} \DeclareNot{\sim}{X2241} \DeclareNot{\preceq}{X22E0} \DeclareNot{\succeq}{X22E1} \DeclareNot{\simeq}{X2244} \DeclareNot{\subset}{X2284} \DeclareNot{\supset}{X2285} \DeclareNot{\approx}{X2249} \DeclareNot{\subseteq}{X2288} \DeclareNot{\supseteq}{X2289} \DeclareNot{\cong}{X2247} \DeclareNot{\sqsubseteq}{X22E2} \DeclareNot{\sqsupseteq}{X22E3} \DeclareNot{\asymp}{X226D} \DeclareNot{\ni}{X220C} \DeclareNot{\vdash}{X22AC} \DeclareNot{\Leftarrow}{X21CD} \DeclareNot{\leftarrow}{X219A} \DeclareNot{\Leftrightarrow}{X21CE} \DeclareNot{\leftrightarrow}{X21AE} \DeclareNot{\rightarrow}{X219B} \DeclareNot{\Rightarrow}{X21CF} \DeclareNot{\exists}{X2204} \DeclareNot{\mid}{X2224} \DeclareNot{\parallel}{X2226} \DeclareNot{\models}{X22AD} %%%%%%%%%%%%%%%%%% % TeX synomyms % %%%%%%%%%%%%%%%%%% \@Let\le\leq \@Let\ge\geq \@Let\ne\neq \@Let\to\rightarrow \@Let\land\wedge \newcommand{\iff}{\;\Longleftrightarrow\;} \@Let\gets\leftarrow \@Let\lor\vee \@Let\owns\ni \@Let\lnot\neg %%%%%%%%%%%%%%%%%%%% %Needed internally % %%%%%%%%%%%%%%%%%%%% hevea-2.09/outManager.mli0000644004317100512160000000765512017700472015404 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Lexstate module type S = sig exception Error of 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 val has_mod : Element.text -> bool val forget_par : unit -> int option val close_par : unit -> bool val open_par : unit -> unit val par : int option -> unit val open_block : string -> string -> unit val close_block : string -> unit val force_block : string -> string -> unit val close_flow : string -> unit val insert_block : string -> string -> unit val insert_attr : string -> string -> unit val open_maths : bool -> unit val close_maths : bool -> unit val open_display_varg : string -> unit val open_display : unit -> unit val close_display : unit -> unit val item_display : unit -> unit val force_item_display : unit -> unit val erase_display : unit -> unit val standard_sup_sub : (string arg -> unit) -> (unit -> unit) -> string arg -> string arg -> bool -> unit val limit_sup_sub : (string arg -> unit) -> (unit -> unit) -> string arg -> string arg -> bool -> unit val int_sup_sub : bool -> int -> (string arg -> unit) -> (unit -> unit) -> string arg -> string arg -> bool -> unit val addvsize : int -> unit val over : Lexing.lexbuf -> unit val left : string -> (int -> unit) -> (int -> unit) -> unit val right : string -> (int -> unit) -> int val set_dcount : string -> unit val item : string-> unit val nitem : string-> unit val ditem : (string -> unit) -> string -> string -> string -> unit val erase_block : string -> unit val open_group : string -> unit val open_aftergroup : (string -> string) -> unit val close_group : unit -> unit val put : string -> unit val put_char : char -> unit val put_unicode : OutUnicode.unichar -> unit val flush_out : unit -> unit val skip_line : unit -> unit val loc_name : string -> unit val open_chan : out_channel -> unit val close_chan : unit -> unit val to_string : (unit -> unit) -> string val to_style : (unit -> unit) -> Element.text list val get_current_output : unit -> string val finalize : bool -> unit val horizontal_line : string -> Length.t -> Length.t -> unit val put_separator : unit -> unit val unskip : unit -> unit val put_tag : string -> unit val put_nbsp : unit -> unit val put_open_group : unit -> unit val put_close_group : unit -> unit val put_in_math : string -> unit val open_table : bool -> string -> unit val new_row : unit -> unit val open_cell : Tabular.format -> int -> int -> bool -> unit val erase_cell : unit -> unit val close_cell : string -> unit val do_close_cell : unit -> unit val open_cell_group : unit -> unit val close_cell_group : unit -> unit val erase_cell_group : unit -> unit val close_row : unit -> unit val erase_row : unit -> unit val close_table : unit -> unit val make_border : string -> unit val make_inside : string -> bool -> unit val make_hline : int -> bool -> unit val infomenu : string -> unit val infonode : string -> string -> string -> unit val infoextranode : string -> string -> string -> unit val image : string -> string -> unit type saved val check : unit -> saved val hot : saved -> unit end hevea-2.09/czech.hva0000644004317100512160000000274010334123204014351 0ustar marangetcristal%%%% Hevea support for babel option 'czech'. %%%% Note : Support for %%%% a) date %%%% b) usual shorthands (\' \` \^ etc.) %%%% c) names of various part descriptors (contentsname etc.) \newcommand{\czech@babel}{ \renewcommand{\czech@month} {\ifthenelse{\value{month}=1 }{Leden} {\ifthenelse{\value{month}=2 }{\'Unor} {\ifthenelse{\value{month}=3 }{Brezen} {\ifthenelse{\value{month}=4 }{Duben} {\ifthenelse{\value{month}=5 }{Kveten} {\ifthenelse{\value{month}=6 }{Cerven} {\ifthenelse{\value{month}=7 }{Cervenec} {\ifthenelse{\value{month}=8 }{Srpen} {\ifthenelse{\value{month}=9 }{Z\'ar\'i} {\ifthenelse{\value{month}=10}{R\'ijen} {\ifthenelse{\value{month}=11}{Listopad} {\ifthenelse{\value{month}=12}{Pronisec}{} }}}}}}}}}}}}% \renewcommand\today{\theday.~\czech@month~\theyear}% \renewcommand\prefacename{Predmluva}% \renewcommand\refname{Reference}% \renewcommand\abstractname{Abstrakt}% \renewcommand\bibname{Literatura}% \renewcommand\chaptername{Kapitola}% \renewcommand\appendixname{Dodatek}% \renewcommand\contentsname{Obsah}% \renewcommand\listfigurename{Seznam Obr\'azku}% \renewcommand\listtablename{Seznam Tabulek}% \renewcommand\indexname{Index}% \renewcommand\figurename{Obrazek}% \renewcommand\tablename{Tabluka}% \renewcommand\partname{C\'ast}% \renewcommand\enclname{Pr\'iloha}% \renewcommand\ccname{cc}% \renewcommand\headtoname{Komu}% \renewcommand\pagename{Strana}% \renewcommand\headpagename{Strana}% \renewcommand\seename{viz}% \renewcommand\alsoseename{viz t\'ez}% } hevea-2.09/doOut.ml0000644004317100512160000002157412111205631014207 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf let verbose = ref 0 module type Config = sig val small_length : int end module type S = sig type t val create_buff : unit -> t val create_chan : out_channel -> t val create_null : unit -> t val is_null : t -> bool val is_empty : t -> bool val reset : t -> unit val put : t -> string -> unit val blit : t -> Lexing.lexbuf -> unit val put_char : t -> char -> unit val flush : t -> unit val get_pos : t -> int val erase_start : int -> t -> unit val iter : (char -> unit) -> t -> unit val iter_next : (char -> (unit -> int) -> unit) -> t -> unit val to_string : t -> string val to_list : t -> string list val to_chan : out_channel -> t -> unit val copy : t -> t -> unit val copy_fun : (string -> string) -> t -> t -> unit val copy_no_tag : t -> t -> unit val close : t -> unit val debug : out_channel -> t -> unit val unskip : t -> unit end module Make(C:Config) = struct module S = SimpleRope.Make(C) (***************************************************) (* Rope with a front buffer of size C.small_length *) (***************************************************) let max_sz = C.small_length type buff = { mutable b : string ; mutable p : int ; mutable sz : int ; mutable r : S.t; } let start_sz = min 16 max_sz let alloc_buff () = { b = String.create start_sz ; p = 0 ; sz=start_sz; r = S.empty ; } let dump_buff chan b = S.output chan b.r ; output chan b.b 0 b.p let reset_buff b = b.p <- 0 ; b.r <- S.empty let length_buff b = b.p + S.length b.r let to_string_buff b = let r = String.create (length_buff b) in S.blit b.r r 0 ; String.unsafe_blit b.b 0 r (S.length b.r) b.p ; r let do_flush_buff b = let s = String.create b.p in String.unsafe_blit b.b 0 s 0 b.p ; b.r <- S.append_string b.r s ; b.p <- 0 let flush_buff b = if b.p > 0 then do_flush_buff b let realloc b = let nsz = 2 * b.sz in let nbuff = String.create nsz in String.unsafe_blit b.b 0 nbuff 0 b.p ; b.b <- nbuff ; b.sz <- nsz let rec vput_buff b s pos len = if b.p + len < b.sz then begin String.unsafe_blit s pos b.b b.p len ; b.p <- b.p + len end else if b.sz < max_sz then begin realloc b ; vput_buff b s pos len end else if b.p = 0 then let bsz = String.create b.sz in String.unsafe_blit s pos bsz 0 b.sz ; b.r <- S.append_string b.r bsz ; vput_buff b s (pos+b.sz) (len-b.sz) else begin let tr = b.sz-b.p in String.unsafe_blit s pos b.b b.p tr ; b.p <- b.p+tr ; do_flush_buff b ; vput_buff b s (pos+tr) (len-tr) end let put_buff b s pos len = if !verbose > 2 then eprintf "PUT '%s'-> '%a'\n%a\n" (String.sub s pos len) dump_buff b S.debug b.r ; vput_buff b s pos len ; if !verbose > 2 then eprintf "PUT OVER '%s'-> '%a'\n%a\n" (String.sub s pos len) dump_buff b S.debug b.r ; () let put_buff_char b c = if b.p >= b.sz then begin if b.sz < max_sz then realloc b else do_flush_buff b end ; String.unsafe_set b.b b.p c ; b.p <- b.p + 1 let get_buff b k = let len = S.length b.r in if k < len then S.get b.r k else String.unsafe_get b.b (k-len) (* Append src at the end of dst *) let copy_buff src dst = flush_buff dst ; dst.r <- S.append dst.r src.r ; put_buff dst src.b 0 src.p (*******************) type t = | Rope of buff | Chan of out_channel | Null let debug chan = function | Rope out -> output_char chan '*'; dump_buff chan out ; output_char chan '*'; () | Chan _ -> output_string chan "*CHAN*" | Null -> output_string chan "*NULL*" let pp_type = function | Rope _out -> "*Rope*" | Chan _ -> "*CHAN*" | Null -> "*NULL*" let create_buff () = Rope (alloc_buff ()) let create_chan chan = Chan chan let create_null () = Null let is_null = ( = ) Null and is_empty = function | Rope b -> b.p = 0 && S.length b.r = 0 | _ -> false let reset = function | Rope b -> b.p <- 0 ; b.r <- S.empty | _ -> raise (Misc.fatal "Out.reset") let get_pos = function | Rope b -> length_buff b | _ -> 0 let erase_start n = function | Rope b -> flush_buff b ; b.r <- S.sub b.r n (S.length b.r - n) | _ -> raise (Misc.fatal "Out.erase_start") let put out s = match out with | Null -> () | Chan chan -> output_string chan s | Rope b -> put_buff b s 0 (String.length s) (* To be used only in a lexer action *) let blit out lexbuf = let open Lexing in match out with | Rope b -> let len = lexbuf.lex_curr_pos - lexbuf.lex_start_pos in put_buff b lexbuf.lex_buffer lexbuf.lex_start_pos len | Chan chan -> let len = lexbuf.lex_curr_pos - lexbuf.lex_start_pos in output chan lexbuf.lex_buffer lexbuf.lex_start_pos len | Null -> () let put_char out c = match out with | Null -> () | Chan chan -> output_char chan c | Rope b -> put_buff_char b c let flush = function | Chan chan -> flush chan | _ -> () let iter f = function | Null -> () | Chan _ -> raise (Misc.fatal "Out.iter") | Rope b -> S.iter f b.r ; let bb = b.b in for k = 0 to b.p-1 do f (String.unsafe_get bb k) done ; () let iter_next f = function | Null -> () | Chan _ -> raise (Misc.fatal "Out.iter_next") | Rope b -> let rec do_rec next = let c = next () in if c <> -1 then begin f (Char.chr c) next; do_rec next end in do_rec (let k = ref 0 in fun () -> let i = !k in if i >= length_buff b then -1 else begin incr k; Char.code (get_buff b i) end) let to_string = function | Rope b -> let s = to_string_buff b in reset_buff b ; s | Null -> "" | _ -> raise (Misc.fatal "Out.to_string") let to_list = function | Rope b -> let xs = if b.p > 0 then [String.sub b.b 0 b.p] else [] in let xs = S.to_list_append b.r xs in if !verbose > 2 then begin match xs with | []|[_] -> () | _ -> eprintf "to_list: %s\n%!" (String.concat " " (List.map (fun s -> sprintf "\"%s\"" (String.escaped s)) xs)) end ; reset_buff b ; xs | Null -> [] | _ -> raise (Misc.fatal "Out.to_list") let to_chan chan = function | Rope b -> dump_buff chan b ; reset_buff b | Null -> () | b -> raise (Misc.fatal (sprintf "Out.to_chan: %s" (pp_type b))) let hidden_copy from_rope to_buff = match to_buff with | Null -> () | Rope b -> copy_buff from_rope b | Chan chan -> dump_buff chan from_rope let copy from_buff to_buff = match from_buff with | Rope b -> hidden_copy b to_buff | _ -> raise (Misc.fatal "Out.copy") let copy_fun f from_buff to_buff = match from_buff with | Rope b -> put to_buff (f (to_string_buff b)) | _ -> raise (Misc.fatal "Out.copy_fun") let copy_no_tag from_buff to_buff = if !verbose > 2 then begin prerr_string "copy no tag from buff"; debug stderr from_buff; prerr_newline (); end; match from_buff with | Rope src -> begin flush_buff src ; try let i = S.index src.r '>' in let j = if is_empty from_buff then i + 1 else S.rindex src.r '<' in src.r <- S.sub src.r (i+1) (j-i-1) ; hidden_copy src to_buff ; if !verbose > 2 then begin prerr_string "copy no tag to_buff"; debug stderr to_buff; prerr_newline () end with Not_found -> raise (Misc.fatal "Out.copy_no_tag, no tag found") end | _ -> raise (Misc.fatal "Out.copy_no_tag") let close = function | Chan c -> close_out c | _ -> () let is_space c = match c with |' '|'\n'|'\r'|'\t' -> true | _ -> false let unskip = function | Rope b -> flush_buff b ; b.r <- S.erase b.r is_space | _ -> () end hevea-2.09/util.mli0000644004317100512160000000277507304505330014254 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: util.mli,v 1.5 2001-05-28 17:28:56 maranget Exp $ *) (***********************************************************************) val cost : ('a -> int * int) -> 'a Tree.t -> int * int val costs : ('a -> int * int) -> 'a Tree.t list -> int * int val cost_compare : int * int -> int * int -> int val there : Htmltext.t_style -> Htmltext.style -> bool val inter : Htmltext.style -> Htmltext.style -> Htmltext.style val union : Htmltext.style -> Htmltext.style -> Htmltext.style val sub : Htmltext.style -> Htmltext.style -> Htmltext.style val neutral : Htmltext.style -> Htmltext.style * Htmltext.style val is_blank : 'a Tree.t -> bool val is_blanks : 'a Tree.t list -> bool val nodes : Htmltext.style -> Htmltext.style Tree.t list -> Htmltext.style Tree.t list val node : Htmltext.style -> Htmltext.style Tree.t list -> Htmltext.style Tree.t hevea-2.09/verbatim.hva0000644004317100512160000000030507113527407015077 0ustar marangetcristal\@primitives{verbatim} \newcommand{\verbatiminput}[1] {\@scaninput{\begin{verbatim} }{#1}{\end{verbatim}}} \newcommand{\verbatiminput*}[1] {\@scaninput{\begin{verbatim*} }{#1}{\end{verbatim*}}}hevea-2.09/zyva.mli0000644004317100512160000000217110565402214014256 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2007 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: zyva.mli,v 1.1 2007-02-16 19:22:52 maranget Exp $ *) (***********************************************************************) module type S = functor (Dest : OutManager.S) -> functor (Image : ImageManager.S) -> functor (Scan : Latexscan.S) -> sig end module Make : functor (Dest : OutManager.S) -> functor (Image : ImageManager.S) -> functor (Scan : Latexscan.S) -> functor (ToMake : S) -> sig module Rien : sig end end hevea-2.09/babel.hva0000644004317100512160000001621512111172515014330 0ustar marangetcristal\ProvidesPackage{babel} %%%% %%%% A simple command that takes language (say l) and %%%% a) checks for existence and includes l.hva %%%% b) calls the command \l@babel (in l.hva) %%%% c) sets current language to l % \newcommand{\InitiateOption}[1]{% \@ifundefined{bbl@#1@loaded} {\let\csname bbl@#1@loaded\endcsname\relax% \@iffileexists{#1.hva} {\input{#1.hva}\def\bbl@main@language{#1}} {\hva@warn{Hevea babel '#1' not found, loading 'english' instead}% \input{english.hva}\def\bbl@main@language{english}}} {}} % %%%% Processing information for each optional argument % \DeclareOption{english}{\InitiateOption{english}}% \DeclareOption{USenglish}{\InitiateOption{english}}% \DeclareOption{french}{\InitiateOption{french}}% \DeclareOption{frenchb}{\InitiateOption{french}}% \DeclareOption{francais}{\InitiateOption{french}}% \DeclareOption{german}{\InitiateOption{german}}% \DeclareOption{greek}{\InitiateOption{greek}}% \DeclareOption{ngerman}{\InitiateOption{german}}% \DeclareOption{austrian}{\InitiateOption{austrian}}% \DeclareOption{czech}{\InitiateOption{czech}}% \DeclareOption{american}{\InitiateOption{english}} \DeclareOption{croatian}{\InitiateOption{croatian}}% \DeclareOption{catalan}{\InitiateOption{catalan}}% \DeclareOption{brazil}{\InitiateOption{brazil}}% \DeclareOption{danish}{\InitiateOption{danish}}% \DeclareOption{dutch}{\InitiateOption{dutch}}% \DeclareOption{esperanto}{\InitiateOption{esperanto}}% \DeclareOption{finnish}{\InitiateOption{finnish}}% \DeclareOption{galician}{\InitiateOption{galician}}% \DeclareOption{italian}{\InitiateOption{italian}}% \DeclareOption{magyar}{\InitiateOption{magyar}}% \DeclareOption{norsk}{\InitiateOption{norsk}}% \DeclareOption{nynorsk}{\InitiateOption{nynorsk}}% \DeclareOption{polish}{\InitiateOption{polish}}% \DeclareOption{portuges}{\InitiateOption{portuges}}% \DeclareOption{romanian}{\InitiateOption{romanian}}% \DeclareOption{russian}{\InitiateOption{russian}}% \DeclareOption{slovak}{\InitiateOption{slovak}}% \DeclareOption{slovene}{\InitiateOption{slovene}}% \DeclareOption{spanish}{\InitiateOption{spanish}}% \DeclareOption{swedish}{\InitiateOption{swedish}}% \DeclareOption{turkish}{\InitiateOption{turkish}}% % %%%% Processing babel options postponed for later % %\ProcessOptions* % %%%% One variable for each supported language, to keep track of and to %%%% change the current language. Might as well have used english itself %%%% instead of \english@language!!! % \newcommand\english@language{english}% \newcommand\french@language{french}% \newcommand\german@language{german}% \newcommand\ngerman@language{ngerman}% \newcommand\greek@language{greek}% \newcommand\american@language{american}% \newcommand\austrian@language{austrian}% \newcommand\brazil@language{brazil}% \newcommand\catalan@language{catalan}% \newcommand\croatian@language{croatian}% \newcommand\czech@language{czech}% \newcommand\danish@language{danish}% \newcommand\dutch@language{dutch}% \newcommand\esperanto@language{esperanto}% \newcommand\finnish@language{finnish}% \newcommand\galician@language{galician}% \newcommand\italian@language{italian}% \newcommand\magyar@language{magyar}% \newcommand\norsk@language{norsk}% \newcommand\nynorsk@language{nynorsk}% \newcommand\polish@language{polish}% \newcommand\portuges@language{portuges}% \newcommand\romanian@language{romanian}% \newcommand\russian@language{russian}% \newcommand\slovak@language{slovak}% \newcommand\slovene@language{slovene}% \newcommand\spanish@language{spanish}% \newcommand\swedish@language{swedish}% \newcommand\turkish@language{turkish}% % %%%% Initializing \current@language before loading babel language packages. % \let\current@language\english@language % %%%% Support for the 'babel' command to select languages. % %Save definition of double quote (altered by german) \let\@hevea@saved@dquote\@hevea@dquote \newcommand{\selectlanguage}[1]{% \let\@hevea@dquote\@hevea@saved@dquote%Restore inocuous definition \ifthenelse{\equal{#1}{german}} {% \let\current@language\german@language \german@babel } {% \ifthenelse{\equal{#1}{greek}} {% \let\current@language\greek@language \greek@babel } {% \ifthenelse{\equal{#1}{ngerman}} {% \let\current@language\ngerman@language \german@babel } {% \ifthenelse{\equal{#1}{english}} {% \let\current@language\english@language \english@babel } {% \ifthenelse{\equal{#1}{french}} {% \let\current@language\french@language \french@babel } {% \ifthenelse{\equal{#1}{american}} {% \let\current@language\american@language \american@babel } {% \ifthenelse{\equal{#1}{austrian}} {% \let\current@language\austrian@language \austrian@babel } {% \ifthenelse{\equal{#1}{brazil}} {% \let\current@language\brazil@language \brazil@babel } {% \ifthenelse{\equal{#1}{catalan}} {% \let\current@language\catalan@language \catalan@babel } {% \ifthenelse{\equal{#1}{croatian}} {% \let\current@language\croatian@language \croatian@babel } {% \ifthenelse{\equal{#1}{czech}} {% \let\current@language\czech@language \czech@babel } {% \ifthenelse{\equal{#1}{danish}} {% \let\current@language\danish@language \danish@babel } {% \ifthenelse{\equal{#1}{dutch}} {% \let\current@language\dutch@language \dutch@babel } {% \ifthenelse{\equal{#1}{esperanto}} {% \let\current@language\esperanto@language \esperanto@babel } {% \ifthenelse{\equal{#1}{finnish}} {% \let\current@language\finnish@language \finnish@babel } {% \ifthenelse{\equal{#1}{galician}} {% \let\current@language\galician@language \galician@babel } {% \ifthenelse{\equal{#1}{italian}} {% \let\current@language\italian@language \italian@babel } {% \ifthenelse{\equal{#1}{magyar}} {% \let\current@language\magyar@language \magyar@babel } {% \ifthenelse{\equal{#1}{norsk}} {% \let\current@language\norsk@language \norsk@babel } {% \ifthenelse{\equal{#1}{nynorsk}} {% \let\current@language\nynorsk@language \nynorsk@babel } {% \ifthenelse{\equal{#1}{polish}} {% \let\current@languagepolish\@language \polish@babel } {% \ifthenelse{\equal{#1}{protuges}} {% \let\current@language\portuges@language \portuges@babel } {% \ifthenelse{\equal{#1}{romanian}} {% \let\current@language\romanian@language \romanian@babel } {% \ifthenelse{\equal{#1}{russian}} {% \let\current@language\russian@language \russian@babel } {% \ifthenelse{\equal{#1}{slovak}} {% \let\current@language\slovak@language \slovak@babel } {% \ifthenelse{\equal{#1}{slovene}} {% \let\current@language\slovene@language \slovene@babel } {% \ifthenelse{\equal{#1}{spanish}} {% \let\current@language\spanish@language \spanish@babel } {% \ifthenelse{\equal{#1}{swedish}} {% \let\current@language\swedish@language \swedish@babel } {% \ifthenelse{\equal{#1}{turkish}} {% \let\current@language\turkish@language \turkish@babel } {% }}}}}}}}}}}}}}}}}}}}}}}}}}}}}% }% % %%%% Support for the 'babel' command for querying the current language. % \newcommand{\iflanguage}[3]{% \ifthenelse{\equal{#1}{\current@language}}{#2}{#3}% }% % %%%% Processing the optional arguments of the '\usepackage{babel}' command %%%% For each option (language l), checks for l.hva and 'includes' it. % \ProcessOptions*% \selectlanguage{\bbl@main@language} hevea-2.09/longtable.hva0000644004317100512160000000473210370645715015247 0ustar marangetcristal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%From code by Gilles Gregoire. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \@primitives{longtable} %% Of no interest to hevea \def\setlongtables{} %%Those commands are invoked by the special scanner 'scan_bycommand' %%in verb.mll. %%They assume that scanned text is in the token command '\@tmp@scanned' \newtokens{\lt@lines}% \newcommand{\lt@save@line}[1] {\appendtokens\lt@lines\@tmp@scanned% \let#1\lt@lines\resettokens{\lt@lines}} \def\lt@endhead{\addtokens{\@tmp@scanned}{\\}\lt@save@line{\lt@head}} \def\lt@endfirsthead{\addtokens{\@tmp@scanned}{\\}\lt@save@line{\lt@firsthead}} \def\lt@endfoot{\lt@save@line{\lt@foot}} \def\lt@endlastfoot{\lt@save@line{\lt@lastfoot}} \def\lt@kill{} \newcommand{\lt@saveline}[1][] {\appendtokens\lt@lines\@tmp@scanned% \addtokens{\lt@lines}{\\[#1]}} \newcommand{\lt@nosaveline}[1][]{\let\\\lt@saveline} %%Infamous hack, prepare a '\caption' command for 'table' env \newcommand{\lt@caption}[2][] {\ifx\lt@fst@caption\@empty\gdef\lt@fst@caption{\caption[#1]{#2}}\fi% \let\\\lt@nosaveline} %%No more than a tabular in a table %%For interpreting optionnal arg. \def\lt@fmt@{\begin{center}} \def\lt@fmt@e{\end{center}} \def\lt@fmt@c{\begin{center}} \def\lt@fmt@ec{\end{center}} \def\lt@fmt@l{\begin{flushleft}} \def\lt@fmt@el{\end{flushleft}} \def\lt@fmt@r{\begin{flushright}} \def\lt@fmt@er{\end{flushright}} %% Define commands being active during scan_bycommand \def\lt@let#1#2{\let#1#2\lt@exists{#1}} %% Invoke comand #1 or command #2 or nothing, if they exist \def\lt@choose#1#2{\ifu#1\ifu#2\else#2\fi\else#1\fi} %Table is typeset first in this box (to place caption above it) \newsavebox{\lt@tabular@box} %Here we go \newenvironment{longtable}[2][] {\def\lt@arg{#2}\def\lt@opt{#1} \@forcecommand{\pagebreak}[1][]{}% \@forcecommand{\nopagebreak}[1][]{}% \@forcecommand{\newpage}{} \lt@let\endhead\lt@endhead% \lt@let\endfirsthead\lt@endfirsthead% \lt@let\endfoot\lt@endfoot% \lt@let\endlastfoot\lt@endlastfoot% \lt@let\kill\lt@kill% \lt@let\\\lt@saveline\lt@let\\*\lt@saveline\lt@let\tabularnewline\lt@saveline% \global\let\lt@fst@caption\@empty% \lt@let\caption\lt@caption\lt@let\caption*\lt@caption% \@longtable} {\lt@saveline%For the last line \begin{lrbox}{\lt@tabular@box}% \begin{tabular}{\lt@arg}% \lt@choose{\lt@firsthead}{\lt@head}% \lt@lines% \lt@choose{\lt@lastfoot}{\lt@foot}% \end{tabular} \end{lrbox} \begin{table}\lt@fst@caption% \csname lt@fmt@\lt@opt\endcsname% \usebox{\lt@tabular@box} \csname lt@fmt@e\lt@opt\endcsname% \end{table}} hevea-2.09/latexmacros.mli0000644004317100512160000000431312113376362015614 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) exception Failed type saved val checkpoint : unit -> saved val hot_start : saved -> unit val pretty_macro : Lexstate.pat -> Lexstate.action -> unit val pretty_table : unit -> unit val set_saved_macros : unit -> unit val get_saved_macro : string -> bool val register_init : string -> (unit -> unit) -> unit val exec_init : string -> unit val open_group : unit -> unit val close_group : unit -> unit val get_level : unit -> int val exists : string -> bool val find : string -> Lexstate.pat * Lexstate.action val pretty_command : string -> unit val def : string -> Lexstate.pat -> Lexstate.action -> unit val global_def : string -> Lexstate.pat -> Lexstate.action -> unit (* Undefine a command *) val global_undef : string -> unit (******************) (* For inside use *) (******************) (* raises Failed if already defined *) val def_init : string -> (Lexing.lexbuf -> unit) -> unit (* raises Failed if not defined *) val find_fail : string -> Lexstate.pat * Lexstate.action (* replace name new, Send back the Some (old definition for name) or None - if new is Some (def) then def replaces the old definition, or a definition is created - if new is None, then undefine the last local binding for name. *) val replace : string -> (Lexstate.pat * Lexstate.action) option -> (Lexstate.pat * Lexstate.action) option (* Add tokens at the end of subst macros, created with zero args if non-existing *) val addto : string -> string list -> unit val invisible : string -> bool hevea-2.09/pp.ml0000644004317100512160000000767512017660721013554 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: pp.ml,v 1.6 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) open Printf open Lexeme open Tree let potag chan ({txt=txt;_} as s)= output_string chan txt ; s let pctag chan {ctxt=txt;_} = output_string chan txt let ppattr (_,s) = s let ppattrs attrs = String.concat " " (List.map ppattr attrs) let rec tree po pc chan = function | Text txt -> output_string chan txt | Blanks txt -> output_string chan txt | Node (styles, ts) -> let styles = po chan styles in trees po pc chan ts ; pc chan styles | ONode (so,sc,ts) -> output_string chan so ; trees po pc chan ts ; output_string chan sc and trees po pc chan = function | [] -> () | t::rem -> tree po pc chan t ; trees po pc chan rem let ptree chan t = tree potag pctag chan t and ptrees chan ts = trees potag pctag chan ts open Htmltext let sep_font = List.partition (function | { nat=(Size (Int _)|Face _|Color _)} -> true | _ -> false) let sep_span = List.partition (function | { nat=Fstyle _} -> true | _ -> false) let rec do_potags chan = function | [] -> () | {txt=txt}::rem -> output_string chan txt ; do_potags chan rem let rec do_pctags chan = function | [] -> () | {ctxt=txt}::rem -> do_pctags chan rem ; output_string chan txt let close_to_open ctag = sprintf "<%s" (String.sub ctag 2 (String.length ctag-3)) let fmtfont fs k = match fs with | [] -> k | {ctxt=ctxt}::_ -> let txt = close_to_open ctxt ^ List.fold_right (fun {txt=atxt} r -> atxt ^ r) fs ">" in {nat=Other; txt=txt; ctxt=ctxt;}::k let do_fmtfontsyle n v = let tag = match n with | Ffamily -> "font-family" | Lexeme.Fstyle -> "font-style" | Fvariant -> "font-variant" | Fweight -> "font-weight" | Fsize -> "font-size" | Fcolor -> "color" | Fbgcolor -> "background-color" in sprintf "%s:%s" tag v let fmtfontsyle = function | {nat=Fstyle (n,v)} -> do_fmtfontsyle n v | _ -> assert false let as_fontstyle = function | {nat=Fstyle (n,_)} -> n | _ -> assert false let fmtfontsyles fs = let fs = List.sort (fun f1 f2 -> Pervasives.compare (as_fontstyle f1) (as_fontstyle f2)) fs in sprintf " style=\"%s\"" (String.concat ";" (List.map fmtfontsyle fs)) let fmtspan fs k = match fs with | [] -> k | {ctxt=ctxt}::_ -> let txt = close_to_open ctxt ^ fmtfontsyles fs ^ ">" in {nat=Other; txt=txt; ctxt=ctxt;}::k let potags chan x = let fs,os = sep_font x in let ss,os = sep_span os in let styles = fmtfont fs (fmtspan ss os) in (* output_char chan '[' ; *) do_potags chan styles ; (* output_char chan ']' ; *) styles and pctags chan x = do_pctags chan x let tree chan t = tree potags pctags chan t and trees chan ts = trees potags pctags chan ts open Css let style chan = function | Other txt -> output_string chan txt | Class (name, addname, txt) -> output_char chan '.' ; output_string chan name ; (match addname with | None -> () | Some n -> output_char chan ' ' ; output_string chan n) ; output_string chan txt let styles chan ids = List.iter (fun id -> style chan id ; output_char chan '\n') ids hevea-2.09/misc.ml0000644004317100512160000000645611770331322014061 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1999 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) exception Fatal of string exception NoSupport of string exception Purposly of string exception ScanError of string exception UserError of string exception EndInput exception EndDocument exception Close of string exception CannotPut exception EndOfLispComment of int (* QNC *) let verbose = ref 0 and readverb = ref 0 and displayverb = ref false let silent = ref false let column_to_command s = "\\@"^s^"@" let warning s = if not !silent || !verbose > 0 then begin Location.print_pos () ; prerr_string "Warning: " ; prerr_endline s end let print_verb level s = if !verbose > level then begin Location.print_pos () ; prerr_endline s end let message s = if not !silent || !verbose > 0 then prerr_endline s let fatal s = raise (Fatal s) let not_supported s = raise (NoSupport s) let rec rev_iter f = function | [] -> () | x::rem -> rev_iter f rem ; f x let copy_hashtbl from_table to_table = Hashtbl.clear to_table ; let module OString = struct type t = string let compare = Pervasives.compare end in let module Strings = Set.Make (OString) in let keys = ref Strings.empty in Hashtbl.iter (fun key _ -> keys := Strings.add key !keys) from_table ; Strings.iter (fun key -> let vals = Hashtbl.find_all from_table key in rev_iter (Hashtbl.add to_table key) vals) !keys let copy_int_hashtbl from_table to_table = Hashtbl.clear to_table ; let module OInt = struct type t = int let compare x y = x-y end in let module Ints = Set.Make (OInt) in let keys = ref Ints.empty in Hashtbl.iter (fun key _ -> keys := Ints.add key !keys) from_table ; Ints.iter (fun key -> let vals = Hashtbl.find_all from_table key in rev_iter (Hashtbl.add to_table key) vals) !keys let start_env env = "\\"^ env and end_env env = "\\end"^env type limits = Limits | NoLimits | IntLimits let image_opt = ref None let set_image_opt s = image_opt := Some s let get_image_opt () = match !image_opt with | None -> "" | Some s -> s let dump_index = ref false type saved = string option let checkpoint () = !image_opt and hot_start so = image_opt := so let next_of_string s = let len = String.length s and k = ref 0 in (fun () -> let i = !k in if i >= len then -1 else begin incr k ; Char.code (String.unsafe_get s i) end) let hexa c = match c with | '0'..'9' -> Char.code c - Char.code '0' | 'a'..'f' -> 10 + Char.code c - Char.code 'a' | 'A'..'F' -> 10 + Char.code c - Char.code 'A' | _ -> assert false let hexa_code c1 c2 = 16 * hexa c1 + hexa c2 hevea-2.09/hrlang.hva0000644004317100512160000001464612111172515014544 0ustar marangetcristal%%Taken from hyperref source %% This is file `hyperref.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% hyperref.dtx (with options: `package') %% %% File: hyperref.dtx Copyright 1995-2001 Sebastian Rahtz, %% with portions written by David Carlisle and Heiko Oberdiek, %% 2001-2009 Heiko Oberdiek. %% %% This file is part of the `Hyperref Bundle'. %% ------------------------------------------- %% %% It may be distributed under the conditions of the LaTeX Project Public %% License, either version 1.2 of this license or (at your option) any %% later version. The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.2 or later is part of all distributions of LaTeX %% version 1999/12/01 or later. %% \def\HyLang@afrikaans{% \def\equationautorefname{Vergelyking}% \def\footnoteautorefname{Voetnota}% \def\itemautorefname{Item}% \def\figureautorefname{Figuur}% \def\tableautorefname{Tabel}% \def\partautorefname{Deel}% \def\appendixautorefname{Bylae}% \def\chapterautorefname{Hoofstuk}% \def\sectionautorefname{Afdeling}% \def\subsectionautorefname{Subafdeling}% \def\subsubsectionautorefname{Subsubafdeling}% \def\paragraphautorefname{Paragraaf}% \def\subparagraphautorefname{Subparagraaf}% \def\FancyVerbLineautorefname{Lyn}% \def\theoremautorefname{Teorema}% \def\pageautorefname{Bladsy}% } \def\HyLang@english{% \def\equationautorefname{Equation}% \def\footnoteautorefname{footnote}% \def\itemautorefname{item}% \def\figureautorefname{Figure}% \def\tableautorefname{Table}% \def\partautorefname{Part}% \def\appendixautorefname{Appendix}% \def\chapterautorefname{chapter}% \def\sectionautorefname{section}% \def\subsectionautorefname{subsection}% \def\subsubsectionautorefname{subsubsection}% \def\paragraphautorefname{paragraph}% \def\subparagraphautorefname{subparagraph}% \def\FancyVerbLineautorefname{line}% \def\theoremautorefname{Theorem}% \def\pageautorefname{page}% } \def\HyLang@french{% \def\equationautorefname{\'Equation}% \def\footnoteautorefname{note}% \def\itemautorefname{item}% \def\figureautorefname{Figure}% \def\tableautorefname{Tableau}% \def\partautorefname{Partie}% \def\appendixautorefname{Appendice}% \def\chapterautorefname{chapitre}% \def\sectionautorefname{section}% \def\subsectionautorefname{sous-section}% \def\subsubsectionautorefname{sous-sous-section}% \def\paragraphautorefname{paragraphe}% \def\subparagraphautorefname{sous-paragraphe}% \def\FancyVerbLineautorefname{ligne}% \def\theoremautorefname{Th\'eor\`eme}% \def\pageautorefname{page}% } \def\HyLang@german{% \def\equationautorefname{Gleichung}% \def\footnoteautorefname{Fu\ss note}% \def\itemautorefname{Punkt}% \def\figureautorefname{Abbildung}% \def\tableautorefname{Tabelle}% \def\partautorefname{Teil}% \def\appendixautorefname{Anhang}% \def\chapterautorefname{Kapitel}% \def\sectionautorefname{Abschnitt}% \def\subsectionautorefname{Unterabschnitt}% \def\subsubsectionautorefname{Unterunterabschnitt}% \def\paragraphautorefname{Absatz}% \def\subparagraphautorefname{Unterabsatz}% \def\FancyVerbLineautorefname{Zeile}% \def\theoremautorefname{Theorem}% \def\pageautorefname{Seite}% } \def\HyLang@italian{% \def\equationautorefname{Equazione}% \def\footnoteautorefname{nota}% \def\itemautorefname{punto}% \def\figureautorefname{Figura}% \def\tableautorefname{Tabella}% \def\partautorefname{Parte}% \def\appendixautorefname{Appendice}% \def\chapterautorefname{Capitolo}% \def\sectionautorefname{sezione}% \def\subsectionautorefname{sottosezione}% \def\subsubsectionautorefname{sottosottosezione}% \def\paragraphautorefname{paragrafo}% \def\subparagraphautorefname{sottoparagrafo}% \def\FancyVerbLineautorefname{linea}% \def\theoremautorefname{Teorema}% \def\pageautorefname{Pag.\@}% } \def\HyLang@magyar{% \def\equationautorefname{Egyenlet}% \def\footnoteautorefname{l\'abjegyzet}% \def\itemautorefname{Elem}% \def\figureautorefname{\'Abra}% \def\tableautorefname{T\'abl\'azat}% \def\partautorefname{R\'esz}% \def\appendixautorefname{F\"uggel\'ek}% \def\chapterautorefname{fejezet}% \def\sectionautorefname{szakasz}% \def\subsectionautorefname{alszakasz}% \def\subsubsectionautorefname{alalszakasz}% \def\paragraphautorefname{bekezd\'es}% \def\subparagraphautorefname{albekezd\'es}% \def\FancyVerbLineautorefname{sor}% \def\theoremautorefname{T\'etel}% \def\pageautorefname{oldal}% } \def\HyLang@portuges{% \def\equationautorefname{Equa\c c\~ao}% \def\footnoteautorefname{Nota de rodap\'e}% \def\itemautorefname{Item}% \def\figureautorefname{Figura}% \def\tableautorefname{Tabela}% \def\partautorefname{Parte}% \def\appendixautorefname{Ap\^endice}% \def\chapterautorefname{Cap\'itulo}% \def\sectionautorefname{Se\c c\~ao}% \def\subsectionautorefname{Subse\c c\~ao}% \def\subsubsectionautorefname{Subsubse\c c\~ao}% \def\paragraphautorefname{par\'agrafo}% \def\subparagraphautorefname{subpar\'agrafo}% \def\FancyVerbLineautorefname{linha}% \def\theoremautorefname{Teorema}% \def\pageautorefname{P\'agina}% } \def\HyLang@spanish{% \def\equationautorefname{Ecuaci\'on}% \def\footnoteautorefname{Nota a pie de p\'agina}% \def\itemautorefname{Elemento}% \def\figureautorefname{Figura}% \def\tableautorefname{Tabla}% \def\partautorefname{Parte}% \def\appendixautorefname{Ap\'endice}% \def\chapterautorefname{Cap\'itulo}% \def\sectionautorefname{Secci\'on}% \def\subsectionautorefname{Subsecci\'on}% \def\subsubsectionautorefname{Subsubsecci\'on}% \def\paragraphautorefname{P\'arrafo}% \def\subparagraphautorefname{Subp\'arrafo}% \def\FancyVerbLineautorefname{L\'inea}% \def\theoremautorefname{Teorema}% \def\pageautorefname{P\'agina}% } \def\HyLang@vietnamese{% \def\equationautorefname{Ph\uhorn{}\ohorn{}ng tr\`inh}% \def\footnoteautorefname{Ch\'u th\'ich}% \def\itemautorefname{m\d{u}c}% \def\figureautorefname{H\`inh}% \def\tableautorefname{B\h{a}ng}% \def\partautorefname{Ph\`\acircumflex{}n}% \def\appendixautorefname{Ph\d{u} l\d{u}c}% \def\chapterautorefname{ch\uhorn{}\ohorn{}ng}% \def\sectionautorefname{m\d{u}c}% \def\subsectionautorefname{m\d{u}c}% \def\subsubsectionautorefname{m\d{u}c}% \def\paragraphautorefname{\dj{}o\d{a}n}% \def\subparagraphautorefname{\dj{}o\d{a}n}% \def\FancyVerbLineautorefname{d\`ong}% \def\theoremautorefname{\DJ{}\d{i}nh l\'y}% \def\pageautorefname{Trang}% } hevea-2.09/tree.mli0000644004317100512160000000165310207662436014237 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: tree.mli,v 1.5 2005-02-25 17:49:18 maranget Exp $ *) (***********************************************************************) type 'a t = | Text of string | Blanks of string | Node of 'a * ('a t) list | ONode of string * string * ('a t) list hevea-2.09/htmltext.ml0000644004317100512160000001400412017660721014766 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: htmltext.ml,v 1.13 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) open Emisc open Lexeme type tsize = Int of int | Big | Small type nat = | Style of tag | Size of tsize | Color of string | Face of string | Fstyle of fontstyle * string | Other type t_style = {nat : nat ; txt : string ; ctxt : string} type style = t_style list let rec do_cost seen_span seen_font r1 r2 = function | [] -> r1,r2 | {nat=(Size (Int _)|Color _|Face _);_}::rem -> do_cost seen_span true (if seen_font then r1 else 1+r1) (1+r2) rem | {nat=(Fstyle _);_}::rem -> do_cost true seen_font (if seen_span then r1 else 1+r1) (1+r2) rem | _::rem -> do_cost seen_span seen_font (1+r1) r2 rem let cost ss = do_cost false false 0 0 ss exception No let add_size d = match !basefont + d with | 1|2|3|4|5|6|7 as x -> x | _ -> raise No let size_val = function | "+1" -> add_size 1 | "+2" -> add_size 2 | "+3" -> add_size 3 | "+4" -> add_size 4 | "+5" -> add_size 5 | "+6" -> add_size 6 | "-1" -> add_size (-1) | "-2" -> add_size (-2) | "-3" -> add_size (-3) | "-4" -> add_size (-4) | "-5" -> add_size (-5) | "-6" -> add_size (-6) | "1" -> 1 | "2" -> 2 | "3" -> 3 | "4" -> 4 | "5" -> 5 | "6" -> 6 | "7" -> 7 | _ -> raise No let color_val s = match String.lowercase s with | "#000000" -> "black" | "#c0c0c0" -> "silver" | "#808080" -> "gray" | "#ffffff" -> "white" | "#800000" -> "maroon" | "#ff0000" -> "red" | "#800080" -> "purple" | "#ff00ff" -> "fuschia" | "#008000" -> "green" | "#00ff00" -> "lime" | "#808000" -> "olive" | "#ffff00" -> "yellow" | "#000080" -> "navy" | "#0000ff" -> "blue" | "#008080" -> "teal" | "#00ffff" -> "aqua" | s -> s let same_style s1 s2 = match s1.nat, s2.nat with | Style t1, Style t2 -> t1=t2 | Other, Other -> s1.txt = s2.txt | Size s1, Size s2 -> s1=s2 | Color c1, Color c2 -> c1=c2 | Face f1, Face f2 -> f1=f2 | Fstyle (a1,v1),Fstyle (a2,v2) -> a1 = a2 && v1 = v2 | _,_ -> false let is_color = function | Color _ | Fstyle (Fcolor,_) -> true | _ -> false and is_size = function | Size _ | Fstyle (Fsize,_) -> true | _ -> false and is_face = function | Face _ -> true | _ -> false exception NoProp let get_prop = function | Size _ -> is_size | Fstyle (Fsize,_) -> is_size | Face _-> is_face | Color _ | Fstyle (Fcolor,_) -> is_color | _ -> raise NoProp let neutral_prop p = p (Color "") let is_font = function | Size (Int _) | Face _ | Color _ -> true | _ -> false let is_span = function | Fstyle _ -> true | _ -> false let font_props = [is_size ; is_face ; is_color] let span_props = [is_size; is_face; ] exception Same let rec rem_prop p = function | s::rem -> if p s.nat then rem else let rem = rem_prop p rem in s::rem | [] -> raise Same let rec rem_style s = function | os::rem -> if same_style s os then rem else let rem = rem_style s rem in os::rem | [] -> raise Same type env = t_style list let empty_env = [] exception Split of t_style * env let add s env = let new_env = try let p = get_prop s.nat in try s::rem_prop p env with | Same -> match s.nat with | Size (Int x) when x = !basefont -> env | _ -> s::env with | NoProp -> try s::rem_style s env with | Same -> s::env in match s.nat with | Other -> begin match new_env with | _::env -> raise (Split (s,env)) | _ -> assert false end | _ -> new_env (* For FONT tag *) let add_fontattr txt ctxt a env = let nat = match a with | SIZE s -> Size (Int (size_val s)) | COLOR s -> Color (color_val s) | FACE s -> Face s | ASTYLE _|CLASS _|OTHER -> raise No in add {nat=nat ; txt=txt ; ctxt=ctxt} env let do_addattrs myadd txt ctxt attrs env = match attrs with | [] -> env | _ -> let rec do_rec = function | [] -> env | (a,atxt)::rem -> myadd atxt ctxt a (do_rec rem) in try do_rec attrs with | No -> add {nat=Other ; txt=txt ; ctxt=ctxt} env let add_fontattrs = do_addattrs add_fontattr (* For SPAN tag *) let add_spanattr txt ctxt a env = let nat = match a with | ASTYLE (a,v) -> Fstyle (a,v) | SIZE _| COLOR _| FACE _ |CLASS _|OTHER -> raise No in add {nat=nat ; txt=txt ; ctxt=ctxt} env let add_spanattrs = do_addattrs add_spanattr let add_style {Lexeme.tag=tag ; Lexeme.attrs=attrs ; Lexeme.txt=txt ; Lexeme.ctxt=ctxt} env = match tag with | FONT -> add_fontattrs txt ctxt attrs env | A -> assert false | BIG -> if attrs=[] then add {nat=Size Big ; txt=txt ; ctxt=ctxt} env else add {nat=Other ; txt=txt ; ctxt=ctxt} env | SMALL -> if attrs=[] then add {nat=Size Small ; txt=txt ; ctxt=ctxt} env else add {nat=Other ; txt=txt ; ctxt=ctxt} env | SPAN -> add_spanattrs txt ctxt attrs env | _ -> if attrs=[] then add {nat=Style tag ; txt=txt ; ctxt=ctxt} env else add {nat=Other ; txt=txt ; ctxt=ctxt} env let blanksNeutral s = match s.nat with | Size _ | Style (U|TT|CODE|SUB|SUP) | Other | Fstyle ((Fsize|Ffamily|Fvariant|Fbgcolor),_)-> false | _ -> true let partition_color styles = List.partition (fun s -> not (is_color s.nat)) styles hevea-2.09/ocb.sh0000755004317100512160000000111312030055774013663 0ustar marangetcristal#!/bin/sh -e . ./config.sh OCBOCAMLFLAGS='' for i in $OCAMLFLAGS do OCBOCAMLFLAGS="$OCBOCAMLFLAGS -cflag $i" done ocb() { ocamlbuild $OCBFLAGS $OCBOCAMLFLAGS $* } toopt () { for f in $* do mv $f `basename $f .native`.opt done } rule() { case $1 in clean) ocb -clean ;; byte) ocb $PGM ;; opt) ocb $PGMNATIVE && toopt $PGMNATIVE ;; both) ocb $PGM $PGMNATIVE && toopt $PGMNATIVE ;; *) echo "Unknown action $1";; esac; } if [ $# -eq 0 ] then rule opt else for i do rule $i done fihevea-2.09/latexscan.mli0000644004317100512160000000454610545232403015256 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Lexstate module type S = sig (* external entry points *) val no_prelude : unit -> unit val translate_put_unicode : char -> (unit -> int) -> unit val translate_put_unicode_string : string -> unit val main : Lexing.lexbuf -> unit val expand_command : string -> Lexing.lexbuf -> unit val expand_command_no_skip : string -> Lexing.lexbuf -> unit val print_env_pos : unit -> unit (* additional resources needed for extension modules. *) val cur_env : string ref val new_env : string -> unit val close_env : string -> unit val echo_toimage : unit -> bool val echo_global_toimage : unit -> bool val fun_register : (unit -> unit) -> unit val newif_ref : string -> bool ref -> unit val top_open_block : string -> string -> unit val top_close_block : string -> unit val check_alltt_skip : Lexing.lexbuf -> unit val skip_pop : Lexing.lexbuf -> unit (* 'def' functions for initialisation only *) val def_code : string -> (Lexing.lexbuf -> unit) -> unit val def_name_code : string -> (string -> Lexing.lexbuf -> unit) -> unit val def_fun : string -> (string -> string) -> unit (* various calls of main scanner, should tidy that a bit *) val get_this_main : string -> string val get_this_arg_mbox : string arg -> string val get_prim_onarg : string Lexstate.arg -> string val check_this_main : string -> bool val get_prim : string -> string val get_prim_arg : Lexing.lexbuf -> string val get_prim_opt : string -> Lexing.lexbuf -> string val get_csname : Lexing.lexbuf -> string end module Make (Dest : OutManager.S) (Image : ImageManager.S) : S hevea-2.09/articlecommon.hva0000644004317100512160000000311310512403554016113 0ustar marangetcristal\setcounter {secnumdepth}{3} \newcounter {part} \newcounter {section} \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \setenvclass{part}{part} \setenvclass{section}{section} \setenvclass{subsection}{subsection} \setenvclass{subsubsection}{subsubsection} \setenvclass{paragraph}{paragraph} \setenvclass{subparagraph}{subparagraph} \newcounter {footnote} \newcounter{titlenote} \renewcommand{\thetitlenote}{\fnsymbol{titlenote}} \newcounter {anchornote} \renewcommand \theanchornote{{\@nostyle\arabic{anchornote}}} \renewcommand \thepart {\Roman{part}} \renewcommand\thesubsection {\thesection.\arabic{subsection}} \renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}} \renewcommand\theparagraph {\thesubsubsection.\arabic{paragraph}} \renewcommand\thesubparagraph {\theparagraph.\arabic{paragraph}} \newcounter{equation} \newcounter{figure} \newcounter{table} \flushdef{document} \newcommand{\partname}{Part} \newcommand{\appendixname}{Appendix} %%%%%%%%%%% Initial cutting \newcommand{\cuttingunit}{section} %%%%%%%%%%%%%%%% \newcommand{\appendix}{% \setcounter{section}{0}% \renewcommand{\thesection}{\Alph{section}}} \newcommand\abstractname{Abstract} \setenvclass{abstract}{abstract} \newenvironment{abstract} {\setenvclass{quote}{abstract}\begin{quote}{\bf \abstractname: }} {\end{quote}} \newcommand{\@indexsection}[1]{\section*{#1}} \newcommand{\@bibliosection}[1]{\section*{#1}} \newcommand{\@tocsection}[1]{\section*{#1}} \newcommand{\@base}{article} \setcounter{tocdepth}{3} hevea-2.09/comment.hva0000644004317100512160000000103707114732007014726 0ustar marangetcristal\@primitives{comment} \def\CommentCutFile{comment.cut} \newcommand{\includecomment}[1] {\begin{toimage}\includecomment{#1}\end{toimage}% \typeout{Include comment '#1'}% \@stopimage% \def{\csname #1\endcsname}{\@end{#1}}% \def{\csname end#1\endcsname}{\@begin{#1}}% \@restartimage} \newcommand{\excludecomment}[1] {\begin{toimage}\excludecomment{#1}\end{toimage}% \typeout{Exclude comment '#1'}% \@stopimage% \let{\csname #1\endcsname}\@excludecomment% \let{\csname end#1\endcsname}\end@excludecomment% \@restartimage} \excludecomment{comment} hevea-2.09/html/0000755004317100512160000000000012204704150013521 5ustar marangetcristalhevea-2.09/html/commongraphic.hva0000644004317100512160000000145410723547637017076 0ustar marangetcristal\@primitives{graphics} \newcommand{\@image@filearg}[1] {\ifx\@imp@dir\@empty \@imagearg{#1}\else \begin{toimage}{\end{toimage}% \@prim@toimage{\@find@file{#1}}% \begin{toimage}}\end{toimage}% \fi} %%%%%%%%%%%%% \@imagecommand{\graphicspath}{\@imagearg} \@imagecommand{\DeclareGraphicsExtensions}{\@imagearg} \@imagecommand{\DeclareGraphicsRule} {\execafter\@verbimagearg\execafter\@imagearg\execafter\@imagearg\@imagearg} \@imagecommand{\scalebox} {\execafter{\imageflush{}}\execafter\@imagearg\execafter\@imageopt\@imagearg} \@imagecommand{\resizebox} {\execafter{\imageflush{}}\execafter\@imagearg\execafter\@imagearg\@imagearg} \@imagecommand{\resizebox*} {\execafter{\imageflush{}}\execafter\@imagearg\execafter\@imagearg\@imagearg} \@imagecommand{\reflectbox} {\execafter{\imageflush{}}\@imagearg}hevea-2.09/html/book.hva0000644004317100512160000000211712017660721015163 0ustar marangetcristal\ifstyleloaded\relax \else \input{bookcommon.hva} \newcommand{\@book@attr}[1]{\@secid\envclass@attr{#1}} \@makesection {\part}{-2}{part} {\@opencell{class="center"}{}{}\@open{h1}{\@book@attr{part}}}% {\partname~\thepart}{\\}% {\@close{h1}\@closecell} \newstyle{.part}{margin:2ex auto;text-align:center} \@makesection {\chapter}{-1}{chapter} {\@open{h1}{\@book@attr{chapter}}}{\chaptername~\thechapter}{\quad}{\@close{h1}} \@makesection {\section}{0}{section} {\@open{h2}{\@book@attr{section}}}{\thesection}{\quad}{\@close{h2}}% \@makesection {\subsection}{1}{subsection} {\@open{h3}{\@book@attr{subsection}}}{\thesubsection}{\quad}{\@close{h3}}% \@makesection {\subsubsection}{2}{subsubsection} {\@open{h4}{\@book@attr{subsubsection}}}{\thesubsubsection}{\quad}{\@close{h4}}% \@makesection {\paragraph}{3}{paragraph} {\@open{h5}{\@book@attr{paragraph}}}{\theparagraph}{\quad}{\@close{h5}}% \@makesection {\subparagraph}{4}{subparagraph} {\@open{h6}{\@book@attr{subparagraph}}}{\thesubparagraph}{\quad}{\@close{h6}}% \newcommand{\hacha@style}{book}% \styleloadedtrue \fi hevea-2.09/html/xypic.hva0000644004317100512160000000062407472446756015411 0ustar marangetcristal\@primitives{xypic} \@imagecommand{\xymatrix}{\execafter{\imageflush{}}\execafter\@imagearg\@xyarg} \@imagecommand{\xymatrix@}{\execafter{\imageflush{}}\execafter\@imagearg\@xyarg} \@imagecommand{\xymatrixnocompile}{\execafter{\imageflush{}}\@imagearg} \def\CompileMatrices{} \def\NoCompileMatrices{} \@imagecommand{\entrymodifiers}{\@imagearg} \@imagecommand{\SelectTips}{\execafter\@imagearg\@imagearg}hevea-2.09/html/austrian.hva0000644004317100512160000000063710155357666016100 0ustar marangetcristal%%%% Hevea support for babel option 'austrian'. \@ifundefined{common@austrian@babel}{\input{german-common.hva}}{} \newcommand{\austrian@babel}{% \common@austrian@babel% \def\glqq{\@print{„}}% \def\grqq{\@print{“}}% \def\glq{\@print{‚}}% \def\grq{\@print{‘}}% \def\flqq{\@print{«}}% \def\frqq{\@print{»}}% \def\flq{\@print{‹}}% \def\frq{\@print{›}}} hevea-2.09/html/hevea.hva0000644004317100512160000006536312125271032015326 0ustar marangetcristal%%%% Une prcaution. \ifhtml\else\hva@warn{html/hevea is for html mode !!!}\endinput\fi %%%% package used by all packages \input{plain.hva} \newif\ififthen\ifthenfalse \input{ifthen.hva} %%%%%%%%%%%%%%%%%%%%%%% %%Style-sheet support % %%%%%%%%%%%%%%%%%%%%%%% %% External/internal style declarations are accumulated into approriate %% token registers % Linking to external style sheets \newtokens{\css@link}% \newcommand{\addcssfile}[1]{\addtokens{\css@link}{#1}}% \newcommand{\loadcssfile}[1]{\addcssfile{\@print{<}\@getprint{link rel="stylesheet" type=\char34 text/css\char34\@print{ }href=\char34#1\char34\char62\@print{ }}}}% %%%%%% % Styles definition in the element \newtokens{\hevea@css}% \newcommand{\addstyle}[1]{\addtokens{\hevea@css}{#1}}% \newcommand{\newstyle}[2]{\addstyle{\@getprint{#1\char123#2\char125\@print{ }}}}% \newif\ifexternalcss\externalcssfalse % %%Style attributes are normaly set through an indirection. %% Ie the class of the BLOCK elt that translates environment 'env' is %% \'env'@class \newcommand{\class@attr}[2]{\ife#1\else\@getprint{class="#1"#2}\fi} \newcommand{\setenvclass}[3][]{#1\def\csname{}#2@class\endcsname{#3}} \newcommand{\getenvclass}[1]{\csname{}#1@class\endcsname} \newcommand{\envclass@attr}[2][]{\class@attr{\getenvclass{#2}}{#1}} %% Packages \input{packages.hva} %%%%%% Spacing \input{spaces.hva} \input{latexcommon.hva} %%% Basic symbols %%% Logos \def\TeX{\@print{TEX}} \def\LaTeX{\@print{LATEX}} \def\LaTeXe{\mbox{\@print{LATEX}~$2\epsilon$}} \newcommand{\hevea}{\@print{H}{\@incsize{-1}\@print{E}}\@print{V}% {\@incsize{-1}\@print{E}}\@print{A}} \newcommand{\hacha}{\@print{H}{\@incsize{-1}\@print{A}}\@print{C}% {\@incsize{-1}\@print{H}}\@print{A}} \newcommand{\html}{html} %%% HTML related stuff (TEX equivalents are in the hevea.sty file) %separate opening & closing of a elements (for cleveref) \newcommand{\@openlocref}[1]{{\@nostyle\@print{}}} \newcommand{\@closelocref}{{\@nostyle\@print{}}} %usual a elements \newcommand{\@doaelement}[3][] {{\@nostyle\@print{}}{#3}{\@nostyle\@print{}}} \newcommand{\@nestedaelement}[3][]{\hva@warn{Suppressing nested a element}#3} \newcommand{\@aelement}[3][] {\bgroup% \let\@aelement\@nestedaelement% \let\@openlocref\@gooble% \let\@closelocref\relax% \@doaelement[#1]{#2}{#3}\egroup} %high level, html vision \newcommand{\ahref}[3][]{\@aelement[#1]{href="#2"}{#3}} \newcommand{\ahrefurl}[2][]{\@aelement[#1]{href="#2"}{\texttt{#2}}} \let\footahref\ahref \newcommand{\mailto}[2][]{\@aelement[#1]{href="mailto:#2"}{#2}} \newcommand{\imgsrc}[2][] {\@print{}\@getprint{#2}\fi
\ifthenelse{\equal{#1}{}}{\@print{}} %% Hyper-text references inside the document, internal usage \newcommand{\@locref}[3][]{\@aelement[#1]{href="\@print{#}\@tr@url{#2}"}{#3}} \newcommand{\@locname}[3][]{\@aelement[#1]{id="#2"}{#3}} \newcommand{\@locnameref}[4][]{\@aelement[#1]{id="#2" href="\@print{#}\@tr@url{#3}"}{#4}} %% Two exported commands \let\ahrefloc\@locref \let\aname\@locname \newcommand{\anchor}[2][]{\@locname[#1]{#2}{}} %% Html footer, header and prefix for titles \newsavebox{\@htmlhead} \newsavebox{\@htmlfoot} \newsavebox{\@htmlprefix} \newcommand{\htmlhead}[1]{\sbox{\@htmlhead}{#1}} \newcommand{\htmlfoot}[1]{\sbox{\@htmlfoot}{#1}} \newcommand{\htmlprefix}[1]{\sbox{\@htmlprefix}{#1}} \AtEndDocument {\@close@par{\@nostyle\@print{ }}% \usebox{\@htmlfoot}% {\@nostyle\@print{ }}} %%%%% Footnotes, html dependant part \newcommand{\@noteref}[4]{\@locnameref{#2#3}{#1#3}{#4}} \newcommand{\@notepointer}[3]{\@locref{#1#2}{#3}} \newcommand{\@notetextstyle}[1] {{\@nostyle\@print{}}#1{{\@nostyle\@print{}}}} \newcommand{\@notenotestyle}[1]{{\@clearstyle{}#1}} %Styling fotnote text: use div because of possible \par in it \newcommand{\@open@footnotetext}{\@open{div}{class="footnotetext"}} \newcommand{\@close@footnotetext}{\@close{div}} \newstyle{.footnotetext}{margin:0ex; padding:0ex;} \newstyle{div.footnotetext P}{margin:0px; text-indent:1em;} %Other styles \setenvclass{thefootnotes}{thefootnotes} \setenvclass{dt-thefootnotes}{dt-thefootnotes} \setenvclass{dd-thefootnotes}{dd-thefootnotes} \setenvclass{footnoterule}{footnoterule} \newstyle{.thefootnotes}{text-align:left;margin:0ex;} \newstyle{.dt-thefootnotes}{margin:0em;} \newstyle{.dd-thefootnotes}{margin:0em 0em 0em 2em;} \newstyle{.footnoterule}{margin:1em auto 1em 0px;width:50\%;} \newcommand{\footnoterule}{\@hr[\envclass@attr{footnoterule}]{}{}} \newenvironment{thefootnotes}[2][] {\@out@par{{\@nostyle\@print{ }}}\footnoterule% \setlistclass{thefootnotes}% \begin{list}{}{\renewcommand{\makelabel}[1]{##1}}} {\end{list}\@out@par{{\@nostyle\@print{ }}}} %%% Captions html dependent part \newstyle{.caption} {padding-left:2ex; padding-right:2ex; margin-left:auto; margin-right:auto} \setenvclass{caption}{caption} \newenvironment{hva@capted} {\@open{div}{\envclass@attr{caption}}\begin{tabular}{p{\linewidth}}} {\end{tabular}\@close{div}} %%% for HaChA \newcounter{cuttingdepth} \setcounter{cuttingdepth}{1} %% Old cutdef/cutend, no footnote managment \newcommand{\cutdef*}[2][] {\@out@par{{\@nostyle\@print{}}}} \newcommand{\cutend*} {\@out@par{{\@nostyle\@print{ }}}} %%% New cutdef/cutend, with footnote managment \hva@newstack{@foot} \newcommand{\cutdef}[2][]{% \@footnotesub\@push@foot{\@footnotelevel}\flushdef{#2}% \@out@par{{\@nostyle\@print{}}}} \newcommand{\cutend}{% \footnoteflush{\@footnotelevel}% \@out@par{{\@nostyle\@print{ }}}% \@endfootnotesub\@pop@foot{\@footnotelevel}} %%%Close/Re-open toplevel pars \newcommand{\@secbegin}{\@close@par} \newcommand{\@secend}{{\@nostyle\@print{}}\@open@par} \newcommand{\@secanchor}{} %{{\@nostyle\@print{}}} \newcommand{\cuthere}[2]{% \@footnoteflush{#1}% {\@out@par{{\@nostyle\@print{ }}}}} \newcommand{\@hacha@arg}[2] {{\@nostyle\@print{}{#2}\@print{}}} \newenvironment{@cutflow}[2] {\@out@par{\@printnostyle{ }}} {\@out@par{\@printnostyle{ }}} \newenvironment{cutflow}[1]{\begin{@cutflow}{YES}{#1}}{\end{@cutflow}} \newenvironment{cutflow*}[1]{\begin{@cutflow}{NO}{#1}}{\end{@cutflow}} \newcommand{\cutname}[1] {\@out@par{{\@nostyle\@print{ }}}} \newcommand{\@link@arg}[2] {\ifthenelse{\equal{#2}{}}{} {\@hacha@arg{#1}{#2}}} \newsavebox{\@toplinks} \newcommand{\toplinks}[3] {\sbox{\@toplinks} {\@printnostyle{ }}} \newsavebox{\@linkstext} \newcommand{\setlinkstext}[3] {\sbox{\@linkstext} {\@printnostyle{ }}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Using style CLASSES with DIV for local style-setting % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \newenvironment{divstyle}[1] {\@open{div}{\class@attr{#1}{}}}{\@close{div}}% \newenvironment{cellstyle}[2] {\@open{table}{\class@attr{#1}{}}\@open{tr}{}\@open{td}{\class@attr{#2}{}}} {\@close{td}\@close{tr}\@close{table}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Echoing to the image file % %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \def\@iopt@def{!*!} \newcommand{\@imageopt}[1][!*!] {\def\@itmp{#1}\ifx\@itmp\@iopt@def\else\begin{toimage}[#1]\end{toimage}\fi} \newcommand{\@imagearg}[1]{\begin{toimage}{#1}\end{toimage}} \newcommand{\@imagecommand}[2] {\@forcecommand{#1}{\begin{toimage}#1\end{toimage}#2}} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \maketitle (is no longer redefined by fancysection) % % Thus defining different styles explicitly will have to % % be done using the respective classes : % % .title : table containing the title and supplements % % .titlemain : h1 containing title name % % .titlerest : h3 containing other fields (author,date,etc.)% % 'checkbox' now takes three instead of two arguments, % % one for the class. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \newcommand{\title@tohaux}[1] {\@auxdowrite{\@print{\@titleaux}\{\@subst{#1}\} }} \newstyle{.title}{margin:2ex auto;text-align:center} \newstyle{.titlemain}{margin:1ex 2ex 2ex 1ex;} \newstyle{.titlerest}{margin:0ex 2ex;} \let\title@flush@hook\relax \newcommand{\maketitle}{% \bgroup \newcommand{\checkcmd}[4] {\@ifundefined{@##3}{##4{No ##3 given}} {\@open{##1}{\class@attr{##2}{}}% \@fmt@title{\csname @##3\endcsname}% \@close{##1}}}% \@opencell{class="title"}{}{style="padding:1ex"}% \checkcmd{h1}{titlemain}{title}{\hva@warn}% \checkcmd{h3}{titlerest}{author}{\hva@warn}% \checkcmd{h3}{titlerest}{date}{\@gooble}% \@closecell% \egroup% \ifthenelse{\equal{\@footnotelevel}{document}}{} {\@footnotesub% \gdef\title@flush@hook{\@endfootnotesub\@footnoteflush@sticky{document}}}% \let\maketitle\relax}% % %%%%%%%%% % Maths % %%%%%%%%% \ifmathml \input{html/symb-mathml.hva} \else \ifsymbtext\input{iso-text.hva}\else\input{iso-html.hva}\fi \fi \renewcommand{\&}{\ifraw\@print{&}\else\@print{&}\fi} \renewcommand{\textless}{\ifraw\@print{<}\else\@print{<}\fi} \renewcommand{\textgreater}{\ifraw\@print{>}\else\@print{>}\fi} %%%%%%%%%%%% Bibliography \newcommand{\@bibtagstyle}{} \newcommand{\@bibref}[3] {\@locref{#1}{\ifx#2\@empty\@verbarg{#1}\else#2\fi}\@bib@post{#3}} \newsavebox{\@bibbox} \newcommand{\@biblabel}[1]{\@locname{\bibtaghook{#1}}{\@bibtagstyle[\@bibread{\bibtaghook{#1}}]}} %%% Environment document. \newcommand{\@charset}{US-ASCII} \newcommand{\@def@charset}[1] {\renewcommand{\@charset}{#1}\@set@out@translator{mappings/#1.map}} \newcommand{\@bodyargs}{} \newcommand{\@meta} {\@print{ }% \ife\hevea@css\else \ifexternalcss\loadcssfile{\hva@dump@css}\else \@print{ }\fi\fi \ife\css@link\else\css@link\fi \undef\hevea@css\undef\newstyle} \newenvironment{document}{% \@end{document}% \@atbegindocument% \@restartoutput\unskip% \@print{ }\@print{ } \@meta% \@print{}% \ifu\@title\jobname\else \@notags{\begin{@norefs}\let\@print@u\@print@u@default\@getprint{\@title}\end{@norefs}} \fi \@print{ }% \ifmathml\@print{ }\fi \@print{ }% \@print{ }% \@print{ }% {\@nostyle\@print{}}% \ife\@htmlhead\else{\@nostyle\@print{ }}% \usebox{\@htmlhead}% {\@nostyle\@print{ }}\fi% \ife\@htmlprefix\else\@printnostyle{ }\fi% \usebox{\@toplinks}\usebox{\@linkstext}% \cutdef*[\thecuttingdepth]{\cuttingunit}% \renewcommand{\addstyle}[1]{\hva@warn{\addstyle{} must be used in document preamble}}% \@open@par%Open first paragraph }{% \@clearstyle\@footnoteflush{\@footnotelevel}\cutend*\title@flush@hook% \@atenddocument% \@final@footer% \@clearstyle% \@print{ }\@raise@enddocument} \newstyle{.center}{text-align:center;margin-left:auto;margin-right:auto;}% \newstyle{.flushleft}{text-align:left;margin-left:0ex;margin-right:auto;}% \newstyle{.flushright}{text-align:right;margin-left:auto;margin-right:0ex;}% % Avoid consecutive tables being stuck together \newstyle{div table}{margin-left:inherit;margin-right:inherit;margin-bottom:2px;margin-top:2px} \newstyle{td table}{margin:auto;} \newstyle{table}{border-collapse:collapse;} \newstyle{td}{padding:0;} \newstyle{.cellpadding0 tr td}{padding:0;} \newstyle{.cellpadding1 tr td}{padding:1px;} \newstyle{pre}{text-align:left;margin-left:0ex;margin-right:auto;} \newstyle{blockquote}{margin-left:4ex;margin-right:4ex;text-align:left;} %Paragraphs in table cells are special (close to latex rendering) \newstyle{td p}{margin:0px;} \setenvclass{center}{center}% \newenvironment{center}{\@open{div}{\envclass@attr{center}}}{\@close{div}} \setenvclass{flushleft}{flushleft} \newenvironment{flushleft} {\@open{div}{\envclass@attr{flushleft}}} {\@close{div}} \setenvclass{flushright}{flushright}% \newenvironment{flushright} {\@open{div}{\envclass@attr{flushright}}} {\@close{div}}% \newcommand{\centerline}[1]{\begin{center}#1\end{center}} %%quotations env. \setenvclass{quote}{quote}% \newenvironment{quote} {\@close{}\@open{blockquote}{\envclass@attr{quote}}} {\@close{blockquote}\@open{}{}}% \setenvclass{quotation}{quotation}% \newenvironment{quotation} {\@open{blockquote}{\envclass@attr{quotation}}}{\@close{blockquote}} \newcommand{\centering}{\@insert{div}{\envclass@attr{center}}} \newcommand{\raggedleft}{\@insert{div}{\envclass@attr{flushright}}} \newcommand{\raggedright}{\@insert{div}{\envclass@attr{flushleft}}} \newcommand{\rule}[3][]{\@printHR{}{}}% %For figure & tables \newcommand{\@open@quote}[1]{\@open{blockquote}{#1}} \newcommand{\@close@quote}{\@close{blockquote}} %%%%%%%%%%%%%%%% LaTeX 2.09 style declarations \newenvironment{tt}{\@span{style="font-family:monospace"}}{} \newenvironment{bf}{\@span{style="font-weight:bold"}}{} \newenvironment{em}{\@style{em}}{} \newenvironment{it}{\@span{style="font-style:italic"}}{} \newenvironment{rm}{\@anti{\it,\bf,\em,\sf,\tt}}{} \newenvironment{tiny}{\@fontsize{1}}{} \newenvironment{footnotesize}{\@fontsize{2}}{} \newenvironment{scriptsize}{\@fontsize{2}}{} \newenvironment{small}{\@fontsize{2}}{} \newenvironment{normalsize}{\@fontsize{3}}{} \newenvironment{large}{\@fontsize{4}}{} \newenvironment{Large}{\@fontsize{5}}{} \newenvironment{LARGE}{\@fontsize{5}}{} \newenvironment{huge}{\@fontsize{6}}{} \newenvironment{Huge}{\@fontsize{7}\@span{style="font-size:150\%"}}{} % dirty hack for size 7, blame w3c for making css and html size non-convertible %%%%%% Colors \newenvironment{purple}{\@fontcolor{purple}}{} \newenvironment{black}{\@fontcolor{black}}{} \newenvironment{silver}{\@fontcolor{silver}}{} \newenvironment{gray}{\@fontcolor{gray}}{} \newenvironment{white}{\@fontcolor{white}}{} \newenvironment{maroon}{\@fontcolor{maroon}}{} \newenvironment{red}{\@fontcolor{red}}{} \newenvironment{fuchsia}{\@fontcolor{fuchsia}}{} \newenvironment{green}{\@fontcolor{green}}{} \newenvironment{lime}{\@fontcolor{lime}}{} \newenvironment{olive}{\@fontcolor{olive}}{} \newenvironment{yellow}{\@fontcolor{yellow}}{} \newenvironment{navy}{\@fontcolor{navy}}{} \newenvironment{blue}{\@fontcolor{blue}}{} \newenvironment{teal}{\@fontcolor{teal}}{} \newenvironment{aqua}{\@fontcolor{aqua}}{} \def\cal{\ifmath\ifmathml\@style{font-family: cursive }% \else\red\fi\else\red\fi} \def\sf{\ifmath\ifmathml\@style{font-family: sans-serif }% \else\@span{style="font-family:sans-serif"}\fi\else\@span{style="font-family:sans-serif"}\fi} \def\sl{\ifmath\ifmathml\@style{font-family: fantasy; font-style: italic }% \else\@span{style="font-style:oblique"}\fi\else\@span{style="font-style:oblique"}\fi} \def\sc{\@span{style="font-variant:small-caps"}}% %%%% LaTeX2e verbose declarations \newenvironment{mdseries}{\@anti{\bf}}{} \newenvironment{bfseries}{\bf}{} \newenvironment{rmfamily}{\rm}{} \newenvironment{sffamily}{\@anti{\tt}\sf}{} \newenvironment{ttfamily}{\@anti{\sf}\tt}{} \newenvironment{upshape}{\@anti{\it,\sl,\sc}}{} \newenvironment{itshape}{\@anti{\sl,\sc}\it}{} \newenvironment{slshape}{\@anti{\it,\sc}\sl}{} \newenvironment{scshape}{\@anti{\it,\sl}\sc}{} \newenvironment{normalfont}{\rm\mdseries\upshape}{} %%%%%%%%%%%%%%%% \def\textrm#1{\mbox{\rmfamily#1}} \def\textup#1{\mbox{\upshape#1}} \def\textmd#1{\mbox{\mdseries#1}} \def\textnormal#1{\mbox{\normalfont#1}} \def\texttt#1{\mbox{\ttfamily#1}} \def\textit#1{\mbox{\itshape#1}} \def\textbf#1{\mbox{\bfseries#1}} \def\textsf#1{\mbox{\sffamily#1}} \def\textsl#1{\mbox{\slshape#1}} \def\textsc#1{\mbox{\scshape#1}} \newcommand{\emph}[1]{\mbox{\em#1}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % New implementation of \sc & \textsc using "small-caps" style. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % %%%%%%%%%%%%%%% Multicolumns index formating \newcommand{\setindexpos}[2] {\providesavebox{\csname indexpos#1\endcsname}% \sbox{\csname indexpos#1\endcsname}{\@nostyle #2}} \newcommand{\getindexpos}[1]{\usebox{\csname indexpos#1\endcsname}} \newcounter{indexcols}\setcounter{indexcols}{2} \newcounter{indexcount}\newcounter{indexdepth} \newcounter{indexbox} \newcommand{\indexitem} {\stepcounter{indexcount}% \end{lrbox}% \setindexpos{\theindexbox}{\theindexcount}% \stepcounter{indexbox}% \providesavebox{\csname indexbox\theindexbox\endcsname}% \begin{lrbox}{\csname indexbox\theindexbox\endcsname}} \newcommand{\indexspace}{\indexitem} {\stepcounter{indexcount}} \setenvclass{indexenv}{indexenv} \setenvclass{li-indexenv}{li-indexenv} \newenvironment{indexenv} {\setenvclass{itemize}{\getenvclass{indexenv}}% \setenvclass{li-itemize}{\getenvclass{li-indexenv}}% \stepcounter{indexdepth}% %IF \ifthenelse{\value{indexdepth}>1} %THEN {\begin{itemize}% \renewcommand{\indexitem}{\stepcounter{indexcount}\item}% \renewcommand{\indexspace}{\stepcounter{indexcount}\vspace*{2ex}}} %ELSE {\setcounter{indexbox}{0}\setcounter{indexcount}{0}% \providesavebox{\csname indexbox0\endcsname}% \begin{lrbox}{\csname indexbox0\endcsname}}} {\ifthenelse{\value{indexdepth}>1} {\end{itemize}\addtocounter{indexdepth}{-1}} {\end{lrbox}% \setindexpos{\theindexbox}{\theindexcount}% \stepcounter{indexbox}% \addtocounter{indexdepth}{-1}\printindexboxes}} \newcounter{indexwork}\newcounter{indexlimit} \newcounter{indexlines} \newboolean{spaceallowed} \newcounter{indexclines}\newcounter{indexprev}\newcounter{indexnow}% \newcommand{\printindexboxes} {\setcounter{indexwork}{1}% \setcounter{indexlimit} {(\value{indexcount}+\value{indexcols}-1)/\value{indexcols}}% \setcounter{indexclines}{0}% \setcounter{indexprev}{0}% \setcounter{indexnow}{0}% \begin{tabular}{*{\value{indexcols}}{X}} \begin{itemize} \whiledo{\value{indexwork}<\value{indexbox}} {\setcounter{indexnow}{\pushint{\getindexpos{\theindexwork}}}% \addtocounter{indexclines}{\value{indexnow}-\value{indexprev}}% \ifthenelse{\equal{\usebox{\csname indexbox\theindexwork\endcsname}}{}} {\ifthenelse{\boolean{spaceallowed}}{\vspace*{2ex}}{}} {\item}% \setboolean{spaceallowed}{true}% \usebox{\csname indexbox\theindexwork\endcsname}% \stepcounter{indexwork}% \ifthenelse{\value{indexclines}>\value{indexlimit}} {\ifthenelse{\value{indexwork}<\value{indexbox}} {\end{itemize}&\begin{itemize}\setboolean{spaceallowed}{false}% \setcounter{indexclines}{0}} {}}% {}% \setcounter{indexprev}{\value{indexnow}}}% \end{itemize}\end{tabular}} %%%%%% Default table attribute for array and tabular \newcommand{\@table@attributes}{style="border-spacing:6px;border-collapse:separate" class="cellpading0"} \newcommand{\@table@attributes@border}{style="border-spacing:0" class="cellpadding1"} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Redefining \textoverline of latexcommon.hva % % Here we can use HTML primitives % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \newcommand{\overlinedbox}[1]% {{\@styleattr{span}{style="text-decoration:overline"}#1}}% \renewcommand{\textoverline}[1]{\overlinedbox{#1}}% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Redefining \fbox of latexcommon.hva % % Here we can use HTML primitives % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newstyle{.boxed}{border:1px solid black} \newstyle{.textboxed}{border:1px solid black} \NewcommandHtml{\@@boxed}[1] {\@start@text\@open{table}{class="boxed"}\@open{tr}{}\@open{td}{}% #1% \@close{td}\@close{tr}\@close{table}\@end@text} \NewcommandHtml{\@boxed}[1]{{\@styleattr{span}{class="textboxed"}#1}} \RenewcommandHtml{\fbox}{\DisplayChoose\@@boxed\@boxed} %%Style of bars \def\@barsz{2px} \def\@@barsz{4px}%2 x \def\@@@barsz{6px}%3 x \def\@@@@barsz{8px}%3 x \newstyle{.vbar} {border:none;width:\@barsz;background-color:black;} \newstyle{.hbar} {border:none;height:\@barsz;width:100\%;background-color:black;} \newstyle{.hfill} {border:none;height:1px;width:200\%;background-color:black;} %%%Bars with HR \newcommand{\@hfill}{{\@nostyle\@print{
    }}} \newcommand{\@vbar}[1][] {{\@clearstyle\def\@tmp{#1}\@print{
    }}} %%Bars with div \newcommand{\@@hbar}[1][] {{\@clearstyle\def\@tmp{#1}% \@open{div}{class="hbar"\ifx\@tmp\@empty\else{} #1\fi}\@force{div}}} \newcommand{\@@vbar}[1][] {{\@clearstyle\def\@tmp{#1}% \@open{div}{class="vbar"\ifx\@tmp\@empty\else{} #1\fi}\@force{div}}} %%Style of paragraphs \ifverbd\newstyle{p}{border:1px solid gray}\fi \ifverbd\newstyle{div}{border:1px dotted gray}\fi %%Style of display \def\@orange{\@print{#}FF8000} \def\@magenta{fuchsia} \def\@dtstyle{border-collapse:separate;border-spacing:\@barsz;width:auto;} \def\@dcstyle{white-space:nowrap;padding:0px;}%;width:auto;} \newstyle{.vdisplay}{\@dtstyle{} empty-cells:show; border:2px solid red;} \newstyle{.vdcell}{\@dcstyle{} border:2px solid green;} \newstyle{.display}{\@dtstyle{} border:none;} \newstyle{.dcell}{\@dcstyle{} border:none;} \newstyle{.dcenter}{margin:0ex auto;} \newstyle{.vdcenter}{border:solid \@orange{} 2px; margin:0ex auto;} %%% And we can get something similar for extensible arrows accents. \newcommand{\@vd}{\ifverbd{}v\fi} \newcommand{\@dclass}{class="\@vd{}display"} \DeclareSymbolHtml{\hva@righthead}{X25B8} \DeclareSymbolHtml{\hva@lefthead}{X25C2} \DeclareSymbolHtml{\hva@uphead}{X25B4} \DeclareSymbolHtml{\hva@downhead}{X25BE} \DeclareSymbolHtml{\hva@lrt}{X25E2} \DeclareSymbolHtml{\hva@llt}{X25E3} \DeclareSymbolHtml{\hva@ult}{X25E4} \DeclareSymbolHtml{\hva@urt}{X25E5} \DeclareSymbolHtml{\hva@utr}{X25B2} \DeclareSymbolHtml{\hva@dtr}{X25BC} \newcommand{\@open@dcell}[1] {\def\@tmp{#1}% \@open{td}{class="\@vd{}dcell" \ifx\@tmp\@empty\else{} \@addstyle{text-align:center}{#1}\fi}} \newcommand{\@close@dcell}{\@close{td}} \newcommand{\d@cell}[2][]{\@open@dcell{#1}#2\@close@dcell} \newcommand{\@open@display} {\@open{table}{class="\@vd{}display" style="width:100\%;"}\@open{tr}{}} \newcommand{\@close@display}{\@close{tr}\@close{table}} \newcommand{\@open@sizer}{} \newcommand{\@close@sizer}{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Generic positioning of extensible upper accent %% Beware need to open display inside itemdisplays. %% Need also to open two displays so as to avoid 100% to %% mean all page width, in case command is alone in %% display! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\@over@arrow}[3][2] {\@open@sizer\@open@display% #2% \@close{tr}\@open{tr}{}% \d@cell[colspan="#1"]{#3}% \@close{tr}\@open{tr}{}% \d@cell[colspan="#1"]{~}% \@close@display\@close@sizer} \newcommand{\textoverleftarrow}[1] {\hva@warn{\overleftarrow outside display mode}#1} \newcommand{\@overleftarrow}[1] {\mathop{\@over@arrow {\d@cell[style="width:10\%"]{\hva@lefthead}% \d@cell[style="width:90\%"]{\@hbar}} {#1}}\intlimits} \newcommand{\overleftarrow}{\DisplayChoose\@overleftarrow\textoverleftarrow} \newcommand{\textoverrightarrow}[1] {\hva@warn{\overrightarrow outside display mode}#1} \newcommand{\@overrightarrow}[1] {\mathop{\@over@arrow {\d@cell[style="width:90\%"]{\@hbar}\d@cell[style="width:10\%"]{\hva@righthead}} {#1}}\intlimits} \newcommand{\overrightarrow}{\DisplayChoose\@overrightarrow\textoverrightarrow} \newcommand{\textoverbrace}[1] {\hva@warn{\overbrace in non-display mode}#1} \newcommand{\@overbrace}[1] {\mathop{\@over@arrow[5] {\d@cell[style="width:5\%"]{\hva@lrt}% \d@cell[style="width:40\%;"]{\@hbar}% \d@cell[style="width:10\%"]{\hva@utr}% \d@cell[style="width:40\%"]{\@hbar}% \d@cell[style="width:5\%"]{\hva@llt}} {#1}}} \newcommand{\overbrace}{\DisplayChoose\@overbrace\textoverbrace} \newcommand{\@under@arrow}[3][2] {\@open@sizer\@open@display% \d@cell[colspan="#1"]{~}\@close{tr}% \@open{tr}{}\d@cell[colspan="#1"]{#3}\@close{tr}% \@open{tr}{}#2% \@close@display\@close@sizer} \newcommand{\textunderbrace}[1] {\hva@warn{\underbrace in non-display mode}#1} \newcommand{\@underbrace}[1] {\mathop{\@under@arrow[5] {\d@cell[style="width:5\%"]{\hva@urt}% \d@cell[style="width:40\%"]{\@hbar}% \d@cell[style="width:10\%"]{\hva@dtr}% \d@cell[style="width:40\%"]{\@hbar}% \d@cell[style="width:5\%"]{\hva@ult}} {#1}}} \newcommand{\underbrace}{\DisplayChoose\@underbrace\textunderbrace} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%concrete minipage \newstyle{.minipage}{text-align:left; margin-left:0em; margin-right:auto;} \setenvclass{minipage}{minipage} \newenvironment{@minipage} {\@open{div}{class="\getenvclass{minipage}"}} {\@close{div}} %%%%%%%%margin par \newstyle{.marginpar} {border:solid thin black; width:20\%; text-align:left;} \newstyle{.marginparleft} {float:left; margin-left:0ex; margin-right:1ex;} \newstyle{.marginparright} {float:right; margin-left:1ex; margin-right:0ex;} \newif\ifmarginright\marginrighttrue \setenvclass{marginpar}{marginpar} \setenvclass{marginparside}{marginparright} \newcommand{\normalmarginpar} {\setenvclass{marginparside}{marginparright}\marginrighttrue} \newcommand{\reversemarginpar} {\setenvclass{marginparside}{marginparleft}\marginrightfalse} \newcommand{\hva@mtemp}{} \newcommand{\marginpar}[2][] {\def\hva@mtemp{#1}% \@open{div}{class="\getenvclass{marginpar} \getenvclass{marginparside}"}% \ifx\hva@mtemp\@empty% #2% \else\ifmarginright #2% \else #1% \fi\fi \@close{div}} %%%%%%%%Default env class for verbatim \setenvclass{verbatim}{verbatim} %%%%%% format theorems \newcommand{\set@th@font}[1]{\def\th@font{#1}} \let\th@font\em \newstyle{.theorem}{text-align:left;margin:1ex auto 1ex 0ex;} \newcommand{\set@th}[1] {\global\let\csname#1@font\endcsname\th@font% \setenvclass[\global]{#1}{theorem}} \newenvironment{th@env}[3] {\@open{div}{class="\getenvclass{#1}"}% \refstepcounter{#2}\textbf{#3~\csname{}the#2\endcsname}% \def\th@tmp{#1}\th@kont} {\@close{div}} \newcommand{\th@kont}[1][] {\ifoptarg~\textbf{(#1)}\fi\quad\csname\th@tmp{}@font\endcsname} %%%%%% Do not load hevea.hva again ! \def\csname hevea@loaded\endcsname{} hevea-2.09/html/mathpartir.hva0000644004317100512160000001600312017660721016403 0ustar marangetcristal% Mathpartir --- Math Paragraph for Typesetting Inference Rules % % Copyright (C) 2001--2005 Didier Rmy % Hevea version by Luc Maranget % % Author : Didier Remy % Version : 1.2 % Bug Reports : to author % Web Site : http://pauillac.inria.fr/~remy/latex/ % % WhizzyTeX is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % Mathpartir is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details % (http://pauillac.inria.fr/~remy/license/GPL). % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % File mathpartir.hva (LaTeX macros) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % See the interface of mathpartir.sty % However, by default \\ does a vertical break in mathpar and a horizontal cut % in mathrule % % Preceeding \\ by \hva \\ does a horizontal break in mathpar and a vertical % break in mathrule. % % \hva is ignored in latex more. \usepackage {keyval} \let\latexcr\\ %%% Styles for mathpar \newcommand{\mp@row@style} {border-collapse:separate;border-spacing:2ex;width:100\%;margin:0ex;} \newstyle{.mprow}{\mp@row@style} \newstyle{.vmprow}{\mp@row@style empty-cells:show; border:solid \@magenta{} 2px} \newcommand{\mp@cell@style}{padding:0px;width:auto;} \newstyle{.mprcell}{\mp@cell@style} \newstyle{.vmprcell}{\mp@cell@style border:dotted \@magenta{} 2px;} \setenvclass{mathpar}{mathpar} \ifverbd \setenvclass{mprow}{vmprow} \setenvclass{mprcell}{vmprcell} \else \setenvclass{mprow}{mprow} \setenvclass{mprcell}{mprcell} \fi %% Open/close table elements \def\open@mathpar@table{\@open{table}{\envclass@attr{mprow}}} \def\open@mprow{\@open{tr}{style="vertical-align:middle"}} \def\close@mprow{\@close{tr}} \def\open@mpcell{\@open{td}{\@addstyle{text-align:center}{\envclass@attr[ ]{mprcell}}}\displaymath} \def\close@mpcell{\enddisplaymath\@close{td}} \def\force@mpcell{\enddisplaymath\@force{td}} \def\open@mpfstcell{\open@mpcell} \def\close@mplstcell{\force@mpcell} \def\mathpar@hspace{\push@styles\close@mpcell\open@mpcell\pop@styles\@skip@blanks} \def\mathpar@vspace {\push@styles\close@mplstcell\close@mprow\@close{table}% \open@mathpar@table\open@mprow\open@mpfstcell\pop@styles\@skip@blanks}% \def\mathpar@hva#1{\ifx#1\and\mathpar@vspace\else\mathpar@hspace\fi}% %%exported mathpar \newenvironment{mathpar}[1][] {\@open{div}{\envclass@attr{mathpar}} \let\and\mathpar@hspace\let\par\mathpar@vspace\let\\\mathpar@vspace\let\hva\mathpar@hva% \open@mathpar@table\open@mprow\open@mpfstcell} {\close@mplstcell\close@mprow\@close{table}\@close{div}} %%%% Type Inference Rules (TIR) \newsavebox{\mpr@save@arg}% \newcommand{\mpr@globle}[1]{} \newcommand {\@mpr@name}[1]{\@tir@name{#1}\let\mpr@name\mpr@globle} \def \mpr@line@hva #1{\mpr@break@display} \def \mpr@break@display {\sbox{\mpr@save@arg}{\mpr@line@arg}% \endmpr@line\mpr@line{\usebox{\mpr@save@arg}}} %%% this may not be robust (if nextchar is special char) %%% also may not want this semantics \def \@latexcr #1{% \def \@test {#1}\ifx \@test \@latexcr@char \latexcr \else \qquad #1\fi} \newcommand{\mpr@valign}[1] {\ifthenelse{\equal{#1}{}}{}{style="vertical-align:#1"}} \newcommand{\mpr@line}[1] {\@open{tr}{\mpr@valign{#1}}% \ifx\mpr@label\mpr@L\@open{td}{}\mpr@name{\@rule@name}~\@force{td}\fi \@open{td}{style="whitespace:nowrap;text-align:\ifmpr@center{}center\else{}left\fi"}% \bgroup\def\mpr@line@arg{#1}% \@open{display}{\mpr@valign{#1}}% \def\\{\@latexcr{\qquad}}\def\and{\@latexcr{\qquad}}% \let\hva\mpr@line@hva} \newcommand{\endmpr@line} {\@close{display}\egroup\@force{td}% \ifx\mpr@label\mpr@R\@open{td}{}~\mpr@name{\@rule@name}\@force{td}\fi \@close{tr}} \def \mpr@empty {} \newif \ifmpr@center \mpr@centertrue \newif \ifmpr@vdots \mpr@vdotsfalse \newcounter{mpr@count} \newcommand{\mpr@output@vdots} {\vdots% \setcounter{mpr@count}{\@lengthtonchar{\mpr@vdots}}% \whiledo{\value{mpr@count}>1}{\@br\vdots\addtocounter{mpr@count}{-1}}} \def\mpr@emptyL{\ifx\mpr@label\mpr@L\@open{td}{}\@force{td}\fi} \def\mpr@emptyR{\ifx\mpr@label\mpr@R\@open{td}{}\@force{td}\fi} \newcommand{\@mpr@table}{\@open{table}{style="border:0;border-spacing:1px;border-collapse:separate" class="cellpadding0"}} \newcommand {\@inferrule}[2] {\bgroup \let \\ \latexcr% \@mpr@table% \ifx\mpr@label\mpr@C \@open{tr}{}\@open{td}{style="text-align:left"}% \mpr@name{\@rule@name}% \@close{td}\@close{tr}% \fi \def \@@arg{#1}\ifx \@@arg \mpr@empty% \mpr@line{}#2\endmpr@line% \else \def \@@arg{#2}\ifx \@@arg \mpr@empty% \mpr@line{}#1\endmpr@line% \else \mpr@line{bottom}#1\endmpr@line% \@hhline% \mpr@line{top}#2\endmpr@line% \fi\fi% \ifmpr@vdots% \@open{tr}{style="vertical-align:middle"}% \mpr@emptyL \@open{td}{style="text-align:center"}\mpr@output@vdots\@force{td}% \mpr@emptyR \@close{tr}% \fi \@force{table}% \egroup% } \def\mpr@hhline@color{green} \def \@hhline {\@open{tr}{}% \mpr@emptyL \@open{td}{style="background-color:\mpr@hhline@color;height:3px"}\@force{td}% \mpr@emptyR \@force{tr}} \newcommand {\inferrule*}[3][]{% \bgroup\let\@tir@name\RefTirName% \mpr@vdotsfalse\let\mpr@label\mpr@N\let\mpr@name\@mpr@name%Default \@setkeys {mpr}{#1}% \@inferrule{#2}{#3}% \egroup} \newcommand {\inferrule}[3][]{% \def\mpr@arg{#1}\ifx\mpr@arg\mpr@empty \inferrule*{#2}{#3}\else \inferrule*[before={\let\@tir@name\TirName},lab=#1,center]{#2}{#3}\fi} \def \mprset {\setkeys{mprset}} \define@key {mprset}{flushleft}[]{\mpr@centerfalse} \define@key {mprset}{center}[]{\mpr@centertrue} \define@key {mpr}{flushleft}[]{\mpr@centerfalse} \define@key {mpr}{center}[]{\mpr@centertrue} \define@key {mpr}{width}{} \define@key {mpr}{before}{#1} \define@key {mpr}{narrower}{} \define@key {mpr}{leftskip}{} \define@key {mpr}{rightskip}{} \def\mpr@N{N}\def\mpr@C{C}\def\mpr@R{R}\def\mpr@L{L}\let\mpr@label\mpr@N \def\mpr@set@name#1{\def \@rule@name {\mpr@name{#1}}} \define@key {mpr}{lab}{\let\mpr@label\mpr@C\mpr@set@name{#1}} \define@key {mpr}{Lab}{\let\mpr@label\mpr@C\mpr@set@name{#1}} \define@key {mpr}{left}{\let\mpr@label\mpr@L\mpr@set@name{#1}} \define@key {mpr}{Left}{\let\mpr@label\mpr@L\mpr@set@name{#1}} \define@key {mpr}{Right}{\let\mpr@label\mpr@R\mpr@set@name{#1}} \define@key {mpr}{right}{\let\mpr@label\mpr@R\mpr@set@name{#1}} \define@key {mpr}{vdots}{\mpr@vdotstrue\def\mpr@vdots{#1}} \define@key {mpr}{after}{} \define@key {mpr}{fraction}{\hva@warn{fraction key ignored (mathpartir)}} \define@key {mpr}{myfraction}{\hva@warn{myfraction key ignored (mathpartir)}} %%%%Synonyms \@ifundefined{infer}{\let\infer\inferrule}{} \@ifundefined{infer*}{\let\infer*\inferrule*}{} %%%Label formatting \newcommand {\tir@name}[1]{\textsc{\scriptsize {#1}}} \let\RefTirName\tir@name \let\TirName\tir@name \endinput hevea-2.09/html/report.hva0000644004317100512160000000002006714547664015554 0ustar marangetcristal\input{book.hva}hevea-2.09/html/symb-eng.hva0000644004317100512160000000000010376357564015755 0ustar marangetcristalhevea-2.09/html/sword.hva0000644004317100512160000000024607356035522015375 0ustar marangetcristal\@primitives{sword} \def\swEXT{.gif} %graphics extension \def\swFRAME#1{\imgsrc{#1\swEXT}} \newcommand{\swUNICODE}[2]{{\@nostyle\@print{&#}\@getprint{#2}\@print{;}}}hevea-2.09/html/fancyvrb.hva0000644004317100512160000001104212017660721016040 0ustar marangetcristal\@primitives{fancyvrb} \usepackage{keyval} %%%%%%%% Helper \def\verb@table#1{\@open{table}{#1}\@open{tr}{}\@open{td}{}} \def\verb@elbat{\@close{td}\@close{tr}\@close{table}} %%%%%%%%% Font size \define@key{fancyvrb}{fontsize}{\def\verb@size{#1}} \def\verb@size{} \define@key{fancyvrb}{fontshape}{\def\verb@shape{\csname #1shape\endcsname}} \def\verb@shape{} %%%%%%% Labels \def\verb@label@ #1{\@open{tr}{}\@open{th}{style="text-align:center" colspan=3}#1\@close{th}\@close{tr}} \def\verb@toplabel{}\def\verb@bottomlabel{} \def\verb@deftop#1{\def\verb@toplabel{\ifverb@top\verb@horiz@line\verb@label@{#1}\fi}} \def\verb@defbottom#1{\def\verb@bottomlabel{\ifverb@bottom\verb@label@{#1}\verb@horiz@line\fi}} \newcommand{\verb@labelkey}[2][] {\def\verb@test{#1}% \ifx\verb@test\@empty\def\verb@label{#2}\else \def\verb@label{#1}\def\verb@labelbis{#2}\fi} \newcommand{\verb@labels}[2][] {\def\verb@test{#1}% \ifx\verb@test\@empty\verb@deftop{#2}\else \verb@deftop{#1}\verb@defbottom{#2}\fi} \define@key{fancyvrb}{label}{\@callopt{\verb@labelkey}{#1}} \def\verb@labelpos{default} \define@key{fancyvrb}{labelposition}{\def\verb@labelpos{#1}} %%%%%%% Framing \def\verb@framesize{2} \define@key{fancyvrb}{framerule}{\def\verb@framesize{\@getlength{#1}}} \def\verb@framesep{1} \define@key{fancyvrb}{framesep}{\def\verb@framesep{\@getlength{#1}}} \def\verb@rulecolor{black} \def\verb@rulecolor@key #1{\def\verb@rulecolor{{\let\color\@getcolor#1}}} \define@key{fancyvrb}{rulecolor}{\verb@rulecolor@key{#1}} \def\verb@fillcolor@key #1{\def\verb@fillcolor{{\let\color\@getcolor{}BGCOLOR=#1{}}}} \define@key{fancyvrb}{fillcolor}{\verb@fillcolor@key{#1}} \def\verb@fillcolor{} \def\verb@horiz@line {\@open{tr}{}\verb@vert@line[3]\@close{tr}} \newcommand{\verb@vert@line}[1][1] {\@open{td}{style="background-color:\verb@rulecolor{}" colspan="\@getprint{#1}"}% \verb@table{style="border-spacing:\verb@framesize;border:0;border-collapse:separate" class="cellpadding0"} \verb@elbat\@close{td}} \define@key{fancyvrb}{frame}{\def\verb@frame{#1}} \def\verb@frame{none} \def\begin@frame@{\@open{table}{style="border:0;border-spacing:0" class="cellpadding0"}\verb@toplabel\@open{tr}{}\@open{td}{}\@open{table}{\@getprint{\verb@fillcolor} style="border:0;border-spacing:0" class="cellpadding0" }\ifverb@top\verb@horiz@line\fi\@open{tr}{}\ifverb@left\verb@vert@line\fi\@open{td}{}\@open{table}{style="border:0;border-spacing:0"}\@open{tr}{}\@open{td}{style="padding:\verb@framesep"}} \def\end@frame@{\@close{td}\@close{tr}\@close{table}\@close{td}\ifverb@right\verb@vert@line\fi\@close{tr}\ifverb@bottom\verb@horiz@line\fi\@close{table}\@close{td}\@close{tr}\verb@bottomlabel\@close{table}} \newif\ifverb@left\newif\ifverb@bottom\newif\ifverb@top\newif\ifverb@right \def\reset@frame {\setcounter{verb@count}{0}% \verb@leftfalse\verb@bottomfalse\verb@topfalse\verb@rightfalse% \def\verb@toplabel{}\def\verb@bottomlabel{}} \def\verb@labelmaker#1#2{\ifu#2\else#1#2\fi} \def\check@labels {\ifthenelse{\equal{\verb@labelpos}{topline}} {\verb@labelmaker{\verb@deftop}{\verb@label}}{}% \ifthenelse{\equal{\verb@labelpos}{bottomline}} {\verb@labelmaker{\verb@defbottom}{\verb@label}% \verb@labelmaker{\verb@defbottom}{\verb@labelbis}}{}% \ifthenelse{\equal{\verb@labelpos}{all}} {\verb@labelmaker{\verb@deftop}{\verb@label}% \verb@labelmaker{\verb@defbottom}{\verb@label}% \verb@labelmaker{\verb@defbottom}{\verb@labelbis}}{}% \ifthenelse{\equal{\verb@labelpos}{default}} {\verb@labelmaker{\verb@deftop}{\verb@label}% \verb@labelmaker{\verb@defbottom}{\verb@labelbis}}{}} \def\check@frame {\reset@frame% \ifthenelse{\equal{\verb@frame}{lines}}{\verb@toptrue\verb@bottomtrue}{}% \ifthenelse{\equal{\verb@frame}{leftline}}{\verb@lefttrue}{}% \ifthenelse{\equal{\verb@frame}{topline}}{\verb@toptrue}{}% \ifthenelse{\equal{\verb@frame}{bottomline}}{\verb@bottomtrue}{}% \ifthenelse{\equal{\verb@frame}{single}} {\verb@toptrue\verb@bottomtrue\verb@lefttrue\verb@righttrue}{}% \ifthenelse{\equal{\verb@frame}{none}} {\let\begin@frame\@empty\let\end@frame\@empty} {\check@labels\let\begin@frame\begin@frame@\let\end@frame\end@frame@}} %%%%%%%%% Line numbers \newcounter{verb@count} \newcommand{\verb@startline}{\stepcounter{verb@count}\theverb@count} %%%%%%%%%% User command \newcommand{\fvset}[1]{\@setkeys{fancyvrb}{#1}} \newenvironment{Verbatim}[1][] {\@setkeys{fancyvrb}{#1}% \def\endVerbatim{\@endVerbatim\end@frame}% \check@frame\begin@frame\verb@shape\verb@size\@Verbatim} {} \newcommand{\VerbatimInput}[1] {\@scaninput{\begin{Verbatim}}{#1}{\end{Verbatim}}} hevea-2.09/html/fancysection.hva0000644004317100512160000000601512021655445016721 0ustar marangetcristal\@ifundefined{@base}{\typeout{'fancysection.hva' must be loaded after base style}\endinput}{} \usepackage{color} %%% Color section \def\fcs@hue{} \newcommand{\colorsections}[1]{ \def\fcs@hue{#1}% \definecolor{visited}{hsv}{#1,1,.4} \definecolor{link}{hsv}{#1,1,.7} \definecolor{hover}{hsv}{#1,.4,1} \definecolor{title}{hsv}{#1,1,.7} \definecolor{titlemain}{hsv}{#1,1,.7} \definecolor{titlerest}{hsv}{#1,1,.7} \definecolor{part}{hsv}{#1, 1, .8} \ifthenelse{\equal{\@base}{article}}{% \definecolor{section}{hsv}{#1, .8, .9}% \definecolor{subsection}{hsv}{#1, .6, 1}% \definecolor{subsubsection}{hsv}{#1, .4, 1}% \definecolor{paragraph}{hsv}{#1, .2, 1}% }{% \definecolor{chapter}{hsv}{#1, .8, .9}% \definecolor{section}{hsv}{#1, .6, 1}% \definecolor{subsection}{hsv}{#1, .5, 1}% \definecolor{subsubsection}{hsv}{#1, .4, 1}% }% \definecolor{paragraph}{hsv}{#1, .2, 1}}% \colorsections{120}% %% \renewcommand{\@bibtagstyle}{\@span{style="color:\@getstylecolor{visited}"}}% %% Define sectioning comands \AtBeginDocument {\newstyle{body}{background-color:white}% \newstyle{a:link} {color:\@getstylecolor{link};text-decoration:underline;} \newstyle{a:visited} {color:\@getstylecolor{visited};text-decoration:underline;} \newstyle{a:hover} {color:black;text-decoration:none;background-color:\@getstylecolor{hover}} \newstyle{.title} {background-color:\@getstylecolor{title}}% \newstyle{.titlemain} {background-color:\@getstylecolor{titlemain}}% \newstyle{.titlerest} {ackground-color:\@getstylecolor{titlerest}}% \newstyle{.part} {padding:1ex;background-color:\@getstylecolor{part}}% \newstyle{.section} {padding:.5ex;background-color:\@getstylecolor{section}}% \newstyle{.subsection} {padding:0.3ex;background-color:\@getstylecolor{subsection}}% \newstyle{.subsubsection} {padding:0.5ex;background-color:\@getstylecolor{subsubsection}}% \newstyle{.paragraph} {padding:0.5ex;background-color:\@getstylecolor{paragraph}}% \ifthenelse{\equal{\@base}{book}} {\newstyle{.chapter}{padding:0.5ex;background-color:\@getstylecolor{chapter}}} {}% \newstyle{.fmarginpar} {border:solid thin \@getstylecolor{subsection}; width:20\%; text-align:left}% \newstyle{.ffootnoterule} {border:none;margin:1em auto 1em 0px;width:50\%;background-color:\@getstylecolor{part}}} \setenvclass{marginpar}{fmarginpar} \setenvclass{footnoterule}{ffootnoterule} \newcounter{tocstyle} \renewenvironment{tocenv} {\setenvclass{itemize}{ftoc\thetocstyle}% \setenvclass{li-itemize}{\getenvclass{li-toc}}% \stepcounter{tocstyle}% \begin{itemize}} {\end{itemize}\addtocounter{tocstyle}{-1}} \newcommand{\newftocstyle}[3][0ex] {\newstyle{.ftoc#2}{list-style:none;margin:#1 1ex;padding:0ex 1ex;border-left:1ex solid \@getstylecolor{#3}}} \AtBeginDocument {\newftocstyle{1}{part}% \ifthenelse{\equal{\@base}{book}} {\newftocstyle[1ex]{2}{chapter}\newftocstyle{3}{section}% \newftocstyle{4}{subsection}% \newftocstyle{5}{subsubsection}% \newftocstyle{6}{paragraph}} {\newftocstyle[1ex]{2}{section}% \newftocstyle{3}{subsection}% \newftocstyle{4}{subsubsection}% \newftocstyle{5}{paragraph}}} hevea-2.09/html/german.hva0000644004317100512160000000060510237656625015514 0ustar marangetcristal%%%% Hevea support for babel option 'german'. \@ifundefined{common@german@babel}{\input{german-common.hva}}{} \newcommand{\german@babel}{% \common@german@babel% \def\glqq{\@print{„}}% \def\grqq{\@print{“}}% \def\glq{\@print{‚}}% \def\grq{\@print{‘}}% \def\flqq{\@print{«}}% \def\frqq{\@print{»}}% \def\flq{\@print{‹}}% \def\frq{\@print{›}}} hevea-2.09/html/urlhref.hva0000644004317100512160000000024007114732007015672 0ustar marangetcristal\@stopimage\@stopoutput% \usepackage{url} \def\url{\begingroup% \def\UrlLeft##1\UrlRight{\ahrefurl{##1}}% \urlstyle{tt}% \Url} \@restartoutput\@restartimage% hevea-2.09/html/undersection.hva0000644004317100512160000000503612021655445016740 0ustar marangetcristal\@ifundefined{@base}{\typeout{'undersection.hva' must be loaded after base style}\endinput}{} \usepackage{color} %%Colors (gray) \definecolor{visited}{gray}{0.0}% \definecolor{link}{gray}{0.35}% \definecolor{hover}{gray}{0.7}% \definecolor{part}{gray}{0.0}% \ifthenelse{\equal{\@base}{article}}{% \definecolor{section}{gray}{0.2}% \definecolor{subsection}{gray}{0.4}% \definecolor{subsubsection}{gray}{0.6} \definecolor{paragraph}{gray}{0.7}}{% \definecolor{chapter}{gray}{0.2}% \definecolor{section}{gray}{0.4}% \definecolor{subsection}{gray}{0.6}% \definecolor{subsubsection}{gray}{0.7}% \definecolor{paragraph}{gray}{0.8}}% %% Section style \AtBeginDocument {\newstyle{body}{margin-left:2ex;margin-right:2ex;background-color:white}% \newstyle{a:link}{color:\@getstylecolor{link};text-decoration:underline;} \newstyle{a:visited} {color:\@getstylecolor{visited};text-decoration:underline;} \newstyle{a:hover} {color:black;text-decoration:none;background-color:\@getstylecolor{hover}} \newstyle{.title}{border-top:solid 4px;border-bottom:solid 4px;}% \newstyle{.titlemain}{}% \newstyle{.titlerest}{}% \newstyle{.part}{padding:1ex;border-bottom:solid 4px;} \newstyle{.section}{padding:0.5ex 0ex;border-bottom:solid 3px;} \newstyle{.subsection}{padding:0.5ex 0ex;border-bottom:solid 2px;} \newstyle{.subsubsection}{margin:0.5ex 0ex;padding:0.5ex 0ex;border-bottom:solid 1px;display:inline-block;} \newstyle{.paragraph}{margin:0.5 0ex;padding:0.5ex 0ex;border-bottom:solid 2px;display:inline-block;} \ifthenelse{\equal{\@base}{book}} {\newstyle{.chapter}{padding:0.5ex 0ex;border-bottom:solid 3px;}} {}% \newstyle{.fmarginpar}{border:solid thin black; width:20\%; text-align:left}% \newstyle{.ffootnoterule}{border:none;margin:1em auto 1em 0px;width:50\%;background-color:black;} \setenvclass{marginpar}{fmarginpar} \setenvclass{footnoterule}{ffootnoterule}} \newcounter{tocstyle} \renewenvironment{tocenv} {\setenvclass{itemize}{ftoc\thetocstyle}% \setenvclass{li-itemize}{\getenvclass{li-toc}}% \stepcounter{tocstyle}% \begin{itemize}} {\end{itemize}\addtocounter{tocstyle}{-1}} \newcommand{\newftocstyle}[3][0ex] {\newstyle{.ftoc#2}{list-style:none;margin:#1 1ex;padding:0ex 1ex;border-left:1ex solid \@getstylecolor{#3}}} \AtBeginDocument {\newftocstyle{1}{part}% \ifthenelse{\equal{\@base}{book}} {\newftocstyle{2}{chapter}\newftocstyle{3}{section}% \newftocstyle{4}{subsection}% \newftocstyle{5}{subsubsection}% \newftocstyle{6}{paragraph}} {\newftocstyle{2}{section}% \newftocstyle{3}{subsection}% \newftocstyle{4}{subsubsection}% \newftocstyle{5}{paragraph}}} hevea-2.09/html/graphicx.hva0000644004317100512160000000055710723547637016060 0ustar marangetcristal\usepackage{commongraphic} %%% Graphicx specific part \usepackage{keyval} \@imagecommand{\includegraphics} {\execafter\imageflush\execafter\@image@filearg\@imageopt} \@imagecommand{\includegraphics*} {\execafter\imageflush\execafter\@image@filearg\@imageopt} \@imagecommand{\rotatebox} {\execafter\imageflush\execafter\@imagearg\execafter\@imagearg\@imageopt} hevea-2.09/html/graphics.hva0000644004317100512160000000053210723547637016044 0ustar marangetcristal\usepackage{commongraphic} \@imagecommand{\includegraphics} {\execafter{\imageflush{}}\execafter\@image@filearg\execafter\@imageopt\@imageopt} \@imagecommand{\includegraphics*} {\execafter{\imageflush{}}\execafter\@image@filearg\execafter\@imageopt\@imageopt} \@imagecommand{\rotatebox} {\execafter\imageflush\execafter\@imagearg\@imagearg}hevea-2.09/html/amssymb.hva0000644004317100512160000005115610702502410015700 0ustar marangetcristal\usepackage{latexsym} \usepackage{amsfonts} %%%%%%%% From entity list \newcommand{\DeclareSymbolAMS}[3][] {\DeclareSymbolHtml{#2}{#3}% \def\@tmp{#1}% \ifx\@empty\@tmp\else\DeclareNot{#1}{#3}\fi} \DeclareSymbolAMS{\vartriangle}{X25B5} \DeclareSymbolAMS{\triangledown}{X25BF} \DeclareSymbolAMS{\blacksquare}{X25AA} \DeclareSymbolAMS{\blacktriangle}{X25B4} \DeclareSymbolAMS{\blacktriangledown}{X25BE} \DeclareSymbolAMS{\blacktriangleleft}{X25C2} \DeclareSymbolAMS{\blacktriangleright}{X25B8} \DeclareSymbolAMS{\lozenge}{X25CA} \DeclareSymbolAMS{\blacklozenge}{X2726} \DeclareSymbolAMS{\bigstar}{X2605} \DeclareSymbolAMS{\centerdot}{X00B7} \DeclareSymbolAMS{\circledR}{X00AE} \DeclareSymbolAMS{\sphericalangle}{X2222} \DeclareSymbolAMS{\because}{X2235} \DeclareSymbolAMS{\square}{X25AB} \DeclareSymbolAMS{\therefore}{X2234} \DeclareSymbolAMS{\digamma}{X03DC} \DeclareSymbolAMS{\varkappa}{X03F0} \DeclareSymbolAMS{\measuredangle}{X2221} \DeclareSymbolAMS{\beth}{X2136} \DeclareSymbolAMS[\@print{`}]{\backprime}{X2035} \DeclareSymbolAMS{\complement}{X2201} \DeclareSymbolAMS{\daleth}{X2138} \DeclareSymbolAMS{\gimel}{X2137} \DeclareSymbolAMS{\nexists}{X2204} \DeclareSymbolAMS{\circledS}{X24C8} \DeclareSymbolAMS{\smallsetminus}{XFE68} \DeclareSymbolAMS{\doublebarwedge}{X2306} \DeclareSymbolAMS{\barwedge}{X22BC} \DeclareSymbolAMS{\doublecap}{X22D2} \DeclareSymbolAMS{\Cap}{X22D2} \DeclareSymbolAMS{\doublecup}{X22D3} \DeclareSymbolAMS{\Cup}{X22D3} \DeclareSymbolAMS{\curlyvee}{X22CE} \DeclareSymbolAMS{\curlywedge}{X22CF} \DeclareSymbolAMS{\divideontimes}{X22C7} \DeclareSymbolAMS{\intercal}{X22BA} \DeclareSymbolAMS{\leftthreetimes}{X22CB} \DeclareSymbolAMS{\ltimes}{X22C9} \DeclareSymbolAMS{\boxminus}{X229F} \DeclareSymbolAMS{\circledast}{X229B} \DeclareSymbolAMS{\circledcirc}{X229A} \DeclareSymbolAMS{\circleddash}{X229D} \DeclareSymbolAMS{\boxplus}{X229E} \DeclareSymbolAMS{\dotplus}{X2214} \DeclareSymbolAMS{\rightthreetimes}{X22CC} \DeclareSymbolAMS{\rtimes}{X22CA} \DeclareSymbolAMS{\boxdot}{X22A1} \DeclareSymbolAMS{\boxtimes}{X22A0} \DeclareSymbolAMS{\approxeq}{X224A} \DeclareSymbolAMS{\backepsilon}{X220D} \DeclareSymbolAMS{\backsim}{X223D} \DeclareSymbolAMS{\backsimeq}{X22CD} \DeclareSymbolAMS{\Bumpeq}{X224E} \DeclareSymbolAMS{\bumpeq}{X224F} \DeclareSymbolAMS{\circeq}{X2257} \DeclareSymbolAMS{\curlyeqprec}{X22DE} \DeclareSymbolAMS{\curlyeqsucc}{X22DF} \DeclareSymbolAMS{\preccurlyeq}{X227C} \DeclareSymbolAMS{\eqcirc}{X2256} \DeclareSymbolAMS{\Doteq}{X2251} \DeclareSymbolAMS{\doteqdot}{X2251} \DeclareSymbolAMS{\fallingdotseq}{X2252} \DeclareSymbolAMS{\eqslantgtr}{X22DD} \DeclareSymbolAMS{\eqslantless}{X22DC} \DeclareSymbolAMS{\risingdotseq}{X2253} \DeclareSymbolAMS{\pitchfork}{X22D4} \DeclareSymbolAMS{\gtrapprox}{X2273} \DeclareSymbolAMS{\gtrdot}{X22D7} \DeclareSymbolAMS{\geqq}{X2267} \DeclareSymbolAMS{\gtreqless}{X22DB} \DeclareSymbolAMS{\gtreqqless}{X2A8C} \DeclareSymbolAMS{\gggtr}{X22D9} \DeclareSymbolAMS{\ggg}{X22D9} \DeclareSymbolAMS{\gtrless}{X2277}\DeclareNot{\gtrless}{X2279} \DeclareSymbolAMS{\gtrsim}{X2273}\DeclareNot{\gtrsim}{X2275} \DeclareSymbolAMS{\lessapprox}{X2272}\DeclareNot{\lessapprox}{X2274} \DeclareSymbolAMS{\lessdot}{X22D6} \DeclareSymbolAMS{\leqq}{X2266} \DeclareSymbolAMS{\lesseqqgtr}{X2A8B} \DeclareSymbolAMS{\lesseqgtr}{X22DA} \DeclareSymbolAMS{\lessgtr}{X2276}\DeclareNot{\lessgtr}{X2278} \DeclareSymbolAMS{\llless}{X22D8} \DeclareSymbolAMS{\lll}{X22D8} \DeclareSymbolAMS{\lesssim}{X2272} \DeclareSymbolAMS{\trianglelefteq}{X22B4} \DeclareSymbolAMS{\precapprox}{X227E} \DeclareSymbolAMS{\precsim}{X227E} \DeclareSymbolAMS{\trianglerighteq}{X22B5} \DeclareSymbolAMS{\succapprox}{X227F} \DeclareSymbolAMS{\succcurlyeq}{X227D} \DeclareSymbolAMS{\succsim}{X227F} %\DeclareSymbolAMS{\smallfrown}{XE426} %\DeclareSymbolAMS{\shortmid}{XE301} %\DeclareSymbolAMS{\shortparallel}{XE302} %\DeclareSymbolAMS{\smallsmile}{XE303} %\DeclareSymbolAMS{\thickapprox}{XE306} %\DeclareSymbolAMS{\thicksim}{XE429} \DeclareSymbolAMS{\triangleq}{X225C} \DeclareSymbolAMS{\between}{X226C} \DeclareSymbolAMS{\Vdash}{X22A9} \DeclareSymbolAMS{\vDash}{X22A8} \DeclareSymbolAMS{\veebar}{X22BB} \DeclareSymbolAMS{\vartriangleleft}{X22B2}\DeclareNot{\vartriangleleft}{X22EA} \DeclareSymbolAMS{\varpropto}{X221D} \DeclareSymbolAMS{\vartriangleright}{X22B3}\DeclareNot{\vartriangleleft}{X22EB} \DeclareSymbolAMS{\Vvdash}{X22AA} \DeclareSymbolAMS{\gneq}{X2A88} \DeclareSymbolAMS{\gneqq}{X2269} \DeclareSymbolAMS{\gnsim}{X22E7} \DeclareSymbolAMS{\lneqq}{X2268} \DeclareSymbolAMS{\lneq}{X2A87} \DeclareSymbolAMS{\lnsim}{X22E6} \DeclareSymbolAMS[\cong]{\ncong}{X2247} \DeclareSymbolAMS[\geq]{\ngeq}{X2271} \DeclareSymbolAMS{\ngtr}{X226F} \DeclareSymbolAMS[\leq]{\nleq}{X2270} \DeclareSymbolAMS[<]{\nless}{X226E} \DeclareSymbolAMS[\triangleleft]{\ntriangleleft}{X22EA} \DeclareSymbolAMS[\trianglelefteq]{\ntrianglelefteq}{X22EC} \DeclareSymbolAMS[\mid]{\nmid}{X2224} \DeclareSymbolAMS[\parallel]{\nparallel}{X2226} \DeclareSymbolAMS[\prec]{\nprec}{X2280} \DeclareSymbolAMS[\preceq]{\npreceq}{X22E0} \DeclareSymbolAMS[\triangleright]{\ntriangleright}{X22EB} \DeclareSymbolAMS[\trianglerighteq]{\ntrianglerighteq}{X22ED} \DeclareSymbolAMS[\succ]{\nsucc}{X2281} \DeclareSymbolAMS[\succeq]{\nsucceq}{X22E1} \DeclareSymbolAMS[\sim]{\nsim}{X2241} %\DeclareSymbolAMS{\nshortmid}{XE2AA} %\DeclareSymbolAMS{\nshortparallel}{XE2AB} \DeclareSymbolAMS[\vdash]{\nvdash}{X22AC} \DeclareSymbolAMS[\vDash]{\nvDash}{X22AD} \DeclareSymbolAMS[\VDash]{\nVDash}{X22AF} \DeclareSymbolAMS[\Vdash]{\nVdash}{X22AE} \DeclareSymbolAMS{\precnapprox}{X22E8} %\DeclareSymbolAMS{\precneqq}{XE2B3} \DeclareSymbolAMS{\precnsim}{X22E8} \DeclareSymbolAMS{\succnapprox}{X22E9} %\DeclareSymbolAMS{\succneqq}{XE2B5} \DeclareSymbolAMS{\succnsim}{X22E9} \DeclareSymbolAMS{\curvearrowleft}{X21B6} \DeclareSymbolAMS{\curvearrowright}{X21B7} \DeclareSymbolAMS{\downdownarrows}{X21CA} \DeclareSymbolAMS{\downharpoonleft}{X21C3} \DeclareSymbolAMS{\downharpoonright}{X21C2} \DeclareSymbolAMS{\Lleftarrow}{X21DA} \DeclareSymbolAMS{\twoheadleftarrow}{X219E} \DeclareSymbolAMS{\leftleftarrows}{X21C7} \DeclareSymbolAMS{\looparrowleft}{X21AB} \DeclareSymbolAMS{\leftarrowtail}{X21A2} \DeclareSymbolAMS{\leftrightarrows}{X21C6} \DeclareSymbolAMS{\rightleftarrows}{X21C4} \DeclareSymbolAMS{\leftrightsquigarrow}{X21AD} \DeclareSymbolAMS{\leftrightharpoons}{X21CB} \DeclareSymbolAMS{\Lsh}{X21B0} \DeclareSymbolAMS{\multimap}{X22B8} \DeclareSymbolAMS{\nLeftarrow}{X21CD} \DeclareSymbolAMS{\nleftarrow}{X219A} \DeclareSymbolAMS{\nLeftrightarrow}{X21CE} \DeclareSymbolAMS{\nleftrightarrow}{X21AE} \DeclareSymbolAMS{\nrightarrow}{X219B} \DeclareSymbolAMS{\nRightarrow}{X21CF} \DeclareSymbolAMS{\circlearrowleft}{X21BA} \DeclareSymbolAMS{\circlearrowright}{X21BB} \DeclareSymbolAMS{\Rrightarrow}{X21DB} \DeclareSymbolAMS{\twoheadrightarrow}{X21A0} \DeclareSymbolAMS{\rightrightarrows}{X21C9} \DeclareSymbolAMS{\looparrowright}{X21AC} \DeclareSymbolAMS{\rightarrowtail}{X21A3} \DeclareSymbolAMS{\rightsquigarrow}{X21DD} \DeclareSymbolAMS{\Rsh}{X21B1} \DeclareSymbolAMS{\upuparrows}{X21C8} \DeclareSymbolAMS{\upharpoonleft}{X21BF} \DeclareSymbolAMS{\upharpoonright}{X21BE} \DeclareSymbolAMS{\eth}{XF0} \DeclareSymbolAMS{\dashleftarrow}{X21E0} \DeclareSymbolAMS{\dasharrow}{X21E2} \DeclareSymbolAMS{\dashrightarrow}{X21E2} %%Those missing ! \DeclareSymbolHtml{\Finv}{8498} \DeclareSymbolHtml{\Game}{3629} \DeclareSymbolHtml{\Bbbk}{409} \DeclareSymbolHtml{\hslash}{8463} \DeclareSymbolHtml{\varnothing}{X2205} \DeclareSymbolHtml{\diagup}{X5C} \DeclareSymbolHtml{\diagdown}{X2F} \DeclareSymbolHtml{\leqslant}{X2A7D} \DeclareSymbolHtml{\geqslant}{X2A7E} \DeclareSymbolHtml{\lnapprox}{X2A87} \DeclareSymbolHtml{\gnapprox}{X2A8A} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Table 66: AMS Subset and Superset Relations % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%sub \DeclareSymbolAMS{\Subset}{X22D0} \DeclareSymbolAMS{\subseteqq}{X2AC5} \DeclareSymbolAMS[\subseteq]{\nsubseteq}{X2288} \DeclareSymbolAMS{\subsetneq}{X228A} \DeclareSymbolAMS{\subsetneqq}{X2ACB} %%sup \DeclareSymbolAMS{\Supset}{X22D1} \DeclareSymbolAMS{\supseteqq}{X2AC6} \DeclareSymbolAMS[\supseteq]{\nsupseteq}{X2289} \DeclareSymbolAMS{\supsetneq}{X228B} \DeclareSymbolAMS{\supsetneqq}{X2ACC} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Table 4: Commands Defined to Work in Both Math and Text Mode %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml{\checkmark}{X2713} \@Let\circledR\textregistered \DeclareSymbolHtml{\maltese}{X2720} \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Table 40: AMS Binary Operators % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareSymbolHtml{\barwedge}{X22BC} \DeclareSymbolHtml{\boxdot}{8865} \DeclareSymbolHtml{\boxminus}{8863} \DeclareSymbolHtml{\boxtimes}{8864} \DeclareSymbolHtml{\boxplus}{8862} \DeclareSymbolHtml{\Cap}{8914} \@Let\centerdot\cdot \DeclareSymbolHtml{\circledast}{8859} \DeclareSymbolHtml{\circleddash}{8861} \DeclareSymbolHtml{\circledcirc}{8858} \DeclareSymbolHtml{\Cup}{8915} \DeclareSymbolHtml{\curlywedge}{8911} \DeclareSymbolHtml{\curlyvee}{8910} \DeclareSymbolHtml{\divideontimes}{8903} \DeclareSymbolHtml{\dotplus}{8724} \DeclareSymbolHtml{\doublebarwedge}{X2305} \DeclareSymbolHtml{\intercal}{X22BA} \DeclareSymbolHtml{\leftthreetimes}{8907} \DeclareSymbolHtml{\rightthreetimes}{8908} \DeclareSymbolHtml{\veebar}{8891} \DeclareSymbolHtml{\ltimes}{8905} \DeclareSymbolHtml{\rtimes}{8906} \DeclareSymbolHtml{\smallsetminus}{XFE68} %% AMSSYMB Binary Operators (Table 8.19 of Goos-Mitt-Sam) % % %% AMSSYMB Misc (Remains of Table 8.7 of Goos-Mitt-Sam) % % %% AMSSYMB Miscellaneous Symbols (Table 8.20 of Goos-Mitt-Sam) % \newcommand{\vartriangle}{\@print{△}} \newcommand{\triangledown}{\@print{▽}} \newcommand{\lozenge}{\@print{◊}} \newcommand{\circledS}{\@print{Ⓢ}} \newcommand{\measuredangle}{\@print{∡}} \newcommand{\nexists}{\@print{∄}} \newcommand{\backprime}{\@print{`}} \newcommand{\blacktriangle}{\@print{▲}} \newcommand{\blacktriangledown}{\@print{▼}} \newcommand{\blacksquare}{\@print{■}} \newcommand{\blacklozenge}{\@print{◆}} \newcommand{\bigstar}{\@print{★}} \newcommand{\sphericalangle}{\@print{∢}} \newcommand{\complement}{\@print{ʗ}} \newcommand{\eth}{\partial} % %% AMSSYMB Arrow Symbols (Table 8.15 of Goos-Mitt-Sam) % \newcommand{\dashleftarrow}{\@print{⇠}} \newcommand{\dashrightarrow}{\@print{⇢}} \newcommand{\leftrightharpoons}{\@print{⇋}} \renewcommand{\rightleftharpoons}{\@print{⇌}} \newcommand{\Lleftarrow}{\@print{⇚}} \newcommand{\Rrightarrow}{\@print{⇛}} \newcommand{\curvearrowleft}{\@print{↶}} \newcommand{\curvearrowright}{\@print{↷}} \newcommand{\leftleftarrows}{\@print{⇇}} \newcommand{\rightrightarrows}{\@print{⇉}} \newcommand{\upuparrows}{\@print{⇈}} \newcommand{\downdownarrows}{\@print{⇊}} \newcommand{\leftrightarrows}{\@print{⇆}} \newcommand{\rightleftarrows}{\@print{⇆}} \newcommand{\leftarrowtail}{\@print{↢}} \newcommand{\rightarrowtail}{\@print{↣}} \newcommand{\looparrowleft}{\@print{↫}} \newcommand{\looparrowright}{\@print{↬}} \newcommand{\twoheadleftarrow}{\@print{↞}} \newcommand{\twoheadrightarrow}{\@print{↠}} \newcommand{\upharpoonleft}{\@print{↿}} \newcommand{\upharpoonright}{\@print{↾}} \newcommand{\downharpoonleft}{\@print{⇃}} \newcommand{\downharpoonright}{\@print{⇂}} \newcommand{\Lsh}{\@print{↰}} \newcommand{\Rsh}{\@print{↱}} \newcommand{\leftrightsquigarrow}{\@print{↭}} \newcommand{\rightsquigarrow}{\@print{⇝}} \newcommand{\circlearrowleft}{\@print{↶}} % EVENTUALLY 10226 \newcommand{\circlearrowright}{\@print{↷}} % EVENTUALLY 10227 \newcommand{\multimap}{\@print{⊸}} % %% AMSSYMB Negated Arrows (Table 8.16 of Goos-Mitt-Sam) % \newcommand{\nleftarrow}{\@print{↚}} \newcommand{\nrightarrow}{\@print{↛}} \newcommand{\nLeftarrow}{\@print{⇍}} \newcommand{\nRightarrow}{\@print{⇏}} \newcommand{\nleftrightarrow}{\@print{↮}} \newcommand{\nLeftrightarrow}{\@print{⇎}} % %% AMSSYMB Relational Symbols % \newcommand{\eqsim}{\@print{≂}} \newcommand{\leqq}{\@print{≦}} \newcommand{\leqslant}{\leq} % \newcommand{\eqslantless}{\@print{⋜}} \newcommand{\lesssim}{\@print{≲}} \newcommand{\lessapprox}{\lesssim} \newcommand{\approxeq}{\@print{≊}} \newcommand{\lessdot}{\@print{⋖}} \newcommand{\lll}{\@print{⋘}} \newcommand{\lessgtr}{\@print{≶}} \newcommand{\lesseqgtr}{\@print{⋚}} \newcommand{\lesseqqgtr}{\lesseqgtr} \newcommand{\doteqdot}{\@print{≑}} \newcommand{\risingdotseq}{\@print{≓}} \newcommand{\fallingdotseq}{\@print{≒}} \newcommand{\backsim}{\@print{∽}} \newcommand{\backsimeq}{\@print{⋍}} \newcommand{\subseteqq}{\subseteq} \newcommand{\Subset}{\@print{⋐}} \newcommand{\preccurlyeq}{\@print{≼}} \newcommand{\curlyeqprec}{\@print{⋞}} \newcommand{\precsim}{\@print{≾}} \newcommand{\precapprox}{\precsim} \newcommand{\vartriangleleft}{\@print{⊲}} \newcommand{\trianglelefteq}{\@print{⊴}} \newcommand{\vDash}{\@print{⊨}} \newcommand{\Vvdash}{\@print{⊪}} \newcommand{\smallsmile}{\@print{}\smile\@print{}} \newcommand{\smallfrown}{\@print{}\frown\@print{}} \newcommand{\bumpeq}{\@print{≏}} \newcommand{\Bumpeq}{\@print{≎}} \newcommand{\geqq}{\@print{≧}} \newcommand{\geqslant}{\geq} \newcommand{\eqslantgtr}{\@print{⋝}} \newcommand{\gtrsim}{\@print{≳}} \newcommand{\gtrapprox}{\gtrsim} \newcommand{\gtrdot}{\@print{⋗}} \newcommand{\ggg}{\@print{⋙}} \newcommand{\gtrless}{\@print{≷}} \newcommand{\gtreqless}{\@print{⋛}} \newcommand{\gtreqqless}{\gtreqless} \newcommand{\eqcirc}{\@print{≖}} \newcommand{\circeq}{\@print{≗}} \newcommand{\triangleq}{\@print{≜}} \newcommand{\thicksim}{\sim} \newcommand{\thickapprox}{\approx} \newcommand{\supseteqq}{\supseteq} \newcommand{\Supset}{\@print{⋑}} \newcommand{\succcurlyeq}{\@print{≽}} \newcommand{\curlyeqsucc}{\@print{⋟}} \newcommand{\succsim}{\@print{≿}} \newcommand{\succapprox}{\succsim} \newcommand{\vartriangleright}{\@print{⊳}} \newcommand{\trianglerighteq}{\@print{⊵}} \newcommand{\Vdash}{\@print{⊩}} \newcommand{\shortmid}{\mid} \newcommand{\shortparallel}{\parallel} \newcommand{\between}{\@print{≬}} \newcommand{\pitchfork}{\@print{⫛}} \newcommand{\varpropto}{\propto} \newcommand{\blacktriangleleft}{\@print{▶}} \newcommand{\therefore}{\@print{∴}} \newcommand{\blacktriangleright}{\@print{◀}} \newcommand{\backepsilon}{\@print{э}} % EVENTUALLY 1014 \newcommand{\because}{\@print{∵}} % %% These will be activated eventually (currently only in 'moreentities' mode) % %\newcommand{\leqslant}{\@print{⩽}} %\newcommand{\geqslant}{\@print{⩾}} %\newcommand{\lesseqqgtr}{\@print{⪋}} %\newcommand{\gtreqqless}{\@print{⪌}} %\newcommand{\lessapprox}{\@print{⪅}} %\newcommand{\gtrapprox}{\@print{⪆}} %\newcommand{\precapprox}{\@print{⪷}} %\newcommand{\succapprox}{\@print{⪸}} %\newcommand{\preccurlyeq}{\@print{≼}} %\newcommand{\succcurlyeq}{\@print{≽}} %\newcommand{\subseteqq}{\@print{⫅}} %\newcommand{\supseteqq}{\@print{⫆}} % \ifmoreentities \renewcommand{\leqslant}{\@print{⩽}} \renewcommand{\geqslant}{\@print{⩾}} \renewcommand{\lesseqqgtr}{\@print{⪋}} \renewcommand{\gtreqqless}{\@print{⪌}} \renewcommand{\lessapprox}{\@print{⪅}} \renewcommand{\gtrapprox}{\@print{⪆}} \renewcommand{\precapprox}{\@print{⪷}} \renewcommand{\succapprox}{\@print{⪸}} \renewcommand{\preccurlyeq}{\@print{≼}} \renewcommand{\succcurlyeq}{\@print{≽}} \renewcommand{\subseteqq}{\@print{⫅}} \renewcommand{\supseteqq}{\@print{⫆}} \fi % %% AMSSYMB Negated Relational Symbols % \newcommand{\nless}{\@print{≮}} \newcommand{\nleq}{\@print{≰}} \newcommand{\nleqslant}{\@print{≰}} % not ideal (\nleq) \newcommand{\nleqq}{\nleq} % not ideal (\nleq) \newcommand{\lneq}{\@print{⪇}} \newcommand{\lneqq}{\@print{≨}} \newcommand{\lvertneqq}{\@print{≨}} % not ideal (lneqq) \newcommand{\lnsim}{\@print{⋦}} \newcommand{\lnapprox}{\@print{⪉}} \newcommand{\nprec}{\@print{⊀}} \newcommand{\npreceq}{\@print{⋠}} % almost \newcommand{\precnsim}{\@print{⋨}} \newcommand{\precnapprox}{\@print{⪹}} \newcommand{\nsim}{\@print{≁}} \newcommand{\nshortmid}{\@print{∤}} % not ideal (\nmid) \newcommand{\nmid}{\@print{∤}} \newcommand{\nvdash}{\@print{⊬}} \newcommand{\nvDash}{\@print{⊭}} \newcommand{\ntriangleleft}{\@print{⋪}} \newcommand{\ntrianglelefteq}{\@print{⋬}} \newcommand{\nsubseteq}{\@print{⊈}} \newcommand{\nsubseteqq}{\nsubseteq} % not ideal \newcommand{\subsetneq}{\@print{⊊}} \newcommand{\varsubsetneq}{\@print{⊊}} % not ideal (subsetneq) \newcommand{\subsetneqq}{\@print{⫋}} \newcommand{\varsubsetneqq}{\subsetneqq} % not ideal (subsetneqq) \newcommand{\ngtr}{\@print{≯}} \newcommand{\ngeq}{\@print{≱}} \newcommand{\ngeqslant}{\@print{≱}} % not ideal (\ngeq) \newcommand{\ngeqq}{\ngeq} % not ideal (\ngeq) \newcommand{\gneq}{\@print{⪈}} \newcommand{\gneqq}{\@print{≩}} \newcommand{\gvertneqq}{\@print{≩}} % not ideal (gneqq) \newcommand{\gnsim}{\@print{⋧}} \newcommand{\gnapprox}{\@print{⪊}} \newcommand{\nsucc}{\@print{⊁}} \newcommand{\nsucceq}{\@print{⋡}} % almost \newcommand{\succnsim}{\@print{⋩}} \newcommand{\succnapprox}{\@print{⪺}} \newcommand{\ncong}{\@print{≇}} \newcommand{\nshortparallel}{\@print{∦}} % not ideal (\nparallel) \newcommand{\nparallel}{\@print{∦}} \newcommand{\nVDash}{\@print{⊯}} \newcommand{\nVdash}{\@print{⊮}} \newcommand{\ntriangleright}{\@print{⋫}} \newcommand{\ntrianglerighteq}{\@print{⋭}} \newcommand{\nsupseteq}{\@print{⊉}} \newcommand{\nsupseteqq}{\nsupseteq} % not ideal \newcommand{\supsetneq}{\@print{⊋}} \newcommand{\varsupsetneq}{\@print{⊋}} % not ideal (supsetneq) \newcommand{\supsetneqq}{\@print{⫖}} \newcommand{\varsupsetneqq}{\supsetneqq} % not ideal (supsetneqq) % %% These will be activated eventually (currently only in 'moreentities' mode) % %\newcommand{\lneq}{\@print{⪇}} %\newcommand{\gneq}{\@print{⪈}} %\newcommand{\precnapprox}{\@print{⪹}} %\newcommand{\succnapprox}{\@print{⪺}} %\newcommand{\lnapprox}{\@print{⪉}} %\newcommand{\gnapprox}{\@print{⪊}} %\newcommand{\subsetneqq}{\@print{⫋}} %\newcommand{\supsetneqq}{\@print{⫖}} %\newcommand{\varsubsetneqq}{\@print{⫋}} % not ideal (subsetneqq) %\newcommand{\varsupsetneqq}{\@print{⫖}} % not ideal (supsetneqq) % \ifmoreentities{ \renewcommand{\lneq}{\@print{⪇}} \renewcommand{\gneq}{\@print{⪈}} \renewcommand{\precnapprox}{\@print{⪹}} \renewcommand{\succnapprox}{\@print{⪺}} \renewcommand{\lnapprox}{\@print{⪉}} \renewcommand{\gnapprox}{\@print{⪊}} \renewcommand{\subsetneqq}{\@print{⫋}} \renewcommand{\supsetneqq}{\@print{⫖}} \renewcommand{\varsubsetneqq}{\@print{⫋}} % not ideal (subsetneqq) \renewcommand{\varsupsetneqq}{\@print{⫖}} % not ideal (supsetneqq) } \else\fi % %% Miscellaneous Symbols under "amssymb" % %\newcommand{\Game}{\@print{&#;}} %\newcommand{\eth}{\@print{&#;}} %\newcommand{\Finv}{\@print{Ⅎ}} %\newcommand{\mho}{\@print{℧}} %\newcommand{\hslash}{\@print{ℏ}} %\newcommand{\backepsilon}{\@print{&#;}} %\newcommand{\circledS}{\@print{&#;}} %\newcommand{\complement}{\@print{⃕}} %\newcommand{\measuredangle}{\@print{⦨}} %\newcommand{\sphericalangle}{\@print{&#;}} %\newcommand{\because}{\@print{⋽}} %\newcommand{\Bbbk}{\@print{𝕜}} %\newcommand{\therefore}{\@print{⋼}} %\newcommand{\between}{\@print{≬}} %\newcommand{\blacktriangleright}{\@print{◀}} %\newcommand{\blacktriangleleft}{\@print{▶}} %\newcommand{\pitchfork}{\@print{⫛}} %\newcommand{\smallsmile}{\@print{⌣}} %\newcommand{\smallfrown}{\@print{⌢}} % %% AMSSYMB Greek and Hebrew % \newcommand{\digamma}{\@print{Ϝ}} \newcommand{\varkappa}{\@print{ϗ}} % EVENTUALLY 1008 \newcommand{\beth}{\@print{ב}} \newcommand{\daleth}{\@print{ד}} \newcommand{\gimel}{\@print{ג}} % \ifmoreentities\renewcommand{\varkappa}{\@print{ϰ}} \fi % %% AMSSYMB delimiters % \newcommand{\ulcorner}{\@print{⌜}} \newcommand{\urcorner}{\@print{⌝}} \newcommand{\llcorner}{\@print{⌞}} \newcommand{\lrcorner}{\@print{⌟}} \fihevea-2.09/html/natbib.hva0000644004317100512160000000100412017660721015462 0ustar marangetcristal\ProvidesPackage{natbib} \input{natbib-common.hva} \renewcommand{\@NAT@os}{{\@nostyle\@print{}}} \renewcommand{\@NAT@cs}{{\@nostyle\@print{}}} \renewcommand{\@biblabel}[1] {\@locname{#1}{\NAT@bibread{#1}\purple\NAT@format@item{#1}{\NAT@num}{\NAT@auth}{\NAT@year}}} \newcommand{\NAT@fmt}[3] {\def\@tmp{#2}\ifx\@tmp\@empty{}???\else\NAT@format@cite{#2}{#3}{#1}\fi} \renewcommand{\@bibref}[3] {\ifciteindex\@locnameref{\NAT@index{#1}}{#1}{\NAT@fmt{#1}{#2}{#3}}% \else\@locref{#1}{\NAT@fmt{#1}{#2}{#3}}\fi} hevea-2.09/html/amsfonts.hva0000644004317100512160000000047010403607715016064 0ustar marangetcristal\def\@mathbb#1{% \ifx#1\@empty\let\@next\@empty\else\@doublestruck#1\let\@next\@mathbb\fi \@next} \newcommand{\mathbb}[1]{\@callprim{\@mathbb}{#1\@print{\@empty}}} \DeclareSymbolHtml{\ulcorner}{X231C} \DeclareSymbolHtml{\urcorner}{X231D} \DeclareSymbolHtml{\llcorner}{X231E} \DeclareSymbolHtml{\lrcorner}{X231F} hevea-2.09/html/colortbl.hva0000644004317100512160000000005107164617332016053 0ustar marangetcristal\usepackage{color} \@primitives{colortbl}hevea-2.09/html/symb-fra.hva0000644004317100512160000000235306740424257015763 0ustar marangetcristal\newcommand{\forall}{\mbox{pour tout}} \newcommand{\exists}{\mbox{il existe}} \newcommand{\clubsuit}{\mbox{trfle}} \newcommand{\diamondsuit}{\mbox{carreau}} \newcommand{\heartsuit}{\mbox{c{\oe}ur}} \newcommand{\spadesuit}{\mbox{pique}} \newcommand{\uparrow}{\mbox{flche en haut}} \newcommand{\downarrow}{\mbox{flche en bas}} \newcommand{\propto}{\mbox{proptionnel }} \newcommand{\partial}{\mbox{d~rond}} \newcommand{\equiv}{\mbox{identique }} \newcommand{\approx}{\mbox{approximativement}} \newcommand{\otimes}{\mbox{croix rond}} \newcommand{\oplus}{\mbox{plus rond}} \newcommand{\cap}{\mbox{inter}} \newcommand{\cup}{\mbox{union}} \newcommand{\supset}{\mbox{contient}} \newcommand{\supseteq}{\mbox{contient ou gal }} \newcommand{\notsubset}{\mbox{ne contient pas}} \newcommand{\subset}{\mbox{inclus dans}} \newcommand{\subseteq}{\mbox{inclus dans ou gal }} \newcommand{\in}{\mbox{appartient }} \newcommand{\notin}{\mbox{n'appartient pas }} \newcommand{\Uparrow}{\mbox{double flche en haut}} \newcommand{\Downarrow}{\mbox{double flche en bas}} \newcommand{\@sum}{\mbox{sum}} \newcommand{\@int}{\mbox{int}} \newcommand{\lceil}{\mbox{lceil}} \newcommand{\lfloor}{\mbox{lfloor}} \newcommand{\rceil}{\mbox{rceil}} \newcommand{\rfloor}{\mbox{rfloor}} hevea-2.09/html/gif.hva0000644004317100512160000000007011330600330014755 0ustar marangetcristal\renewcommand{\heveaimageext}{.gif} \@addimagenopt{-gif}hevea-2.09/html/common-math.hva0000644004317100512160000003412210155346444016455 0ustar marangetcristal%%% File : (htmlgen/html/)math.hva %%% %%% This file is loaded by 'hevea.hva'. %%% However, the commands are called from the respective definitions, %%% which are in amssymb.hva or symb-ent.hva, depending on whether they %%% require the amssymb package or not. %%% %%% 'not currently supported' means that those unicode slots were vacant %%% in the charts at the time this file was written. %%% %%% Blackboard Bold letters (no lowercase) \newcommand{\one@mathbb}[1]{% \ifthenelse{\equal{#1}{A}}{\@print{𝔸}}{% \ifthenelse{\equal{#1}{B}}{\@print{𝔹}}{% \ifthenelse{\equal{#1}{C}}{\@print{𝔺}}{% not currently supported \ifthenelse{\equal{#1}{D}}{\@print{𝔻}}{% \ifthenelse{\equal{#1}{E}}{\@print{𝔼}}{% \ifthenelse{\equal{#1}{F}}{\@print{𝔽}}{% \ifthenelse{\equal{#1}{G}}{\@print{𝔾}}{% \ifthenelse{\equal{#1}{H}}{\@print{𝔿}}{% not currently supported \ifthenelse{\equal{#1}{I}}{\@print{𝕀}}{% \ifthenelse{\equal{#1}{J}}{\@print{𝕁}}{% \ifthenelse{\equal{#1}{K}}{\@print{𝕂}}{% \ifthenelse{\equal{#1}{L}}{\@print{𝕃}}{% \ifthenelse{\equal{#1}{M}}{\@print{𝕄}}{% \ifthenelse{\equal{#1}{N}}{\@print{𝕅}}{% not currently supported \ifthenelse{\equal{#1}{O}}{\@print{𝕆}}{% \ifthenelse{\equal{#1}{P}}{\@print{𝕇}}{% not currently supported \ifthenelse{\equal{#1}{Q}}{\@print{𝕈}}{% not currently supported \ifthenelse{\equal{#1}{R}}{\@print{𝕉}}{% not currently supported \ifthenelse{\equal{#1}{S}}{\@print{𝕊}}{% \ifthenelse{\equal{#1}{T}}{\@print{𝕋}}{% \ifthenelse{\equal{#1}{U}}{\@print{𝕌}}{% \ifthenelse{\equal{#1}{V}}{\@print{𝕍}}{% \ifthenelse{\equal{#1}{W}}{\@print{𝕎}}{% \ifthenelse{\equal{#1}{X}}{\@print{𝕏}}{% \ifthenelse{\equal{#1}{Y}}{\@print{𝕐}}{% \ifthenelse{\equal{#1}{Z}}{\@print{𝕑}}{% not currently supported }}}}}}}}}}}}}}}}}}}}}}}}}}}% %%% %%% Fraktur letters (no lowercase) %%% \newcommand{\one@mathfrak}[1]{% \ifthenelse{\equal{#1}{A}}{\@print{𝔄}}{% \ifthenelse{\equal{#1}{B}}{\@print{𝔅}}{% \ifthenelse{\equal{#1}{C}}{\@print{𝔆}}{% not currently supported \ifthenelse{\equal{#1}{D}}{\@print{𝔇}}{% \ifthenelse{\equal{#1}{E}}{\@print{𝔈}}{% \ifthenelse{\equal{#1}{F}}{\@print{𝔉}}{% \ifthenelse{\equal{#1}{G}}{\@print{𝔊}}{% \ifthenelse{\equal{#1}{H}}{\@print{𝔋}}{% not currently supported \ifthenelse{\equal{#1}{I}}{\@print{𝔌}}{% not currently supported \ifthenelse{\equal{#1}{J}}{\@print{𝔍}}{% \ifthenelse{\equal{#1}{K}}{\@print{𝔎}}{% \ifthenelse{\equal{#1}{L}}{\@print{𝔏}}{% \ifthenelse{\equal{#1}{M}}{\@print{𝔐}}{% \ifthenelse{\equal{#1}{N}}{\@print{𝔑}}{% \ifthenelse{\equal{#1}{O}}{\@print{𝔒}}{% \ifthenelse{\equal{#1}{P}}{\@print{𝔓}}{% \ifthenelse{\equal{#1}{Q}}{\@print{𝔔}}{% \ifthenelse{\equal{#1}{R}}{\@print{𝔕}}{% not currently supported \ifthenelse{\equal{#1}{S}}{\@print{𝔖}}{% \ifthenelse{\equal{#1}{T}}{\@print{𝔗}}{% \ifthenelse{\equal{#1}{U}}{\@print{𝔘}}{% \ifthenelse{\equal{#1}{V}}{\@print{𝔙}}{% \ifthenelse{\equal{#1}{W}}{\@print{𝔚}}{% \ifthenelse{\equal{#1}{X}}{\@print{𝔛}}{% \ifthenelse{\equal{#1}{Y}}{\@print{𝔜}}{% \ifthenelse{\equal{#1}{Z}}{\@print{𝔝}}{% not currently supported \ifthenelse{\equal{#1}{a}}{\@print{𝔞}}{% \ifthenelse{\equal{#1}{b}}{\@print{𝔟}}{% \ifthenelse{\equal{#1}{c}}{\@print{𝔠}}{% \ifthenelse{\equal{#1}{d}}{\@print{𝔡}}{% \ifthenelse{\equal{#1}{e}}{\@print{𝔢}}{% \ifthenelse{\equal{#1}{f}}{\@print{𝔣}}{% \ifthenelse{\equal{#1}{g}}{\@print{𝔤}}{% \ifthenelse{\equal{#1}{h}}{\@print{𝔥}}{% \ifthenelse{\equal{#1}{i}}{\@print{𝔦}}{% \ifthenelse{\equal{#1}{j}}{\@print{𝔧}}{% \ifthenelse{\equal{#1}{k}}{\@print{𝔨}}{% \ifthenelse{\equal{#1}{l}}{\@print{𝔩}}{% \ifthenelse{\equal{#1}{m}}{\@print{𝔪}}{% \ifthenelse{\equal{#1}{n}}{\@print{𝔫}}{% \ifthenelse{\equal{#1}{o}}{\@print{𝔬}}{% \ifthenelse{\equal{#1}{p}}{\@print{𝔭}}{% \ifthenelse{\equal{#1}{q}}{\@print{𝔮}}{% \ifthenelse{\equal{#1}{r}}{\@print{𝔯}}{% \ifthenelse{\equal{#1}{s}}{\@print{𝔰}}{% \ifthenelse{\equal{#1}{t}}{\@print{𝔱}}{% \ifthenelse{\equal{#1}{u}}{\@print{𝔲}}{% \ifthenelse{\equal{#1}{v}}{\@print{𝔳}}{% \ifthenelse{\equal{#1}{w}}{\@print{𝔴}}{% \ifthenelse{\equal{#1}{x}}{\@print{𝔵}}{% \ifthenelse{\equal{#1}{y}}{\@print{𝔶}}{% \ifthenelse{\equal{#1}{z}}{\@print{𝔷}}{% \ifthenelse{\equal{#1}{1}}{\@print{1}}{% \ifthenelse{\equal{#1}{2}}{\@print{2}}{% \ifthenelse{\equal{#1}{3}}{\@print{3}}{% \ifthenelse{\equal{#1}{4}}{\@print{4}}{% \ifthenelse{\equal{#1}{5}}{\@print{5}}{% \ifthenelse{\equal{#1}{6}}{\@print{6}}{% \ifthenelse{\equal{#1}{7}}{\@print{7}}{% \ifthenelse{\equal{#1}{8}}{\@print{8}}{% \ifthenelse{\equal{#1}{9}}{\@print{9}}{% \ifthenelse{\equal{#1}{0}}{\@print{0}}{% }}}}}}}}}}% }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}% %%% %%% Simple Font letters (allows lowercase and digits) %%% \newcommand{\one@mathsf}[1]{% \ifthenelse{\equal{#1}{A}}{\@print{𝖠}}{% \ifthenelse{\equal{#1}{B}}{\@print{𝖡}}{% \ifthenelse{\equal{#1}{C}}{\@print{𝖢}}{% \ifthenelse{\equal{#1}{D}}{\@print{𝖣}}{% \ifthenelse{\equal{#1}{E}}{\@print{𝖤}}{% \ifthenelse{\equal{#1}{F}}{\@print{𝖥}}{% \ifthenelse{\equal{#1}{G}}{\@print{𝖦}}{% \ifthenelse{\equal{#1}{H}}{\@print{𝖧}}{% \ifthenelse{\equal{#1}{I}}{\@print{𝖨}}{% \ifthenelse{\equal{#1}{J}}{\@print{𝖩}}{% \ifthenelse{\equal{#1}{K}}{\@print{𝖪}}{% \ifthenelse{\equal{#1}{L}}{\@print{𝖫}}{% \ifthenelse{\equal{#1}{M}}{\@print{𝖬}}{% \ifthenelse{\equal{#1}{N}}{\@print{𝖭}}{% \ifthenelse{\equal{#1}{O}}{\@print{𝖮}}{% \ifthenelse{\equal{#1}{P}}{\@print{𝖯}}{% \ifthenelse{\equal{#1}{Q}}{\@print{𝖰}}{% \ifthenelse{\equal{#1}{R}}{\@print{𝖱}}{% \ifthenelse{\equal{#1}{S}}{\@print{𝖲}}{% \ifthenelse{\equal{#1}{T}}{\@print{𝖳}}{% \ifthenelse{\equal{#1}{U}}{\@print{𝖴}}{% \ifthenelse{\equal{#1}{V}}{\@print{𝖵}}{% \ifthenelse{\equal{#1}{W}}{\@print{𝖶}}{% \ifthenelse{\equal{#1}{X}}{\@print{𝖷}}{% \ifthenelse{\equal{#1}{Y}}{\@print{𝖸}}{% \ifthenelse{\equal{#1}{Z}}{\@print{𝖹}}{% \ifthenelse{\equal{#1}{a}}{\@print{𝖺}}{% \ifthenelse{\equal{#1}{b}}{\@print{𝖻}}{% \ifthenelse{\equal{#1}{c}}{\@print{𝖼}}{% \ifthenelse{\equal{#1}{d}}{\@print{𝖽}}{% \ifthenelse{\equal{#1}{e}}{\@print{𝖾}}{% \ifthenelse{\equal{#1}{f}}{\@print{𝖿}}{% \ifthenelse{\equal{#1}{g}}{\@print{𝗀}}{% \ifthenelse{\equal{#1}{h}}{\@print{𝗁}}{% \ifthenelse{\equal{#1}{i}}{\@print{𝗂}}{% \ifthenelse{\equal{#1}{j}}{\@print{𝗃}}{% \ifthenelse{\equal{#1}{k}}{\@print{𝗄}}{% \ifthenelse{\equal{#1}{l}}{\@print{𝗅}}{% \ifthenelse{\equal{#1}{m}}{\@print{𝗆}}{% \ifthenelse{\equal{#1}{n}}{\@print{𝗇}}{% \ifthenelse{\equal{#1}{o}}{\@print{𝗈}}{% \ifthenelse{\equal{#1}{p}}{\@print{𝗉}}{% \ifthenelse{\equal{#1}{q}}{\@print{𝗊}}{% \ifthenelse{\equal{#1}{r}}{\@print{𝗋}}{% \ifthenelse{\equal{#1}{s}}{\@print{𝗌}}{% \ifthenelse{\equal{#1}{t}}{\@print{𝗍}}{% \ifthenelse{\equal{#1}{u}}{\@print{𝗎}}{% \ifthenelse{\equal{#1}{v}}{\@print{𝗏}}{% \ifthenelse{\equal{#1}{w}}{\@print{𝗐}}{% \ifthenelse{\equal{#1}{x}}{\@print{𝗑}}{% \ifthenelse{\equal{#1}{y}}{\@print{𝗒}}{% \ifthenelse{\equal{#1}{z}}{\@print{𝗓}}{% \ifthenelse{\equal{#1}{1}}{\@print{1}}{% \ifthenelse{\equal{#1}{2}}{\@print{2}}{% \ifthenelse{\equal{#1}{3}}{\@print{3}}{% \ifthenelse{\equal{#1}{4}}{\@print{4}}{% \ifthenelse{\equal{#1}{5}}{\@print{5}}{% \ifthenelse{\equal{#1}{6}}{\@print{6}}{% \ifthenelse{\equal{#1}{7}}{\@print{7}}{% \ifthenelse{\equal{#1}{8}}{\@print{8}}{% \ifthenelse{\equal{#1}{9}}{\@print{9}}{% \ifthenelse{\equal{#1}{0}}{\@print{0}}{% }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}% %%% %%% Calligraphic letters (no lowercase) %%% \newcommand{\one@mathcal}[1]{% \ifthenelse{\equal{#1}{A}}{\@print{𝒜}}{% \ifthenelse{\equal{#1}{B}}{\@print{𝒝}}{% not currently supported \ifthenelse{\equal{#1}{C}}{\@print{𝒞}}{% \ifthenelse{\equal{#1}{D}}{\@print{𝒟}}{% \ifthenelse{\equal{#1}{E}}{\@print{𝒠}}{% not currently supported \ifthenelse{\equal{#1}{F}}{\@print{𝒡}}{% not currently supported \ifthenelse{\equal{#1}{G}}{\@print{𝒢}}{% \ifthenelse{\equal{#1}{H}}{\@print{𝒣}}{% not currently supported \ifthenelse{\equal{#1}{I}}{\@print{𝒤}}{% not currently supported \ifthenelse{\equal{#1}{J}}{\@print{𝒥}}{% \ifthenelse{\equal{#1}{K}}{\@print{𝒦}}{% \ifthenelse{\equal{#1}{L}}{\@print{𝒧}}{% not currently supported \ifthenelse{\equal{#1}{M}}{\@print{𝒨}}{% not currently supported \ifthenelse{\equal{#1}{N}}{\@print{𝒩}}{% \ifthenelse{\equal{#1}{O}}{\@print{𝒪}}{% \ifthenelse{\equal{#1}{P}}{\@print{𝒫}}{% \ifthenelse{\equal{#1}{Q}}{\@print{𝒬}}{% \ifthenelse{\equal{#1}{R}}{\@print{𝒭}}{% not currently supported \ifthenelse{\equal{#1}{S}}{\@print{𝒮}}{% \ifthenelse{\equal{#1}{T}}{\@print{𝒯}}{% \ifthenelse{\equal{#1}{U}}{\@print{𝒰}}{% \ifthenelse{\equal{#1}{V}}{\@print{𝒱}}{% \ifthenelse{\equal{#1}{W}}{\@print{𝒲}}{% \ifthenelse{\equal{#1}{X}}{\@print{𝒳}}{% \ifthenelse{\equal{#1}{Y}}{\@print{𝒴}}{% \ifthenelse{\equal{#1}{Z}}{\@print{𝒵}}{% \ifthenelse{\equal{#1}{1}}{\@print{1}}{% \ifthenelse{\equal{#1}{2}}{\@print{2}}{% \ifthenelse{\equal{#1}{3}}{\@print{3}}{% \ifthenelse{\equal{#1}{4}}{\@print{4}}{% \ifthenelse{\equal{#1}{5}}{\@print{5}}{% \ifthenelse{\equal{#1}{6}}{\@print{6}}{% \ifthenelse{\equal{#1}{7}}{\@print{7}}{% \ifthenelse{\equal{#1}{8}}{\@print{8}}{% \ifthenelse{\equal{#1}{9}}{\@print{9}}{% \ifthenelse{\equal{#1}{0}}{\@print{0}}{% }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}% %%% %%% Typewriter style letters (allows lowercase and digits) %%% \newcommand{\one@mathtt}[1]{% \ifthenelse{\equal{#1}{A}}{\@print{𝙰}}{% \ifthenelse{\equal{#1}{B}}{\@print{𝙱}}{% \ifthenelse{\equal{#1}{C}}{\@print{𝙲}}{% \ifthenelse{\equal{#1}{D}}{\@print{𝙳}}{% \ifthenelse{\equal{#1}{E}}{\@print{𝙴}}{% \ifthenelse{\equal{#1}{F}}{\@print{𝙵}}{% \ifthenelse{\equal{#1}{G}}{\@print{𝙶}}{% \ifthenelse{\equal{#1}{H}}{\@print{𝙷}}{% \ifthenelse{\equal{#1}{I}}{\@print{𝙸}}{% \ifthenelse{\equal{#1}{J}}{\@print{𝙹}}{% \ifthenelse{\equal{#1}{K}}{\@print{𝙺}}{% \ifthenelse{\equal{#1}{L}}{\@print{𝙻}}{% \ifthenelse{\equal{#1}{M}}{\@print{𝙼}}{% \ifthenelse{\equal{#1}{N}}{\@print{𝙽}}{% \ifthenelse{\equal{#1}{O}}{\@print{𝙾}}{% \ifthenelse{\equal{#1}{P}}{\@print{𝙿}}{% \ifthenelse{\equal{#1}{Q}}{\@print{𝚀}}{% \ifthenelse{\equal{#1}{R}}{\@print{𝚁}}{% \ifthenelse{\equal{#1}{S}}{\@print{𝚂}}{% \ifthenelse{\equal{#1}{T}}{\@print{𝚃}}{% \ifthenelse{\equal{#1}{U}}{\@print{𝚄}}{% \ifthenelse{\equal{#1}{V}}{\@print{𝚅}}{% \ifthenelse{\equal{#1}{W}}{\@print{𝚆}}{% \ifthenelse{\equal{#1}{X}}{\@print{𝚇}}{% \ifthenelse{\equal{#1}{Y}}{\@print{𝚈}}{% \ifthenelse{\equal{#1}{Z}}{\@print{𝚉}}{% \ifthenelse{\equal{#1}{a}}{\@print{𝚊}}{% \ifthenelse{\equal{#1}{b}}{\@print{𝚋}}{% \ifthenelse{\equal{#1}{c}}{\@print{𝚌}}{% \ifthenelse{\equal{#1}{d}}{\@print{𝚍}}{% \ifthenelse{\equal{#1}{e}}{\@print{𝚎}}{% \ifthenelse{\equal{#1}{f}}{\@print{𝚏}}{% \ifthenelse{\equal{#1}{g}}{\@print{𝚐}}{% \ifthenelse{\equal{#1}{h}}{\@print{𝚑}}{% \ifthenelse{\equal{#1}{i}}{\@print{𝚒}}{% \ifthenelse{\equal{#1}{j}}{\@print{𝚓}}{% \ifthenelse{\equal{#1}{k}}{\@print{𝚔}}{% \ifthenelse{\equal{#1}{l}}{\@print{𝚕}}{% \ifthenelse{\equal{#1}{m}}{\@print{𝚖}}{% \ifthenelse{\equal{#1}{n}}{\@print{𝚗}}{% \ifthenelse{\equal{#1}{o}}{\@print{𝚘}}{% \ifthenelse{\equal{#1}{p}}{\@print{𝚙}}{% \ifthenelse{\equal{#1}{q}}{\@print{𝚚}}{% \ifthenelse{\equal{#1}{r}}{\@print{𝚛}}{% \ifthenelse{\equal{#1}{s}}{\@print{𝚜}}{% \ifthenelse{\equal{#1}{t}}{\@print{𝚝}}{% \ifthenelse{\equal{#1}{u}}{\@print{𝚞}}{% \ifthenelse{\equal{#1}{v}}{\@print{𝚟}}{% \ifthenelse{\equal{#1}{w}}{\@print{𝚠}}{% \ifthenelse{\equal{#1}{x}}{\@print{𝚡}}{% \ifthenelse{\equal{#1}{y}}{\@print{𝚢}}{% \ifthenelse{\equal{#1}{z}}{\@print{𝚣}}{% \ifthenelse{\equal{#1}{1}}{\@print{𝟷}}{% \ifthenelse{\equal{#1}{2}}{\@print{𝟸}}{% \ifthenelse{\equal{#1}{3}}{\@print{𝟹}}{% \ifthenelse{\equal{#1}{4}}{\@print{𝟺}}{% \ifthenelse{\equal{#1}{5}}{\@print{𝟻}}{% \ifthenelse{\equal{#1}{6}}{\@print{𝟼}}{% \ifthenelse{\equal{#1}{7}}{\@print{𝟽}}{% \ifthenelse{\equal{#1}{8}}{\@print{𝟾}}{% \ifthenelse{\equal{#1}{9}}{\@print{𝟿}}{% \ifthenelse{\equal{#1}{0}}{\@print{𝟶}}{% }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}% \newcommand{\check}[1]{% \ifthenelse{\equal{#1}{C}}{\@print{Č}}{% \ifthenelse{\equal{#1}{c}}{\@print{č}}{% \ifthenelse{\equal{#1}{D}}{\@print{Ď}}{% \ifthenelse{\equal{#1}{E}}{\@print{Ě}}{% \ifthenelse{\equal{#1}{e}}{\@print{ě}}{% \ifthenelse{\equal{#1}{N}}{\@print{Ň}}{% \ifthenelse{\equal{#1}{n}}{\@print{Ň}}{% \ifthenelse{\equal{#1}{R}}{\@print{Ř}}{% \ifthenelse{\equal{#1}{r}}{\@print{ř}}{% \ifthenelse{\equal{#1}{S}}{\@print{Š}}{% \ifthenelse{\equal{#1}{s}}{\@print{š}}{% \ifthenelse{\equal{#1}{T}}{\@print{ť}}{% \ifthenelse{\equal{#1}{Z}}{\@print{Ž}}{% \ifthenelse{\equal{#1}{z}}{\@print{ž}}{% #1% }}}}}}}}}}}}}}}% %\newcommand\acute[1]{#1} %\newcommand\check[1]{#1} %\newcommand\grave[1]{#1} %\newcommand\dot[1]{#1} %\newcommand\ddot[1]{#1} %\newcommand\breve[1]{#1} %\newcommand\hat[1]{#1} %\newcommand\vec[1]{#1} %\newcommand\bar[1]{#1} %\newcommand\tilde[1]{#1}hevea-2.09/html/png.hva0000644004317100512160000000007011330600330014774 0ustar marangetcristal\renewcommand{\heveaimageext}{.png} \@addimagenopt{-png}hevea-2.09/html/symb-mathml.hva0000644004317100512160000002355412017660721016473 0ustar marangetcristal\def\@ifitem{\ifmath\ifdisplay\@itemdisplay\fi\fi} \newcommand{\@mop}[1]{ \@ifitem% \@print{ &}\@subst{#1}\@print{; }% \@ifitem} \newcommand{\@mopop}[1]{\@print{ &}\@subst{#1}\@print{; }} \newcommand{\@mid}[1]{ \@ifitem% \@print{ &}\@subst{#1}\@print{; }% \@ifitem} \newcommand{\@mfun}[1]{\@print{ }\@subst{#1}\@print{ }} %% Symboles mathematiques %% classes dans le meme ordre que %% dans le livre LaTeX, de Leslie Lamport. %% overline, underline et Cie \renewcommand{\stackrel}[2]{\ifdisplay \@print{ }% \@open{display}{}#2\@close{display}{} \@open{display}{}#1\@close{display}{}% \@print{ } \else \textstackrel{#1}{#2}\fi} \renewcommand\overline[1]{\ifdisplay \@print{ }% \@open{display}{}#1\@close{display}{}% \@print{ } \else\textoverline{#1}\fi} \renewcommand\underline[1]{\ifdisplay \@print{ }% \@open{display}{}#1\@close{display}{}% \@print{ } \else\textunderline{#1}\fi} % Roots \newcommand{\sqrt}[2][!*!]{\ifthenelse{\equal{#1}{!*!}}% {\@print{ }% #2\@print{ }% }{\@print{ }\@open{display}{}% #2 \@close{display}{}% \@open{display}{}% #1% \@close{display}{}% \@print{ }}} % Ellipsis \renewcommand{\ldots}{\ifmath\@mop{TripleDot}\else{...}\fi} \renewcommand{\cdots}{\@mop{ctdot}} \renewcommand{\ddots}{\@mop{dtdot}} \renewcommand{\vdots}{\@mop{ratio}} %vdots is not the true symbol, but i didn't %find a better one.. %% Greek Letters \newcommand{\alpha}{\@mid{alpha}} \newcommand{\beta}{\@mid{beta}} \newcommand{\gamma}{\@mid{gamma}} \newcommand{\delta}{\@mid{delta}} \newcommand{\epsilon}{\@mid{epsi}} \newcommand{\varepsilon}{\@mid{epsiv}} \newcommand{\zeta}{\@mid{zeta}} \newcommand{\eta}{\@mid{eta}} \newcommand{\theta}{\@mid{theta}} \newcommand{\vartheta}{\@mid{vartheta}} \newcommand{\iota}{\@mid{iota}} \newcommand{\kappa}{\@mid{kappa}} \newcommand{\lambda}{\@mid{lambda}} \renewcommand{\mu}{\@mid{mu}} \newcommand{\nu}{\@mid{nu}} \newcommand{\xi}{\@mid{xi}} \newcommand{\pi}{\@mid{pi}} \newcommand{\varpi}{\@mid{piv}} \newcommand{\rho}{\@mid{rho}} \newcommand{\varrho}{\@mid{rhov}} \newcommand{\sigma}{\@mid{sigma}} \newcommand{\varsigma}{\@mid{sigmav}} \newcommand{\tau}{\@mid{tau}} \newcommand{\upsilon}{\@mid{upsi}} \newcommand{\phi}{\@mid{phi}} \newcommand{\varphi}{\@mid{phiv}} \newcommand{\chi}{\@mid{chi}} \newcommand{\psi}{\@mid{psi}} \newcommand{\omega}{\@mid{omega}} \newcommand{\Gamma}{\@mid{Gamma}} \newcommand{\Delta}{\@mid{Delta}} \newcommand{\Theta}{\@mid{Theta}} \newcommand{\Lambda}{\@mid{Lambda}} \newcommand{\Xi}{\@mid{Xi}} \newcommand{\Pi}{\@mid{Pi}} \newcommand{\Sigma}{\@mid{Sigma}} \newcommand{\Upsilon}{\@mid{Upsi}} \newcommand{\Phi}{\@mid{Phi}} \newcommand{\Psi}{\@mid{Psi}} \newcommand{\Omega}{\@mid{Omega}} %% Binary Operation Symbols \renewcommand{\pm}{\@mop{PlusMinus}} \newcommand{\mp}{\@mop{mp}} \renewcommand{\times}{\@mop{times}} \renewcommand{\div}{\@mop{div}} \renewcommand{\ast}{\@mop{ast}} \renewcommand{\star}{\@mop{star}} \newcommand{\circ}{\@mop{circ}} \newcommand{\bullet}{\@mop{Bull}} \renewcommand{\cdot}{\@mop{cdot}} \newcommand{\cap}{\@mop{cap}} \newcommand{\cup}{\@mop{Cup}} \newcommand{\uplus}{\@mop{UnionPlus}} \newcommand{\sqcap}{\@mop{SquareIntersection}} \newcommand{\sqcup}{\@mop{SquareUnion}} \newcommand{\vee}{\@mop{Or}} \newcommand{\wedge}{\@mop{And}} \renewcommand{\setminus}{\@mop{setminus}} \newcommand{\wr}{\@mop{wr}} \newcommand{\diamond}{\@mop{diamond}} \newcommand{\bigtriangleup}{\@mop{bigtriangleup}} \newcommand{\bigtriangledown}{\@mop{dtri}} %bigtriangledown}} \newcommand{\triangleleft}{\@mop{triangleleft}} \newcommand{\triangleright}{\@mop{triangleright}} \newcommand{\lhd}{\@mop{LeftTriangle}} \newcommand{\rhd}{\@mop{RightTriangle}} \newcommand{\unlhd}{\@mop{LeftTriangleEqual}} \newcommand{\unrhd}{\@mop{RightTriangleEqual}} \newcommand{\oplus}{\@mop{CirclePlus}} \newcommand{\ominus}{\@mop{CircleMinus}} \newcommand{\otimes}{\@mop{CircleTimes}} \newcommand{\oslash}{\@mop{oslash}} \newcommand{\odot}{\@mop{CircleDot}} \renewcommand{\bigcirc}{\@mop{bigcirc}} \newcommand{\dagger}{\@mop{dagger}} \newcommand{\ddagger}{\@mop{ddagger}} \newcommand{\amalg}{\@mop{amalg}} % Relation Symbols \newcommand{\leq}{\@mop{leq}} \newcommand{\prec}{\@mop{prec}} \newcommand{\preceq}{\@mop{preceq}} \renewcommand{\ll}{\@mop{ll}} \newcommand{\subset}{\@mop{SubSet}} \newcommand{\subseteq}{\@mop{SubSetEqual}} \newcommand{\sqsubset}{\@mop{sqsubset}} \newcommand{\sqsubseteq}{\@mop{sqsubseteq}} \newcommand{\in}{\@mop{Element}} \renewcommand{\vdash}{\@mop{RightTee}} \newcommand{\geq}{\@mop{geq}} \newcommand{\succ}{\@mop{succ}} \renewcommand{\gg}{\@mop{gg}} \newcommand{\supset}{\@mop{SuperSet}} \newcommand{\supseteq}{\@mop{SuperSetEqual}} \newcommand{\sqsupset}{\@mop{sqsupset}} \newcommand{\sqsupseteq}{\@mop{sqsupseteq}} \newcommand{\ni}{\@mop{SuchThat}} \renewcommand{\dashv}{\@mop{LeftTee}} \newcommand{\equiv}{\@mop{equiv}} \renewcommand{\sim}{\@mop{Tilde}} \renewcommand{\simeq}{\@mop{simeq}} \newcommand{\asymp}{\@mop{CupCap}} \newcommand{\approx}{\@mop{ap}} \newcommand{\cong}{\@mop{TildeFullEqual}} \newcommand{\neq}{\@mop{NotEqual}} \newcommand{\doteq}{\@mop{doteq}} \newcommand{\notin}{\@mop{NotElement}} \renewcommand{\models}{\@mop{DoubleRightTee}} \newcommand{\perp}{\@mop{UpTee}} \renewcommand{\mid}{\@mop{VerticalBar}} \newcommand{\parallel}{\@mop{parallel}} \newcommand{\bowtie}{\@mop{bowtie}} %\newcommand{\Join}{\@mop{}} \newcommand{\smile}{\@mop{smile}} \newcommand{\frown}{\@mop{frown}} \newcommand{\propto}{\@mop{Proportional}} % Arrow Symbols \newcommand{\leftarrow}{\@mop{LeftArrow}} \newcommand{\Leftarrow}{\@mop{DoubleLeftArrow}} \newcommand{\rightarrow}{\@mop{RightArrow}} \newcommand{\Rightarrow}{\@mop{DoubleRightArrow}} \newcommand{\leftrightarrow}{\@mop{LeftRightArrow}} \newcommand{\Leftrightarrow}{\@mop{DoubleLeftRightArrow}} \renewcommand{\mapsto}{\@mop{mapsto}} \newcommand{\hookleftarrow}{\@mop{hookleftarrow}} \newcommand{\leftharpoonup}{\@mop{leftharpoonup}} \newcommand{\leftharpoondown}{\@mop{leftharpoondown}} \newcommand{\rightleftharpoons}{\@mop{rightleftharpoons}} \newcommand{\longleftarrow}{\@mop{longleftarrow}} \newcommand{\Longleftarrow}{\@mop{Longleftarrow}} \newcommand{\longrightarrow}{\@mop{longrightarrow}} \newcommand{\Longrightarrow}{\@mop{Longrightarrow}} \newcommand{\longleftrightarrow}{\@mop{longleftrightarrow}} \newcommand{\Longleftrightarrow}{\@mop{Longleftrightarrow}} \newcommand{\longmapsto}{\@mop{longmapsto}} \newcommand{\hookrightarrow}{\@mop{hookrightarrow}} \newcommand{\rightharpoonup}{\@mop{rightharpoonup}} \newcommand{\rightharpoondown}{\@mop{rightharpoondown}} \newcommand{\leadsto}{\@mop{zigrarr}} \newcommand{\uparrow}{\@mop{UpArrow}} \newcommand{\Uparrow}{\@mop{DoubleUpArrow}} \newcommand{\downarrow}{\@mop{DownArrow}} \newcommand{\Downarrow}{\@mop{DoubleDownArrow}} \newcommand{\updownarrow}{\@mop{UpDownArrow}} \newcommand{\Updownarrow}{\@mop{DoubleUpDownArrow}} \newcommand{\nearrow}{\@mop{UpperRightArrow}} \newcommand{\searrow}{\@mop{LowerRightArrow}} \newcommand{\swarrow}{\@mop{LowerLeftArrow}} \newcommand{\nwarrow}{\@mop{UpperLeftArrow}} % Miscellaneous symbols \newcommand{\aleph}{\@mop{aleph}} \newcommand{\hbar}{\@mop{hbar}} \newcommand{\imath}{\@mop{imath}} \newcommand{\jmath}{\@mop{jmath}} \newcommand{\ell}{\@mop{ell}} \newcommand{\wp}{\@mop{weierp}} \newcommand{\Re}{\@mop{Re}} \newcommand{\Im}{\@mop{Im}} \newcommand{\mho}{\@mop{mho}} \newcommand{\prime}{\@mop{prime}} \renewcommand{\emptyset}{\@mop{empty}} \newcommand{\nabla}{\@mop{nabla}} \newcommand{\surd}{\@mop{Sqrt}} \newcommand{\top}{\@mop{top}} \renewcommand{\bot}{\@mop{bot}} \renewcommand{\|}{\@mop{DoubleVerticalBar}} \newcommand{\angle}{\@mop{angle}} \newcommand{\forall}{\@mop{ForAll}} \newcommand{\exists}{\@mop{Exist}} \renewcommand{\neg}{\@mop{Not}} \newcommand{\flat}{\@mop{flat}} \newcommand{\natural}{\@mop{natural}} \newcommand{\sharp}{\@mop{sharp}} \renewcommand{\backslash}{\@mop{Backslash}} \newcommand{\partial}{\@mop{PartialD}} \newcommand{\infty}{\@mop{infin}} \newcommand{\Box}{\@mop{square}} \newcommand{\Diamond}{\@mop{loz}} \newcommand{\triangle}{\@mop{triangle}} \newcommand{\clubsuit}{\@mop{clubs}} \newcommand{\diamondsuit}{\@mop{Diamond}} \newcommand{\heartsuit}{\@mop{hearts}} \newcommand{\spadesuit}{\@mop{spades}} % Variable-sized Symbols \newcommand{\sum}{\@mopop{sum}} \newcommand{\prod}{\@mopop{PI}} \newcommand{\coprod}{\@mopop{Coproduct}} \newcommand{\int}{\@mopop{int}} \newcommand{\oint}{\@mopop{oint}} \newcommand{\bigcap}{\@mopop{bigcap}} \newcommand{\bigcup}{\@mopop{bigcup}} \newcommand{\bigsqcup}{\@mopop{bigsqcup}} \newcommand{\bigvee}{\@mopop{bigvee}} \newcommand{\bigwedge}{\@mopop{bigwedge}} \newcommand{\bigodot}{\@mopop{bigodot}} \newcommand{\bigotimes}{\@mopop{bigotimes}} \newcommand{\bigoplus}{\@mopop{bigoplus}} \newcommand{\biguplus}{\@mopop{biguplus}} %% Functions \renewcommand{\arccos}{\@mfun{arccos}} \renewcommand{\arcsin}{\@mfun{arcsin}} \renewcommand{\arctan}{\@mfun{arctan}} \renewcommand{\arg}{\@mfun{arg}} \renewcommand{\cos}{\@mfun{cos}} \renewcommand{\cosh}{\@mfun{cosh}} \renewcommand{\cot}{\@mfun{cot}} \renewcommand{\coth}{\@mfun{coth}} \renewcommand{\csc}{\@mfun{csc}} \renewcommand{\deg}{\@mfun{deg}} \renewcommand{\det}{\@mfun{det}} \renewcommand{\dim}{\@mfun{dim}} \renewcommand{\exp}{\@mfun{exp}} \renewcommand{\gcd}{\@mfun{gcd}} \renewcommand{\hom}{\@mfun{hom}} \renewcommand{\inf}{\@mfun{inf}} \renewcommand{\ker}{\@mfun{ker}} \renewcommand{\lg}{\@mfun{lg}} \renewcommand{\lim}{\@mfun{lim}} \renewcommand{\liminf}{\@mfun{liminf}} \renewcommand{\limsup}{\@mfun{limsup}} \renewcommand{\ln}{\@mfun{ln}} \renewcommand{\log}{\@mfun{log}} \renewcommand{\max}{\@mfun{max}} \renewcommand{\min}{\@mfun{min}} \renewcommand{\Pr}{\@mfun{Pr}} \renewcommand{\sec}{\@mfun{sec}} \renewcommand{\sin}{\@mfun{sin}} \renewcommand{\sinh}{\@mfun{sinh}} \renewcommand{\sup}{\@mfun{sup}} \renewcommand{\tan}{\@mfun{tan}} \renewcommand{\tanh}{\@mfun{tanh}} \renewcommand{\bmod}{\@mfun{mod}} hevea-2.09/html/symb-ent.hva0000644004317100512160000000271012017660721015766 0ustar marangetcristal\newcommand{\@entity}[1]{\@print{&}\@subst{#1}\@print{;}} \newcommand{\@bigentity}[1]{\begin{Huge}\@subst{#1};\end{Huge}} \newcommand{\@numentity}[1]{\@print{&#}\@subst{#1}\@print{;}} %%Petit extra %% HTML 4.0 symbol entities %% classes dans le meme ordre que %% dans le livre LaTeX, de Leslie Lamport. %%%%%%%%%%%%%%%%%%% % % \ifmoreentities \renewcommand{\longleftarrow}{\@print{⟵}}% \renewcommand{\Longleftarrow}{\@print{⟸}}% \renewcommand{\longrightarrow}{\@print{⟶}}% \renewcommand{\Longrightarrow}{\@print{⟹}}% \renewcommand{\longleftrightarrow}{\@print{⟷}}% \renewcommand{\Longleftrightarrow}{\@print{⟺}}% \renewcommand{\longmapsto}{\@print{⟼}}% \else\fi % %% Miscellaneous symbols (Table 8.7 of 'Goos-Mitt-Sam') % % %% Delimiters % %% Variable-sized Symbols % \iffalse \newcommand{\@iint}{\@print{∬}} \newcommand{\@iiint}{\@print{∭}} \newcommand{\@oiint}{\@print{∯}} \newcommand{\@oiiint}{\@print{∰}} \newcommand{\@displayint}{\mbox{\Large\@entity{int}}} \newcommand{\@displayiint}{\mbox{\Large\@print{∬}}} \newcommand{\@displayiiint}{\mbox{\Large\@print{∭}}} \newcommand{\@displaysum}{\mbox{\Large\@sum}} \newcommand{\@displayprod}{\mbox{\Large\@prod}} \newcommand{\@displaycoprod}{\mbox{\Large\@coprod}} \newcommand{\@displayoint}{\mbox{\Large\@print{∮}}} \newcommand{\@displayoiint}{\mbox{\Large\@print{∯}}} \newcommand{\@displayoiiint}{\mbox{\huge\@print{∰}}} \fi hevea-2.09/html/color.hva0000644004317100512160000001161712204363746015361 0ustar marangetcristal\@primitives{color} \newcommand{\color}[2][!*!]{\@fontcolor{\@getcolor[#1]{#2}}} \newcommand{\textcolor}[3][!*!]{{\color[#1]{#2}#3}} \newcommand{\colorbox}[3][!*!] {{\@span{style="background-color:\@getstylecolor[#1]{#2}"}#3}} \newcommand{\fcolorbox}[4][!*!] {{\@span{style="background-color:\@getstylecolor[#1]{#3};border:solid \@getstylecolor[#1]{#2}"}#4}} \newenvironment{bgcolor}[2][style="padding:1em"] {\@open{table}{}\@open{tr}{}% \@open{td}{\@addstyle{background-color:\@getcolor{#2}}{#1}}} {\@close{td}\@close{tr}\@close{table}} \definecolor {blue} {rgb} {0, 0, 1} \definecolor {red} {rgb} {1, 0, 0} \definecolor {green} {rgb} {0, 1, 0} \definecolor {white} {gray} {1} \definecolor {black} {gray} {0} \definecolor {cyan} {cmyk} {1, 0, 0, 0} \definecolor {magenta} {cmyk} {0, 1, 0, 0} \definecolor {yellow} {cmyk} {0, 0, 1, 0} \DefineNamedColor{named}{GreenYellow} {cmyk}{0.15,0,0.69,0} \DefineNamedColor{named}{Yellow} {cmyk}{0,0,1,0} \DefineNamedColor{named}{Goldenrod} {cmyk}{0,0.10,0.84,0} \DefineNamedColor{named}{Dandelion} {cmyk}{0,0.29,0.84,0} \DefineNamedColor{named}{Apricot} {cmyk}{0,0.32,0.52,0} \DefineNamedColor{named}{Peach} {cmyk}{0,0.50,0.70,0} \DefineNamedColor{named}{Melon} {cmyk}{0,0.46,0.50,0} \DefineNamedColor{named}{YellowOrange} {cmyk}{0,0.42,1,0} \DefineNamedColor{named}{Orange} {cmyk}{0,0.61,0.87,0} \DefineNamedColor{named}{BurntOrange} {cmyk}{0,0.51,1,0} \DefineNamedColor{named}{Bittersweet} {cmyk}{0,0.75,1,0.24} \DefineNamedColor{named}{RedOrange} {cmyk}{0,0.77,0.87,0} \DefineNamedColor{named}{Mahogany} {cmyk}{0,0.85,0.87,0.35} \DefineNamedColor{named}{Maroon} {cmyk}{0,0.87,0.68,0.32} \DefineNamedColor{named}{BrickRed} {cmyk}{0,0.89,0.94,0.28} \DefineNamedColor{named}{Red} {cmyk}{0,1,1,0} \DefineNamedColor{named}{OrangeRed} {cmyk}{0,1,0.50,0} \DefineNamedColor{named}{RubineRed} {cmyk}{0,1,0.13,0} \DefineNamedColor{named}{WildStrawberry}{cmyk}{0,0.96,0.39,0} \DefineNamedColor{named}{Salmon} {cmyk}{0,0.53,0.38,0} \DefineNamedColor{named}{CarnationPink} {cmyk}{0,0.63,0,0} \DefineNamedColor{named}{Magenta} {cmyk}{0,1,0,0} \DefineNamedColor{named}{VioletRed} {cmyk}{0,0.81,0,0} \DefineNamedColor{named}{Rhodamine} {cmyk}{0,0.82,0,0} \DefineNamedColor{named}{Mulberry} {cmyk}{0.34,0.90,0,0.02} \DefineNamedColor{named}{RedViolet} {cmyk}{0.07,0.90,0,0.34} \DefineNamedColor{named}{Fuchsia} {cmyk}{0.47,0.91,0,0.08} \DefineNamedColor{named}{Lavender} {cmyk}{0,0.48,0,0} \DefineNamedColor{named}{Thistle} {cmyk}{0.12,0.59,0,0} \DefineNamedColor{named}{Orchid} {cmyk}{0.32,0.64,0,0} \DefineNamedColor{named}{DarkOrchid} {cmyk}{0.40,0.80,0.20,0} \DefineNamedColor{named}{Purple} {cmyk}{0.45,0.86,0,0} \DefineNamedColor{named}{Plum} {cmyk}{0.50,1,0,0} \DefineNamedColor{named}{Violet} {cmyk}{0.79,0.88,0,0} \DefineNamedColor{named}{RoyalPurple} {cmyk}{0.75,0.90,0,0} \DefineNamedColor{named}{BlueViolet} {cmyk}{0.86,0.91,0,0.04} \DefineNamedColor{named}{Periwinkle} {cmyk}{0.57,0.55,0,0} \DefineNamedColor{named}{CadetBlue} {cmyk}{0.62,0.57,0.23,0} \DefineNamedColor{named}{CornflowerBlue}{cmyk}{0.65,0.13,0,0} \DefineNamedColor{named}{MidnightBlue} {cmyk}{0.98,0.13,0,0.43} \DefineNamedColor{named}{NavyBlue} {cmyk}{0.94,0.54,0,0} \DefineNamedColor{named}{RoyalBlue} {cmyk}{1,0.50,0,0} \DefineNamedColor{named}{Blue} {cmyk}{1,1,0,0} \DefineNamedColor{named}{Cerulean} {cmyk}{0.94,0.11,0,0} \DefineNamedColor{named}{Cyan} {cmyk}{1,0,0,0} \DefineNamedColor{named}{ProcessBlue} {cmyk}{0.96,0,0,0} \DefineNamedColor{named}{SkyBlue} {cmyk}{0.62,0,0.12,0} \DefineNamedColor{named}{Turquoise} {cmyk}{0.85,0,0.20,0} \DefineNamedColor{named}{TealBlue} {cmyk}{0.86,0,0.34,0.02} \DefineNamedColor{named}{Aquamarine} {cmyk}{0.82,0,0.30,0} \DefineNamedColor{named}{BlueGreen} {cmyk}{0.85,0,0.33,0} \DefineNamedColor{named}{Emerald} {cmyk}{1,0,0.50,0} \DefineNamedColor{named}{JungleGreen} {cmyk}{0.99,0,0.52,0} \DefineNamedColor{named}{SeaGreen} {cmyk}{0.69,0,0.50,0} \DefineNamedColor{named}{Green} {cmyk}{1,0,1,0} \DefineNamedColor{named}{ForestGreen} {cmyk}{0.91,0,0.88,0.12} \DefineNamedColor{named}{PineGreen} {cmyk}{0.92,0,0.59,0.25} \DefineNamedColor{named}{LimeGreen} {cmyk}{0.50,0,1,0} \DefineNamedColor{named}{YellowGreen} {cmyk}{0.44,0,0.74,0} \DefineNamedColor{named}{SpringGreen} {cmyk}{0.26,0,0.76,0} \DefineNamedColor{named}{OliveGreen} {cmyk}{0.64,0,0.95,0.40} \DefineNamedColor{named}{RawSienna} {cmyk}{0,0.72,1,0.45} \DefineNamedColor{named}{Sepia} {cmyk}{0,0.83,1,0.70} \DefineNamedColor{named}{Brown} {cmyk}{0,0.81,1,0.60} \DefineNamedColor{named}{Tan} {cmyk}{0.14,0.42,0.56,0} \DefineNamedColor{named}{Gray} {cmyk}{0,0,0,0.50} \DefineNamedColor{named}{Black} {cmyk}{0,0,0,1} \DefineNamedColor{named}{White} {cmyk}{0,0,0,0} hevea-2.09/html/french.hva0000644004317100512160000000366011347711701015502 0ustar marangetcristal%%%% Hevea support for babel option 'french'. %%%% Support for %%%% - date %%%% - names of various part descriptors (contentsname etc.) %%%% - special quotations (\glqq et.) % \newcommand{\french@quotes} {\def{\flqq}{\@print@u{0171}}% \def{\glqq}{\@print@u{8222}}% \def{\glqq}{\@print@u{8222}}% \def{\grqq}{\@print@u{8220}}% \def{\glq}{\@print@u{8218}}% \def{\grq}{\@print@u{8216}}% \def{\frqq}{\@print@u{0187}}% \def{\flq}{\@print@u{8249}}% \def{\frq}{\@print@u{8250}}% \let\og\flqq\let\fg\frqq% }% \newcommand{\french@babel}{% \french@quotes% \def\french@day {\ifthenelse{\value{day}=1}{\theday\textsuperscript{er}}{\theday}}% \def\csname f@month1\endcsname{janvier}% \def\csname f@month2\endcsname{f\'evrier}% \def\csname f@month3\endcsname{mars}% \def\csname f@month4\endcsname{avril}% \def\csname f@month5\endcsname{mai}% \def\csname f@month6\endcsname{juin}% \def\csname f@month7\endcsname{juillet}% \def\csname f@month8\endcsname{ao\^ut}% \def\csname f@month9\endcsname{septembre}% \def\csname f@month10\endcsname{octobre}% \def\csname f@month11\endcsname{novembre}% \def\csname f@month12\endcsname{d\'ecembre}% \def\french@month{\csname f@month\arabic{month}\endcsname}% \@ifundefined{theyear}{}{\def\today{\theday~\french@month~\theyear}}% \def\prefacename{Pr\'eface}% \def\refname{R\'ef\'erences}% \def\abstractname{R\'esum\'e}% \def\bibname{Bibliographie}% \def\chaptername{Chapitre}% \def\appendixname{Annexe}% \def\contentsname{Table des mati\`eres}% \def\listfigurename{Liste des figures}% \def\listtablename{Liste des tableaux}% \def\indexname{Index}% \def\figurename{Figure}% \def\tablename{Tableau}% \def\partname{Partie}% \def\enclname{P.~J.}% \def\ccname{Copie \`a}% \def\headtoname{A}% \def\pagename{Page}% \def\headpagename{Page}% \def\seename{voir}% \def\alsoseename{voir aussi}% \def\footertext{Ce document a \'et\'e traduit de \LaTeX{} par \ahref{\heveaurl}{\hevea}}% }% %%% \newif\ifFrenchItemizeSpacing \let\FrenchLabelItem\relax %%%hevea-2.09/html/article.hva0000644004317100512160000000172012021655445015655 0ustar marangetcristal\ifstyleloaded\relax \else \input{articlecommon.hva} \newcommand{\@art@attr}[1]{\@secid\envclass@attr{#1}} \@makesection {\part}{-1}{part} {\@opencell{class="center"}{}{}\@open{h1}{\@art@attr{part}}} {\partname~\thepart}{\\} {\@close{h1}\@closecell} \newstyle{.part}{margin:2ex auto;text-align:center} \@makesection {\section}{0}{section} {\@open{h2}{\@art@attr{section}}}{\thesection}{\quad}{\@close{h2}}% \@makesection {\subsection}{1}{subsection} {\@open{h3}{\@art@attr{subsection}}}{\thesubsection}{\quad}{\@close{h3}}% \@makesection {\subsubsection}{2}{subsubsection} {\@open{h4}{\@art@attr{subsubsection}}}{\thesubsubsection}{\quad}{\@close{h4}}% \@makesection {\paragraph}{3}{paragraph} {\@open{h4}{\@art@attr{paragraph}}}{\theparagraph}{\quad}{\@close{h4}}% \@makesection {\subparagraph}{4}{subparagraph} {\@open{h5}{\@art@attr{subparagraph}}}{\thesubparagraph}{\quad}{\@close{h5}}% \newcommand{\hacha@style}{article}% \styleloadedtrue \fi hevea-2.09/html/symb-text.hva0000644004317100512160000000003210376357564016175 0ustar marangetcristal\input{html/symb-eng.hva} hevea-2.09/html/seminar.hva0000644004317100512160000000257712017660721015701 0ustar marangetcristal\ifstyleloaded\relax \else %%%% Landscape and portrait \newif\ifplanche\planchetrue \newcommand{\slidename}{Slide:} \newcounter{slide} \newenvironment{slide}[1][]{% \refstepcounter{slide}% \cuthere{section}{\slidename{} \theslide}% \ifplanche\@hr{\linewidth}{2pt}% \@open{H3}{class="flushright"}\slidename{} \theslide\@close{H3} \@hr{\linewidth}{2pt}\fi }{} \newenvironment{slide*}[1][]{\begin{slide}}{\end{slide}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% All seminar-specific commandes are null macros %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\landscapeonly}{} \newcommand{\portraitonly}{} \newcommand{\twoup}{} %% Margins \newif\ifcenterslides \newcommand{\raggedslides}[1][]{} %% Page breaking \newcommand{\extraslideheight}[1]{} \newcommand{\newslide}{} \newcommand{\slidefuzz}{} %% Magnification \newcommand{\slidemag}[1]{} \newcommand{\semin}{in} \newcommand{\semcm}{cm} \newcommand{\ptsize}[1]{} %% FRAMES \newcommand{\slideframe}[2][]{} \newcommand{\newslideframe}[1]{\slideframe} \newcommand{\slidetopmargin}{} \newcommand{\slidebottommargin}{} \newcommand{\slideleftmargin}{} \newcommand{\sliderightmargin}{} \newcommand{\slidesmag}[1]{} \newcommand{\slidepagestyle}[1]{} \newcommand{\addtoslidelist}[1]{} \newcommand{\newpagestyle}[2]{} \newcommand{\slideheadfont}{} \newcommand{\slidefootfont}{} %%%% load the article style file \input{article.hva} \fi hevea-2.09/ifthen.hva0000644004317100512160000000036110417501234014534 0ustar marangetcristal\ififthen\endinput\fi \@stopimage \@primitives{ifthen} \newcommand{\@iffileexists}[3]{\ifthenelse{\@fileexists{#1}}{#2}{#3}} \newcommand{\@ifundefined}[3] {\ifthenelse{\@commandexists\csname #1\endcsname}{#3}{#2}} \ifthentrue \@restartimage hevea-2.09/iso-text.hva0000644004317100512160000000105110507223111015023 0ustar marangetcristal\newcommand{\DeclareSymbol}[3][\@empty] {\newcommand{#2}{\@print@u{#3}}% \ifx#1\@empty\else\@def@u@default{#3}{#1}\fi} %This symbol does not appear in latin encoding -> direct text definition \newcommand{\DeclareSymbolHtml}[3][\@empty] {\ifx#1\@empty\else\newcommand{#2}{#1}\fi} \newcommand{\MakeBigSymbolHtml}[3][]{} \newcommand{\MakeBigSymbol}[5][] {\newcommand{#2}{\mathop{\ifdisplay#5\else#4\fi}#1}} \let\NewcommandHtml\NoCommand \let\NewcommandText\newcommand \let\RenewcommandHtml\NoCommand \let\RenewcommandText\renewcommand \input{iso-symb.hva} hevea-2.09/buff.ml0000644004317100512160000000244712017660721014047 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type t = {mutable t : string ; mutable p : int} ;; let create () = {t = String.create 64 ; p = 0} let rec realloc d b = let l = String.length b.t in if b.p + d-1 >= l then begin let new_t = String.create (2*l) in String.blit b.t 0 new_t 0 b.p ; b.t <- new_t ; realloc d b end let put_char b c = realloc 1 b ; b.t.[b.p] <- c ; b.p <- b.p + 1 let put b s = let l = String.length s in realloc l b ; String.blit s 0 b.t b.p l ; b.p <- b.p + l let to_string b = let r = String.sub b.t 0 b.p in b.p <- 0 ; r let reset b = b.p <- 0 hevea-2.09/length.mli0000644004317100512160000000203111763416753014557 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: length.mli,v 1.8 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) type t = Char of int | Pixel of int | Percent of int | No of string | Default val pretty : t -> string val is_zero : t -> bool val font : int val pixel_to_char : int -> int val char_to_pixel : int -> int val main: Lexing.lexbuf -> t hevea-2.09/thread.mli0000644004317100512160000000173010367352272014544 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val setup : string -> string -> unit val setprev : string -> string -> unit val setnext : string -> string -> unit val setprevnext : string -> string -> unit val next : string -> string val prev : string -> string val up : string -> string hevea-2.09/latexmacros.ml0000644004317100512160000002044312113376362015445 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf open Misc open Lexstate exception Failed module OString = struct type t = string let compare = Pervasives.compare end module Strings = Set.Make (OString) (* Data structures for TeX macro model *) let local_table = Hashtbl.create 97 and global_table = Hashtbl.create 97 and prim_table = Hashtbl.create 5 and known_macros = ref Strings.empty let purge = ref Strings.empty and purge_stack = MyStack.create "purge" and group_level = ref 0 (* Hot start *) type ctable = (string, pat * action) Hashtbl.t type ptable = (string, (unit -> unit)) Hashtbl.t type saved = int * Strings.t * Strings.t MyStack.saved * ptable * ctable * ctable * Strings.t let pretty_macro n acs = pretty_pat n ; prerr_string " -> " ; pretty_action acs let hidden_pretty_table cmdtable = let t = Hashtbl.create 97 and count = ref 0 in let incr k = incr count ; let r = try Hashtbl.find t k with | Not_found -> let r = ref 0 in Hashtbl.add t k r ; r in incr r in Hashtbl.iter (fun k (n,acc) -> Printf.fprintf stderr "%s -> " k ; pretty_macro n acc ; prerr_endline "" ; incr k) cmdtable ; Printf.fprintf stderr "Table size: %d\n" !count ; Hashtbl.iter (fun k r -> if !r > 1 then Printf.fprintf stderr "%s: %d\n" k !r) t ; flush stderr let pretty_table () = Printf.fprintf stderr "Macro tables, level=%d\n" !group_level ; prerr_endline "Global table" ; hidden_pretty_table global_table ; prerr_endline "Local table" ; hidden_pretty_table local_table let checkpoint () = !group_level, !purge, MyStack.save purge_stack, Hashtbl.copy prim_table, Hashtbl.copy global_table, Hashtbl.copy local_table, !known_macros and hot_start (level_checked, purge_checked, purge_stack_checked, prim_checked, global_checked, local_checked, known_checked) = group_level := level_checked ; purge := purge_checked ; MyStack.restore purge_stack purge_stack_checked ; Misc.copy_hashtbl prim_checked prim_table ; Misc.copy_hashtbl global_checked global_table ; Misc.copy_hashtbl local_checked local_table ; known_macros := known_checked (* Controlling scope *) let open_group () = incr group_level ; MyStack.push purge_stack !purge ; purge := Strings.empty and close_group () = if !group_level > 0 then (* Undo bindings created at the closed level *) Strings.iter (fun name -> Hashtbl.remove local_table name) !purge ; decr group_level ; purge := MyStack.pop purge_stack let get_level () = !group_level (* Remove one local definition in advance ... *) let pre_purge name purge = if Strings.mem name purge then begin Hashtbl.remove local_table name ; Strings.remove name purge end else purge (* Definitions *) let hidden_global_def name x = if !group_level > 0 && Hashtbl.mem local_table name then begin (* global definition of a localy defined macro, undo all local bindings *) purge := pre_purge name !purge ; MyStack.map purge_stack (fun purge -> pre_purge name purge) end ; Hashtbl.replace global_table name x let hidden_local_def name x = if !group_level > 0 then begin (* indeed local *) if Strings.mem name !purge then (* redefinition *) Hashtbl.remove local_table name else (* creation (at the current level) *) purge := Strings.add name !purge ; Hashtbl.add local_table name x end else begin (* same as global *) Hashtbl.replace global_table name x end let hidden_find name = if !group_level > 0 then begin try Hashtbl.find local_table name with | Not_found -> Hashtbl.find global_table name end else Hashtbl.find global_table name let set_saved_macros () = known_macros := Hashtbl.fold (fun name _ -> Strings.add name) global_table Strings.empty let get_saved_macro name = Strings.mem name !known_macros (* Primitives *) let register_init name f = if !verbose > 1 then prerr_endline ("Registering primitives for package: "^name); try let _ = Hashtbl.find prim_table name in fatal ("Attempt to initlialize primitives for package "^name^" twice") with | Not_found -> Hashtbl.add prim_table name f and exec_init name = if !verbose > 1 then prerr_endline ("Initializing primitives for package: "^name) ; try let f = Hashtbl.find prim_table name in Hashtbl.remove prim_table name ; (* accidental double is possible... *) try f () with Failed -> Misc.warning ("Bad trip while initializing primitives for package: "^name) with Not_found -> Misc.warning ("Cannot find primitives for package: "^name) ;; (* Interface *) let exists name = try let _ = hidden_find name in true with | Not_found -> false let find name = try hidden_find name with | Not_found -> warning ("Command not found: "^name) ; ([],[]),Subst [] and find_fail name = try hidden_find name with | Not_found -> raise Failed let pretty_command name = let n,acc = find name in eprintf "%s: " name ; pretty_macro n acc ; prerr_endline "" let def name pat action = if !verbose > 1 then begin Printf.fprintf stderr "def %s = " name; pretty_macro pat action ; prerr_endline "" end ; hidden_local_def name (pat,action) and global_def name pat action = if !verbose > 1 then begin Printf.fprintf stderr "global def %s = " name; pretty_macro pat action ; prerr_endline "" end ; hidden_global_def name (pat,action) and global_undef name = Hashtbl.remove global_table name ; Hashtbl.remove local_table name ;; let def_init name f = if exists name then begin fatal ("Command: "^name^" defined at initialisation") end ; def name zero_pat (CamlCode f) (* let pretty_arg = function | None -> prerr_string "" | Some (n,acc) -> pretty_macro n acc let pretty_replace s name old new_def = Printf.fprintf stderr "%s: %s\n\told=" s name ; pretty_arg old ; Printf.fprintf stderr "\n\tnew=" ; pretty_arg new_def ; prerr_endline "" *) let replace name new_def = let old_def = try Some (hidden_find name) with | Not_found -> None in (* pretty_replace "replace" name old_def new_def ; Printf.fprintf stderr "level=%d\n" !group_level ; *) begin match new_def with | Some d -> hidden_local_def name d | None -> match old_def with | None -> () | Some _ -> (* what will happen if binding was global ??? *) if !group_level > 0 then purge := pre_purge name !purge else Hashtbl.remove global_table name end ; old_def (* addto *) let addto name body = let old = try Some (hidden_find name) with Not_found -> None in match old with | Some (pat,Subst obody) -> hidden_local_def name (pat,Subst (obody@("%\n"::body))) | Some (_,_) -> warning "\\addto on non-subst macro" | None -> hidden_local_def name (zero_pat,Subst body) (* macro static properties *) let invisible = function "\\nofiles" | "\\pagebreak" | "\\nopagebreak" | "\\linebreak" | "\\nolinebreak" | "\\label" | "\\index" | "\\vspace" | "\\glossary" | "\\marginpar" | "\\figure" | "\\table" | "\\nostyle" | "\\rm" | "\\tt" | "\\bf" | "\\em" | "\\it" | "\\sl" | "\\tiny" | "\\footnotesize" | "\\scriptsize" | "\\small" | "\\normalsize" | "\\large" | "\\Large" | "\\LARGE" | "\\huge" | "\\Huge" | "\\purple" | "\\silver" | "\\gray" | "\\white" | "\\maroon" | "\\red" | "\\fuchsia" | "\\green" | "\\lime" | "\\olive" | "\\yellow" | "\\navy" | "\\blue" | "\\teal" | "\\aqua" | "\\else" | "\\fi" | "\\char" -> true | name -> (String.length name >= 3 && String.sub name 0 3 = "\\if") ;; hevea-2.09/package.mli0000644004317100512160000000164007001040426014652 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* *) (***********************************************************************) (* $Id: package.mli,v 1.2 1999-10-13 08:21:26 maranget Exp $ *) module type S = sig end module Make (Dest : OutManager.S) (Image : ImageManager.S) (Scan : Latexscan.S) : S hevea-2.09/xxcharset.exe0000755004317100512160000000007010457455411015304 0ustar marangetcristal#! /bin/sh cat < string val ptree : out_channel -> Lexeme.style Tree.t -> unit val ptrees : out_channel -> Lexeme.style Tree.t list -> unit val tree : out_channel -> Htmltext.style Tree.t -> unit val trees : out_channel -> Htmltext.style Tree.t list -> unit val styles : out_channel -> Css.id list -> unit hevea-2.09/mysys.ml0000644004317100512160000000350412017660721014304 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) exception Error of string let put_from_file name put = try let size = 1024 in let buff = String.create size in let chan_in = open_in_bin name in let rec do_rec () = let i = input chan_in buff 0 size in if i > 0 then begin put (String.sub buff 0 i) ; do_rec () end in do_rec () ; close_in chan_in with Sys_error _ -> raise (Error ("Cannot read file "^name)) ;; let copy_from_lib dir name = let chan_out = try open_out_bin name with Sys_error _ -> raise (Error ("Cannot open file: "^name)) in try put_from_file (Filename.concat dir (Filename.basename name)) (fun s -> output_string chan_out s) ; close_out chan_out with | e -> close_out chan_out ; raise e ;; let copy_from_lib_to_dir src dst name = match dst with | None -> copy_from_lib src name | Some dst -> copy_from_lib src (Filename.concat dst name) (* handle windows/Unix dialectic => no error when s2 exists *) let rename s1 s2 = if Sys.file_exists s2 then Sys.remove s2 ; Sys.rename s1 s2 let remove s = if Sys.file_exists s then Sys.remove s hevea-2.09/mylib.mli0000644004317100512160000000142507303420320014374 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val static_libdir : string val libdir : string hevea-2.09/expandlib.sh0000755004317100512160000000010310610713116015055 0ustar marangetcristal#! /bin/sh . `dirname $0`/config.sh sed -e "s,LIBDIR,$LIBDIR,g" $1 hevea-2.09/save.mll0000644004317100512160000002570312074006057014236 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) { open Lexing open Misc open SaveUtils let rec peek_next_char lb = let pos = lb.lex_curr_pos and len = lb.lex_buffer_len in if pos >= len then begin if lb.lex_eof_reached then raise Not_found else begin lb.refill_buff lb ; peek_next_char lb end end else lb.lex_buffer.[pos] let if_next_char c lb = try peek_next_char lb = c with | Not_found -> false let rec if_next_string s lb = if s = "" then true else let pos = lb.lex_curr_pos and len = lb.lex_buffer_len and slen = String.length s in if pos + slen - 1 >= len then begin if lb.lex_eof_reached then begin false end else begin lb.refill_buff lb ; if_next_string s lb end end else let lb_s = String.sub lb.lex_buffer pos slen in lb_s = s type kmp_t = Continue of int | Stop of string let rec kmp_char delim next i c = if i < 0 then begin Out.put_char arg_buff c ; Continue 0 end else if c = delim.[i] then begin if i >= String.length delim - 1 then Stop (Out.to_string arg_buff) else Continue (i+1) end else begin if next.(i) >= 0 then Out.put arg_buff (String.sub delim 0 (i-next.(i))) ; kmp_char delim next next.(i) c end } let command_name = '\\' (( ['@''A'-'Z' 'a'-'z']+ '*'?) | [^ 'A'-'Z' 'a'-'z'] | "\\*") let space = [' ''\t''\r'] rule skip_comment = parse | eof {()} | '\n' space* {check_comment lexbuf} | _ {skip_comment lexbuf} and check_comment = parse | '%' {skip_comment lexbuf} | "" {()} and first_char = parse | _ {let lxm = lexeme_char lexbuf 0 in put_echo_char lxm ; lxm} | eof {raise Eof} and rest = parse | _ * eof {let lxm = lexeme lexbuf in put_echo lxm ; lxm} and skip_blanks = parse | space* '\n' as lxm {seen_par := false ; put_echo lxm ; more_skip lexbuf} | space* as lxm {put_echo lxm ; Out.to_string arg_buff} and more_skip = parse (space* '\n' space*)+ as lxm {seen_par := true ; put_echo lxm ; more_skip lexbuf} | space* as lxm { put_echo lxm ; Out.to_string arg_buff} and skip_equal = parse space* '='? space* {()} and arg2 = parse '{' {incr brace_nesting; put_both_char '{' ; arg2 lexbuf} | '}' {decr brace_nesting; if !brace_nesting > 0 then begin put_both_char '}' ; arg2 lexbuf end else begin put_echo_char '}' ; Out.to_string arg_buff end} | "\\{" | "\\}" | "\\\\" {blit_both lexbuf ; arg2 lexbuf } | eof {error "End of file in argument"} | [^'\\''{''}']+ {blit_both lexbuf ; arg2 lexbuf } | _ {let c = lexeme_char lexbuf 0 in put_both_char c ; arg2 lexbuf} and csname get_prim subst = parse (space|'\n')+ { blit_echo lexbuf ; csname get_prim subst lexbuf } | '{'? "\\csname" space* {blit_echo lexbuf ; let r = incsname lexbuf in "\\"^get_prim r} | "" {let r = Saver.String.arg lexbuf in let r = subst r in try check_csname get_prim (MyLexing.from_string r) with | Exit -> r } and check_csname get_prim = parse | "\\csname" space* { let r = incsname lexbuf in "\\"^get_prim r} | command_name | "" { raise Exit } and incsname = parse "\\endcsname" '}'? {let lxm = lexeme lexbuf in put_echo lxm ; Out.to_string arg_buff} | _ {put_both_char (lexeme_char lexbuf 0) ; incsname lexbuf} | eof {error "End of file in command name"} and cite_arg = parse | space* '{' {cite_args_bis lexbuf} | eof {raise Eof} | "" {error "No opening ``{'' in citation argument"} and cite_args_bis = parse [^'}'' ''\t''\r''\n''%'',']+ {let lxm = lexeme lexbuf in lxm::cite_args_bis lexbuf} | '%' [^'\n']* '\n' {cite_args_bis lexbuf} | ',' {cite_args_bis lexbuf} | (space|'\n')+ {cite_args_bis lexbuf} | '}' {[]} | "" {error "Bad syntax for \\cite argument"} and num_arg = parse | (space|'\n')+ {(fun get_int -> num_arg lexbuf get_int)} | ['0'-'9']+ {fun _get_int -> let lxm = lexeme lexbuf in my_int_of_string lxm} | "'" ['0'-'7']+ {fun _get_int ->let lxm = lexeme lexbuf in my_int_of_string ("0o"^String.sub lxm 1 (String.length lxm-1))} | '"' ['0'-'9' 'a'-'f' 'A'-'F']+ (* '"' *) {fun _get_int ->let lxm = lexeme lexbuf in my_int_of_string ("0x"^String.sub lxm 1 (String.length lxm-1))} | '`' '\\' _ {fun _get_int ->let c = lexeme_char lexbuf 2 in Char.code c} | '`' '#' ['1'-'9'] {fun get_int -> let lxm = lexeme lexbuf in get_int (String.sub lxm 1 2)} | '`' _ {fun _get_int ->let c = lexeme_char lexbuf 1 in Char.code c} | "" {fun get_int -> let s = Saver.String.arg lexbuf in get_int s} and filename = parse [' ''\n']+ {put_echo (lexeme lexbuf) ; filename lexbuf} | [^'\n''{'' ']+ {let lxm = lexeme lexbuf in put_echo lxm ; lxm} | "" {Saver.String.arg lexbuf} and remain = parse _ * eof {Lexing.lexeme lexbuf} and get_limits r = parse space+ {get_limits r lexbuf} | "\\limits" {get_limits (Some Limits) lexbuf} | "\\nolimits" {get_limits (Some NoLimits) lexbuf} | "\\intlimits" {get_limits (Some IntLimits) lexbuf} | eof {raise (LimitEof r)} | "" {r} and get_sup = parse | space* '^' {try Some (Saver.String.arg lexbuf) with Eof -> error "End of file after ^"} | eof {raise Eof} | "" {None} and get_sub = parse | space* '_' {try Some (Saver.String.arg lexbuf) with Eof -> error "End of file after _"} | eof {raise Eof} | "" {None} and defargs = parse | '#' ['1'-'9'] {let lxm = lexeme lexbuf in put_echo lxm ; lxm::defargs lexbuf} | [^'{'] | "\\{" {blit_both lexbuf ; let r = in_defargs lexbuf in r :: defargs lexbuf} | "" {[]} and in_defargs = parse | "\\{" | "\\#" {blit_both lexbuf ; in_defargs lexbuf} | [^'{''#'] {put_both_char (lexeme_char lexbuf 0) ; in_defargs lexbuf} | "" {Out.to_string arg_buff} and get_defargs = parse [^'{']* {let r = lexeme lexbuf in r} and tagout = parse | "
    " {Out.put_char tag_buff ' ' ; tagout lexbuf} | '<' {intag lexbuf} | " " {Out.put tag_buff " " ; tagout lexbuf} | ">" {Out.put tag_buff ">" ; tagout lexbuf} | "<" {Out.put tag_buff "<" ; tagout lexbuf} | _ {Out.blit tag_buff lexbuf ; tagout lexbuf} | eof {Out.to_string tag_buff} and intag = parse '>' {tagout lexbuf} | '"' {instring lexbuf} (* '"' *) | _ {intag lexbuf} | eof {Out.to_string tag_buff} and instring = parse '"' {intag lexbuf} | '\\' '"' {instring lexbuf} | _ {instring lexbuf} | eof {Out.to_string tag_buff} and checklimits = parse "\\limits" {true} | "\\nolimits" {false} | "" {false} and eat_delim_init delim next i = parse | eof {raise Eof} | '{' { put_echo_char '{' ; incr brace_nesting ; let r = arg2 lexbuf in check_comment lexbuf ; if if_next_string delim lexbuf then begin skip_delim_rec delim 0 lexbuf ; r end else begin Out.put_char arg_buff '{' ; Out.put arg_buff r ; Out.put_char arg_buff '}' ; eat_delim_rec delim next 0 lexbuf end} | "" {eat_delim_rec delim next i lexbuf} and eat_delim_rec delim next i = parse | "\\{" { put_echo "\\{" ; match kmp_char delim next i '\\' with | Stop _ -> error "Delimitors cannot end with ``\\''" | Continue i -> match kmp_char delim next i '{' with | Stop s -> s | Continue i -> eat_delim_rec delim next i lexbuf} | '{' { put_echo_char '{' ; Out.put arg_buff (if i > 0 then String.sub delim 0 i else "") ; Out.put_char arg_buff '{' ; incr brace_nesting ; let r = arg2 lexbuf in Out.put arg_buff r ; Out.put_char arg_buff '}' ; eat_delim_rec delim next 0 lexbuf } | _ { let c = lexeme_char lexbuf 0 in put_echo_char c ; match kmp_char delim next i c with | Stop s -> s | Continue i -> eat_delim_rec delim next i lexbuf} | eof {error ("End of file in delimited argument, read:\n" ^ Out.to_string echo_buff)} and skip_delim_init delim i = parse | space|'\n' {skip_delim_init delim i lexbuf} | "" {skip_delim_rec delim i lexbuf} and skip_delim_rec delim i = parse | _ { let c = lexeme_char lexbuf 0 in put_echo_char c ; if c <> delim.[i] then raise (Delim delim) ; if i+1 < String.length delim then skip_delim_rec delim (i+1) lexbuf} | eof { error ("End of file checking delimiter ``"^delim^"''")} and check_equal = parse | '=' {true} | "" {false} and do_xyarg = parse | [^'{'] {let lxm = Lexing.lexeme_char lexbuf 0 in put_both_char lxm ; do_xyarg lexbuf} | eof {raise Eof} | "" {Out.to_string arg_buff} and simple_delim c = parse | _ as x {if c = x then begin put_echo_char x ; Out.to_string arg_buff end else begin put_both_char x ; simple_delim c lexbuf end } | eof {error (Printf.sprintf "End of file in simple delim '%c'" c)} and gobble_one_char = parse | _ {()} | "" {fatal ("Gobble at end of file")} { let arg = Saver.String.arg let arg_list = Saver.List.arg let opt = Saver.String.opt let opt_list = Saver.List.opt let start_echo = SaveUtils.start_echo let get_echo = SaveUtils.get_echo exception NoOpt = SaveUtils.NoOpt exception LimitEof = SaveUtils.LimitEof exception Eof = SaveUtils.Eof let seen_par = SaveUtils.seen_par let set_verbose = SaveUtils.set_verbose let empty_buffs = SaveUtils.empty_buffs exception Delim = SaveUtils.Delim exception Error = SaveUtils.Error let init_kmp s = let l = String.length s in let r = Array.create l (-1) in let rec init_rec i j = if i+1 < l then begin if j = -1 || s.[i]=s.[j] then begin r.(i+1) <- j+1 ; init_rec (i+1) (j+1) end else init_rec i r.(j) end in init_rec 0 (-1) ; r let with_delim delim lexbuf = let next = init_kmp delim in check_comment lexbuf ; let r = eat_delim_init delim next 0 lexbuf in r and skip_delim delim lexbuf = check_comment lexbuf ; skip_delim_init delim 0 lexbuf let skip_blanks_init lexbuf = let _ = skip_blanks lexbuf in () let arg_verbatim lexbuf = ignore (skip_blanks lexbuf) ; match first_char lexbuf with | '{' -> incr brace_nesting ; arg2 lexbuf | c -> simple_delim c lexbuf let xy_arg lexbuf = do_xyarg lexbuf } hevea-2.09/htmltext.mli0000644004317100512160000000306512017660721015144 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: htmltext.mli,v 1.6 2005-11-08 14:27:20 maranget Exp $ *) (***********************************************************************) exception No type tsize = Int of int | Big | Small type nat = Style of Lexeme.tag | Size of tsize | Color of string | Face of string | Fstyle of Lexeme.fontstyle * string | Other type t_style = { nat : nat; txt : string; ctxt : string; } type style = t_style list val cost : style -> int * int exception NoProp val get_prop : nat -> (nat -> bool) val is_font : nat -> bool val is_span : nat -> bool val font_props : (nat -> bool) list val span_props : (nat -> bool) list val neutral_prop : (nat -> bool) -> bool val same_style : t_style -> t_style -> bool type env = t_style list val empty_env : env exception Split of t_style * env val add_style : Lexeme.style -> env -> env val blanksNeutral : t_style -> bool val partition_color : env -> env * env hevea-2.09/tagout.mli0000644004317100512160000000147212017660721014576 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Erase tags (for title in hacha) *) exception Error val tagout : string -> string hevea-2.09/count.mli0000644004317100512160000000176512017660721014430 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Map extension for counting occurrences *) module type S = sig type key type count val empty : count val incr : key -> count -> count val fold : (key -> int -> 'b -> 'b) -> count -> 'b -> 'b end module Make (Ord : Map.OrderedType) : S with type key = Ord.t hevea-2.09/noimage.mli0000644004317100512160000000174507021270537014716 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val start : unit -> unit val stop : unit -> unit val restart : unit -> unit val put_char : char -> unit val put : string -> unit val dump : string -> (Lexing.lexbuf -> unit) -> Lexing.lexbuf -> unit val page : unit -> unit val finalize : bool -> bool hevea-2.09/cutOut.mli0000644004317100512160000000233112202203731014537 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet MOSCOVA, INRIA Rocquencourt *) (* *) (* Copyright 2006 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) module type Config = sig val small_length : int end module Make(C:Config) : sig type t val get_name : t -> string val create_buff : string -> t val create_null : unit -> t val create_chan : string -> t val close : t -> unit val put : t -> string -> unit val put_char : t -> char -> unit val is_empty : t -> bool val to_string : t -> string val to_chan : out_channel -> t -> unit val copy : t -> t -> unit val flush : t -> unit val debug : out_channel -> t -> unit end hevea-2.09/imageManager.mli0000644004317100512160000000204107021270537015642 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) module type S = sig val start : unit -> unit val stop : unit -> unit val restart : unit -> unit val put_char : char -> unit val put : string -> unit val dump : string -> (Lexing.lexbuf -> unit) -> Lexing.lexbuf -> unit val page : unit -> unit val finalize : bool -> bool end hevea-2.09/multibib.hva0000644004317100512160000000111610563036154015073 0ustar marangetcristal\newcommand{\@readmultbib}[1] {\@stopoutput\@stopimage% \ifthenelse{\@fileexists{#1.aux} \and \not \boolean{fixpoint}} {\@try{\@readaux{#1}}{\hva@warn{Failure while reading #1.aux, multibib not available}}} {}% \@restartoutput\@restartimage} \newcommand{\newcites}[2]{% \let{\csname cite#1\endcsname}\cite% \let{\csname nocite#1\endcsname}\nocite% \let{\csname bibliographystyle#1\endcsname}\bibliographystyle% \def\csname refname#1\endcsname{#2}% \def\csname bibliography#1\endcsname##1{{\def\refname{\csname refname#1\endcsname}\input{#1.bbl}}}% \AtBeginDocument{\@readmultbib{#1}}% }hevea-2.09/mysys.mli0000644004317100512160000000175210116062252014451 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) exception Error of string val put_from_file : string -> (string -> unit) -> unit val copy_from_lib : string -> string -> unit val copy_from_lib_to_dir : string -> string option -> string -> unit val rename : string -> string -> unit val remove : string -> unit hevea-2.09/text.ml0000644004317100512160000014264012017700472014107 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf open Misc open Element open Lexstate open MyStack open Length exception Error of string;; let failclose s = raise (Misc.Close s) ;; type block = | ALIGN | HEAD | QUOTE | QUOTATION | PRE | INFO | INFOLINE | DELAY | AFTER | TEMP | UL | DL | OL | NONE | GROUP | OTHER of string let blocks = [ ALIGN,"ALIGN" ; HEAD,"HEAD" ; QUOTE,"QUOTE" ; QUOTATION,"QUOTATION" ; PRE,"PRE" ; INFO,"INFO" ; INFOLINE,"INFOLINE" ; DELAY,"DELAY" ; AFTER,"AFTER" ; TEMP,"TEMP" ; UL,"UL" ; OL,"OL" ; DL,"DL" ; NONE,"NONE" ; GROUP,"" ; ] let b2s = Hashtbl.create 17 and s2b = Hashtbl.create 17 let () = List.iter (fun (b,s) -> Hashtbl.add b2s b s ; Hashtbl.add s2b s b ; ()) blocks let tr_block s a = let s = String.uppercase s in try Hashtbl.find s2b s with Not_found -> Misc.warning (sprintf "Undefined block in text mode: '%s' [%s]" s a) ; OTHER s let pp_block b = try Hashtbl.find b2s b with Not_found -> match b with | OTHER s -> sprintf "'%s'" s | _ -> assert false (* output globals *) type status = { mutable nostyle : bool ; mutable active : text list ; mutable out : Out.t; mutable temp : bool };; type stack_item = Normal of block * string * status | Freeze of (unit -> unit) ;; exception PopFreeze ;; let push_out s (a,b,c) = push s (Normal (a,b,c)) ;; let pretty_stack s = MyStack.pretty (function | Normal (s,args,_) -> sprintf "[%s]-{%s} " (pp_block s) args | Freeze _ -> "Freeze ") s ;; let pop_out s = match pop s with Normal (a,b,c) -> a,b,c | Freeze _ -> raise PopFreeze ;; let free_list = ref [];; let out_stack = MyStack.create "out_stack";; let pblock () = if empty out_stack then NONE else match top out_stack with | Normal (s,_,_) -> s | _ -> NONE ;; let free out = out.nostyle<-false; out.active<-[]; Out.reset out.out; free_list := out :: !free_list ;; let cur_out = ref { nostyle = false; active=[]; out=Out.create_null(); temp=false };; let set_out out = !cur_out.out <- out ;; let newstatus nostyle _ a t = match !free_list with [] -> { nostyle = nostyle; active = a; out = Out.create_buff (); temp = t; } | e::reste -> free_list:=reste; e.nostyle <- nostyle; e.active <- a; e.temp <- t; assert (Out.is_empty e.out); e ;; type saved_out = status * stack_item MyStack.saved let save_out () = !cur_out, MyStack.save out_stack and restore_out (a,b) = if !cur_out != a then begin free !cur_out ; MyStack.finalize out_stack (function | Normal (_,_,out) -> out == a | _ -> false) (function | Normal (_,_,out) -> if out.temp then free out | _ -> ()) end ; cur_out := a ; MyStack.restore out_stack b type align_t = Left | Center | Right type flags_t = { mutable pending_par : int option; mutable empty : bool; (* Listes *) mutable nitems : int; mutable dt : string; mutable dcount : string; mutable last_closed : block; (* Alignement et formattage *) mutable align : align_t; mutable in_align : bool; mutable hsize : int; mutable x : int; mutable x_start : int; mutable x_end : int; mutable last_space : int; mutable first_line : int; mutable underline : string; mutable nocount : bool ; mutable in_table : bool; (* Maths *) mutable vsize : int; } ;; let flags = { pending_par = None; empty = true; nitems = 0; dt = ""; dcount = ""; last_closed = NONE; align = Left; in_align = false; hsize = !Parse_opts.width; x = 0; x_start = 0; x_end = !Parse_opts.width - 1; last_space = 0; first_line = 2; underline = ""; nocount = false ; in_table = false; vsize = 0; } ;; let copy_flags f = {f with vsize = flags.vsize} and set_flags f { pending_par = pending_par ; empty = empty ; nitems = nitems ; dt = dt ; dcount = dcount ; last_closed = last_closed ; align = align ; in_align = in_align ; hsize = hsize ; x = x ; x_start = x_start ; x_end = x_end ; last_space = last_space ; first_line = first_line ; underline = underline ; nocount = nocount ; in_table = in_table ; vsize = vsize } = f.pending_par <- pending_par ; f.empty <- empty ; f.nitems <- nitems ; f.dt <- dt ; f.dcount <- dcount ; f.last_closed <- last_closed ; f.align <- align ; f.in_align <- in_align ; f.hsize <- hsize ; f.x <- x ; f.x_start <- x_start ; f.x_end <- x_end ; f.last_space <- last_space ; f.first_line <- first_line ; f.underline <- underline ; f.nocount <- nocount ; f.in_table <- in_table ; f.vsize <- vsize type stack_t = { s_nitems : int MyStack.t ; s_dt : string MyStack.t ; s_dcount : string MyStack.t ; s_x : (int * int * int * int * int * int) MyStack.t ; s_align : align_t MyStack.t ; s_in_align : bool MyStack.t ; s_underline : string MyStack.t ; s_nocount : bool MyStack.t ; s_in_table : bool MyStack.t ; s_vsize : int MyStack.t ; s_active : Out.t MyStack.t ; s_pending_par : int option MyStack.t ; s_after : (string -> string) MyStack.t } let stacks = { s_nitems = MyStack.create "nitems" ; s_dt = MyStack.create "dt" ; s_dcount = MyStack.create "dcount" ; s_x = MyStack.create "x" ; s_align = MyStack.create "align" ; s_in_align = MyStack.create "in_align" ; s_underline = MyStack.create "underline" ; s_nocount = MyStack.create "nocount" ; s_in_table = MyStack.create "in_table" ; s_vsize = MyStack.create "vsize" ; s_active = MyStack.create "active" ; s_pending_par = MyStack.create "pending_par" ; s_after = MyStack.create "after" } type saved_stacks = { ss_nitems : int MyStack.saved ; ss_dt : string MyStack.saved ; ss_dcount : string MyStack.saved ; ss_x : (int * int * int * int * int * int) MyStack.saved ; ss_align : align_t MyStack.saved ; ss_in_align : bool MyStack.saved ; ss_underline : string MyStack.saved ; ss_nocount : bool MyStack.saved ; ss_in_table : bool MyStack.saved ; ss_vsize : int MyStack.saved ; ss_active : Out.t MyStack.saved ; ss_pending_par : int option MyStack.saved ; ss_after : (string -> string) MyStack.saved } let save_stacks () = { ss_nitems = MyStack.save stacks.s_nitems ; ss_dt = MyStack.save stacks.s_dt ; ss_dcount = MyStack.save stacks.s_dcount ; ss_x = MyStack.save stacks.s_x ; ss_align = MyStack.save stacks.s_align ; ss_in_align = MyStack.save stacks.s_in_align ; ss_underline = MyStack.save stacks.s_underline ; ss_nocount = MyStack.save stacks.s_nocount ; ss_in_table = MyStack.save stacks.s_in_table ; ss_vsize = MyStack.save stacks.s_vsize ; ss_active = MyStack.save stacks.s_active ; ss_pending_par = MyStack.save stacks.s_pending_par ; ss_after = MyStack.save stacks.s_after } and restore_stacks { ss_nitems = saved_nitems ; ss_dt = saved_dt ; ss_dcount = saved_dcount ; ss_x = saved_x ; ss_align = saved_align ; ss_in_align = saved_in_align ; ss_underline = saved_underline ; ss_nocount = saved_nocount ; ss_in_table = saved_in_table ; ss_vsize = saved_vsize ; ss_active = saved_active ; ss_pending_par = saved_pending_par ; ss_after = saved_after } = MyStack.restore stacks.s_nitems saved_nitems ; MyStack.restore stacks.s_dt saved_dt ; MyStack.restore stacks.s_dcount saved_dcount ; MyStack.restore stacks.s_x saved_x ; MyStack.restore stacks.s_align saved_align ; MyStack.restore stacks.s_in_align saved_in_align ; MyStack.restore stacks.s_underline saved_underline ; MyStack.restore stacks.s_nocount saved_nocount ; MyStack.restore stacks.s_in_table saved_in_table ; MyStack.restore stacks.s_vsize saved_vsize ; MyStack.restore stacks.s_active saved_active ; MyStack.restore stacks.s_pending_par saved_pending_par ; MyStack.restore stacks.s_after saved_after let check_stack what = if not (MyStack.empty what) && not !silent then begin prerr_endline ("Warning: stack "^MyStack.name what^" is non-empty in Html.finalize") ; end ;; let check_stacks () = match stacks with { s_nitems = nitems ; s_dt = dt ; s_dcount = dcount ; s_x = x ; s_align = align ; s_in_align = in_align ; s_underline = underline ; s_nocount = nocount ; s_in_table = in_table ; s_vsize = vsize ; s_active = active ; s_pending_par = pending_par ; s_after = after } -> check_stack nitems ; check_stack dt ; check_stack dcount ; check_stack x ; check_stack align ; check_stack in_align ; check_stack underline ; check_stack nocount ; check_stack in_table ; check_stack vsize ; check_stack active ; 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 let check () = let saved_flags = copy_flags flags and saved_stacks = save_stacks () and saved_out = save_out () in String.copy line, saved_flags, saved_stacks, saved_out and hot (l,f,s,o) = String.blit l 0 line 0 (String.length l) ; set_flags flags f ; restore_stacks s ; restore_out o let stop () = MyStack.push stacks.s_active !cur_out.out ; MyStack.push stacks.s_pending_par flags.pending_par ; !cur_out.out <- Out.create_null () and restart () = !cur_out.out <- MyStack.pop stacks.s_active ; flags.pending_par <- MyStack.pop stacks.s_pending_par let do_do_put_char c = Out.put_char !cur_out.out c;; let do_do_put s = Out.put !cur_out.out s;; let do_put_line s = (* Ligne a formatter selon flags.align, avec les parametres courants.*) (* soulignage eventuel *) let taille = String.length s in let length = if s.[taille-1]='\n' then taille-1 else taille in let soul = ref false in for i = 0 to length - 1 do soul := !soul || s.[i] <> ' '; done; soul := !soul && s<>"\n" && flags.underline <> ""; let ligne = match flags.align with | Left -> s | Center -> let sp = (flags.hsize - (length -flags.x_start))/2 in String.concat "" [String.make sp ' '; s] | Right -> let sp = flags.hsize - length + flags.x_start in String.concat "" [ String.make sp ' '; s] in if !verbose > 3 then prerr_endline ("line :"^ligne); do_do_put ligne; if !soul then begin let souligne = let l = String.make taille ' ' in let len = String.length flags.underline in if len = 0 then raise (Misc.Fatal ("cannot underline with nothing:#" ^String.escaped flags.underline^"#"^ (if (flags.underline <> "") then "true" else "false" ))); for i = flags.x_start to length -1 do l.[i]<-flags.underline.[(i-flags.x_start) mod len] done; if taille <> length then l.[length]<-'\n'; match flags.align with | Left -> l | Center -> let sp = (flags.hsize - length)/2 +flags.x_start/2 in String.concat "" [String.make sp ' '; l] | Right -> let sp = (flags.hsize - length) + flags.x_start in String.concat "" [ String.make sp ' '; l] in if !verbose >3 then prerr_endline ("line underlined:"^souligne); do_do_put souligne; end ;; let do_flush () = if !verbose>3 && flags.x >0 then prerr_endline ("flush :#"^(String.sub line 0 (flags.x))^"#"); if flags.x >0 then do_put_line (String.sub line 0 (flags.x)) ; flags.x <- -1; ;; let do_put_char_format nbsp c = if !verbose > 3 then prerr_endline ("caracters read : '"^Char.escaped c^"', x="^string_of_int flags.x^", length ="^string_of_int (flags.hsize)); if not nbsp && c=' ' then flags.last_space <- flags.x; if flags.x =(-1) then begin (* La derniere ligne finissait un paragraphe : on indente *) (* 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]<-' '; done; flags.last_space<-flags.x-1; end; line.[flags.x]<-c; if c='\n' then begin (* Ligne prete *) if !verbose > 2 then prerr_endline("line not cut :["^line^"]"); do_put_line (String.sub line 0 (flags.x +1)); flags.x <- -1; end else flags.x<-flags.x + 1; if flags.x>(flags.x_end +1) then begin (* depassement de ligne *) if (flags.x - flags.last_space) >= flags.hsize then begin (* On coupe brutalement le mot trop long *) if !verbose > 2 then prerr_endline ("line cut :"^line); warning ("line too long"); line.[flags.x-1]<-'\n'; (* La ligne est prete et complete*) do_put_line (String.sub line 0 (flags.x)); for i = 0 to flags.x_start-1 do line.[i]<-' ' done; line.[flags.x_start]<-c; flags.x<-flags.x_start + 1; flags.last_space<-flags.x_start-1; end else begin if !verbose > 2 then begin prerr_endline ("Line and the beginning of the next word :"^line); prerr_endline ("x ="^string_of_int flags.x); prerr_endline ("x_start ="^string_of_int flags.x_start); prerr_endline ("x_end ="^string_of_int flags.x_end); prerr_endline ("hsize ="^string_of_int flags.hsize); prerr_endline ("last_space ="^string_of_int flags.last_space); prerr_endline ("line size ="^string_of_int (String.length line)); end; (* On repart du dernier espace *) let reste = let len = flags.x - flags.last_space -1 in if len = 0 then "" else String.sub line (flags.last_space +1) len in (* La ligne est prete et incomplete*) line.[flags.last_space]<-'\n'; do_put_line (String.sub line 0 (flags.last_space+1)); for i = 0 to flags.x_start-1 do line.[i]<-' ' done; for i = flags.x_start to (flags.x_start+ String.length reste -1) do line.[i]<- reste.[i-flags.x_start]; done; flags.x<- flags.x_start + (String.length reste); flags.last_space <- flags.x_start-1; end; end; ;; let direct_output () = !cur_out.temp || (Out.is_null !cur_out.out) let do_put_char c = if !verbose>3 then prerr_endline ("put_char:|"^String.escaped (String.make 1 c)^"|"); if direct_output () then do_do_put_char c else do_put_char_format false c and do_put_nbsp () = if direct_output () then do_do_put_char ' ' else do_put_char_format true ' ' ;; let finit_ligne () = if !verbose>3 then prerr_endline "ending the line."; if flags.x >0 then do_put_char '\n' ;; let do_unskip () = if !cur_out.temp || (Out.is_null !cur_out.out) then Out.unskip !cur_out.out else begin while flags.x > flags.x_start && line.[flags.x-1] = ' ' do flags.x <- flags.x - 1 done ; flags.last_space <- flags.x ; while flags.last_space >= flags.x_start && line.[flags.last_space] <> ' ' do flags.last_space <- flags.last_space - 1 done; if flags.x = flags.x_start && !cur_out.temp then Out.unskip !cur_out.out end let do_put s = if !verbose>3 then prerr_endline ("put:|"^String.escaped s^"|"); for i = 0 to String.length s - 1 do do_put_char s.[i] done ;; (* Gestion des styles : pas de style en mode texte *) let is_list = function | UL | DL | OL -> true | _ -> false ;; let get_fontsize () = 3;; let nostyle () = !cur_out.nostyle<-true ;; let clearstyle () = !cur_out.active<-[] ;; let open_mod m = if m=(Style "CODE") then begin do_put "'"; !cur_out.active <- m::!cur_out.active end; ;; let do_close_mod = function | Style "CODE" -> do_put "'"; | _ -> () ;; let close_mod () = match !cur_out.active with [] -> () | (Style "CODE" as s)::reste -> do_close_mod s; !cur_out.active <- reste | _ -> () ;; let has_mod _ = false (* No text-level elements in text *) let erase_mods _ = () ;; let close_mods () = List.iter do_close_mod !cur_out.active; !cur_out.active <- [] ;; let open_par () = () and close_par () = false let par = function (*Nombre de lignes a sauter avant le prochain put*) | Some n -> begin flags.pending_par <- (match pblock() with | QUOTE |QUOTATION -> Some (n-1) | _ -> Some n); if !verbose> 2 then eprintf "par: last_close=%s, r=%i\n" (pp_block flags.last_closed) n end | _ -> () let forget_par () = let r = flags.pending_par in flags.pending_par <- None; r ;; let flush_par n = flags.pending_par <- None; let p = n in do_put_char '\n' ; for _i=1 to p-1 do do_put_char '\n' done; if !verbose >2 then eprintf "flush_par : last_closed=%s, p=%i\n" (pp_block flags.last_closed) p ; flags.last_closed <- NONE ;; let try_flush_par () = match flags.pending_par with | Some n -> flush_par n | _ -> () ;; let do_pending () = begin match flags.pending_par with | Some n -> flush_par n | _ -> () end; flags.last_closed <- NONE ;; (* Blocs *) let try_open_block s args = (* Prepare l'environnement specifique au bloc en cours *) if !verbose > 2 then eprintf "=> try_open %s" (pp_block s) ; push stacks.s_x (flags.hsize,flags.x,flags.x_start,flags.x_end, flags.first_line,flags.last_space); push stacks.s_align flags.align; push stacks.s_in_align flags.in_align; if is_list s then begin do_put_char '\n'; push stacks.s_nitems flags.nitems; flags.nitems <- 0; flags.x_start <- flags.x_start + 3; flags.first_line <- -2 ; flags.hsize <- flags.x_end - flags.x_start+1; if not flags.in_align then begin flags.align <- Left end; if s=DL then begin push stacks.s_dt flags.dt; push stacks.s_dcount flags.dcount; flags.dt <- ""; flags.dcount <- ""; end; end else begin match s with | ALIGN -> begin finit_ligne (); flags.in_align<-true; flags.first_line <-2; match String.uppercase args with "LEFT" -> flags.align <- Left | "CENTER" -> flags.align <- Center | "RIGHT" -> flags.align <- Right | a -> raise (Misc.ScanError (sprintf "Invalid argument in ALIGN: %s" a)) end | HEAD -> begin finit_ligne (); flags.first_line <-0 ; push stacks.s_underline flags.underline; flags.underline <- args; end | QUOTE -> begin finit_ligne (); flags.in_align<-true; flags.align <- Left; flags.first_line<-0; flags.x_start<- flags.x_start + 5 * flags.hsize / 100; flags.hsize <- flags.x_end - flags.x_start+1; end | QUOTATION -> begin finit_ligne (); flags.in_align<-true; flags.align <- Left; flags.first_line<-2; flags.x_start<- flags.x_start + 5 * flags.hsize / 100; flags.hsize <- flags.x_end - flags.x_start+1; end | PRE -> flags.first_line <-0; finit_ligne (); do_put "<<"; flags.first_line <-2; | INFO -> push stacks.s_nocount flags.nocount ; flags.nocount <- true ; flags.first_line <-0 | INFOLINE -> push stacks.s_nocount flags.nocount ; flags.nocount <- true ; flags.first_line <-0 ; finit_ligne () | _ -> () end ; if !verbose > 2 then eprintf "<= try_open %s\n" (pp_block s) ;; let try_close_block s = let (h,_,xs,xe,fl,_) = pop stacks.s_x in flags.hsize<-h; flags.x_start<-xs; flags.x_end<-xe; flags.first_line <-fl; if (is_list s) then begin finit_ligne(); flags.nitems <- pop stacks.s_nitems; if s=DL then begin flags.dt <- pop stacks.s_dt; flags.dcount <- pop stacks.s_dcount end end else begin match s with | ALIGN | QUOTE | QUOTATION -> finit_ligne () | HEAD -> finit_ligne(); let u = pop stacks.s_underline in flags.underline <- u | PRE -> flags.first_line <-0; do_put ">>\n"; flags.first_line <-fl | INFO|INFOLINE -> flags.nocount <- pop stacks.s_nocount | _ -> () end ; let a = pop stacks.s_align in flags.align <- a; let ia = pop stacks.s_in_align in flags.in_align <- ia ;; let open_block s arg = let s = tr_block s arg in (* Cree et se place dans le bloc de nom s et d'arguments args *) if !verbose > 2 then eprintf "=> open_block '%s'\n" (pp_block s); push_out out_stack (s,arg,!cur_out); try_flush_par (); (* Sauvegarde de l'etat courant *) if !cur_out.temp || s=TEMP || s=AFTER then begin cur_out := newstatus !cur_out.nostyle !cur_out.active [] true; end; try_open_block s arg; if !verbose > 2 then eprintf "<= open_block '%s'" (pp_block s) ;; let do_force_block s = if !verbose > 2 then eprintf "force_block '%s'\n" (pp_block s) ; let old_out = !cur_out in try_close_block s; let ps,_,pout = pop_out out_stack in if ps <>DELAY then begin cur_out:=pout; if ps = AFTER then begin let f = pop stacks.s_after in Out.copy_fun f old_out.out !cur_out.out end else if !cur_out.temp then Out.copy old_out.out !cur_out.out; flags.last_closed<- s; if !cur_out.temp then free old_out; end else raise ( Misc.Fatal "text: unflushed DELAY") ;; let force_block s _content = do_force_block (tr_block s "") let do_close_block s = (* Fermeture du bloc : recuperation de la pile *) if !verbose > 2 then eprintf "=> close_block %s\n" (pp_block s); do_force_block s ; if !verbose > 2 then eprintf "<= close_block %s\n" (pp_block s); () let close_block s = do_close_block (tr_block s "") (* Hum, wrong *) let close_flow s = let active = !cur_out.active in close_block s ; !cur_out.active <- active ;; let insert_block _ arg = match String.uppercase arg with | "LEFT" -> flags.align <- Left | "CENTER" -> flags.align <- Center | "RIGHT" -> flags.align <- Right | _ -> raise (Misc.ScanError (sprintf "Invalid argument in ALIGN: %s" arg)) and insert_attr _ _ = () ;; (* Autres *) (* Listes *) let set_dcount s = flags.dcount <- s ;; let do_item isnum = if !verbose > 2 then begin prerr_string "do_item: stack="; pretty_stack out_stack end; if flags.nitems = 0 then begin let _ = forget_par () in () end ; try_flush_par () ; flags.nitems<-flags.nitems+1; do_put_char '\n' ; let saved = flags.first_line in flags.first_line <- 0 ; let tag = if isnum then string_of_int flags.nitems^". " else "- " in do_put tag ; flags.first_line <- saved ;; let item _ = do_item false and nitem _ = do_item true ;; let ditem scan arg _ _ = if !verbose > 2 then begin prerr_string "ditem: stack="; pretty_stack out_stack end; let true_scan = if flags.nitems = 0 then begin let _ = forget_par() in (); ( fun arg -> scan arg) end else scan in try_flush_par(); flags.nitems<-flags.nitems+1; do_put_char '\n'; if flags.dcount <> "" then scan("\\refstepcounter{"^flags.dcount^"}"); true_scan ("\\makelabel{"^arg^"}") ; do_put_char ' ' ;; let erase_block s = let s = tr_block s "" in if not !cur_out.temp then do_close_block s else begin if !verbose > 2 then begin fprintf stderr "erase_block: %s" (pp_block s); prerr_newline () end ; try_close_block s ; let ts,_,tout = pop_out out_stack in if ts <> s then failclose (sprintf "erase_block: %s closes %s" (pp_block s) (pp_block ts)); free !cur_out ; cur_out := tout end ;; let to_string f = open_block "TEMP" ""; f () ; let r = Out.to_string !cur_out.out in close_block "TEMP"; r ;; let open_group ss = open_block "" ""; open_mod (Style ss); ;; let open_aftergroup f = open_block "AFTER" "" ; push stacks.s_after f ;; let close_group () = close_mod (); close_block ""; ;; let put s = if !verbose > 3 then fprintf stderr "put: %s\n" s ; do_pending (); do_put s ;; let put_char c = if !verbose > 3 then fprintf stderr "put_char: %c\n" c ; do_pending (); do_put_char c ;; let put_unicode i = do_pending (); try OutUnicode.translate_out i do_put_char with OutUnicode.CannotTranslate -> raise Misc.CannotPut ;; let flush_out () = Out.flush !cur_out.out ;; let skip_line () = if !verbose > 2 then prerr_endline "skip_line" ; put_char '\n' ;; let loc_name _ = () ;; let open_chan chan = free !cur_out; !cur_out.out<- Out.create_chan chan ;; let close_chan () = Out.close !cur_out.out; !cur_out.out <- Out.create_buff() ;; let to_style f = !cur_out.active<-[]; open_block "TEMP" ""; f (); let r = !cur_out.active in erase_block "TEMP"; r ;; let get_current_output () = Out.to_string !cur_out.out ;; let finalize check = if check then check_stacks () ; finit_ligne () ; Out.close !cur_out.out ; !cur_out.out <- Out.create_null () ;; let unskip () = do_unskip () let put_separator () = put " " ;; let put_tag _ = () ;; let put_nbsp () = do_pending (); do_put_nbsp() ;; let put_open_group () = () ;; let put_close_group () = () ;; let put_in_math s = put s ;; (*--------------*) (*-- TABLEAUX --*) (*--------------*) type align = Top | Middle | Bottom | Base of int and wrap_t = Wtrue | Wfalse | Fill ;; type cell_t = { mutable ver : align; mutable hor : align_t; mutable h : int; mutable w : int; mutable wrap : wrap_t; mutable span : int; (* Nombre de colonnes *) mutable text : string; mutable pre : string; (* bordures *) mutable post : string; mutable pre_inside : int list; mutable post_inside : int list; } ;; type cell_set = Tabl of cell_t Table.t | Arr of cell_t array ;; type row_t = { mutable haut : int; mutable cells : cell_set; } ;; type table_t = { mutable lines : int; mutable cols : int; mutable width : int; mutable taille : int Table.t; mutable tailles : int array; mutable table : row_t Table.t; mutable line : int; mutable col : int; mutable in_cell : bool; } ;; let ptailles chan table = let t = table.tailles in fprintf chan "[" ; for i = 0 to Array.length t-1 do fprintf chan "%d; " t.(i) done ; fprintf chan "]" let ptaille chan table = let t = Table.to_array table.taille in fprintf chan "[" ; for i = 0 to Array.length t-1 do fprintf chan "%d; " t.(i) done ; fprintf chan "]" let cell = ref { ver = Middle; hor = Left; h = 0; w = 0; wrap = Wfalse; span = 1; text = ""; pre = ""; post = ""; pre_inside = []; post_inside = []; } ;; let row= ref { haut = 0; cells = Tabl (Table.create !cell) } ;; let table = ref { lines = 0; cols = 0; width = 0; taille = Table.create 0; tailles = Array.create 0 0; table = Table.create {haut = 0; cells = Arr (Array.create 0 !cell)}; line = 0; col = 0; in_cell = false; } ;; let table_stack = MyStack.create "table_stack";; let row_stack = MyStack.create "row_stack";; let cell_stack = MyStack.create "cell_stack";; let multi = ref [] and multi_stack = MyStack.create "multi_stack";; let open_table _ _ = (* creation d'une table : on prepare les donnees : creation de l'environnement qvb, empilage du precedent. *) push table_stack !table; push row_stack !row; push cell_stack !cell; push stacks.s_in_table flags.in_table; push multi_stack !multi; push stacks.s_align flags.align; if !verbose>2 then prerr_endline "=> open_table"; finit_ligne (); open_block "" ""; flags.first_line <- 0; table := { lines = 0; cols = 0; width = 0; taille = Table.create 0; tailles = Array.create 0 0; table = Table.create {haut = 0; cells = Arr (Array.create 0 !cell)}; line = -1; col = -1; in_cell = false; }; row := { haut = 0; cells = Tabl (Table.create !cell) }; cell := { ver = Middle; hor = Left; h = 0; w = 0; wrap = Wfalse; span = 1; text = ""; pre = ""; post = ""; pre_inside = []; post_inside = []; }; multi := []; flags.in_table<-true; ;; let register_taille table = let old = table.tailles and cur = Table.trim table.taille in let old_len = Array.length old and cur_len = Array.length cur in let dest = if cur_len > old_len then begin let t = Array.create cur_len 0 in Array.blit old 0 t 0 old_len ; t end else old in for i=0 to cur_len-1 do dest.(i) <- max dest.(i) cur.(i) done ; table.tailles <- dest let new_row () = if !verbose> 2 then begin eprintf "=> new_row, line =%d, tailles=%a\n" !table.line ptailles !table end ; if !table.col> !table.cols then !table.cols<- !table.col; !table.col <- -1; !table.line <- !table.line +1; Table.reset !table.taille ; let _ =match !row.cells with | Tabl t -> Table.reset t | _-> raise (Error "invalid table type in array") in !cell.pre <- ""; !cell.pre_inside <- []; !row.haut<-0; if !verbose>2 then prerr_endline ("<= new_row, line ="^string_of_int !table.line) ;; let change_format format = match format with Tabular.Align {Tabular.vert=v ; Tabular.hor=h ; Tabular.wrap=w ; Tabular.width=size} -> !cell.ver <- (match v with | "" -> Base 50 | "middle" -> Base 50 | "top" -> Top | "bottom" -> Bottom | s -> let n = try int_of_string s with (Failure _) -> raise (Misc.Fatal ("open_cell, invalid vertical format :"^v)); in if n>100 || n<0 then raise (Misc.Fatal ("open_cell, invalid vertical format :"^v)); Base n); !cell.hor <- (match h with | "" -> Left | "center" -> Center | "left" -> Left | "right" -> Right | _-> raise (Misc.Fatal ("open_cell, invalid horizontal format :"^h))); !cell.wrap <- (if w then Wtrue else Wfalse); if w then !cell.w <- (match size with | Length.Char l -> l | Length.Pixel l -> l / Length.font | Length.Percent l -> l * !Parse_opts.width / 100 | Length.Default -> !cell.wrap <- Wfalse; warning "cannot wrap column with no width"; 0 | Length.No s -> raise (Misc.Fatal ("No-length ``"^s^"'' in out-manager"))) else !cell.w <- 0; | _ -> raise (Misc.Fatal ("as_align")) ;; let open_cell format span insides _border = open_block "TEMP" ""; (* preparation du formattage : les flags de position sont sauvegardes par l'ouverture du bloc TEMP *) (* remplir les champs de formattage de cell *) !table.col <- !table.col+1; if !verbose>2 then prerr_endline ("open_cell, col="^string_of_int !table.col); change_format format; !cell.span <- span - insides; if !table.col > 0 && !cell.span=1 then begin !cell.pre <- ""; !cell.pre_inside <- []; end; !cell.post <- ""; !cell.post_inside <- []; open_block "" ""; if !cell.w > String.length line then raise ( Error "Column too wide"); if (!cell.wrap=Wtrue) then begin (* preparation de l'alignement *) !cur_out.temp <- false; flags.x_start <- 0; flags.x_end <- !cell.w-1; flags.hsize <- !cell.w; flags.first_line <- 0; flags.x <- -1; flags.last_space <- -1; push stacks.s_align flags.align; push stacks.s_in_align flags.in_align; flags.in_align <- true; flags.align <- Left; end; ;; let do_close_cell _content = if !verbose>2 then prerr_endline "=> force_cell"; if (!cell.wrap=Wtrue) then begin do_flush (); flags.in_align <- pop stacks.s_in_align; flags.align <- pop stacks.s_align; end; do_force_block GROUP ; !cell.text<-Out.to_string !cur_out.out; do_close_block TEMP; if !verbose>2 then prerr_endline ("cell :#"^ !cell.text^ "#,pre :#"^ !cell.pre^ "#,post :#"^ !cell.post^ "#"); (* il faut remplir les champs w et h de cell *) if (!cell.wrap = Wfalse ) then !cell.w <- 0; !cell.h <- 1; let taille = ref 0 in for i = 0 to (String.length !cell.text) -1 do if !cell.text.[i]='\n' then begin !cell.h<- !cell.h+1; if (!cell.wrap = Wfalse) && (!taille > !cell.w) then begin !cell.w <- !taille; end; taille:=0; end else begin taille:=!taille+1; end; done; if (!cell.wrap = Wfalse) && (!taille > !cell.w) then !cell.w <- !taille; !cell.w <- !cell.w + (String.length !cell.pre) + (String.length !cell.post); if !verbose>2 then prerr_endline ("size : width="^string_of_int !cell.w^ ", height="^string_of_int !cell.h^ ", span="^string_of_int !cell.span); let _ = match !row.cells with | Tabl t -> Table.emit t { ver = !cell.ver; hor = !cell.hor; h = !cell.h; w = !cell.w; wrap = !cell.wrap; span = !cell.span; text = !cell.text; pre = !cell.pre; post = !cell.post; pre_inside = !cell.pre_inside; post_inside = !cell.post_inside; } | _ -> raise (Error "Invalid row type") in (* on a la taille de la cellule, on met sa largeur au bon endroit, si necessaire.. *) (* Multicolonne : Il faut mettre des zeros dans le tableau pour avoir la taille minimale des colonnes atomiques. Puis on range start,end dans une liste que l'on regardera a la fin pour ajuster les tailles selon la loi : la taille de la multicolonne doit etre <= la somme des tailles minimales. Sinon, il faut agrandir les colonnes atomiques pour que ca rentre. *) if !cell.span = 1 then begin Table.emit !table.taille !cell.w end else if !cell.span = 0 then begin Table.emit !table.taille 0; end else begin for _i = 1 to !cell.span do Table.emit !table.taille 0 done; multi := (!table.col,!table.col + !cell.span -1,!cell.w) :: !multi; end; !table.col <- !table.col + !cell.span -1; if !cell.h> !row.haut then !row.haut<- !cell.h; !cell.pre <- ""; !cell.pre_inside <- []; if !verbose>2 then prerr_endline "<= force_cell"; ;; let close_cell _content = do_close_cell _content let open_cell_group () = !table.in_cell <- true; and close_cell_group () = !table.in_cell <- false; and erase_cell_group () = !table.in_cell <- false; ;; let erase_cell () = if !verbose>2 then prerr_endline "erase cell"; if (!cell.wrap=Wtrue) then begin flags.in_align <- pop stacks.s_in_align; flags.align <- pop stacks.s_align; end; erase_block ""; let _ = Out.to_string !cur_out.out in erase_block "TEMP"; !table.col <- !table.col -1; !cell.pre <- ""; !cell.pre_inside <- []; ;; let erase_row () = if !verbose > 2 then prerr_endline "erase_row" ; !table.line <- !table.line -1 and close_row _ = if !verbose> 2 then eprintf "close_row tailles=%a, taille=%a\n" ptailles !table ptaille !table ; register_taille !table ; Table.emit !table.table { haut = !row.haut; cells = Arr (Table.trim (match !row.cells with | Tabl t -> t | _-> raise (Error "Invalid row type")))}; ;; let center_format = Tabular.Align {Tabular.hor="center" ; Tabular.vert = "top" ; Tabular.wrap = false ; Tabular.pre = "" ; Tabular.post = "" ; Tabular.width = Length.Default} ;; let make_border s = if !verbose> 2 then prerr_endline ("Adding border after column "^string_of_int !table.col^" :'"^s^"'"); if (!table.col = -1) || not ( !table.in_cell) then !cell.pre <- !cell.pre ^ s else !cell.post <- !cell.post ^ s ;; let make_inside s _ = if !verbose>2 then prerr_endline ("Adding inside after column "^string_of_int !table.col^" :'"^s^"'"); if (!table.col = -1) || not ( !table.in_cell) then begin let start = String.length !cell.pre in !cell.pre <- !cell.pre ^ s; for i = start to String.length !cell.pre -1 do !cell.pre_inside <- i::!cell.pre_inside; done; end else begin let start = String.length !cell.post in !cell.post <- !cell.post ^ s; for i = start to String.length !cell.post -1 do !cell.post_inside <- i::!cell.post_inside; done; end; ;; let make_hline _ _ = new_row(); open_cell center_format 0 0 false; close_mods (); !cell.w <- 0; !cell.wrap <- Fill; put_char '-'; close_cell (); close_row (); ;; let text_out j hauteur height align = match align with | Top -> (j < height) | Middle -> ((j >= (hauteur-height)/2) && (j <= ((hauteur-height)/2)+height-1)) | Bottom -> (j >= hauteur - height) | Base i -> if ( hauteur * i) >= 50 * ( 2*hauteur - height ) then (j >= hauteur - height) (* Bottom *) else if ( hauteur * i) <= height * 50 then (j < height) (* Top *) else ((100*j >= i*hauteur - 50*height) && (100*j < i*hauteur + 50*height)) (* Elsewhere *) ;; (* dis si oui ou non on affiche la ligne de cette cellule, etant donne l'alignement vertical.*) let safe_string_make n c = if n >= 0 then String.make n c else begin warning (sprintf "Text.put_line: negative line: %i '%c'\n" n c) ; "" end let put_ligne texte pos align width taille wrap= (* envoie la ligne de texte apres pos, sur out, en alignant horizontalement et en completant pour avoir la bonne taille *) let pos_suiv = try String.index_from texte pos '\n' with | Not_found -> String.length texte | Invalid_argument _ -> let l = String.length texte in assert (pos=l) ; l in let s = String.sub texte pos (pos_suiv - pos) in let t,post= if wrap=Wtrue then String.length s,0 else width,width - String.length s in let ligne = match align with | Left -> String.concat "" [s; safe_string_make (taille-t+post) ' '] | Center -> String.concat "" [safe_string_make ((taille-t)/2) ' '; s; safe_string_make (taille - t + post- (taille-t)/2) ' '] | Right -> String.concat "" [safe_string_make (taille-t) ' '; s; safe_string_make (post) ' '] in if !verbose>2 then prerr_endline ("line sent :#"^ligne^"#"); do_put ligne; pos_suiv + 1 ;; let put_border s inside j = for i = 0 to String.length s -1 do if j=0 || not (List.mem i inside) then do_put_char s.[i] else do_put_char ' '; done; ;; let somme debut fin = let r = ref 0 in for k = debut to fin do r := !r + !table.tailles.(k) done ; !r ;; let calculate_multi () = (* Finalisation des multi-colonnes : on les repasse toutes pour ajuster les tailles eventuellement *) let rec do_rec = function [] -> () | (debut,fin,taille_mini) :: reste -> begin let taille = somme debut fin in if !verbose>3 then prerr_endline ("from "^string_of_int debut^ " to "^string_of_int fin^ ", size was "^string_of_int taille^ " and should be at least "^string_of_int taille_mini); if taille < taille_mini then begin (* il faut agrandir *) if !verbose>3 then prerr_endline ("ajusting.."); for i = debut to fin do if taille = 0 then !table.tailles.(debut) <- taille_mini else let t = !table.tailles.(i) * taille_mini in !table.tailles.(i) <- (t / taille + ( if 2*(t mod taille) >= taille then 1 else 0)); done; (* Attention : on agrandit aussi les colonnes p !! *) end; do_rec reste; end in if !verbose>2 then prerr_endline "Finalizing multi-columns."; do_rec !multi; if !verbose>2 then prerr_endline "Finalized multi-columns."; ;; let close_table () = if !verbose>2 then begin prerr_endline "=> close_table"; pretty_stack out_stack end; register_taille !table ; let tab = Table.trim !table.table in (* il reste a formatter et a flusher dans la sortie principale.. *) !table.lines<-Array.length tab; if !verbose>2 then prerr_endline ("lines :"^string_of_int !table.lines); calculate_multi (); !table.width <- somme 0 (Array.length !table.tailles -1); finit_ligne(); if !table.width > flags.hsize then warning ("overfull line in array : array too wide"); for i = 0 to !table.lines - 1 do let ligne = match tab.(i).cells with | Arr a -> a | _-> raise (Error "Invalid row type:table") in (* affichage de la ligne *) (* il faut envoyer ligne apres ligne dans chaque cellule, en tenant compte de l'alignement vertical et horizontal..*) if !verbose> 2 then prerr_endline ("line "^string_of_int i^", columns:"^string_of_int (Array.length ligne)^", height:"^string_of_int tab.(i).haut); let pos = Array.create (Array.length ligne) 0 in !row.haut <-0; for j = 0 to tab.(i).haut -1 do if not ( i=0 && j=0) then do_put_char '\n'; let col = ref 0 in for k = 0 to Array.length ligne -1 do begin (* ligne j de la cellule k *) if ligne.(k).wrap = Fill then ligne.(k).span <- Array.length !table.tailles; let taille_borders = (String.length ligne.(k).pre) + (String.length ligne.(k).post) in let taille = (somme !col (!col + ligne.(k).span-1)) - taille_borders in if !verbose> 2 then prerr_endline ("cell to output:"^ ligne.(k).pre^ ligne.(k).text^ ligne.(k).post^ ", taille="^string_of_int taille); put_border ligne.(k).pre ligne.(k).pre_inside j; if (text_out j tab.(i).haut ligne.(k).h ligne.(k).ver) && (ligne.(k).wrap <> Fill )then begin pos.(k) <- put_ligne ligne.(k).text pos.(k) ligne.(k).hor (ligne.(k).w - taille_borders) taille ligne.(k).wrap end else if ligne.(k).wrap = Fill then do_put (String.make taille ligne.(k).text.[0]) else do_put (String.make taille ' '); col := !col + ligne.(k).span; put_border ligne.(k).post ligne.(k).post_inside j; end; done; if !col< Array.length !table.tailles -1 then begin let len = !table.width - (somme 0 (!col-1)) in do_put ( String.make len ' '); end; done; done; flags.align <- pop stacks.s_align; table := pop table_stack; row := pop row_stack; cell := pop cell_stack; multi := pop multi_stack; flags.in_table <- pop stacks.s_in_table; close_block ""; if not (flags.in_table) then finit_ligne (); if !verbose>2 then prerr_endline "<= close_table" ;; (* Info *) let infomenu _ = () ;; let infonode _ _ _ = () and infoextranode _ _ _ = () ;; (* Divers *) let is_empty () = flags.in_table && (Out.is_empty !cur_out.out) && (flags.x= -1);; let image arg _ = if arg <> "" then begin put arg; put_char ' ' end ;; let horizontal_line s width height = if flags.in_table then begin eprintf "HR: %s %s %s\n" s (Length.pretty width) (Length.pretty height) ; if false && not (Length.is_zero width || Length.is_zero height) then begin !cell.w <- 0; !cell.wrap <- Fill; put_char '-' end end else begin open_block "INFO" ""; finit_ligne (); let taille = match width with | Char x -> x | Pixel x -> x / Length.font | Percent x -> (flags.hsize -1) * x / 100 | Default -> flags.hsize - 1 | No s -> raise (Fatal ("No-length ``"^s^"'' in out-manager")) in let ligne = String.concat "" [(match s with | "right" -> String.make (flags.hsize - taille -1) ' ' | "center" -> String.make ((flags.hsize - taille)/2) ' ' | _ -> ""); String.make taille '-'] in put ligne; finit_ligne (); close_block "INFO"; end ;; (*------------*) (*---MATHS ---*) (*------------*) let cm_format = Tabular.Align {Tabular.hor="center" ; Tabular.vert = "middle" ; Tabular.wrap = false ; Tabular.pre = "" ; Tabular.post = "" ; Tabular.width = Length.Default} ;; let formated s = Tabular.Align { Tabular.hor= (match s with | "cm" | "cmm" | "cb" | "ct" -> "center" | "lt" | "lb" | "lm" -> "left" | _ -> "left") ; Tabular.vert = (match s with | "cm" | "lm" ->"middle" | "lt" | "ct" -> "top" | "lb" | "cb" -> "bottom" | "cmm" -> "45" | _ -> "middle") ; Tabular.wrap = false ; Tabular.pre = "" ; Tabular.post = "" ; Tabular.width = Length.Default} ;; let freeze f = push out_stack (Freeze f) ; if !verbose > 2 then begin prerr_string "freeze: stack=" ; pretty_stack out_stack end ;; let flush_freeze () = match top out_stack with Freeze f -> let _ = pop out_stack in if !verbose > 2 then begin prerr_string "flush_freeze" ; pretty_stack out_stack end ; f () ; true | _ -> false ;; let pop_freeze () = match top out_stack with Freeze f -> let _ = pop out_stack in f,true | _ -> (fun () -> ()),false ;; (* Displays *) let open_display _ = open_table (!verbose>1) ""; new_row (); if !verbose > 1 then make_border "{"; open_cell cm_format 1 0 false; open_cell_group (); ;; let open_display_varg _ = open_display "" let close_display () = if not (flush_freeze ()) then begin if !verbose > 1 then make_border "}"; close_cell_group (); close_cell (); close_row (); close_table (); end; ;; let item_display () = let f,is_freeze = pop_freeze () in if !verbose > 1 then make_border "|"; close_cell (); close_cell_group (); open_cell cm_format 1 0 false; open_cell_group (); if is_freeze then freeze f; ;; let item_display_format format = let f,is_freeze = pop_freeze () in if !verbose > 1 then make_border "|"; close_cell (); close_cell_group (); open_cell (formated format) 1 0 false; open_cell_group (); if is_freeze then freeze f; ;; let force_item_display () = item_display () ;; let erase_display () = if !verbose > 2 then prerr_endline "erase_display" ; erase_cell (); erase_cell_group (); erase_row (); close_table (); ;; let open_maths display = if !verbose >1 then prerr_endline "open_maths"; if display then begin open_block "ALIGN" "CENTER"; open_display ""; flags.first_line <- 0; open_display "" end else open_block "" ""; and close_maths display = if display then begin close_display (); close_display (); close_block "ALIGN"; end else close_block ""; if !verbose>1 then prerr_endline "close_maths"; ;; let open_vdisplay _ = open_table (!verbose>1) ""; and close_vdisplay () = close_table (); and open_vdisplay_row s = new_row (); if !verbose > 0 then make_border "["; open_cell (formated s) 1 0 false; open_cell_group (); open_display ""; and close_vdisplay_row () = close_display (); if !verbose > 0 then make_border "]"; close_cell (); close_cell_group (); close_row (); if !verbose > 0 then make_hline 0 false; ;; let insert_sup_sub () = let f,is_freeze = pop_freeze () in let ps,parg,pout = pop_out out_stack in if ps <> GROUP then failclose (sprintf "sup_sub : %s closes \"\"" (pp_block ps)); let new_out = newstatus false [] [] true in push_out out_stack (ps,parg,new_out); close_block ""; cur_out := pout; open_block "" ""; if is_freeze then freeze f; open_display ""; let s =(Out.to_string new_out.out) in do_put s; flags.empty <- (s=""); free new_out; ;; let standard_sup_sub scanner what sup sub display = if display then begin insert_sup_sub (); let f,ff = match sup.arg,sub.arg with | "","" -> "cm","cm" | "",_ -> change_format (formated "lt"); "lb","cm" | _,"" -> change_format (formated "lm"); "lt","cmm" | _,_ -> "cm","cm" in let vide= flags.empty in item_display_format f ; if sup.arg <>"" || sub.arg<>"" then begin open_vdisplay display; (*if sup<>"" || vide then*) begin open_vdisplay_row "lt"; scanner sup ; close_vdisplay_row (); end; open_vdisplay_row "lm"; what (); close_vdisplay_row (); if sub.arg <>"" || vide then begin open_vdisplay_row "lb"; scanner sub ; close_vdisplay_row (); end; close_vdisplay (); item_display (); end else what (); close_display (); change_format (formated ff); item_display (); end else begin what (); if sub.arg <> "" then begin put "_"; scanner sub; end; if sup.arg <> "" then begin put "^"; scanner sup; end; end and limit_sup_sub scanner what sup sub display = item_display (); open_vdisplay display; open_vdisplay_row "cm"; scanner sup; close_vdisplay_row (); open_vdisplay_row "cm"; what (); close_vdisplay_row (); open_vdisplay_row "cm"; scanner sub; close_vdisplay_row (); close_vdisplay (); item_display (); and int_sup_sub something _ scanner what sup sub display = if something then what (); item_display (); open_vdisplay display; open_vdisplay_row "lm"; scanner sup; close_vdisplay_row (); open_vdisplay_row "lm"; put ""; close_vdisplay_row (); open_vdisplay_row "lm"; scanner sub; close_vdisplay_row (); close_vdisplay (); item_display (); ;; let insert_vdisplay open_fun = let ps,parg,pout = pop_out out_stack in if ps <> GROUP then failclose (sprintf "insert_vdisplay : %s closes the cell." (pp_block ps)); let pps,pparg,ppout = pop_out out_stack in if pps <> TEMP then failclose (sprintf "insert_vdisplay : %s closes the cell2." (pp_block pps)); let ts,targ,tout = pop_out out_stack in if ts <> GROUP then failclose (sprintf "insert_vdisplay : %s closes the table." (pp_block ts)); let new_out = newstatus false [] [] tout.temp in push_out out_stack (ts,targ,new_out); push_out out_stack (pps,pparg,ppout); push_out out_stack (ps,parg,pout); close_display (); cur_out :=tout; open_display ""; open_fun (); let s = Out.to_string new_out.out in put s; free new_out; [] ;; let addvsize x = flags.vsize <- flags.vsize + x let over _ = let _=insert_vdisplay ( fun () -> begin open_vdisplay display; open_vdisplay_row "cm" end) in close_vdisplay_row (); make_hline 0 false ; open_vdisplay_row "cm"; freeze (fun () -> close_vdisplay_row (); close_vdisplay (); close_display ();) let translate = function "<" -> "<" | ">" -> ">" | "\\{" -> "{" | "\\}" -> "}" | s -> s ;; let left delim _ k = item_display (); open_display ""; close_cell_group (); make_border (translate delim) ; k 3 ; open_cell_group (); ;; let right delim _ = let vsize = 3 in if delim<>"." then make_border (translate delim); item_display (); close_display (); vsize ;; hevea-2.09/index.ml0000644004317100512160000002404612017660721014233 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Misc open Entry let missing_index tag = Misc.warning ("Index structure not found, missing "^ (match tag with | "default" -> "\\makeindex" | _ -> "\\newindex{"^tag^"}..")) ;; type entry_t = {key : key ; see : string option ; item : string} ;; type entry = | Good of entry_t | Bad let first_key = function | (x::_),_ -> x | _ -> raise (Misc.Fatal ("Empty key in first_key")) let pretty_key (l,p) = let rec p_rec l p = match l,p with [],[] -> "" | [x],[""]-> x | [x],[y]-> x^"@"^y | x::xs,""::ys -> x^"!"^p_rec xs ys | x::xs,y::ys -> x^"@"^y^"!"^p_rec xs ys | _,_ -> assert false in p_rec l p ;; type t_index = {mutable name : string ; mutable onebad : bool ; mutable counter : int ; sufin : string ; sufout : string ; from_file : entry array option ; from_doc : entry Table.t ; out : Out.t} let itable = Hashtbl.create 17 ;; let read_index_file name file = let lexbuf = Lexing.from_channel file in let r = Table.create Bad in let rec do_rec () = try let arg1,arg2 = read_indexentry lexbuf in let entry = try let k,see = read_key (MyLexing.from_string arg1) in Good {key=k ; see=see ; item = arg2} with Entry.NoGood -> Misc.warning ("Bad index arg syntax in file: "^name^ ", index entry is '"^arg1^"'") ; Bad in Table.emit r entry ; do_rec () with | Entry.Fini -> Table.trim r in let r = do_rec () in if !verbose > 0 then prerr_endline ("Index file: "^name^" succesfully read"); Some r let find_index tag = Hashtbl.find itable tag let changename tag name = try let idx = find_index tag in idx.name <- name with Not_found -> missing_index tag let index_lbl tag i = "hevea_"^tag^string_of_int i let index_filename suff = Parse_opts.base_out^".h"^suff let do_treat tag arg refvalue anchor = (* prerr_endline ("Index treat: "^tag^", "^arg^", "^refvalue) ; *) try if !verbose > 2 then prerr_endline ("Index.treat with arg: "^arg) ; let {from_doc = from_doc ; out = out} as idx = find_index tag in let lbl = match anchor with | Some lbl -> lbl | None -> index_lbl tag idx.counter in let refvalue = match refvalue with "" -> "??" | s -> s in let item = "\\@locref{"^lbl^"}{"^refvalue^"}" in Out.put out "\\indexentry{" ; Out.put out arg ; Out.put out "}{" ; Out.put out item ; Out.put out "}\n" ; let lexbuf = MyLexing.from_string arg in let entry = try let key,see = read_key lexbuf in Good {key = key ; see = see ; item = item} with | Entry.NoGood -> idx.onebad <- true ; Misc.warning ("Bad index syntax: '"^arg^"'") ; Bad in Table.emit from_doc entry ; idx.counter <- idx.counter + 1 ; lbl with | Not_found -> missing_index tag ; "" ;; let treat tag arg refvalue = do_treat tag arg refvalue None and treat_anchor tag arg refvalue lbl = ignore (do_treat tag arg refvalue (Some lbl)) (* Compare function for keys *) let is_alpha c = ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') let compare_char c1 c2 = if is_alpha c1 && is_alpha c2 then let r = compare (Char.uppercase c1) (Char.uppercase c2) in if r <> 0 then r else compare c1 c2 else if is_alpha c1 then 1 else if is_alpha c2 then -1 else compare c1 c2 exception Result of int let compare_string s1 s2 = let i = ref 0 and l1 = String.length s1 and l2 = String.length s2 in begin try while true do begin if !i >= l1 then if !i >= l2 then raise (Result 0) else raise (Result (-1)) else if !i >= l2 then raise (Result 1) else let c = compare_char s1.[!i] s2.[!i] in if c <> 0 then raise (Result c) end ; i := !i + 1 done ; 0 with Result x -> x end let comp (l1,p1) (l2,p2) = let rec c_rec l1 l2 p1 p2 = match l1,l2 with | [],[] -> 0 | [],_ -> -1 | _,[] -> 1 | x1::r1,x2::r2 -> let t = compare_string x1 x2 in if t<> 0 then t else begin match p1,p2 with | y1::p1, y2::p2 -> let t = compare_string y1 y2 in if t <> 0 then t else c_rec r1 r2 p1 p2 | _,_ -> assert false end in c_rec l1 l2 p1 p2 ;; module OrderedKey = struct type t = key let compare = comp end ;; module KeySet = Set.Make(OrderedKey) ;; let rec common e1 e2 = match e1,e2 with ([],_),_ -> e1,e2 | _,([],_) -> e1,e2 | ([_],_),([_],_) -> e1,e2 | (_::_,_),([_],_) -> e1,e2 | (x1::r1,_::p1),(x2::r2,_::p2) -> if x1=x2 then common (r1,p1) (r2,p2) else e1,e2 | _ -> assert false ;; let rec close_prev out = function [],_ | [_],_ -> () | _::r,_::p -> Out.put out "\\end{indexenv}\n" ; close_prev out (r,p) | _ -> assert false ;; let rec open_this out k = match k with [],_ -> () | k::r,p::rp -> Out.put out "\\indexitem " ; let tag = if p <> "" then p else k in Out.put out tag ; begin match r with [] -> () | _ -> Out.put out "\\begin{indexenv}\n" ; end ; open_this out (r,rp) | _ -> assert false ;; let start_change s1 s2 = match s1,s2 with | "",_ -> false | _,"" -> false | _,_ -> Char.uppercase s1.[0] <> Char.uppercase s2.[0] let print_entry out _ entries bk k xs = let rp,rt = common bk k in close_prev out rp ; if fst rp = [] then Out.put out "\\begin{indexenv}\n" else begin let top_prev = first_key bk and top_now = first_key k in if start_change top_prev top_now then Out.put out "\\indexspace\n" end ; open_this out rt ; let rec prints = function [] -> Out.put_char out '\n' | i::r -> Out.put out ", " ; begin match entries.(i) with | Good e -> begin match e.see with | None -> Out.put out e.item | Some see -> Out.put out ("\\"^see^"{"^e.item^"}") end ; | Bad -> () end ; prints r in prints (List.rev xs) ;; let make_index t = let table = Hashtbl.create 17 and all = ref KeySet.empty in for i = 0 to Array.length t - 1 do match t.(i) with | Good e -> all := KeySet.add e.key !all ; Hashtbl.add table e.key i | Bad -> () done ; !all,table let output_index tag entries out = if !verbose > 1 then prerr_endline ("Print index ``"^tag^"''") ; let all_keys,table = make_index entries in let prev = ref ([],[]) in KeySet.iter (fun k -> if !verbose > 2 then prerr_endline ("Print_entry: "^pretty_key k); print_entry out tag entries !prev k (Hashtbl.find_all table k) ; prev := k) all_keys ; let pk,_ = !prev in List.iter (fun _ -> Out.put out "\\end{indexenv}\n") pk let create_hind t tag sufout = let outname = index_filename sufout in try let chan = open_out outname in output_index tag t (Out.create_chan chan) ; close_out chan with | Sys_error s -> Misc.warning ("File error for "^outname^": "^s) let newindex tag sufin sufout name = (* prerr_endline ("New index: "^tag) ; *) Hashtbl.remove itable tag ; let from_file = try let filename = index_filename sufin in let file = open_in filename in read_index_file filename file with Sys_error _ -> None in begin match from_file with | None -> () | Some t -> create_hind t tag sufout end ; Hashtbl.add itable tag {name = name ; onebad = false ; counter = 0 ; sufin = sufin ; sufout = sufout ; from_file = from_file ; from_doc = Table.create Bad ; out = Out.create_buff ()} let print main tag = try let idx = find_index tag in main ("\\@indexsection{"^idx.name^"}") ; let indname = index_filename idx.sufout in begin match idx.from_file with | None -> create_hind (Table.trim idx.from_doc) tag idx.sufout | _ -> () end ; main ("\\input{"^indname^"}") with | Not_found -> missing_index tag let diff_entries e1 e2 = let l1 = Array.length e1 and l2 = Array.length e2 in if l1 <> l2 then true else let rec diff_rec i = if i >= l1 then false else e1.(i) <> e2.(i) || diff_rec (i+1) in diff_rec 0 let do_dump_index idxname idx = try let chan = open_out idxname in Out.to_chan chan idx.out ; close_out chan with | Sys_error s -> Misc.warning ("File error on "^idxname^": "^s) let finalize check = if check then begin let top_changed = ref false in Hashtbl.iter (fun _ idx -> let entries = Table.trim idx.from_doc in let changed = match idx.from_file with | Some t -> diff_entries t entries | None -> Array.length entries <> 0 in let idxname = index_filename idx.sufin in if changed || idx.onebad then begin top_changed := !top_changed || changed ; try if Array.length entries = 0 && not idx.onebad then Mysys.remove idxname else begin do_dump_index idxname idx end with | Sys_error s -> Misc.warning ("File error on "^idxname^": "^s) end else if !Misc.dump_index then begin do_dump_index idxname idx end) itable ; if !top_changed then Misc.message "HeVeA Warning: Index(es) may have changed. Rerun me to get them right." ; !top_changed end else false hevea-2.09/text/0000755004317100512160000000000012204704151013542 5ustar marangetcristalhevea-2.09/text/book.hva0000644004317100512160000000170712017660721015207 0ustar marangetcristal\ifstyleloaded \else \input{bookcommon.hva} \newcommand{\@forcenewline}{\\{}~\\{}} \@makesection {\part}{-2}{part} {\@forcenewline\@open{align}{center}\@open{head}{*}} {\partname:~\thepart}{\\} {\@close{head}\@close{align}} \@makesection {\chapter}{-1}{chapter} {\@forcenewline\@open{head}{*}} {\chaptername~\thechapter}{\qquad} {\@close{head}} \@makesection {\section}{0}{section} {\@forcenewline\@open{head}{*=}} {\thesection}{\quad} {\@forcenewline\@close{head}} \@makesection {\subsection}{1}{subsection} {\@forcenewline\@open{head}{=}} {\thesubsection}{\quad} {\@close{head}} \@makesection {\subsubsection}{2}{subsubsection} {\@forcenewline\@open{head}{-}}{\thesubsubsection}{\quad}{\@close{head}} \@makesection {\paragraph}{3}{paragraph} {\@open{head}{}}{\theparagraph}{\quad}{\@close{head}} \@makesection {\subparagraph}{4}{subparagraph} {\@open{head}{}}{\thesubparagraph}{\quad}{\@close{head}} \styleloadedtrue \fi hevea-2.09/text/austrian.hva0000644004317100512160000000016610155357666016115 0ustar marangetcristal\@ifundefined{common@austrian@babel}{\input{german-common.hva}}{} \newcommand{\austrian@babel}{\common@austrian@babel}hevea-2.09/text/hevea.hva0000644004317100512160000001566212113070517015345 0ustar marangetcristal%%% Une prcaution. \ifhtml\hva@warn{text/hevea is for text and info mode !!!}\endinput\fi %%%% package used by all packages \input{plain.hva} \newif\ififthen\ifthenfalse \input{ifthen.hva} %% Style sheet information is ignored \newcommand{\newstyle}[2]{} \newcommand{\@getstylecolor}[1]{} \newcommand{\class@attr}[2]{} \newcommand{\setenvclass}[2]{} \newcommand{\getenvclass}[1]{} \newcommand{\envclass@attr}[2][]{} \newcommand{\loadcssfile}[1]{} %% Packages \input{packages.hva} %%%%%% Spacing \input{spaces.hva} \renewcommand{\ }{ } %% \input{latexcommon.hva} \input{iso-text.hva} %%% Special characters %%% Logos \def\TeX{\@print{TeX}} \def\LaTeX{\@print{LaTeX}} \def\LaTeXe{\@print{LaTeX2e}} \newcommand{\hevea}{\@print{HeVeA}} \newcommand{\hacha}{\@print{HaChA}} \newcommand{\html}{\@print{HTML}} %%% HTML related stuff (TEX equivalents are in the hevea.sty file) \newcommand{\@aelement}[2]{#2} \newcommand{\@footahref}[2]{#2\footnote{#1}} \newcommand{\ahref}[2]{\@footahref{#1}{#2}} \let\footahref\ahref \newcommand{\ahrefurl}[1]{\texttt{#1}} \newcommand{\mailto}[1]{{#1}} \newcommand{\imgsrc}[2][]{\hva@warn{Image in text}*#2*} \newcommand{\anchor}[1]{} %% Hyper-text references inside the document: \newcomand{\@openlocref}[1]{} \newcomand{\@closelocref}[1]{} \newcommand{\@locref}[2]{{#2}} \newcommand{\@locname}[2]{{#2}} \newcommand{\@locnameref}[3]{{#3}} %%% Two exported commands \let\ahrefloc\@locref \let\aname\@locname %%% footer and header, useful ??? \newsavebox{\@htmlhead} \newsavebox{\@htmlfoot} \newcommand{\htmlhead}[1]{\sbox{\@htmlhead}{#1}} \newcommand{\htmlfoot}[1]{\sbox{\@htmlfoot}{#1}} %%%%%%%%%%% Footnotes text dependant part \newcommand{\@open@footnotetext}{} \newcommand{\@close@footnotetext}{} \newcommand{\@noteref}[4]{#4} \newcommand{\@notepointer}[3]{#3} \newcommand{\@notetextstyle}[1]{~(#1)} \newcommand{\@notenotestyle}[1]{(#1)} \newcommand{\footnoterule}{\@hr[align=left]{.5\textwidth}{1pt}} \newenvironment{thefootnotes}[2][] {\footnoterule\begin{list}{}{\renewcommand{\makelabel}[1]{##1}}} {\end{list}} %%% Captions \newenvironment{hva@capted} {\begin{center}\begin{flushleft}} {\end{flushleft}\end{center}} %%% Neutral definitions for hacha \newcounter{cuttingdepth} \setcounter{cuttingdepth}{1} \newcommand{\cutdef}[2][]{} \newcommand{\cutend}{} \newcommand{\cuthere}[2]{\footnoteflush{#1}} \newcommand{\@secbegin}{} \newcommand{\@secend}{} \newcommand{\@secanchor}{} \newenvironment{cutflow}[1]{}{} \newcommand{\cutname}[1]{} \newcommand{\toplinks}[3]{} \newcommand{\setlinkstext}[3]{} %%%%%%%%%%%%% % Maketitle % %%%%%%%%%%%%% \newcommand{\title@tohaux}[1]{} \newcommand{\maketitle}{% \bgroup \newcommand{\checkcmd}[2] {\@ifundefined{@##1} {\hva@warn{No ##1 given}} {\usebox{\csname @##1\endcsname}##2}}% \@open{align}{center}% \@open{head}{*}% \usebox{\@title}\\% \@close{head}% \@open{head}{=}%H3 \checkcmd{author}{\par}% \checkcmd{date}{}% \@close{head}% \@close{align}% \egroup% \global\let\maketitle\relax} %%%%%%%%%%%% Bibliography \newcommand{\@bibref}[3]{#2\@bib@post{#3}} \newcommand{\@biblabel}[1]{[\@bibread{\bibtaghook{#1}}]} %%%%%%%%%%%%%%%%%%%%%%%% % Document environment % %%%%%%%%%%%%%%%%%%%%%%%% \newenvironment{document}{% \@end{document} \@restartoutput\unskip% \@atbegindocument% \cutdef[\thecuttingdepth]{\cuttingunit}% }{% \@atenddocument\@final@footer\@footnoteflush{document}\@raise@enddocument} \newenvironment{center}{\@open{align}{center}}{\@close{align}} \newenvironment{flushleft}{\@open{align}{left}}{\@close{align}} \newenvironment{flushright}{\@open{align}{right}}{\@close{align}} \newcommand{\centerline}[1]{\begin{center}#1\end{center}} \newenvironment{quote}{\@open{quote}{}}{\@close{quote}} \newenvironment{quotation}{\@open{quotation}{}}{\@close{quotation}} \newcommand{\centering}{\@insert{align}{center}} \newcommand{\raggedleft}{\@insert{align}{right}} \newcommand{\raggedright}{\@insert{align}{left}} %%%%%%%%%%% Figures %For figure & tables \newcommand{\@open@quote}[1]{\@open{quote}{}} \newcommand{\@close@quote}{\@close{quote}} \newcommand{\rule}[3][]{\@printHR{left}{100}\@print{ }}% %%%%%%%%%%%%%%%% LaTeX 2.09 style declarations \newenvironment{tt}{\@style{tt}}{} \newenvironment{bf}{\@style{b}}{} \newenvironment{em}{\@style{em}}{} \newenvironment{it}{\@style{i}}{} \newenvironment{rm}{\@anti{\sf,\tt}}{} \newenvironment{tiny}{\@fontsize{1}}{} \newenvironment{footnotesize}{\@fontsize{2}}{} \newenvironment{scriptsize}{\@fontsize{2}}{} \newenvironment{small}{\@fontsize{3}}{} \newenvironment{normalsize}{\@fontsize{3}}{} \newenvironment{large}{\@fontsize{4}}{} \newenvironment{Large}{\@fontsize{5}}{} \newenvironment{LARGE}{\@fontsize{5}}{} \newenvironment{huge}{\@fontsize{6}}{} \newenvironment{Huge}{\@fontsize{7}}{} \newenvironment{purple}{\@fontcolor{purple}}{} \newenvironment{silver}{\@fontcolor{silver}}{} \newenvironment{gray}{\@fontcolor{gray}}{} \newenvironment{white}{\@fontcolor{white}}{} \newenvironment{maroon}{\@fontcolor{maroon}}{} \newenvironment{red}{\@fontcolor{red}}{} \newenvironment{fuchsia}{\@fontcolor{fuchsia}}{} \newenvironment{green}{\@fontcolor{green}}{} \newenvironment{lime}{\@fontcolor{lime}}{} \newenvironment{olive}{\@fontcolor{olive}}{} \newenvironment{yellow}{\@fontcolor{yellow}}{} \newenvironment{navy}{\@fontcolor{navy}}{} \newenvironment{blue}{\@fontcolor{blue}}{} \newenvironment{teal}{\@fontcolor{teal}}{} \newenvironment{aqua}{\@fontcolor{aqua}}{} \def\cal{\red} \def\sf{\purple} \def\sc{\navy} \def\sl{\it\maroon} %%%% LaTeX2e verbose declarations \newenvironment{mdseries}{\@anti{\bf}}{} \newenvironment{bfseries}{\bf}{} \newenvironment{rmfamily}{\rm}{} \newenvironment{sffamily}{\@anti{\tt}\sf}{} \newenvironment{ttfamily}{\@anti{\sf}\tt}{} \newenvironment{upshape}{\@anti{\it,\sl,\sc}}{} \newenvironment{itshape}{\@anti{\sl,\sc}\it}{} \newenvironment{slshape}{\@anti{\it,\sc}\sl}{} \newenvironment{scshape}{\@anti{\it,\sl}\sc}{} \newenvironment{normalfont}{\rm\mdseries\upshape}{} %%%%%%%%%%%%%%%% \def\textrm#1{\mbox{\rmfamily#1}} \def\textup#1{\mbox{\upshape#1}} \def\textmd#1{\mbox{\mdseries#1}} \def\textnormal#1{\mbox{\normalfont#1}} \def\texttt#1{\mbox{\ttfamily#1}} \def\textit#1{\mbox{\itshape#1}} \def\textbf#1{\mbox{\bfseries#1}} \def\textsf#1{\mbox{\sffamily#1}} \def\textsl#1{\mbox{\slshape#1}} \def\textsc#1{\mbox{\scshape#1}} \newcommand{\emph}[1]{\mbox{\em#1}} %%%%%%%%% Index formating \newenvironment{indexenv}{\begin{itemize}}{\end{itemize}} \newcommand{\indexitem}{\item} \newcommand{\indexspace}{\vspace*{1em}} %%%%%%%%concrete minipage \setenvclass{minipage}{minipage} \newenvironment{@minipage}{}{} %%%%%% format theorems \let\th@font\em \newcommand{\set@th}[1] {\global\let\csname#1@font\endcsname\th@font} \newenvironment{th@env}[3] {\begin{flushleft}% \refstepcounter{#2}\textbf{#3~\csname{}the#2\endcsname}% \def\th@tmp{#1}\th@kont} {\end{flushleft}} \newcommand{\th@kont}[1][] {\ifoptarg~\textbf{(#1)}\fi\quad\csname\th@tmp{}@font\endcsname} %%%%%%%%%% No attributes for arrays and tabular \newcommand{\@table@attributes}{} \newcommand{\@table@attributes@border}{} %% Over \def\csname hevea@loaded\endcsname{} hevea-2.09/text/report.hva0000644004317100512160000000002006714547664015574 0ustar marangetcristal\input{book.hva}hevea-2.09/text/fancysection.hva0000644004317100512160000000002207041415265016731 0ustar marangetcristal\usepackage{color}hevea-2.09/text/german.hva0000644004317100512160000000015610155357666015537 0ustar marangetcristal\@ifundefined{common@german@babel}{\input{german-common.hva}} \newcommand{\german@babel}{\common@german@babel}hevea-2.09/text/natbib.hva0000644004317100512160000000040410634524554015513 0ustar marangetcristal\ProvidesPackage{natbib} \input{natbib-common.hva} \renewcommand{\@biblabel}[1] {\NAT@bibread{#1}\purple\NAT@format@item{#1}{\NAT@num}{\NAT@auth}{\NAT@year}} \renewcommand{\@bibref}[3] {{\def\@tmp{#2}\ifx\@tmp\@empty{}???\else\NAT@format@cite{#2}{#3}{#1}\fi}} hevea-2.09/text/colortbl.hva0000644004317100512160000000015207356331741016075 0ustar marangetcristal\usepackage{color} \def\columncolor {\execafter\@skipopt\execafter\@skipopt\execafter\@skiparg\@skipopt}hevea-2.09/text/color.hva0000644004317100512160000000031007043406614015362 0ustar marangetcristal\newcommand{\definecolor}[3]{} \newcommand{\DefineNamedColor}[4]{} \newcommand{\@getcolor}[2][]{} \newcommand{\color}[2][!*!]{} \newcommand{\textcolor}[3][!*!]{{#3}} \newenvironment{bgcolor}[2][]{}{} hevea-2.09/text/french.hva0000644004317100512160000000004610556103572015517 0ustar marangetcristal\input{\@hevealibdir/html/french.hva} hevea-2.09/text/article.hva0000644004317100512160000000151712017660721015677 0ustar marangetcristal\ifstyleloaded\relax \else \input{articlecommon.hva} \newcommand{\@forcenewline}{\\{}~\\{}} \@makesection {\part}{-1}{part} {\@forcenewline\@open{align}{center}\@open{head}{*}} {\partname:~\thepart}{\\} {\@close{head}\@close{align}} \@makesection {\section}{0}{section} {\@forcenewline\@open{head}{*=}} {\thesection}{\quad} {\@forcenewline\@close{head}} \@makesection {\subsection}{1}{subsection} {\@forcenewline\@open{head}{=}} {\thesubsection}{\quad} {\@close{head}} \@makesection {\subsubsection}{2}{subsubsection} {\@forcenewline\@open{head}{-}}{\thesubsubsection}{\quad}{\@close{head}} \@makesection {\paragraph}{3}{paragraph} {\@open{head}{}}{\theparagraph}{\quad}{\@close{head}} \@makesection {\subparagraph}{4}{subparagraph} {\@open{head}{}}{\thesubparagraph}{\quad}{\@close{head}} \styleloadedtrue \fi hevea-2.09/text/seminar.hva0000644004317100512160000000213406736142076015717 0ustar marangetcristal\ifstyleloaded\relax \else %%%% Landscape and portrait \iffrench \newcommand{\slidename}{Planche~:} \else \newcommand{\slidename}{Slide:} \fi \newcounter{slide} \newenvironment{slide}[1][]{% \stepcounter{slide}% \cuthere{section}{\slidename{} \theslide}% \@printHR{}{100}% \@open{ALIGN}{RIGHT}% \@open{HEAD}{*=}\slidename{} \theslide\@close{HEAD}%H2 \@close{ALIGN} \@printHR{}{100}% }{} \newenvironment{slide*}[1][]{\begin{slide}}{\end{slide}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% All seminar-specific commandes are null macros %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\landscapeonly}{} \newcommand{\portraitonly}{} \newcommand{\twoup}{} %% Margins \newif\ifcenterslides \newcommand{\raggedslides}[1][]{} %% Page breaking \newcommand{\extraslideheight}[1]{} \newcommand{\newslide}{} \newcommand{\slidefuzz}{} %% Magnification \newcommand{\slidemag}[1]{} \newcommand{\semin}{in} \newcommand{\semcm}{cm} \newcommand{\ptsize}[1]{} %% FRAMES \newcommand{\slideframe}[2][]{} \newcommand{\newslideframe}[1]{\slideframe} %%%% load the article style file \input{article.hva} \fihevea-2.09/lexattr.mll0000644004317100512160000000115312017660721014755 0ustar marangetcristallet blank = [' ' '\t' '\n' '\r'] rule add_style_acc acc style flag = parse | ("style"|"STYLE") blank* "=" blank* (('\'' ([^'\'']* as v) '\'' | '"' ([^'"']* as v) '"' | ('#'?['a' - 'z' 'A' - 'Z' '0' - '9' '-' '+' '_' ':' '.']+ as v))) (* '"' *) { add_style_acc (Printf.sprintf "%s style=\"%s;%s\"" acc v style) style true lexbuf } | _ as v { add_style_acc (acc ^ (String.make 1 v)) style flag lexbuf } | eof { if flag then acc else Printf.sprintf "%s style=\"%s\"" acc style} { let add_style style attrs = add_style_acc "" style false (MyLexing.from_string attrs) } hevea-2.09/program.hva0000644004317100512160000000002507156457563014750 0ustar marangetcristal\@primitives{program}hevea-2.09/bibhva.ml0000644004317100512160000000636110457455411014363 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* Luc Maranget, projet MOSCOVA, INRIA Rocquencourt *) (* *) (* Copyright 2006 Institut National de Recherche en Informatique et *) (* en Automatique. Distributed only by permission. *) (* *) (* *) (***********************************************************************) (* $Id: bibhva.ml,v 1.2 2006-07-19 16:17:13 maranget Exp $ *) let parse_args () = let options = ref [] and name = ref "" in for k = 1 to Array.length Sys.argv-1 do let a = Sys.argv.(k) in if String.length a > 0 && a.[0] == '-' then options := !options @ [a] else name := a done ; !options, !name exception Error of string let rename name1 name2 = try Sys.rename name1 name2 with Sys_error msg -> raise (Error (Printf.sprintf "rename %s %s: %s" name1 name2 msg)) let remove name = try Sys.remove name with Sys_error msg -> raise (Error (Printf.sprintf "remove %s: %s" name msg)) let file_exists name = try Sys.file_exists name with Sys_error msg -> raise (Error (Printf.sprintf "file_exists %s: %s" name msg)) let preserved = ref [] let preserve x = preserved := x :: !preserved (* Not 100% safe, but will do most of the time *) let rec temp_file name suff = let temp_name = name ^ suff in if file_exists temp_name then temp_file temp_name suff else temp_name let save_to_temp file_name = if file_exists file_name then begin let tmp_name = temp_file file_name "~" in rename file_name tmp_name ; preserve (file_name, Some tmp_name) end else begin preserve (file_name, None) end and restore () = let restore_one x = try begin match x with | name,None -> if file_exists name then remove name | name,Some tmp_name -> if file_exists name then remove name ; rename tmp_name name end with Error msg -> Printf.eprintf "Warning: %s\n" msg in List.iter restore_one !preserved ; preserved := [] let run_bibtex options name = try let base = if Filename.check_suffix name ".haux" then Filename.chop_suffix name ".haux" else name in let name_aux = base ^ ".aux" and name_haux = base ^ ".haux" in save_to_temp name_aux ; rename name_haux name_aux ; preserve (name_haux, Some name_aux) ; let cmd = "bibtex "^String.concat " " (options @ [name_aux]) in let name_bbl = base ^ ".bbl" in save_to_temp name_bbl ; (* bibtex fails too easily to account for its status code *) ignore (Sys.command cmd) ; let name_hbbl = base ^ ".hbbl" in if file_exists name_hbbl then remove name_hbbl ; rename name_bbl name_hbbl ; restore () with | Error msg -> Printf.eprintf "Bibtex run failed: %s\n" msg ; restore () ; exit 2 | e -> restore () ; raise e let _ = let options, name = parse_args () in run_bibtex options name ; exit 0 hevea-2.09/infoRef.mll0000644004317100512160000002552012122274007014661 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) { open Lexing open Misc let compat_mem tbl key = try let _ = Hashtbl.find tbl key in true with Not_found -> false ;; exception Error of string type node_t = { mutable name : string; mutable comment : string; mutable previous : node_t option; mutable next : node_t option; mutable up : node_t option; mutable pos : int; } ;; type menu_t = { mutable num : int; mutable nom : string; mutable nod : node_t option; mutable nodes : node_t list; } ;; let menu_list = ref [];; let nodes = Hashtbl.create 17;; let delayed = ref [];; let current_node = ref None;; let menu_num = ref 0 ;; let counter = ref 0 and pos_file = ref 0 ;; let abs_pos () = !counter + !pos_file ;; let cur_file = ref (Parse_opts.name_out) ;; let file_number = ref 1 ;; type label_t = { mutable lab_name : string; mutable noeud : node_t option; };; let labels_list = ref [];; let files = ref [];; let top_node = ref false;; let hot_start () = menu_list := []; Hashtbl.clear nodes ; current_node := None ; menu_num := 0 ; counter := 0 ; pos_file := 0 ; cur_file := Parse_opts.name_out ; files := [] ; top_node := false ; file_number := 1 ; labels_list := [] ;; let infomenu arg = menu_num:=!menu_num+1; menu_list := { num = !menu_num; nom = arg; nod = !current_node; nodes = []; } ::!menu_list; Text.open_block "INFOLINE" ""; Text.put ("\\@menu"^string_of_int !menu_num^"\n"); Text.close_block "INFOLINE" ;; let rec cherche_menu m = function | [] -> raise (Error ("Menu ``"^m^"'' not found")) | menu::r -> if menu.nom = m then menu else cherche_menu m r ;; let rec cherche_menu_par_num n = function | [] -> raise (Error ("Menu not found")) | menu::r -> if menu.num = n then menu else cherche_menu_par_num n r ;; let ajoute_node_dans_menu n m = try let menu = cherche_menu m !menu_list in menu.nodes <- n :: menu.nodes; menu.nod with _ -> None ;; let verifie name = let nom = String.copy name in for i = 0 to String.length name -1 do match nom.[i] with | '\t' -> nom.[i] <- ' ' | ',' -> nom.[i] <- ' ' | '.' -> nom.[i] <- '-' | '\n' -> nom.[i] <- ' ' | _ -> () done; nom ;; (* References *) let rec cherche_label s = function | [] -> raise Not_found | l::r -> if l.lab_name=s then l.noeud else cherche_label s r ;; let rec change_label s = function | [] -> Misc.warning ("Cannot change label: ``"^s^"''") | l::r -> if l.lab_name = s then l.noeud <- !current_node else change_label s r let loc_name s1 = (* pose un label *) let _ = try let _ = cherche_label s1 !labels_list in Misc.warning ("Multiple use of label: "^s1) with Not_found -> () in let l = { lab_name = s1; noeud = !current_node ; } in labels_list := l:: !labels_list; Text.open_block "INFO" "" ; Text.put "\\@name{" ; Text.put s1 ; Text.put "}" ; Text.close_block "INFO" ; if !verbose > 1 then prerr_endline ("InfoRef.loc_name, label="^s1); ;; (* Sortie du fichier final *) let out_cur = ref (Out.create_null ()) ;; let set_out chan = if !verbose >3 then prerr_endline "Set_out"; out_cur := chan ;; let set_out_file s = if !verbose >3 then prerr_endline ("Set_out_file :"^s); cur_file := s ;; let put s = if !verbose >3 then prerr_endline ("put :"^s); counter:=!counter + String.length s; Out.put !out_cur s ;; let put_char c = if !verbose >3 then prerr_endline ("put_char :"^String.make 1 c); counter:=!counter +1; Out.put_char !out_cur c ;; let put_credits () = put "\n\n-------------------------------------\nThis file has been translated from LaTeX by HeVeA.\n\n"; and put_header () = put "This file has been translated from LaTeX by HeVeA.\n" ;; let next_file () = Out.close !out_cur ; file_number := !file_number +1; cur_file := Parse_opts.name_out ^ "-" ^ string_of_int !file_number ; if !verbose > 0 then prerr_endline ("Change file to "^ !cur_file) ; set_out (Out.create_chan (open_out !cur_file)) ; files := (!cur_file,abs_pos ()) :: !files ; pos_file := abs_pos () ; put_header () ; counter := 0 ;; let noeud_name n = n.name ;; let affiche_menu num = let menu = cherche_menu_par_num num !menu_list in if menu.nodes <> [] then begin put "* Menu:\n\n"; let rec affiche_items = function | [] -> () | n::reste -> put ("* "^noeud_name n^"::\t"^n.comment^"\n"); affiche_items reste; in affiche_items (List.rev menu.nodes); if !verbose >1 then prerr_endline ("Menu :"^menu.nom); end ;; let do_affiche_tag_table s = put ("\n\nTag table:\n"^(if s<> "" then s^"\n" else "")) ; Hashtbl.iter (fun _ n -> put ("Node: "^noeud_name n^""^string_of_int n.pos^"\n")) nodes; put "\nEnd tag table\n"; ;; let affiche_tag_table ()= match !files with | [_] -> do_affiche_tag_table "" | _ -> let rec do_indirect = function | [] -> () | (f,p)::reste -> put (f^": "^string_of_int p^"\n"); do_indirect reste in Out.close !out_cur ; set_out (Out.create_chan (open_out Parse_opts.name_out)) ; put_header () ; put "\nIndirect:\n"; do_indirect (List.rev !files); do_affiche_tag_table "(Indirect)" ;; let affiche_node nom = if !top_node then begin put_credits () ; top_node := false end ; let noeud = try Hashtbl.find nodes nom with Not_found -> raise (Error ("Node not found :"^nom)) in if not Parse_opts.filter && !counter > 50000 then begin next_file () end; noeud.pos <- abs_pos (); put "\n"; put ("File: "^Parse_opts.base_out^", Node: "^noeud_name noeud); (match noeud.next with | None -> () | Some n -> put (",\tNext: "^noeud_name n)); (match noeud.previous with | None -> () | Some n -> put (",\tPrev: "^noeud_name n)); (match noeud.up with | None -> if noeud.name = "Top" then begin put ",\tUp: (dir)" ; top_node := true end else put ",\tUp: Top" | Some n -> put (",\tUp: "^noeud_name n)); put_char '\n'; if !verbose >1 then prerr_endline ("Node : "^noeud_name noeud); ;; let affiche_ref key = try let l = cherche_label key !labels_list in match l with | None -> () | Some node -> put ("*Note "^noeud_name node^"::") with | Not_found -> () (* A warning has already been given *) ;; let footNote_label = ref "" ;; } rule main = parse | "\\@menu" { let num = numero lexbuf in affiche_menu num; main lexbuf} | "\\@node" { let nom = finitLigne lexbuf in affiche_node nom; main lexbuf} | "\\@reference{" { let key = arg lexbuf in affiche_ref key; main lexbuf} | "\\@name{" {let _ = arg lexbuf in main lexbuf} | eof {affiche_tag_table ()} | _ {let lxm = lexeme_char lexbuf 0 in put_char lxm; main lexbuf} and numero = parse ['0'-'9']+ {let lxm = lexeme lexbuf in int_of_string lxm} | _ {raise (Error "Syntax error in info temp file")} and finitLigne = parse [^'\n']+'\n' {let lxm = lexeme lexbuf in String.sub lxm 0 ((String.length lxm) -1)} | _ {raise ( Error "Syntax error in info temp file: no node name.")} and arg = parse [^'}']+'}' {let lxm= lexeme lexbuf in String.sub lxm 0 ((String.length lxm) -1)} | _ {raise (Error "Syntax error in info temporary file: invalid reference.")} and labels = parse | "\\@name{" {let key = arg lexbuf in key::labels lexbuf} | _ {labels lexbuf} | eof {[]} { let do_infonode opt num arg = let n = { name = verifie num; comment = arg; previous = None; next = None; up = None; pos = 0; } in if compat_mem nodes n.name then raise (Error ("Duplicate node name: "^n.name)); n.up <- (match opt with "" -> None | m -> ajoute_node_dans_menu n m); Hashtbl.add nodes n.name n; Text.open_block "INFOLINE" ""; Text.put ("\\@node"^n.name^"\n"); Text.close_block "INFOLINE"; current_node := Some n; if !verbose>1 then prerr_endline ("Node added :"^n.name^", "^n.comment) let infoextranode num nom text = delayed := (num,nom,text) :: !delayed and flushextranodes () = let rec flush_rec = function | [] -> () | (num,nom,text) :: rest -> do_infonode "" num nom ; Text.open_block "INFO" "" ; Text.put text ; Text.close_block "INFO" ; let labs = labels (MyLexing.from_string text) in List.iter (fun lab -> change_label lab !labels_list) labs ; flush_rec rest in flush_rec !delayed ; delayed := [] ;; let infonode opt num arg = flushextranodes () ; do_infonode opt num arg (* finalisation des liens entre les noeuds *) let rec do_finalize_nodes suivant = function | [] -> () | n::reste -> if !verbose>2 then prerr_endline ("node :"^n.name); n.next <- suivant; (match suivant with | None -> () | Some suiv -> suiv.previous <- Some n ); do_finalize_nodes (Some n) reste ;; let rec do_finalize_menus = function | [] -> () | m::reste -> if m.nodes <> [] then begin do_finalize_nodes None m.nodes; (match m.nod with None -> () | Some n -> if n.name = "Top" then let first_node = List.hd (List.rev m.nodes) in n.next <- Some first_node; first_node.previous <- Some n; (* On descend dans l'arborescence des menus *) let last_node = List.hd m.nodes in match last_node.next with | None -> () | Some suiv -> suiv.previous <- Some n; (* On remonte les menus au meme niveau *) ); do_finalize_menus reste; end ;; let finalize_nodes () = if !verbose>2 then prerr_endline "finalizing nodes"; flushextranodes () ; do_finalize_menus (List.rev !menu_list); if !verbose>2 then prerr_endline "finalizing done."; ;; let dump buff = let name,out_chan = match Parse_opts.name_out with | ""|"-" -> "", Out.create_chan stdout | s -> let name = s^"-1" in name, Out.create_chan (open_out name) in if !verbose > 0 then prerr_endline ("Final dump in "^name) ; set_out out_chan ; set_out_file name ; put_header () ; files := [name,abs_pos ()] ; main buff ; Out.close !out_cur ; if !file_number = 1 then Mysys.rename !cur_file Parse_opts.name_out } hevea-2.09/get.mli0000644004317100512160000000236612017660721014055 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: get.mli,v 1.12 2001-05-25 12:37:22 maranget Exp $ *) (***********************************************************************) open Lexstate exception Error of string val init : (string arg -> string) -> ((Lexing.lexbuf -> unit) -> Lexing.lexbuf -> string) -> (string -> unit) -> (string -> unit) -> (Lexing.lexbuf -> string) -> (Lexing.lexbuf -> unit) -> unit type saved val check : unit -> saved val hot : saved -> unit val get_int_string : string arg -> int val get_int : string list arg -> int val get_bool : string arg -> bool val get_length : string -> Length.t hevea-2.09/underscore.hva0000644004317100512160000000002007332473163015433 0ustar marangetcristal\@warnunderfalsehevea-2.09/myfiles.mli0000644004317100512160000000164210723547637014756 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) exception Error of string exception Except val set_import : string -> unit val open_tex : string -> string * in_channel val find : string -> string val changed : string -> string -> bool hevea-2.09/winstyles.hva0000644004317100512160000000047710513745760015343 0ustar marangetcristal%%Style for tables expressing delimitors \def\@delim@s{border-collapse:separate;border-spacing:0px;}% \newstyle{.delim}{\@delim@s{}margin:0px \@barsz;}% \newstyle{.delimleft}{\@delim@s{}margin:0px \@@barsz{} 0px 0px;}% \newstyle{.delimright}{\@delim@s{}margin:0px 0px 0px \@@barsz;}% \newstyle{.bracell}{padding:0ex;}% hevea-2.09/lexstyle.mli0000644004317100512160000000161412017660721015142 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Extract/abstract style attributes *) val get : Lexing.lexbuf -> Emisc.StringCount.count val set : string Emisc.StringMap.t -> out_channel -> Lexing.lexbuf -> bool hevea-2.09/english.hva0000644004317100512160000000165510334123204014712 0ustar marangetcristal %%%% Hevea support for babel option 'english'. %%%% Resets %%%% a) date format %%%% b) names of various part descriptors (contentsname etc.) \newcommand{\english@babel}{ \let\english@day\default@day% \let\english@month\default@month% \@ifundefined{theyear}{}{\def\today{\english@day\english@month,~\theyear}}% \def\prefacename{Preface}% \def\refname{References}% \def\abstractname{Abstract}% \def\bibname{Bibliography}% \def\chaptername{Chapter}% \def\appendixname{Appendix}% \def\contentsname{Contents}% \def\listfigurename{List of Figures}% \def\listtablename{List of Tables}% \def\indexname{Index}% \def\figurename{Figure}% \def\tablename{Table}% \def\partname{Part}% \def\enclname{encl}% \def\ccname{cc}% \def\headtoname{To}% \def\pagename{Page}% \def\headpagename{Page}% \def\seename{see}% \def\alsoseename{see also}% \def\footertext{This document was translated from \LaTeX{} by \footahref{\heveaurl/index.html}{\hevea}.}% } hevea-2.09/package.ml0000644004317100512160000012070012204704117014505 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* en Automatique. Distributed only by permission. *) (* *) (* *) (***********************************************************************) (* $Id: package.ml,v 1.112 2012-06-18 13:14:41 suzanne Exp $ *) open Printf module type S = sig end module Make (Dest : OutManager.S) (Image : ImageManager.S) (Scan : Latexscan.S) : S = struct open Misc open Lexing open Lexstate open Latexmacros open Subst open MyStack open Scan ;; (*********************************************************) (* Accents are here, to make latexscan.mll a bit smaller *) (* Accent commands use a mapping from ascii to *) (* unicode entities with accents *) (* - When no char with accent exists (html) or can *) (* be outputed (text), command *) (* \text@accent{\cmd}{name}{arg} is scanned *) (* where \cmd is accent command name *) (* name is some internal name (eg \' -> accute) *) (* arg is the argument to \cmd *) (* See iso-sym.hva, for the definition of \text@accent *) (*********************************************************) let put_empty empty = if empty <> OutUnicode.null then Dest.put_unicode empty else raise OutUnicode.CannotTranslate exception DiacriticFailed of string * string let do_def_diacritic _verb _name f empty = (fun lexbuf -> let arg0 = save_arg lexbuf in let arg = get_prim_onarg arg0 in try match String.length arg with | 0 -> put_empty empty | 1 -> let c = arg.[0] in if c = ' ' then put_empty empty else Dest.put_unicode (f arg.[0]) | _ -> raise OutUnicode.CannotTranslate with | OutUnicode.CannotTranslate | Misc.CannotPut -> raise (DiacriticFailed (Subst.do_subst_this arg0,arg))) let def_diacritic name internal f empty = def_code name (fun lexbuf -> try do_def_diacritic true name f empty lexbuf with DiacriticFailed (p,input) -> scan_this main ("\\text@accent{"^internal^"}{"^name^"}{\\@print{"^input^"}}{"^p^"}")) ;; open OutUnicode let () = def_diacritic "\\'" "acute" OutUnicode.acute acute_alone ; def_diacritic "\\`" "grave" OutUnicode.grave grave_alone ; def_diacritic "\\^" "circumflex" OutUnicode.circumflex circum_alone ; def_diacritic "\\\"" "diaeresis" OutUnicode.diaeresis diaeresis_alone ; def_diacritic "\\c" "cedilla" OutUnicode.cedilla cedilla_alone ; def_diacritic "\\~" "tilde" OutUnicode.tilde tilde_alone ; def_diacritic "\\=" "macron" OutUnicode.macron macron_alone ; def_diacritic "\\H" "doubleacute" OutUnicode.doubleacute doubleacute_alone ; (* package fc, see later ? *) (* def_diacritic "\\G" "doublegrave" OutUnicode.doublegrave 0x2F5 ; *) def_diacritic "\\u" "breve" OutUnicode.breve breve_alone ; def_diacritic "\\." "dotabove" OutUnicode.dotabove dotabove_alone ; def_diacritic "\\d" "dotbelow" OutUnicode.dotbelow dotbelow_alone ; def_diacritic "\\b" "linebelow" OutUnicode.linebelow linebelow_alone ; def_diacritic "\\k" "ogonek" OutUnicode.ogonek ogonek_alone ; def_diacritic "\\r" "ringabove" OutUnicode.ring ring_alone ; def_diacritic "\\v" "caron" OutUnicode.caron caron_alone ; def_diacritic "\\textcircled" "circled" OutUnicode.circled circled_alone ; (* activated by amssymb *) def_diacritic "\\@doublestruck" "doublestruck" OutUnicode.doublestruck null ; () ;; (* Specialized version of \IfDisplay (plain.hva) for command names, so as to avoid inserting \fi at end of scanned text *) def_code "\\DisplayChoose" (fun lexbuf -> let cmd1 = get_csname lexbuf in let cmd2 = get_csname lexbuf in if !display then expand_command cmd1 lexbuf else expand_command cmd2 lexbuf) ;; (**************) (* Delimiters *) (**************) def_code "\\process@delim@one" (fun lexbuf -> let n = Get.get_int (save_body lexbuf) in let n = if n < 2 then 2 else n in let mid = get_csname lexbuf in for _i = 1 to n-1 do scan_this main mid ; Dest.skip_line () ; done ; scan_this main mid) ;; def_code "\\process@delim@top" (fun lexbuf -> let n = Get.get_int (save_body lexbuf) in let top = get_csname lexbuf in let mid = get_csname lexbuf in scan_this main top ; if n > 1 then begin Dest.skip_line () ; scan_this main mid ; for _i = 1 to n-2 do Dest.skip_line () ; scan_this main mid ; done end) ;; def_code "\\process@delim@dow" (fun lexbuf -> let n = Get.get_int (save_body lexbuf) in let mid = get_csname lexbuf in let dow = get_csname lexbuf in for _i = 1 to n-1 do scan_this main mid ; Dest.skip_line () ; done ; scan_this main dow) ;; def_code "\\process@delim@three" (fun lexbuf -> let n = Get.get_int (save_body lexbuf) in let top = get_csname lexbuf in let mid = get_csname lexbuf in let dow = get_csname lexbuf in scan_this main top ; scan_this main "\\@top@br" ; for _i = 1 to n-2 do scan_this main mid ; Dest.skip_line () ; done ; scan_this main dow) ;; def_code "\\process@delim@four" (fun lexbuf -> let n = Get.get_int (save_body lexbuf) in let ext = get_csname lexbuf in let top = get_csname lexbuf in let mid = get_csname lexbuf in let dow = get_csname lexbuf in scan_this main top ; Dest.skip_line () ; for _i = 1 to (n-3+1)/2 do scan_this main ext ; Dest.skip_line () ; done ; scan_this main mid ; Dest.skip_line () ; for _i = 1 to (n-3+1)/2 do scan_this main ext ; Dest.skip_line () ; done ; scan_this main dow) ;; let int_sup_sub lexbuf = let n = Get.get_int (save_body lexbuf) in if !display then begin let {limits=_limits ; sup=sup ; sub=sub} = save_sup_sub lexbuf in Dest.int_sup_sub false n (scan_this_arg main) (fun () -> ()) sup sub true end ;; def_code "\\int@sup@sub" int_sup_sub ;; (* Direct ajustement of vsize *) def_code "\\@addvsize" (fun lexbuf -> let n = Get.get_int (save_body lexbuf) in Dest.addvsize n) ;; (*****************) (* Cummunication *) (*****************) def_code "\\typeout" (fun lexbuf -> let what = Scan.get_prim_arg lexbuf in prerr_endline what ) ;; def_code "\\hva@warn" (fun lexbuf -> let what = Subst.subst_arg lexbuf in warning what ) ; def_code "\\hva@warn@prim" (fun lexbuf -> let what = get_prim_arg lexbuf in warning what ) ;; def_code "\\@lexbuf" (fun _ -> prerr_endline ("LEXBUF: "^string_of_int (MyStack.length stack_lexbuf))) ;; def_code "\\@macros" (fun lexbuf -> Latexmacros.pretty_table () ; check_alltt_skip lexbuf) ;; def_code "\\show@macro" (fun lexbuf -> let cmd = get_csname lexbuf in Latexmacros.pretty_command cmd) ;; (* Save the names of all macros defined up to now *) def_code "\\@save@macros" (fun lexbuf -> Latexmacros.set_saved_macros () ; check_alltt_skip lexbuf) ;; let def_print name s = def_code name (fun _ -> Scan.translate_put_unicode_string s) ;; def_print "\\@basein" Parse_opts.base_in ; def_print "\\jobname" Parse_opts.base_out ; def_print "\\jobname@base" (Filename.basename Parse_opts.base_out) ; def_print "\\@heveacomline" (Array.fold_right (fun arg r -> arg^" "^r) Sys.argv "") ; def_print "\\@heveaversion" Version.version ; def_print "\\@hevealibdir" Mylib.libdir ;; def_code "\\@heveaverbose" (fun lexbuf -> let lvl = Get.get_int (save_body lexbuf) in Misc.verbose := lvl ; DoOut.verbose := lvl) ;; def_code "\\typemacro" (fun lexbuf -> let name = Scan.get_csname lexbuf in let pat,body = Latexmacros.find name in Latexmacros.pretty_macro pat body) ;; def_code "\\@find@file" (fun lexbuf -> let real_name = let name = Scan.get_prim_arg lexbuf in try Myfiles.find name with Not_found -> Misc.warning ("Cannot find file: "^name) ; name in Scan.translate_put_unicode_string real_name) ;; (* Translate to URL fragment part to %encoding *) def_code "\\@tr@url" (fun lexbuf -> let x = get_prim_arg lexbuf in scan_this main "{\\@nostyle" ; Url.encode_fragment Dest.put_char Dest.put x ; scan_this main "}") ;; (*******) (* CSS *) (*******) (* External style-sheet *) def_code "\\hva@dump@css" (fun _ -> let name = match Parse_opts.base_out with | "" -> let r = "out.css" in warning ("Outputing style sheet to default file: "^r) ; r | base -> base ^ ".css" in begin try let stys = Dest.to_string (fun () -> scan_this main "\\hevea@css") in let chan = open_out name in output_string chan stys ; close_out chan with | Sys_error msg -> warning ("Trouble while outputing style sheet: "^msg) end ; scan_this main (Printf.sprintf "\\@getprintnostyle{%s}" name)) ;; (* Length for CSS *) def_code "\\css@length" (fun lexbuf -> let arg = get_prim_arg lexbuf in let len = match Get.get_length arg with | Length.Pixel n -> Printf.sprintf "%ipx" n | Length.Char n -> Printf.sprintf "%iem" n | _ -> warning "\\css@length cannot interpret this length" ; "0px" in Dest.put len) ;; (* Add elements to style attributes *) def_code "\\@addstyle" (fun lexbuf -> let add = get_prim_arg lexbuf in let attr = get_prim_arg lexbuf in let attr = Lexattr.add_style add attr in scan_this main (sprintf "\\@printnostyle{%s}" attr)) ;; (* A few subst definitions, with 2 optional arguments *) def "\\makebox" (latex_pat ["" ; ""] 3) (Subst ["\\hva@warn{makebox}\\mbox{#3}"]) ; def "\\framebox" (latex_pat ["" ; ""] 3) (Subst ["\\hva@warn{framebox}\\fbox{#3}"]) ;; (***********************) (* Special definitions *) (***********************) def_code "\\addto" (fun lexbuf -> let name = get_csname lexbuf in let body = subst_body lexbuf in Latexmacros.addto name body) ;; (*********************) (* 'Token' registers *) (*********************) def_code "\\newtokens" (fun lexbuf -> let toks = Scan.get_csname lexbuf in if Latexmacros.exists toks then Misc.warning ("\\newtokens redefines command ``"^toks^"''") ; Latexmacros.def toks zero_pat (Toks [])) ;; let get_tokens toks = match Latexmacros.find_fail toks with | _,Toks r-> r | _ -> raise Failed ;; def_code "\\resettokens" (fun lexbuf -> let toks = Scan.get_csname lexbuf in try ignore (get_tokens toks) ; Latexmacros.def toks zero_pat (Toks []) with Failed -> Misc.warning ("\\resettokens for "^toks^" failed")) ;; def_code "\\addtokens" (fun lexbuf -> let toks = Scan.get_csname lexbuf in let arg = Subst.subst_arg lexbuf in begin try let l = get_tokens toks in Latexmacros.def toks zero_pat (Toks (arg::l)) with Failed -> Misc.warning ("\\addtokens for "^toks^" failed") end) ;; def_code "\\addrevtokens" (fun lexbuf -> let toks = Scan.get_csname lexbuf in let arg = Subst.subst_arg lexbuf in begin try let l = get_tokens toks in Latexmacros.def toks zero_pat (Toks (l@[arg])) with Failed -> Misc.warning ("\\addtokens for "^toks^" failed") end) ;; def_code "\\appendtokens" (fun lexbuf -> let toks1 = Scan.get_csname lexbuf in let toks2 = Scan.get_csname lexbuf in begin try let l1 = get_tokens toks1 and l2 = get_tokens toks2 in Latexmacros.def toks1 zero_pat (Toks (l2@l1)) with Failed -> Misc.warning ("\\addtokens for "^toks1^" and "^toks2^" failed") end) ;; (* Useful ??? def_code "\\lrtokens" (fun lexbuf -> let toks = Scan.get_csname lexbuf in let out = Out.create_buff () in let kont = let once = ref false in (fun lexbuf -> if not !once then begin once := true ; begin try match Latexmacros.find_fail toks with | _,Toks l -> let arg = Out.to_string out in Latexmacros.def toks zero_pat (Toks (l@[arg])) | _ -> raise Failed with Failed -> Misc.warning ("\\lrtokens for "^toks^" failed") end end ; main lexbuf) in start_other_scan "lrtokens" (copy kont "lrtokens" out) lexbuf) ;; *) (*********************************) (* Stacks of command definitions *) (*********************************) def_code "\\hva@newstack" (fun lexbuf -> let name = get_prim_arg lexbuf in let stack = MyStack.create name in def_code ("\\@push"^name) (fun lexbuf -> let cmd = Scan.get_csname lexbuf in let def = Latexmacros.find cmd in MyStack.push stack def) ; def_code ("\\@pop"^name) (fun lexbuf -> let cmd = Scan.get_csname lexbuf in try let pat,body = MyStack.pop stack in Latexmacros.def cmd pat body with Fatal _ -> warning (Printf.sprintf "Pop empty stack '%s'" name))) ;; let call_subst lexbuf = let csname = get_csname lexbuf in let arg = subst_arg_list lexbuf in let exec = csname::" "::arg in if !verbose > 1 then begin eprintf "\\@callsubst: %a\n%!" pretty_body exec end ; scan_this_list main exec let call_prim lexbuf = let csname = get_csname lexbuf in let arg = get_prim_arg lexbuf in let exec = csname^" "^arg in if !verbose > 1 then begin prerr_string "\\@callprim: " ; prerr_endline exec ; end ; scan_this main exec and call_subst_opt lexbuf = let csname = get_csname lexbuf in let default = subst_arg lexbuf in let arg = subst_arg lexbuf in let lb = MyLexing.from_string arg in let opt = try Save.opt lb with Save.NoOpt -> default in let rem = Save.remain lb in let exec = csname ^ "{" ^ opt ^ "}" ^ rem in if !verbose > 1 then begin prerr_string "\\@callsubstopt: " ; prerr_endline exec ; end ; scan_this main exec ;; def_code "\\@funcall" call_subst ; def_code "\\@callsubst" call_subst ; def_code "\\@callsubstopt" call_subst_opt ; def_code "\\@callprim" call_prim ; ;; def_code "\\@calloptsimple" (fun lexbuf -> let csname = get_csname lexbuf in let arg = subst_arg lexbuf in let lb = MyLexing.from_string arg in let opt = try Some (Save.opt lb) with Save.NoOpt -> None in let rem = Save.remain lb in let exec = match opt with | None -> csname ^ "{" ^ rem ^ "}" | Some opt -> csname ^ "[" ^ opt ^ "]{" ^ rem ^ "}" in if !verbose > 1 then begin prerr_string "\\@calloptsimple: " ; prerr_endline exec ; end ; scan_this main exec ) ;; (* Haux files parsing hooks before and after reading the file *) def_code "\\@hauxinit" (fun lexbuf -> Auxx.init Parse_opts.base_out ; check_alltt_skip lexbuf) ;; def_code "\\@hauxfinal" (fun lexbuf -> Auxx.final Parse_opts.base_out ; check_alltt_skip lexbuf) ;; let get_raw lexbuf = let saved = !raw_chars in raw_chars := true ; let r = get_prim_arg lexbuf in raw_chars := saved ; r ;; def_code "\\@newlabel" (fun lexbuf -> let name = get_raw lexbuf in let arg = get_raw lexbuf in Auxx.rset name arg) ;; def_code "\\@auxwrite" (fun lexbuf -> let lab = get_raw lexbuf in let theref = get_prim_arg lexbuf in Auxx.rwrite lab theref) ;; def_code "\\@@auxwrite" (fun lexbuf -> let anchor = get_raw lexbuf in let lab = get_raw lexbuf in let theref = get_prim_arg lexbuf in Auxx.rwrite2 anchor lab theref) ;; def_code "\\@auxread" (fun lexbuf -> let lab = get_raw lexbuf in scan_this main (Auxx.rget lab)) ;; def_code "\\@bibread" (fun lexbuf -> let key = get_raw lexbuf in let arg = match Auxx.bget false key with | None -> "\\@verbarg{"^key^"}" | Some s -> s in scan_this main arg) ;; def_code "\\@bibwrite" (fun lexbuf -> let pretty = match Subst.subst_arg lexbuf with | "\\theheveabib" as s -> get_prim s | s -> s in let key = get_raw lexbuf in Auxx.bwrite key pretty) ;; def_code "\\bibcite" (fun lexbuf -> let name = get_raw lexbuf in let arg = Subst.subst_arg lexbuf in Auxx.bset name arg) ;; (* Index primitives *) register_init "index" (fun () -> let put_lbl lbl = scan_this main "{\\@nostyle" ; Dest.put lbl ; scan_this main "}" in def_code "\\@indexwrite" (fun lexbuf -> let tag = get_prim_opt "default" lexbuf in let arg = Subst.subst_arg lexbuf in let theref = get_prim_arg lexbuf in let lbl = Index.treat tag arg theref in put_lbl lbl ) ; (* Special indexwrite that does not put an anchor. Instead, the anchor is given as an extra argument *) def_code "\\@@indexwrite" (fun lexbuf -> let tag = get_prim_opt "default" lexbuf in let arg = Subst.subst_arg lexbuf in let theref = get_prim_arg lexbuf in let theanchor = get_prim_arg lexbuf in Index.treat_anchor tag arg theref theanchor) ; (* Special indexwrite where the key is given as fst argument and fully processed *) def_code "\\@@@indexwrite" (fun lexbuf -> let tag = get_prim_opt "default" lexbuf in let key = get_prim_arg lexbuf in let nice = Subst.subst_arg lexbuf in let theref = get_prim_arg lexbuf in let arg = key ^ "@" ^ nice in let lbl = Index.treat tag arg theref in put_lbl lbl) ; def_code "\\@printindex" (fun lexbuf -> let tag = get_prim_opt "default" lexbuf in Index.print (scan_this main) tag) ; def_code "\\@indexname" (fun lexbuf -> let tag = get_prim_opt "default" lexbuf in let name = get_prim_arg lexbuf in Index.changename tag name) ; let new_index lexbuf = let _ = get_prim_opt "" lexbuf in let tag = get_prim_arg lexbuf in let sufin = get_prim_arg lexbuf in let sufout = get_prim_arg lexbuf in let name = get_prim_arg lexbuf in Index.newindex tag sufin sufout name in def_code "\\newindex" new_index ; def_code "\\renewindex" new_index) ;; (* ifthen package *) register_init "ifthen" (fun () -> def_code "\\ifthenelse" (fun lexbuf -> let cond = save_arg lexbuf in let arg_true = save_arg lexbuf in let arg_false = save_arg lexbuf in scan_this_arg main (if Get.get_bool cond then arg_true else arg_false)) ; def_code "\\whiledo" (fun lexbuf -> let test = save_arg lexbuf in let body = save_arg lexbuf in let btest = ref (Get.get_bool test) in while !btest do scan_this_arg main body ; btest := Get.get_bool test done) ; def_fun "\\newboolean" (fun s -> "\\newif\\if"^s) ; def_code "\\setboolean" (fun lexbuf -> let name = get_prim_arg lexbuf in let arg = save_arg lexbuf in let b = Get.get_bool arg in scan_this main ("\\"^name^(if b then "true" else "false"))) ; ()) ;; (* color package *) register_init "color" (fun () -> def_code "\\definecolor" (fun lexbuf -> Save.start_echo () ; let clr = get_prim_arg lexbuf in let mdl = get_prim_arg lexbuf in let value = get_prim_arg lexbuf in Image.put "\\definecolor" ; Image.put (Save.get_echo ()) ; fun_register (fun () -> Color.remove clr) ; Color.define clr mdl value ) ; def_code "\\DefineNamedColor" (fun lexbuf -> let _ = get_prim_arg lexbuf in let clr = get_prim_arg lexbuf in let mdl = get_prim_arg lexbuf in let value = get_prim_arg lexbuf in fun_register (fun () -> Color.remove clr) ; Color.define clr mdl value ; Color.define_named clr mdl value) ; let do_getcolor c lexbuf = let mdl = get_prim_opt "!*!" lexbuf in let clr = get_prim_arg lexbuf in let htmlval = match mdl with | "!*!"|"" -> Color.retrieve clr | _ -> Color.compute mdl clr in Dest.put c ; begin match htmlval with | Color.Hex x -> Dest.put_char '#' ; Dest.put x | Color.Name n -> Dest.put n end ; Dest.put c in def_code "\\@getcolor" (do_getcolor "") ; def_code "\\@getstylecolor" (do_getcolor "") ; ()) ;; register_init "colortbl" (fun () -> let color_to_string = function | Color.Hex x -> "#"^x | Color.Name n -> n in def_code "\\columncolor" (fun lexbuf -> let mdl = get_prim_opt "!*!" lexbuf in let clr = get_prim_arg lexbuf in let htmlval = match mdl with | "!*!" -> Color.retrieve clr | _ -> Color.compute mdl clr in skip_opt lexbuf ; skip_opt lexbuf ; Dest.insert_block "div" ("style=\"background-color:" ^ color_to_string htmlval ^ "\""); ); def_code "\\rowcolor" (fun lexbuf -> let mdl = get_prim_opt "!*!" lexbuf in let clr = get_prim_arg lexbuf in let htmlval = match mdl with | "!*!" -> Color.retrieve clr | _ -> Color.compute mdl clr in skip_opt lexbuf ; skip_opt lexbuf ; Dest.insert_attr "TR" ("style=\"background-color:"^color_to_string htmlval^"\""))) ;; (* xspace package *) register_init "xspace" (fun () -> def_code "\\xspace" (fun lexbuf -> try match Lexstate.full_peek_char lexbuf with | '{'|'}'|'~'|'.'|'!'|','|':'|'?'|'/'|'\''|')'|'-' | ' '|'\t'|'\n' -> () | _c -> Dest.put_char ' ' with Not_found -> warning "\\xspace could not reach next char")) ;; (* sword package *) register_init "sword" (fun () -> def_code "\\FRAME" (fun lexbuf -> let _ = lexeme lexbuf in (* discard the first 7 arguments *) let _ = save_arg lexbuf in let _ = save_arg lexbuf in let _ = save_arg lexbuf in let _ = save_arg lexbuf in let _ = save_arg lexbuf in let _ = save_arg lexbuf in let _ = save_arg lexbuf in (* keep argument 8 *) let t = Subst.subst_arg lexbuf in (* try to find rightmost material in single quotes *) let i = try String.rindex t '\'' with Not_found-> (-1) in if i>=0 then begin (* we found something, so extract the filename *) let j = String.rindex_from t (i - 1) '\'' in let s = String.sub t (j + 1) (i - j - 1) in let t = Filename.basename (s) in let s = Filename.chop_extension (t) in (* now form the macro swFRAME whose arg is just the base file name *) let cmd = "\\swFRAME{"^s^"}" in (* put it back into the input stream *) scan_this main cmd end ; if i<0 then begin (* no filename found: we use a default name and give a warning *) warning ("\\FRAME: no filename (missing snapshot?) - using\nfallback name"); let s = "FRAME-graphic-not-found" in let cmd = "\\swFRAME{"^s^"}" in scan_this main cmd end) ; def_code "\\UNICODE" (fun lexbuf -> (* input: \UNICODE{arg} where arg is a hex number, eg 0x23ab *) (* output: call to \swUNICODE{arg1}{arg2} where: *) (* arg1 = hex number w/o leading 0, eg x23ab *) (* arg2 = decimal equivalent, eg 9131 *) (* it is up to \swUNICODE (in sword.hva) to do final formatting *) let _ = lexeme lexbuf in let t = Subst.subst_arg lexbuf in let s = string_of_int (int_of_string (t)) in let tt = String.sub t (String.index t 'x') (-1+String.length t) in let cmd = "\\swUNICODE{" ^tt^"}{"^s^"}" in scan_this main cmd) ) ;; (* Some strange arg scanning, needed for \DeclareGraphicsRule *) register_init "graphics" (fun () -> def_code "\\@verbimagearg" (fun lexbuf -> let {arg=arg} = save_arg lexbuf in Image.put_char '{' ; Image.put arg ; Image.put_char '}')) ;; (* url package *) let verb_arg lexbuf = let {arg=url} = save_verbatim lexbuf in Scan.translate_put_unicode_string url ;; def_code "\\@verbarg" verb_arg ; ;; register_init "url" (fun () -> def_code "\\@Url" verb_arg ; def_code "\\Url" (fun lexbuf -> Save.start_echo () ; let _ = save_verbatim lexbuf in let arg = Save.get_echo () in scan_this main ("\\UrlFont\\UrlLeft\\@Url"^arg^"\\UrlRight\\endgroup")) ; let do_urldef lexbuf = Save.start_echo () ; let name = Scan.get_csname lexbuf in let url_macro = Scan.get_csname lexbuf in let true_args = Save.get_echo () in Save.start_echo () ; let _ = save_verbatim lexbuf in let arg = Save.get_echo () in let what = get_this_main (url_macro^arg) in if Scan.echo_toimage () then begin Image.put "\\urldef" ; Image.put true_args ; Image.put arg end ; Latexmacros.def name zero_pat (CamlCode (fun _ -> Dest.put what)) in def_code "\\urldef" do_urldef ; ()) ;; (* hyperref (not implemented in fact) *) register_init "hyperref" (fun () -> let get_url lexbuf = if Lexstate.top_level () then begin Save.start_echo () ; ignore (save_arg lexbuf) ; Save.get_echo () end else subst_arg lexbuf in def_code "\\href" (fun lexbuf -> let url = get_url lexbuf in let {arg=arg ; subst=subst} = save_arg lexbuf in scan_this_arg main (mkarg ("\\ahref{\\@hr@expand{"^url^"}}{"^arg^"}") subst)) ; def_code "\\hyperimage" (fun lexbuf -> let url = get_url lexbuf in let _ = save_arg lexbuf in scan_this main ("\\imgsrc{\\@hr@expand{"^url^"}}")) ; def_code "\\@hyperref" (fun lexbuf -> let url = get_url lexbuf in let category = get_prim_arg lexbuf in let name = get_prim_arg lexbuf in let {arg=text ; subst=subst} = save_arg lexbuf in scan_this_arg main (mkarg ("\\ahref{\\@hr@expand{"^url^ "\\#"^category^"."^name^"}}{"^text^"}") subst))) ;; (* (extended) keyval package *) let keyval_name f k = "\\KV@"^f^"@"^k let keyval_extra f k = keyval_name f k^"@extra" let do_definekey lexbuf = let argdef = save_opts ["1" ; ""] lexbuf in let family = get_prim_arg lexbuf in let key = get_prim_arg lexbuf in let opt = save_opts [""] lexbuf in let body = subst_body lexbuf in begin match argdef with | {arg=No _}:: _ -> begin match opt with | [{arg=No _}] -> Latexmacros.def (keyval_name family key) one_pat (Subst body) | [{arg=Yes opt ; subst=subst}] -> Latexmacros.def (keyval_name family key) one_pat (Subst body) ; Latexmacros.def (keyval_name family key^"@default") zero_pat (Subst [(keyval_name family key^"{"^do_subst_this_list (mkarg opt subst))^"}"]) | _ -> assert false end | [{arg=Yes nargs ; subst=subst} ; opt] -> let nargs = Get.get_int (mkarg nargs subst) in let extra = keyval_extra key family in Latexmacros.def (keyval_name family key) one_pat (Subst ["\\@funcall{"^extra^"}{#1}"]) ; begin match opt with | {arg=No _} -> Latexmacros.def extra (latex_pat [] nargs) (Subst body) | {arg=Yes opt ; subst=o_subst} -> Latexmacros.def extra (latex_pat [do_subst_this_list (mkarg opt o_subst)] nargs) (Subst body) end | _ -> assert false end ;; let do_setkey lexbuf = let family = get_prim_arg lexbuf in let arg = subst_arg lexbuf^",," in if !verbose > 1 then Printf.eprintf "SETKEY, family='%s', arg='%s'\n" family arg ; let abuff = MyLexing.from_string arg in let rec do_rec () = let {arg=x} = save_arg_with_delim "," abuff in if x <> "" then begin let xbuff = MyLexing.from_string (x^"==") in check_alltt_skip xbuff ; let {arg=key} = save_arg_with_delim "=" xbuff in let {arg=value} = save_arg_with_delim "=" xbuff in if !verbose > 1 then Printf.eprintf "Found KEY, key='%s', value='%s'\n" key value ; if key <> "" then begin let csname = keyval_name family key in if Latexmacros.exists csname then begin if value <> "" then scan_this main (csname^"{"^value^"}") else let defname = csname^"@default" in if Latexmacros.exists defname then scan_this main defname else warning ("keyval, no default value for key: '"^key^"'") end else warning ("keyval, unknown key: '"^key^"'") end ; do_rec () end in do_rec () ;; register_init "keyval" (fun () -> def_code "\\define@key" do_definekey ; def_code "\\@setkeys" do_setkey ) ;; register_init "xypic" (fun () -> def_code "\\@xyarg" (fun lexbuf -> Save.start_echo () ; let _ = Lexstate.save_xy_arg lexbuf in let r = Save.get_echo () in Image.put r ) ) ;; register_init "natbib" (fun () -> def_code "\\NAT@write" (fun lexbuf -> let key = get_raw lexbuf in let num = get_prim_arg lexbuf in let auth = subst_arg lexbuf in let year = subst_arg lexbuf in let long = subst_arg lexbuf in Auxx.bwrite key (Printf.sprintf "{%s}{%s}{{%s}}{{%s}}" num year auth long)) ; def_code "\\NAT@bibread" (fun lexbuf -> let key = get_raw lexbuf in let arg = match Auxx.bget false key with | None -> "{}{??}{}{}" | Some s -> s in scan_this main ("\\NAT@args" ^ arg)) ; ()) ;; let gput lexbuf c = Save.gobble_one_char lexbuf ; Dest.put_char c and gput_unicode lexbuf u = Save.gobble_one_char lexbuf ; Dest.put_unicode u ;; let gscan lexbuf cmd = Save.gobble_one_char lexbuf ; Scan.expand_command_no_skip cmd lexbuf ;; register_init "german" (fun () -> def_code "\\@german@dquote" (fun lexbuf -> if effective !alltt || not (is_plain '"') then (* '"' *) Dest.put_char '"' (* '"' *) else try let c = Save.peek_next_char lexbuf in match c with | 'a' | 'A' | 'e' | 'E' | 'i' | 'I' | 'o' | 'O' | 'u'| 'U' -> begin try gput_unicode lexbuf (OutUnicode.diaeresis c) with OutUnicode.CannotTranslate -> assert false end | 's'|'z' -> gput_unicode lexbuf eszett | 'c'|'f'|'l'|'m'|'p'|'r'|'t' as c -> gput lexbuf c (* for "ck and "ff etc. *) | 'S' -> Save.gobble_one_char lexbuf ; Dest.put "SS" | 'Z' -> Save.gobble_one_char lexbuf ; Dest.put "SZ" | '|' | '-'| '"' -> Save.gobble_one_char lexbuf | '~'|'=' -> gput lexbuf '-' | '`' -> gscan lexbuf "\\glqq" | '\'' -> gscan lexbuf "\\grqq" | '<' -> gscan lexbuf "\\flqq" | '>' -> gscan lexbuf "\\frqq" | _ -> Dest.put_char '"' with | Not_found -> Dest.put_char '"')) ;; (***************) (* Translators *) (***************) def_code "\\@set@translators" (fun lexbuf -> let name = get_prim_arg lexbuf in OutUnicode.set_translators name) ;; def_code "\\@set@out@translator" (fun lexbuf -> let name = get_prim_arg lexbuf in OutUnicode.set_output_translator name) ;; def_code "\\@set@in@translator" (fun lexbuf -> let name = get_prim_arg lexbuf in OutUnicode.set_input_translator name) ;; (********************************) (* Counters, change reset lists *) (********************************) def_code "\\@addtoreset" (fun lexbuf -> let name = get_prim_arg lexbuf in let within = get_prim_arg lexbuf in Counter.addtoreset name within) ;; register_init "chngcntr" (fun () -> def_code "\\@removefromreset" (fun lexbuf -> let name = get_prim_arg lexbuf in let within = get_prim_arg lexbuf in Counter.removefromreset name within) ; ()) ;; (**********) (* Import *) (**********) register_init "import" (fun () -> def_code "\\@imp@set" (fun lexbuf -> let imp = get_prim_arg lexbuf in Myfiles.set_import imp) ; ()) ;; (************) (* Cleveref *) (************) let cr_fmt_one kind label = let com = sprintf "\\@cr@fmt@one{%s}{%s}" kind label in scan_this main com and cr_fmt_two kind l1 l2 = let com = sprintf "\\@cr@fmt@two{%s}{%s}{%s}" kind l1 l2 in scan_this main com and cr_fmt_many kind lbl1 lbl2 rem = let fmt_lbl lbl = sprintf "\\@cr@apply@fmt{%s}" lbl in let buff = Buffer.create 16 in Buffer.add_string buff "{" ; let name = sprintf "\\@cr@secname@plural{%s}{%s}" kind lbl1 in Buffer.add_string buff name ; Buffer.add_string buff " " ; Buffer.add_string buff (fmt_lbl lbl1) ; Buffer.add_string buff "\\crefmiddleconjunction" ; Buffer.add_string buff (fmt_lbl lbl2) ; let rec do_rec = function | [] -> () | [lbl] -> Buffer.add_string buff "\\creflastconjunction" ; Buffer.add_string buff (fmt_lbl lbl) | lbl::rem -> Buffer.add_string buff "\\crefmiddleconjunction" ; Buffer.add_string buff (fmt_lbl lbl) ; do_rec rem in do_rec rem ; Buffer.add_string buff "}" ; scan_this main (Buffer.contents buff) ;; let cr_split arg = let len = String.length arg in let extract k1 k2 = let len = k2-k1 in if len <= 0 then None else Some (String.sub arg k1 len) in let rec do_rec start k = if k < len then match arg.[k] with | ',' -> begin let fst,rem = do_rec (k+1) (k+1) in match extract start k with | None -> [],fst::rem | Some x -> (x::fst),rem end | _ -> do_rec start (k+1) else match extract start k with | None -> [],[] | Some x -> [x],[] in let fst,rem = do_rec 0 0 in let r = match fst with | [] -> rem | _ -> fst::rem in List.concat r ;; let cr_fmt kind lbls = match lbls with | [] -> () | [lbl] -> cr_fmt_one kind lbl | [lbl1;lbl2] -> cr_fmt_two kind lbl1 lbl2 | lbl1::lbl2::rem -> cr_fmt_many kind lbl1 lbl2 rem ;; let cr_add_info mk_info lbls = List.map (fun lbl -> let tymacro = sprintf "\\%s" (mk_info lbl) in let tycsname = sprintf "\\csname %s\\endcsname" (mk_info lbl) in let ty = if Latexmacros.exists tymacro then let ty = get_prim tycsname in (* eprintf "Info: %s -> %s\n" lbl ty ; *) Some ty else None in lbl,ty) lbls let cr_add_types = cr_add_info (sprintf "@cf@%s@type") let cr_add_orders = cr_add_info (sprintf "%s@label@order") let rec cr_group_types k = function | [] -> k | (lbl,t1)::rem -> let t1s = List.fold_right (fun (y,t2) k -> if t1 = t2 then (y::k) else k) rem [lbl] in let rem = List.fold_right (fun (_,t2 as c) k -> if t1 = t2 then k else (c::k)) rem [] in t1s::cr_group_types k rem let protect_int_of_string o = match o with | Some o -> begin try int_of_string o with _ -> -1 end | None -> -1 let cr_sort_labels lbls = let xs = cr_add_types lbls in let lbls = cr_group_types [] xs in let ys = List.map cr_add_orders lbls in let ys = List.map (List.map (fun (lbl,o) -> lbl,protect_int_of_string o)) ys in let ys = List.map (List.sort (fun (_,o1) (_,o2) -> Pervasives.compare o1 o2)) ys in let lbls = List.map (List.map fst) ys in lbls ;; let cr_fmt_groups kind = function | [] -> () | [lbls] -> cr_fmt kind lbls | [lbls1;lbls2] -> cr_fmt kind lbls1 ; scan_this main "\\crefpairgroupconjunction" ; cr_fmt "cref" lbls2 | lbls1::(_::_ as rem) -> cr_fmt kind lbls1 ; let rec do_rec = function | [] -> () | [lbls] -> scan_this main "\\creflastgroupconjunction" ; cr_fmt "cref" lbls | lbls::rem -> scan_this main "\\crefmiddlegroupconjunction" ; cr_fmt "cref" lbls ; do_rec rem in do_rec rem ;; register_init "cleveref" (fun () -> (* Sort labels *) def_code "\\@cr@sort@labels" (fun lexbuf -> let kind = get_prim_arg lexbuf in let label = get_prim_arg lexbuf in let lbls = cr_split label in let lbls = cr_sort_labels lbls in cr_fmt_groups kind lbls) ; (* This special \def macro does not expand body *) def_code "\\@cr@def" (fun lexbuf -> let name = get_csname lexbuf in let nargs = save_arg lexbuf in let nargs = Get.get_int_string nargs in let {arg=body} = save_body lexbuf in Latexmacros.def name (latex_pat [] nargs) (Subst body)) ; def_code "\\@cr@def@withother" (fun lexbuf -> let oname = get_csname lexbuf in let ocom = get_csname lexbuf in let name = get_csname lexbuf in let nargs = save_arg lexbuf in let nargs = Get.get_int_string nargs in let {arg=body} = save_body lexbuf in (* eprintf "oname=%s, ocom=%s\n" oname ocom ; *) Latexmacros.def name (latex_pat [] nargs) (Subst body) ; if not (Latexmacros.exists oname) then begin Latexmacros.def oname (latex_pat [] nargs) (Subst (ocom::" "::body)) ; end) ; ()) ;; (*************************************) (* Extra font changes, from abisheck *) (*************************************) let get_elements str = let len = String.length str in let rec all_elements l = match l with 0 -> [] | n -> (all_elements (n-1))@[(String.sub str (n-1) 1)] in all_elements len ;; let str_cat x y = x^y ;; def_code "\\@mathbb" (fun lexbuf -> let arg1 = save_arg lexbuf in let str = arg1.arg in (*let dummy = print_string str in*) let str_list = get_elements str in (*let h = List.hd str_list in let dummy = print_string h in*) let format x = Scan.get_this_main ("\\"^"one@mathbb{"^x^"}") in let formatted_list = List.map format str_list in let formatted_text = List.fold_left str_cat "" formatted_list in (*print_string ("<<"^formatted_text^">>\n") ;*) Dest.put formatted_text ) ;; def_code "\\@mathfrak" (fun lexbuf -> let str = subst_arg lexbuf in let str_list = get_elements str in let format x = Scan.get_this_main ("\\"^"one@mathfrak{"^x^"}") in let formatted_list = List.map format str_list in let formatted_text = List.fold_left str_cat "" formatted_list in Dest.put formatted_text ) ;; def_code "\\@mathsf" (fun lexbuf -> let str = subst_arg lexbuf in let str_list = get_elements str in let format x = Scan.get_this_main ("\\"^"one@mathsf{"^x^"}") in let formatted_list = List.map format str_list in let formatted_text = List.fold_left str_cat "" formatted_list in Dest.put formatted_text ) ;; def_code "\\@mathbf" (fun lexbuf -> let str = subst_arg lexbuf in (*let str_list = get_elements str in let format x = Scan.get_this_main ("\\"^"one@mathbf{"^x^"}") in let formatted_list = List.map format str_list in let formatted_text = List.fold_left str_cat "" formatted_list in*) Dest.put (""^str^"") ) ;; def_code "\\@mathrm" (fun lexbuf -> let arg1 = save_arg lexbuf in let str = arg1.arg in (*let str_list = get_elements str in let format x = Scan.get_this_main ("\\"^"one@mathbf{"^x^"}") in let formatted_list = List.map format str_list in let formatted_text = List.fold_left str_cat "" formatted_list in*) Dest.put (str) ) ;; def_code "\\@mathcal" (fun lexbuf -> let arg1 = save_arg lexbuf in let str = arg1.arg in let str_list = get_elements str in let format x = Scan.get_this_main ("\\"^"one@mathcal{"^x^"}") in let formatted_list = List.map format str_list in let formatted_text = List.fold_left str_cat "" formatted_list in Dest.put formatted_text ) ;; def_code "\\@mathtt" (fun lexbuf -> let arg1 = save_arg lexbuf in let str = arg1.arg in let str_list = get_elements str in let format x = Scan.get_this_main ("\\"^"one@mathtt{"^x^"}") in let formatted_list = List.map format str_list in let formatted_text = List.fold_left str_cat "" formatted_list in Dest.put formatted_text ) ;; end hevea-2.09/LICENSE0000644004317100512160000007422312030055774013602 0ustar marangetcristal All source files marked "Copyright INRIA" in this distribution are distributed under the terms of the Q Public License version 1.0 (included below). Binary versions of this software include some parts of the Objective Caml runtime system, which is distributed under the terms of the GNU LIBRARY GENERAL PUBLIC LICENSE Version 2. (included below) Sources for Objective Caml runtime system are available at http://caml.inria.fr/ocaml/distrib.html ---------------------------------------------------------------------- As a special exception to the Q Public Licence, you may develop application programs, reusable components and other software items that link with the original or modified versions of the Software and are not made available to the general public, without any of the additional requirements listed in clause 6c of the Q Public licence. THE Q PUBLIC LICENSE version 1.0 Copyright (C) 1999 Troll Tech AS, Norway. Everyone is permitted to copy and distribute this license document. The intent of this license is to establish freedom to share and change the software regulated by this license under the open source model. This license applies to any software containing a notice placed by the copyright holder saying that it may be distributed under the terms of the Q Public License version 1.0. Such software is herein referred to as the Software. This license covers modification and distribution of the Software, use of third-party application programs based on the Software, and development of free software which uses the Software. Granted Rights 1. You are granted the non-exclusive rights set forth in this license provided you agree to and comply with any and all conditions in this license. Whole or partial distribution of the Software, or software items that link with the Software, in any form signifies acceptance of this license. 2. You may copy and distribute the Software in unmodified form provided that the entire package, including - but not restricted to - copyright, trademark notices and disclaimers, as released by the initial developer of the Software, is distributed. 3. You may make modifications to the Software and distribute your modifications, in a form that is separate from the Software, such as patches. The following restrictions apply to modifications: a. Modifications must not alter or remove any copyright notices in the Software. b. When modifications to the Software are released under this license, a non-exclusive royalty-free right is granted to the initial developer of the Software to distribute your modification in future versions of the Software provided such versions remain available under these terms in addition to any other license(s) of the initial developer. 4. You may distribute machine-executable forms of the Software or machine-executable forms of modified versions of the Software, provided that you meet these restrictions: a. You must include this license document in the distribution. b. You must ensure that all recipients of the machine-executable forms are also able to receive the complete machine-readable source code to the distributed Software, including all modifications, without any charge beyond the costs of data transfer, and place prominent notices in the distribution explaining this. c. You must ensure that all modifications included in the machine-executable forms are available under the terms of this license. 5. You may use the original or modified versions of the Software to compile, link and run application programs legally developed by you or by others. 6. You may develop application programs, reusable components and other software items that link with the original or modified versions of the Software. These items, when distributed, are subject to the following requirements: a. You must ensure that all recipients of machine-executable forms of these items are also able to receive and use the complete machine-readable source code to the items without any charge beyond the costs of data transfer. b. You must explicitly license all recipients of your items to use and re-distribute original and modified versions of the items in both machine-executable and source code forms. The recipients must be able to do so without any charges whatsoever, and they must be able to re-distribute to anyone they choose. c. If the items are not available to the general public, and the initial developer of the Software requests a copy of the items, then you must supply one. Limitations of Liability In no event shall the initial developers or copyright holders be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise. No Warranty The Software and this license document are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Choice of Law This license is governed by the Laws of France. ---------------------------------------------------------------------- GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! hevea-2.09/textcomp.hva0000644004317100512160000000671310702502410015123 0ustar marangetcristal%%Some day maybe \iffalse \newcommand{\@buildaccent}[2] {\newcommand{\csname#1\endcsname}[1]{##1\@print{&#}\@getprint{#2}\@print{;}}} \@buildaccent{textcircled}{X20DD} \fi \newcommand{\@buildtext}[2][\@empty] {\ifx#1\@empty \def\csname text#2\endcsname{\@print{&}\@getprint{#2}\@print{;}}% \else \def\csname text#2\endcsname{\@print@u{#1}}% \fi} \DeclareSymbol[<-]{\textleftarrow}{X2190} \DeclareSymbol[->]{\textrightarrow}{X2192} \newcommand{\textquotesingle}{\@print{'}} \newcommand{\textdblhyphen}{\@print{=}}%snif \DeclareSymbol[/]{\textfractionsolidus}{X2044} \DeclareSymbol[<]{\textlangle}{9001} \DeclareSymbol[-]{\textminus}{X2D} \DeclareSymbol[>]{\textrangle}{9002} \DeclareSymbolHtml{\textmho}{X2127} \DeclareSymbolHtml[O]{\textbigcircle}{X25EF} \DeclareSymbolHtml{\textohm}{X2126} \DeclareSymbolHtml[{[[}]{\textlbrackdbl}{X27E6}%}] \DeclareSymbolHtml[{]]}]{\textrbrackdbl}{X27E7}% \DeclareSymbolHtml{\textuparrow}{X2191} \DeclareSymbolHtml{\textdownarrow}{X2193} \DeclareSymbol{\textasciigrave}{X60} \DeclareSymbolHtml{\textborn}{8902} \DeclareSymbol[o|o]{\textdivorced}{X26AE} \DeclareSymbolHtml{\textdied}{X26B0} \DeclareSymbol[oo]{\textmarried}{X26AD} \DeclareSymbolHtml{\textmusicalnote}{X266A} \DeclareSymbolHtml{\texttildelow}{X02F7} \def\textdblhyphenchar{\@print{=}}%snif \DeclareSymbolHtml{\textasciibreve}{X02D8} \DeclareSymbolHtml{\textasciicaron}{X02C7} \ifhtml \def\textgravedbl{\@print@u{XA0}\@print{̏}} \def\textacutedbl{\@print@u{XA0}\@print{̋}} \else \def\textgravedbl{\@print{``}} \def\textacutedbl{\textasciiacute\textasciiacute} \fi \DeclareSymbol[||]{\textbardbl}{X2016} \DeclareSymbolHtml[./..]{\textperthousand}{X2030} \DeclareSymbol[\textdegree{}C]{\textcelsius}{X2103} \DeclareSymbol[Florin]{\textflorin}{X0192} \DeclareSymbol[Colon]{\textcolonmonetary}{X20A1} \DeclareSymbol[Won]{\textwon}{X20A9} \DeclareSymbol[naira]{\textnaira}{X20A6} \DeclareSymbol[Guarani]{\textguarani}{X20B2} \DeclareSymbol[Peso]{\textpeso}{X20B1} \DeclareSymbol[lira]{\textlira}{X20A4} \DeclareSymbolHtml{\textrecipe}{X211E} \DeclareSymbolHtml{\textinterrobang}{X203D} \DeclareSymbolHtml[Dong]{\textdong}{X20AB} \DeclareSymbolHtml[./...]{\textpertenthousand}{X2031} \DeclareSymbol{\textpilcrow}{XB6} \DeclareSymbol[Bath]{\textbaht}{X0E3F} \DeclareSymbol[N\textdegree]{\textnumero}{X2116} \DeclareSymbol[./.]{\textdiscount}{X2052} \DeclareSymbolHtml{\textestimated}{X212E} \DeclareSymbol[o]{\textopenbullet}{X25CB} \DeclareSymbol[(SM)]{\textservicemark}{X2120} \DeclareSymbol[c.]{\textcent}{XA2} %%ISO latin \DeclareSymbol{\textcurrency}{XA4} \DeclareSymbol[yen]{\textyen}{XA5} \DeclareSymbol{\textbrokenbar}{XA6} \DeclareSymbol{\textasciidieresis}{XA8} %\DeclareSymbol{copyleft}%not found \DeclareSymbol{\textlnot}{XAC} \DeclareSymbol[(P)]{\textcircledP}{X2117} \DeclareSymbol{\textasciimacron}{XAF} \DeclareSymbol{\textdegree}{XB0} \DeclareSymbol{\textpm}{XB1} \DeclareSymbol[$^2]{\texttwosuperior}{XB2} \DeclareSymbol[$^3$]{\textthreesuperior}{XB3} \DeclareSymbol[']{\textasciiacute}{XB4} \DeclareSymbol[mu]{\textmu}{XB5} \DeclareSymbolHtml{\textreferencemark}{X203B} \DeclareSymbol[$^1$]{\textonesuperior}{XB9} \let\textsurd\surd \DeclareSymbol[1/4]{\textonequarter}{XBC} \DeclareSymbol[1/2]{\textonehalf}{XBD} \DeclareSymbol[3/4]{\textthreequarters}{XBE} \DeclareSymbol[Euro]{\texteuro}{X20AC} \DeclareSymbol[X]{\texttimes}{XD7} \DeclareSymbol[/]{\textdiv}{XF7} %%%% Text-mode arrows \@Let\textdownarrow\downarrow \@Let\textrightarrow\rightarrow \@Let\textleftarrow\leftarrow \@Let\textuparrow\uparrow hevea-2.09/chapterbib.hva0000644004317100512160000000201710634250756015375 0ustar marangetcristal\let\chapterbib@include\include \newcounter{chap@included} \newcommand{\maketocbibitem}{} \newcommand{\@sectionbib@maketocbibitem}{\@auxdowrite{\@print{\@addcontentsline{htoc}}\{0\}\{\@print{\ahrefloc}\{bib:chap\thechap@included\}\{\refname{}\}\}\@print{ }}} \renewcommand{\include}[1] {\stepcounter{chap@included}% \def\chapterbib@include@name{#1}% \chapterbib@include{#1}} \renewcommand{\bibliography}[1]{\maketocbibitem\input{\chapterbib@include@name.bbl}} \let\chapterbib@thebibliography\thebibliography \renewcommand{\thebibliography}[1] {\setcounter{heveabib}{0}\chapterbib@thebibliography{#1}} \renewcommand{\bibtaghook}[1] {\@ifundefined{chapterbib@include@name}{#1}{#1@\thechap@included}} \newcommand{\sectionbib}[2] {\renewcommand{\@bibliosection}[1]{#1{\aname{bib:chap\thechap@included}{##1}}}% \let\maketocbibitem\@sectionbib@maketocbibitem} \DeclareOption{sectionbib}{\sectionbib{\section*}{section}}% \DeclareOption{draft}{}% \DeclareOption{rootbib}{}% \DeclareOption{duplicate}{}% \DeclareOption{gather}{}% \ProcessOptions* hevea-2.09/imagen0000755004317100512160000000453112017660721013755 0ustar marangetcristal#! /bin/sh LATEX=latex DVIPS=dvips GS=gs COM=/tmp/imagen-com.$$ RESOLUTION=100 # resolution in dpi CROP="-trim +repage " EXTRA=" " MARGIN="-bordercolor none -border 2 " TOGIF="-background white -flatten -interlace Plane gif:-" TOPNG="-interlace Plane -quality 90 png:-" TOEXT=${TOPNG} EXT=png TODIR="." RM="/bin/rm -f" while true do case $1 in -todir) shift TODIR="$1" mkdir -p ${TODIR} 2> /dev/null || : ;; -gif) TOEXT=${TOGIF} EXT=gif ;; -png) TOEXT=${TOPNG} EXT=png ;; -pnm) TOEXT="pnm:-" EXT=pnm ;; -quant) shift echo "Warning: option -quant deprecated" 1>&2 ;; -extra) shift EXTRA="$1" ;; -mag) shift RESOLUTION="$( expr '(' "$1" '*' 100 '+' 999 ')' '/' 1000)" ;; -res) shift RESOLUTION="$1" ;; -t) shift TPAPER="-t $1" ;; -pdflatex|-pdf) LATEX=pdflatex DVIPS=cat ;; -raw) EXTRA='' MARGIN='' TOEXT="pnm:-" ;; *) break ;; esac shift done echo "RESOLUTION: $RESOLUTION" case $1 in '') BASE=image ;; *) BASE=$1 ;; esac NAME=${BASE}.image trap "${RM} ${NAME}.dvi ${NAME}.pdf `basename ${NAME}.log` `basename ${NAME}.aux` head.tmp body.tmp ${COM} ; exit 2" 1 2 3 8 10 13 15 DVIPSOPTS="-Z $TPAPER" GSOPTS="-q -dNOPAUSE -dBATCH -dNOPROMPT -sDEVICE=pngalpha \ -r$RESOLUTION -dAutoRotatePages=/None \ -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dDOINTERPOLATE \ -P- -dSAFER" CONVERT="convert png:- ${CROP} ${EXTRA} ${MARGIN} ${TOEXT}" echo ${CONVERT} > ${COM} if [ "${TODIR}" = "." ] then FINAL=${BASE}%03d.${EXT} else FINAL=${TODIR}/${BASE}%03d.${EXT} fi test -f ${NAME}.tex ||\ { echo "Failure: no ${NAME}.tex file!" 2>&1 ; exit 2 ; } ${LATEX} ${NAME}.tex NAMEDIR=`dirname ${NAME}` if [ "${LATEX}" = "pdflatex" ] then if [ ${NAMEDIR} != "." ] then mv `basename ${NAME}.pdf` ${NAME}.pdf fi cat ${NAME}.pdf else if [ ${NAMEDIR} != "." ] then mv `basename ${NAME}.dvi` ${NAME}.dvi fi ${DVIPS} ${DVIPSOPTS} -o - ${NAME}.dvi fi |\ ${GS} ${GSOPTS} -sOutputFile="| sh ${COM} > ${FINAL}" - ${RM} ${COM} ${NAME}.dvi ${NAME}.pdf head.tmp body.tmp ${RM} `basename ${NAME}.log` `basename ${NAME}.aux` hevea-2.09/deepcut.hva0000644004317100512160000000430310505741042014711 0ustar marangetcristal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Instruct hacha to cut everywhere from part to subsection %% %% Some code contributed by Gilles Gregoire %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Inactivate cutting macros % %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \let\dc@cutdef\cutdef \let\dc@cutend\cutend %%%%%%%%%%%%%%%%%%% %% cut footnotes % %%%%%%%%%%%%%%%%%%% \let\deepcut@thefootnotes\thefootnotes \let\enddeepcut@thefootnotes\endthefootnotes \renewenvironment{thefootnotes}[2][] {\begin{cutflow}{Notes}\begin{deepcut@thefootnotes}{#2}} {\end{deepcut@thefootnotes}\end{cutflow}} %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% sectionning commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifcutchapter\cutchapterfalse \let\dc@part\part\let\dc@part*\part* \renewcommand{\part}[2][] {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse \ifcutsection\dc@cutend\fi\cutsectionfalse \ifcutchapter\dc@cutend\fi \ife#1\dc@part{#2}\else\dc@part[#1]{#2}\fi \dc@cutdef{chapter}\cutchaptertrue} \renewcommand{\part*}[1] {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse \ifcutsection\dc@cutend\fi\cutsectionfalse \ifcutchapter\dc@cutend\fi \dc@part*{#1}% \dc@cutdef{chapter}\cutchaptertrue} %%%%%%%%%%%%%%%%%% \newif\ifcutsection\cutsectionfalse \@ifundefined{chapter}{} {\let\dc@chapter\chapter\let\dc@chapter*\chapter* \renewcommand{\chapter}[2][] {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse \ifcutsection\dc@cutend\fi \ife#1\dc@chapter{#2}\else\dc@chapter[#1]{#2}\fi \dc@cutdef{section}\cutsectiontrue} \renewcommand{\chapter*}[1] {\ifcutsubsection\dc@cutend\fi\cutsubsectionfalse \ifcutsection\dc@cutend\fi \dc@chapter*{#1}% \dc@cutdef{section}\cutsectiontrue}} %%%%%%%%%%%%%%%%%% \newif\ifcutsubsection\cutsubsectionfalse \let\dc@section\section \let\dc@section*\section* \renewcommand{\section}[2][] {\ifcutsubsection\dc@cutend\fi \ife#1\dc@section{#2}\else\dc@section[#1]{#2}\fi \dc@cutdef{subsection}\cutsubsectiontrue} \renewcommand{\section*}[1] {\ifcutsubsection\dc@cutend\fi \dc@section*{#1}% \dc@cutdef{subsection}\cutsubsectiontrue} %%%%%Check that! \AtEndDocument {\ifcutsubsection\dc@cutend\fi\ifcutsection\dc@cutend\fi\ifcutchapter\dc@cutend\fi} hevea-2.09/out.ml0000644004317100512160000000156312017660721013732 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Tibault Suzanne, Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) include DoOut.Make (struct let small_length = let x = !Parse_opts.small_length in if x <= 0 then 1 else x end) hevea-2.09/packages.hva0000644004317100512160000000461512113070517015043 0ustar marangetcristal\newcommand{\@usepackage}[1] {%\hva@warn{\@usepackage '#1'}% \def\pkg@arg{{\@nostyle\@callprim{\@eatspaces}{#1,}}}% \ifthenelse{\equal{\pkg@arg}{hevea}}{\@usepackage{comment}} {\ifu\csname\pkg@arg{}@loaded\endcsname \@iffileexists{\pkg@arg.hva} {\def\csname\pkg@arg{}@loaded\endcsname{foo}% %Warning: loading \pkg@arg.hva may redefine \pgk@arg!!!! \input{\pkg@arg.hva}} {}% \fi}} \newsavebox{\@pkg@opts} \newcommand{\usepackage}[2][!*!] {%\hva@warn{\usepackage '#1' '#2'} \ifthenelse{\equal{#1}{!*!}} {\sbox{\@pkg@opts}{}\begin{toimage}\usepackage{#2}\end{toimage}} {\sbox{\@pkg@opts}{#1}\begin{toimage}\usepackage[#1]{#2}\end{toimage}}% \@stopoutput\@stopimage% \@funcall{\@iter}{\@usepackage,{#2}}% \@restartimage\@restartoutput} \hva@newstack{@pkg}\let\@pkg@me\relax \hva@newstack{@pkg@opts} \newcommand{\@pkg@pushs} {%\typeout{Saving: '\@pkg@opts' '\@pkg@me'} \@push@pkg{\@pkg@me}\@push@pkg@opts{\@pkg@opts}} \newcommand{\@pkg@pops} {\@pop@pkg@opts{\@pkg@opts}\@pop@pkg{\@pkg@me}% %\typeout{Restoring: '\@pkg@opts' '\@pkg@me'} } \newcommand{\ProvidesPackage}[1] {\def{\@pkg@me}{\@getprint{#1}}\AtEndOfFile{\@EndPackage}} \newcommand{\@EndPackage}{} \newcommand{\EndPackage}{\hva@warn{END}} \newcommand{\@pkg@opt@name}[1]{@pkg\@pkg@me{}@#1} \newcommand{\DeclareOption}[2] {\newcommand{\csname\@pkg@opt@name{#1}\endcsname}{#2}} \newcommand{\@process@option}[1]% {\def\pkg@opt{{\@nostyle\@callprim{\@eatspaces}{#1,}}}% \ifu\csname\@pkg@opt@name{\pkg@opt}\endcsname \hva@warn{Ignoring option: '#1'}\else \csname\@pkg@opt@name{\pkg@opt}\endcsname\fi}% %%Do not warn \newcommand{\@@process@option}[1]% {\def\pkg@opt{{\@nostyle\@callprim{\@eatspaces}{#1,}}}% \ifu\csname\@pkg@opt@name{\pkg@opt}\endcsname\else \csname\@pkg@opt@name{\pkg@opt}\endcsname\fi}% \newcommand{\ProcessOptions*} {\@callprim{\@iter} {\string\@@process@option,{\char123\usebox{\@document@opts}\char125}}% \@callprim{\@iter} {\string\@process@option,{\char123\usebox{\@pkg@opts}\char125}}} \newcommand{\ExecuteOptions}[1] {\@callprim{\@iter}{\string\@process@option,{\{#1\}}}} %%%% Packages in packages \newcommand{\@GoobleOpt}[1][]{}% \newcommand{\RequirePackage}[2][!*!] {\@pkg@pushs\usepackage[#1]{#2}\execafter\@GoobleOpt\@pkg@pops}% %%%%No op ProvidesFile \newcommand{\@eatopt}[1][]{} \newcommand{\ProvidesFile}[1]{\@eatopt} %%%%Misc \newcommand{\PackageInfo}[2]{\hva@warn{Package #1 info: #2}} hevea-2.09/tabular.mll0000644004317100512160000001534312017660721014732 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* $Id: tabular.mll,v 1.33 2012-06-05 14:55:39 maranget Exp $ *) { open Misc open Lexing open Table open Lexstate open Subst exception Error of string ;; type align = {hor : string ; mutable vert : string ; wrap : bool ; mutable pre : string ; mutable post : string ; width : Length.t} let make_hor = function 'c' -> "center" | 'l' -> "left" | 'r' -> "right" | 'p'|'m'|'b' -> "left" | _ -> raise (Misc.Fatal "make_hor") and make_vert = function | 'c'|'l'|'r' -> "" | 'p' -> "top" | 'm' -> "middle" | 'b' -> "bottom" | _ -> raise (Misc.Fatal "make_vert") type format = Align of align | Inside of string | Border of string ;; (* Patch vertical alignment (for HTML) *) let check_vert f = try for i = 0 to Array.length f-1 do match f.(i) with | Align {vert=s} when s <> "" -> raise Exit | _ -> () done ; f with Exit -> begin for i = 0 to Array.length f-1 do match f.(i) with | Align ({vert=""} as f) -> f.vert <- "top" | _ -> () done ; f end (* Compute missing length (for text) *) and check_length f = for i = 0 to Array.length f - 1 do match f.(i) with | Align ({wrap=true ; width=Length.No _} as r) -> f.(i) <- Align {r with width = Length.Percent (truncate (100.0 /. float (Array.length f)))} | _ -> () done let border = ref false let out_table = Table.create (Inside "") let pretty_format = function | Align {vert = v ; hor = h ; pre = pre ; post = post ; wrap = b ; width = w} -> "[>{"^pre^"}"^ ", h="^h^", v="^v^ ", <{"^post^"}"^(if b then ", wrap" else "")^ ", w="^Length.pretty w^"]" | Inside s -> "@{"^s^"}" | Border s -> s let pretty_formats f = Array.iter (fun f -> prerr_string (pretty_format f) ; prerr_string "; ") f (* For some reason pre/post-ludes are executed right to left *) let concat_pre_post x y = match x, y with | "", _ -> y | _, "" -> x | _,_ -> y ^ "{}" ^ x } rule tfone = parse | [' ''\t''\n''\r'] {tfone lexbuf} | '>' {let pre = subst_arg lexbuf in tfone lexbuf ; try apply out_table (function | Align a -> a.pre <- concat_pre_post pre a.pre ; | _ -> raise (Error "Bad syntax in array argument (>)")) with Table.Empty -> raise (Error "Bad syntax in array argument (>)")} | "" {tfmiddle lexbuf} and tfmiddle = parse | [' ''\t''\n''\r'] {tfmiddle lexbuf} | ['c''l''r'] {let f = Lexing.lexeme_char lexbuf 0 in let post = tfpostlude lexbuf in emit out_table (Align {hor = make_hor f ; vert = make_vert f ; wrap = false ; pre = "" ; post = post ; width = Length.Default})} | ['p''m''b'] {let f = Lexing.lexeme_char lexbuf 0 in let width = subst_arg lexbuf in let my_width = Length.main (MyLexing.from_string width) in let post = tfpostlude lexbuf in emit out_table (Align {hor = make_hor f ; vert = make_vert f ; wrap = true ; pre = "" ; post = post ; width = my_width})} | '#' ['1'-'9'] {let lxm = lexeme lexbuf in let i = Char.code (lxm.[1]) - Char.code '1' in Lexstate.scan_arg (scan_this_arg_list tfmiddle) i} | '%' [^'\n']* '\n' {tfmiddle lexbuf} | [^'|' '@' '<' '>' '!' '#'] {let lxm = lexeme lexbuf in let name = column_to_command lxm in let pat,body = Latexmacros.find name in let args = Lexstate.make_stack name pat lexbuf in let cur_subst = get_subst () in Lexstate.scan_body (function | Lexstate.Subst body -> scan_this_list_may_cont lexformat lexbuf cur_subst (string_to_arg body) ; | _ -> assert false) body args ; let post = tfpostlude lexbuf in if post <> "" then try Table.apply out_table (function | Align f -> f.post <- post | _ -> Misc.warning ("``<'' after ``@'' in tabular arg scanning")) with | Table.Empty -> raise (Error ("``<'' cannot start tabular arg"))} | eof {()} | "" {let rest = String.sub lexbuf.lex_buffer lexbuf.lex_curr_pos (lexbuf.lex_buffer_len - lexbuf.lex_curr_pos) in raise (Error ("Syntax of array format near: "^rest))} and tfpostlude = parse | [' ''\t''\n''\r'] {tfpostlude lexbuf} | '<' {let one = subst_arg lexbuf in let rest = tfpostlude lexbuf in let r = concat_pre_post one rest in r} | eof {if MyStack.empty stack_lexbuf then "" else let lexbuf = previous_lexbuf () in tfpostlude lexbuf} | "" {""} and lexformat = parse | [' ''\t''\n''\r'] {lexformat lexbuf} | '*' {let ntimes = save_arg lexbuf in let what = save_arg lexbuf in let rec do_rec = function 0 -> lexformat lexbuf | i -> scan_this_arg lexformat what ; do_rec (i-1) in do_rec (Get.get_int_string ntimes)} | '|' {border := true ; emit out_table (Border "|") ; lexformat lexbuf} | '@'|'!' {let lxm = Lexing.lexeme_char lexbuf 0 in let inside = subst_arg lexbuf in if lxm = '!' || inside <> "" then emit out_table (Inside inside) ; lexformat lexbuf} | '#' ['1'-'9'] {let lxm = lexeme lexbuf in let i = Char.code (lxm.[1]) - Char.code '1' in Lexstate.scan_arg (scan_this_arg_list lexformat) i ; lexformat lexbuf} | eof {if MyStack.empty stack_lexbuf then () else let lexbuf = previous_lexbuf () in lexformat lexbuf} | "" {tfone lexbuf ; lexformat lexbuf} { open Parse_opts let main {arg=s ; subst=env} = if !verbose > 1 then prerr_endline ("Table format: "^s); let lexbuf = if String.length s > 0 && s.[0] = '\\' then match Latexmacros.find s with | _, Lexstate.Subst s -> MyLexing.from_list s | _,_ -> MyLexing.from_string s else MyLexing.from_string s in start_normal env ; lexformat lexbuf ; end_normal () ; let r = check_vert (trim out_table) in begin match !destination with | (Text | Info) -> check_length r | Html -> () end ; if !verbose > 1 then begin prerr_string "Format parsed: " ; pretty_formats r ; prerr_endline "" end ; r } hevea-2.09/parse_opts.mli0000644004317100512160000000241412017660721015447 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type input = File of string | Prog of string type symbol_mode = SText | Symbol | Entity val symbol_mode : symbol_mode ref type destination = Html | Text | Info val destination : destination ref val moreentities : bool ref val mathml : bool ref val pedantic : bool ref val fixpoint : bool ref val optimize : bool ref val width : int ref val except : string list ref val path : string list ref val small_length : int ref val filter : bool val styles : input list val base_in : string val name_in : string val base_out : string val name_out : string hevea-2.09/lexeme.mli0000644004317100512160000000273112017660721014551 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: lexeme.mli,v 1.6 2005-06-24 08:32:21 maranget Exp $ *) (***********************************************************************) type tag = | TT |I |B |BIG |SMALL | STRIKE | S |U |FONT | EM |STRONG |DFN |CODE |SAMP | KBD |VAR |CITE |ABBR |ACRONYM | Q |SUB |SUP | A | SCRIPT | SPAN | STYLE (* style for fonts by span tags *) type fontstyle = | Ffamily | Fstyle | Fvariant | Fweight | Fsize | Fcolor | Fbgcolor type atag = | SIZE of string | COLOR of string | FACE of string | CLASS of string | ASTYLE of fontstyle * string | OTHER type attr = atag * string type attrs = attr list type token = | Open of tag * attrs * string | Close of tag * string | Text of string | Blanks of string | Eof type style = {tag : tag ; attrs : attrs ; txt : string ; ctxt : string} hevea-2.09/pub0000644004317100512160000000011606776427531013312 0ustar marangetcristalcomp.lang.ml comp.text.tex fr.comp.text.tex inria.general caml-list@inria.fr hevea-2.09/outUnicode.ml0000644004317100512160000004463710634170641015252 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet MOSCOVA, INRIA Rocquencourt *) (* *) (* Copyright 2006 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type unichar = int (* 31 bits, well *) let show x = Printf.sprintf "U+%04X" x exception Failed of string let bad_char c = raise (Failed (Printf.sprintf "Bad character in unicode entity: %c" c)) let rec parse10 len str i r = if i < len then let c = match str.[i] with | '0' -> 0 | '1' -> 1 | '2' -> 2 | '3' -> 3 | '4' -> 4 | '5' -> 5 | '6' -> 6 | '7' -> 7 | '8' -> 8 | '9' -> 9 | c -> bad_char c in parse10 len str (i+1) (10*r+c) else r let rec parse16 len str i r = if i < len then let c = match str.[i] with | '0' -> 0 | '1' -> 1 | '2' -> 2 | '3' -> 3 | '4' -> 4 | '5' -> 5 | '6' -> 6 | '7' -> 7 | '8' -> 8 | '9' -> 9 | 'a'|'A' -> 10 | 'b'|'B' -> 11 | 'c'|'C' -> 12 | 'd'|'D' -> 13 | 'e'|'E' -> 14 | 'f'|'F' -> 15 | c -> bad_char c in parse16 len str (i+1) (16*r+c) else r let do_parse str = let len = String.length str in if len = 0 then begin raise (Failed "Cannot parse unicode entity: empty") end else match str.[0] with | 'X'|'x' -> parse16 len str 1 0 | '0'..'9' -> parse10 len str 0 0 | c -> bad_char c let parse str = try do_parse str with Failed msg -> Misc.warning msg ; 0 exception CannotTranslate let translate_ascii_out i put = if i < 128 then put (Char.unsafe_chr i) else raise CannotTranslate and translate_ascii_in c _ = let i = Char.code c in if i < 128 then i else raise CannotTranslate let translate_latin1_out i put = if i < 256 then put (Char.unsafe_chr i) else raise CannotTranslate and translate_latin1_in c _ = Char.code c let cannot () = raise CannotTranslate let translate_utf8_in c next = match c with | '\000'..'\127' -> Char.code c | '\128'..'\223' -> let n1 = Char.code c in let n2 = next () in if n2 < 128 || n2 > 191 then cannot () ; let p = ((n1 land 0b11111) lsl 6) lor (n2 land 0b111111) in if p < 128 then cannot () ; p | '\224'..'\239' -> let n1 = Char.code c in let n2 = next () in let n3 = next () in if n2 < 128 or n2 > 191 then cannot(); if n3 < 128 or n3 > 191 then cannot(); let p = ((n1 land 0b1111) lsl 12) lor ((n2 land 0b111111) lsl 6) lor (n3 land 0b111111) in if p < 0x800 then cannot(); if (p >= 0xd800 && p < 0xe000) then (* Surrogate pairs are not supported in UTF-8 *) cannot(); if (p >= 0xfffe && p <= 0xffff) then cannot(); p | '\240'..'\247' -> let n1 = Char.code c in let n2 = next () in let n3 = next () in let n4 = next () in if n2 < 128 or n2 > 191 then cannot(); if n3 < 128 or n3 > 191 then cannot(); if n4 < 128 or n4 > 191 then cannot(); let p = ((n1 land 0b111) lsl 18) lor ((n2 land 0b111111) lsl 12) lor ((n3 land 0b111111) lsl 6) lor (n4 land 0b111111) in if p < 0x10000 then cannot (); if p >= 0x110000 then cannot(); (* These code points are not supported. *) p | _ -> cannot () and translate_utf8_out p put = if p <= 127 then put (Char.unsafe_chr p) else if p <= 0x7ff then begin put (Char.unsafe_chr (0xc0 lor (p lsr 6))) ; put (Char.unsafe_chr (0x80 lor (p land 0x3f))) end else if p <= 0xffff then begin put (Char.unsafe_chr (0xe0 lor (p lsr 12))); put (Char.unsafe_chr (0x80 lor ((p lsr 6) land 0x3f))); put (Char.unsafe_chr (0x80 lor (p land 0x3f))) end else begin (* No such characters are defined... *) put (Char.chr (0xf0 lor (p lsr 18))); put (Char.chr (0x80 lor ((p lsr 12) land 0x3f))) ; put (Char.chr (0x80 lor ((p lsr 6) land 0x3f))) ; put (Char.chr (0x80 lor (p land 0x3f))) ; end let translate_out_fun = ref translate_ascii_out and translate_in_fun = ref translate_ascii_in let make_out_translator ps = let t = Hashtbl.create 101 in List.iter (fun (iso, uni) -> Hashtbl.add t uni (Char.chr iso)) ps ; (fun i put -> try put (Hashtbl.find t i) with Not_found -> raise CannotTranslate) and make_in_translator ps = let t = Array.create 256 0 in List.iter (fun (iso, uni) -> t.(iso) <- uni) ps ; (fun c _ -> t.(Char.code c)) let read_mapping name chan = let t = ref [] and scanbuf = Scanf.Scanning.from_channel chan in try while true do Scanf.bscanf scanbuf " %i %i" (fun iso uni -> t := (iso,uni) :: !t) ; done ; !t with | End_of_file -> !t | Sys_error msg -> Misc.warning (Printf.sprintf "Error '%s' while loading mapping: %s\n" msg name) ; raise (Misc.Fatal "Mapping") let open_mapping name = try let real_name = Myfiles.find name in open_in real_name with | Not_found -> Misc.warning (Printf.sprintf "Cannot find mapping: %s\n" name) ; raise (Misc.Fatal "Mapping") | Sys_error msg -> Misc.warning (Printf.sprintf "Error '%s' while opening mapping: %s\n" msg name) ; raise (Misc.Fatal "Mapping") and close_mapping chan = try close_in chan with _ -> () let set_output_translator name = let key = Filename.basename name in match key with | "ISO-8859-1.map" -> translate_out_fun := translate_latin1_out | "US-ASCII.map" -> translate_out_fun := translate_ascii_out | "UTF-8.map" -> translate_out_fun := translate_utf8_out | _ -> let chan = open_mapping name in let ps = read_mapping name chan in close_mapping chan ; translate_out_fun := make_out_translator ps and set_input_translator name = let key = Filename.basename name in match key with | "ISO-8859-1.map" -> translate_in_fun := translate_latin1_in | "US-ASCII.map" -> translate_in_fun := translate_ascii_in | "UTF-8.map" -> translate_in_fun := translate_utf8_in | _ -> let chan = open_mapping name in let ps = read_mapping name chan in close_mapping chan ; translate_in_fun := make_in_translator ps and set_translators name = let key = Filename.basename name in match key with | "ISO-8859-1.map" -> translate_out_fun := translate_latin1_out ; translate_in_fun := translate_latin1_in | "US-ASCII.map" -> translate_out_fun := translate_ascii_out ; translate_in_fun := translate_ascii_in | "UTF-8.map" -> translate_out_fun := translate_utf8_out ; translate_in_fun := translate_utf8_in | _ -> let chan = open_mapping name in let ps = read_mapping name chan in close_mapping chan ; translate_out_fun := make_out_translator ps ; translate_in_fun := make_in_translator ps let translate_out i = !translate_out_fun i and translate_in c (next:unit -> int) = !translate_in_fun c next (* Diacritical marks *) (* Tables from ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859 Mapping from NAME LIST of the www.unicode.org site. Got functions by: egrep 'WITH GRAVE$' NamesList.txt | grep LATIN | awk -f a.awk Where a.awk is /SMALL/ { printf ("| '%s' -> 0x%s\n", tolower($5), $1) } /CAPITAL/ { printf ("| '%s' -> 0x%s\n", $5, $1) } *) let grave = function | 'A' -> 0x00C0 | 'E' -> 0x00C8 | 'I' -> 0x00CC | 'O' -> 0x00D2 | 'U' -> 0x00D9 | 'a' -> 0x00E0 | 'e' -> 0x00E8 | 'i' -> 0x00EC | 'o' -> 0x00F2 | 'u' -> 0x00F9 | 'N' -> 0x01F8 | 'n' -> 0x01F9 | 'W' -> 0x1E80 | 'w' -> 0x1E81 | 'Y' -> 0x1EF2 | 'y' -> 0x1EF3 | _ -> raise CannotTranslate and acute = function | 'A' -> 0x00C1 | 'E' -> 0x00C9 | 'I' -> 0x00CD | 'O' -> 0x00D3 | 'U' -> 0x00DA | 'Y' -> 0x00DD | 'a' -> 0x00E1 | 'e' -> 0x00E9 | 'i' -> 0x00ED | 'o' -> 0x00F3 | 'u' -> 0x00FA | 'y' -> 0x00FD | 'C' -> 0x0106 | 'c' -> 0x0107 | 'L' -> 0x0139 | 'l' -> 0x013A | 'N' -> 0x0143 | 'n' -> 0x0144 | 'R' -> 0x0154 | 'r' -> 0x0155 | 'S' -> 0x015A | 's' -> 0x015B | 'Z' -> 0x0179 | 'z' -> 0x017A | 'G' -> 0x01F4 | 'g' -> 0x01F5 | 'K' -> 0x1E30 | 'k' -> 0x1E31 | 'M' -> 0x1E3E | 'm' -> 0x1E3F | 'P' -> 0x1E54 | 'p' -> 0x1E55 | 'W' -> 0x1E82 | 'w' -> 0x1E83 | _ -> raise CannotTranslate and circumflex = function | 'A' -> 0x00C2 | 'E' -> 0x00CA | 'I' -> 0x00CE | 'O' -> 0x00D4 | 'U' -> 0x00DB | 'a' -> 0x00E2 | 'e' -> 0x00EA | 'i' -> 0x00EE | 'o' -> 0x00F4 | 'u' -> 0x00FB | 'C' -> 0x0108 | 'c' -> 0x0109 | 'G' -> 0x011C | 'g' -> 0x011D | 'H' -> 0x0124 | 'h' -> 0x0125 | 'J' -> 0x0134 | 'j' -> 0x0135 | 'S' -> 0x015C | 's' -> 0x015D | 'W' -> 0x0174 | 'w' -> 0x0175 | 'Y' -> 0x0176 | 'y' -> 0x0177 | 'Z' -> 0x1E90 | 'z' -> 0x1E91 | _ -> raise CannotTranslate and tilde = function | 'A' -> 0x00C3 | 'N' -> 0x00D1 | 'O' -> 0x00D5 | 'a' -> 0x00E3 | 'n' -> 0x00F1 | 'o' -> 0x00F5 | 'I' -> 0x0128 | 'i' -> 0x0129 | 'U' -> 0x0168 | 'u' -> 0x0169 | 'V' -> 0x1E7C | 'v' -> 0x1E7D | 'E' -> 0x1EBC | 'e' -> 0x1EBD | 'Y' -> 0x1EF8 | 'y' -> 0x1EF9 | _ -> raise CannotTranslate and diaeresis = function | 'A' -> 0x00C4 | 'E' -> 0x00CB | 'I' -> 0x00CF | 'O' -> 0x00D6 | 'U' -> 0x00DC | 'a' -> 0x00E4 | 'e' -> 0x00EB | 'i' -> 0x00EF | 'o' -> 0x00F6 | 'u' -> 0x00FC | 'y' -> 0x00FF | 'Y' -> 0x0178 | 'H' -> 0x1E26 | 'h' -> 0x1E27 | 'W' -> 0x1E84 | 'w' -> 0x1E85 | 'X' -> 0x1E8C | 'x' -> 0x1E8D | 't' -> 0x1E97 | _ -> raise CannotTranslate and ring = function | 'A' -> 0x00C5 | 'a' -> 0x00E5 | 'U' -> 0x016E | 'u' -> 0x016F | 'w' -> 0x1E98 | 'y' -> 0x1E99 | _ -> raise CannotTranslate and cedilla = function | 'C' -> 0x00C7 | 'c' -> 0x00E7 | 'G' -> 0x0122 | 'g' -> 0x0123 | 'K' -> 0x0136 | 'k' -> 0x0137 | 'L' -> 0x013B | 'l' -> 0x013C | 'N' -> 0x0145 | 'n' -> 0x0146 | 'R' -> 0x0156 | 'r' -> 0x0157 | 'S' -> 0x015E | 's' -> 0x015F | 'T' -> 0x0162 | 't' -> 0x0163 | 'E' -> 0x0228 | 'e' -> 0x0229 | 'D' -> 0x1E10 | 'd' -> 0x1E11 | 'H' -> 0x1E28 | 'h' -> 0x1E29 | _ -> raise CannotTranslate and stroke = function | 'O' -> 0x00D8 | 'o' -> 0x00F8 | 'D' -> 0x0110 | 'd' -> 0x0111 | 'H' -> 0x0126 | 'h' -> 0x0127 | 'L' -> 0x0141 | 'l' -> 0x0142 | 'T' -> 0x0166 | 't' -> 0x0167 | 'b' -> 0x0180 | 'I' -> 0x0197 | 'Z' -> 0x01B5 | 'z' -> 0x01B6 | 'G' -> 0x01E4 | 'g' -> 0x01E5 | 'A' -> 0x023A | 'C' -> 0x023B | 'c' -> 0x023C | 'i' -> 0x0268 | 'p' -> 0x1D7D | _ -> raise CannotTranslate and macron = function | 'A' -> 0x0100 | 'a' -> 0x0101 | 'E' -> 0x0112 | 'e' -> 0x0113 | 'I' -> 0x012A | 'i' -> 0x012B | 'O' -> 0x014C | 'o' -> 0x014D | 'U' -> 0x016A | 'u' -> 0x016B (* Aie | 'AE' -> 0x01E2 | 'ae' -> 0x01E3 *) | 'Y' -> 0x0232 | 'y' -> 0x0233 | 'G' -> 0x1E20 | 'g' -> 0x1E21 | _ -> raise CannotTranslate and caron = function | 'C' -> 0x010C | 'c' -> 0x010D | 'D' -> 0x010E | 'd' -> 0x010F | 'E' -> 0x011A | 'e' -> 0x011B | 'L' -> 0x013D | 'l' -> 0x013E | 'N' -> 0x0147 | 'n' -> 0x0148 | 'R' -> 0x0158 | 'r' -> 0x0159 | 'S' -> 0x0160 | 's' -> 0x0161 | 'T' -> 0x0164 | 't' -> 0x0165 | 'Z' -> 0x017D | 'z' -> 0x017E (* | 'DZ' -> 0x01C4 | 'dz' -> 0x01C6 *) | 'A' -> 0x01CD | 'a' -> 0x01CE | 'I' -> 0x01CF | 'i' -> 0x01D0 | 'O' -> 0x01D1 | 'o' -> 0x01D2 | 'U' -> 0x01D3 | 'u' -> 0x01D4 | 'G' -> 0x01E6 | 'g' -> 0x01E7 | 'K' -> 0x01E8 | 'k' -> 0x01E9 (*Aie | 'EZH' -> 0x01EE | 'ezh' -> 0x01EF *) | 'j' -> 0x01F0 | 'H' -> 0x021E | 'h' -> 0x021F | _ -> raise CannotTranslate and doubleacute = function | 'O' -> 0x0150 | 'o' -> 0x0151 | 'U' -> 0x0170 | 'u' -> 0x0171 | _ -> raise CannotTranslate and doublegrave = function | 'A' -> 0x0200 | 'a' -> 0x0201 | 'E' -> 0x0204 | 'e' -> 0x0205 | 'I' -> 0x0208 | 'i' -> 0x0209 | 'O' -> 0x020C | 'o' -> 0x020D | 'R' -> 0x0210 | 'r' -> 0x0211 | 'U' -> 0x0214 | 'u' -> 0x0215 | _ -> raise CannotTranslate and breve = function | 'A' -> 0x0102 | 'a' -> 0x0103 | 'E' -> 0x0114 | 'e' -> 0x0115 | 'G' -> 0x011E | 'g' -> 0x011F | 'I' -> 0x012C | 'i' -> 0x012D | 'O' -> 0x014E | 'o' -> 0x014F | 'U' -> 0x016C | 'u' -> 0x016D | 'H' -> 0x1E2A | 'h' -> 0x1E2B | _ -> raise CannotTranslate and dotabove = function | 'C' -> 0x010A | 'c' -> 0x010B | 'E' -> 0x0116 | 'e' -> 0x0117 | 'G' -> 0x0120 | 'g' -> 0x0121 | 'I' -> 0x0130 | 'i' -> 0x69 | 'Z' -> 0x017B | 'z' -> 0x017C | 'A' -> 0x0226 | 'a' -> 0x0227 | 'O' -> 0x022E | 'o' -> 0x022F | 'B' -> 0x1E02 | 'b' -> 0x1E03 | 'D' -> 0x1E0A | 'd' -> 0x1E0B | 'F' -> 0x1E1E | 'f' -> 0x1E1F | 'H' -> 0x1E22 | 'h' -> 0x1E23 | 'M' -> 0x1E40 | 'm' -> 0x1E41 | 'N' -> 0x1E44 | 'n' -> 0x1E45 | 'P' -> 0x1E56 | 'p' -> 0x1E57 | 'R' -> 0x1E58 | 'r' -> 0x1E59 | 'S' -> 0x1E60 | 's' -> 0x1E61 | 'T' -> 0x1E6A | 't' -> 0x1E6B | 'W' -> 0x1E86 | 'w' -> 0x1E87 | 'X' -> 0x1E8A | 'x' -> 0x1E8B | 'Y' -> 0x1E8E | 'y' -> 0x1E8F | _ -> raise CannotTranslate and dotbelow = function | 'B' -> 0x1E04 | 'b' -> 0x1E05 | 'D' -> 0x1E0C | 'd' -> 0x1E0D | 'H' -> 0x1E24 | 'h' -> 0x1E25 | 'K' -> 0x1E32 | 'k' -> 0x1E33 | 'L' -> 0x1E36 | 'l' -> 0x1E37 | 'M' -> 0x1E42 | 'm' -> 0x1E43 | 'N' -> 0x1E46 | 'n' -> 0x1E47 | 'R' -> 0x1E5A | 'r' -> 0x1E5B | 'S' -> 0x1E62 | 's' -> 0x1E63 | 'T' -> 0x1E6C | 't' -> 0x1E6D | 'V' -> 0x1E7E | 'v' -> 0x1E7F | 'W' -> 0x1E88 | 'w' -> 0x1E89 | 'Z' -> 0x1E92 | 'z' -> 0x1E93 | 'A' -> 0x1EA0 | 'a' -> 0x1EA1 | 'E' -> 0x1EB8 | 'e' -> 0x1EB9 | 'I' -> 0x1ECA | 'i' -> 0x1ECB | 'O' -> 0x1ECC | 'o' -> 0x1ECD | 'U' -> 0x1EE4 | 'u' -> 0x1EE5 | 'Y' -> 0x1EF4 | 'y' -> 0x1EF5 | _ -> raise CannotTranslate and linebelow = function | 'B' -> 0x1E06 | 'b' -> 0x1E07 | 'D' -> 0x1E0E | 'd' -> 0x1E0F | 'K' -> 0x1E34 | 'k' -> 0x1E35 | 'L' -> 0x1E3A | 'l' -> 0x1E3B | 'N' -> 0x1E48 | 'n' -> 0x1E49 | 'R' -> 0x1E5E | 'r' -> 0x1E5F | 'T' -> 0x1E6E | 't' -> 0x1E6F | 'Z' -> 0x1E94 | 'z' -> 0x1E95 | 'h' -> 0x1E96 | _ -> raise CannotTranslate and ringabove = function | 'A' -> 0x00C5 | 'a' -> 0x00E5 | 'U' -> 0x016E | 'u' -> 0x016F | 'w' -> 0x1E98 | 'y' -> 0x1E99 | _ -> raise CannotTranslate and ogonek = function | 'A' -> 0x0104 | 'a' -> 0x0105 | 'E' -> 0x0118 | 'e' -> 0x0119 | 'I' -> 0x012E | 'i' -> 0x012F | 'U' -> 0x0172 | 'u' -> 0x0173 | 'O' -> 0x01EA | 'o' -> 0x01EB | _ -> raise CannotTranslate and circled = function | 'A' -> 0x24B6 | 'B' -> 0x24B7 | 'C' -> 0x24B8 | 'D' -> 0x24B9 | 'E' -> 0x24BA | 'F' -> 0x24BB | 'G' -> 0x24BC | 'H' -> 0x24BD | 'I' -> 0x24BE | 'J' -> 0x24BF | 'K' -> 0x24C0 | 'L' -> 0x24C1 | 'M' -> 0x24C2 | 'N' -> 0x24C3 | 'O' -> 0x24C4 | 'P' -> 0x24C5 | 'Q' -> 0x24C6 | 'R' -> 0x24C7 | 'S' -> 0x24C8 | 'T' -> 0x24C9 | 'U' -> 0x24CA | 'V' -> 0x24CB | 'W' -> 0x24CC | 'X' -> 0x24CD | 'Y' -> 0x24CE | 'Z' -> 0x24CF | 'a' -> 0x24D0 | 'b' -> 0x24D1 | 'c' -> 0x24D2 | 'd' -> 0x24D3 | 'e' -> 0x24D4 | 'f' -> 0x24D5 | 'g' -> 0x24D6 | 'h' -> 0x24D7 | 'i' -> 0x24D8 | 'j' -> 0x24D9 | 'k' -> 0x24DA | 'l' -> 0x24DB | 'm' -> 0x24DC | 'n' -> 0x24DD | 'o' -> 0x24DE | 'p' -> 0x24DF | 'q' -> 0x24E0 | 'r' -> 0x24E1 | 's' -> 0x24E2 | 't' -> 0x24E3 | 'u' -> 0x24E4 | 'v' -> 0x24E5 | 'w' -> 0x24E6 | 'x' -> 0x24E7 | 'y' -> 0x24E8 | 'z' -> 0x24E9 | _ -> raise CannotTranslate and doublestruck = function | 'C' -> 0x2102 | 'H' -> 0x210D | 'N' -> 0x2115 | 'P' -> 0x2119 | 'Q' -> 0x211A | 'R' -> 0x211D | 'Z' -> 0x2124 | 'D' -> 0x2145 | 'd' -> 0x2146 | 'e' -> 0x2147 | 'i' -> 0x2148 | 'j' -> 0x2149 | c -> if !Parse_opts.moreentities then begin match c with | 'A' -> 0x1D538 | 'B' -> 0x1D539 | 'E' -> 0x1D53C | 'F' -> 0x1D53D | 'G' -> 0x1D53E | 'I' -> 0x1D540 | 'J' -> 0x1D541 | 'K' -> 0x1D542 | 'L' -> 0x1D543 | 'M' -> 0x1D544 | 'O' -> 0x1D546 | 'S' -> 0x1D54A | 'T' -> 0x1D54B | 'U' -> 0x1D54C | 'V' -> 0x1D54D | 'W' -> 0x1D54E | 'X' -> 0x1D54F | 'Y' -> 0x1D550 | 'a' -> 0x1D552 | 'b' -> 0x1D553 | 'c' -> 0x1D554 | 'f' -> 0x1D557 | 'g' -> 0x1D558 | 'h' -> 0x1D559 | 'k' -> 0x1D55C | 'l' -> 0x1D55D | 'm' -> 0x1D55E | 'n' -> 0x1D55F | 'o' -> 0x1D560 | 'p' -> 0x1D561 | 'q' -> 0x1D562 | 'r' -> 0x1D563 | 's' -> 0x1D564 | 't' -> 0x1D565 | 'u' -> 0x1D566 | 'v' -> 0x1D567 | 'w' -> 0x1D568 | 'x' -> 0x1D569 | 'y' -> 0x1D56A | 'z' -> 0x1D56B | '0' -> 0x1D7D8 | '1' -> 0x1D7D9 | '2' -> 0x1D7DA | '3' -> 0x1D7DB | '4' -> 0x1D7DC | '5' -> 0x1D7DD | '6' -> 0x1D7DE | '7' -> 0x1D7DF | '8' -> 0x1D7E0 | '9' -> 0x1D7E1 | _ -> raise CannotTranslate end else raise CannotTranslate (* Text rendering *) let def_t = Hashtbl.create 101 let def_default i default = Hashtbl.replace def_t i default and get_default i = Hashtbl.find def_t i let html_put put put_char i = match i with | 0x3C -> put "<" | 0x3E -> put ">" | 0x26 -> put "&" | _ -> try (translate_out i put_char) with CannotTranslate -> put (Printf.sprintf "&#X%X;" i) (* Constants *) let null = 0x00 and space = 0X20 and nbsp = 0XA0 and acute_alone = 0xB4 and grave_alone = 0X60 and circum_alone = 0X5E and diaeresis_alone = 0xA8 and cedilla_alone = 0xB8 and tilde_alone = 0x7E and macron_alone = 0xAF and doubleacute_alone = 0x2DD and breve_alone = 0x2D8 and dotabove_alone = 0x2D9 and dotbelow_alone = 0x2D4 and linebelow_alone = 0x5F and ogonek_alone = 0x2DB and ring_alone = 0x2DA and caron_alone = 0x2C7 and circled_alone = 0x25EF and eszett = 0xDF and iques = 0xBF and iexcl = 0xA10 and minus = 0x2212 and endash = 0x2013 and emdash = 0x2014 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 hevea-2.09/version.mli0000644004317100512160000000137307017033006014752 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val version : string hevea-2.09/latexcommon.hva0000644004317100512160000006252612125271032015616 0ustar marangetcristal\newif\ifhevea\heveatrue \let\ifimage\iffalse \newenvironment{htmlonly}{}{} \newcommand{\home}[1]{\~{}#1} %%%%%%%%%%%%%%%% Maths environments and TeXisms \newcommand{\@dot}{.} \newcommand{\textright}[1]{\def\@tmp{#1}\ifx\@tmp\@dot\else#1\fi} \newcommand{\textleft}[1]{\def\@tmp{#1}\ifx\@tmp\@dot\else#1\fi} \def\mathord#1{#1} \def\mathrel#1{#1} \def\mathbin#1{#1} \def\mathopen#1{#1} \def\mathclose#1{#1} \def\mathchardef#1#2{} \newenvironment{math}{$}{$} \newcommand{\(}{$}\newcommand{\)}{$} \newcommand{\[}{$$\@skip@blanks}\newcommand{\]}{$$} \newcommand{\sp}[1]{^{#1}}\newcommand{\sb}[1]{_{#1}} \newcommand{\ensuremath}[1]{\ifmmode#1\else\(#1\)\fi} \newcommand{\@edm@act}{} \newenvironment{ensuredisplaymath} {\ifdisplay\ifmmode\def\@edm@act{NO}\else\let\@edm@act\relax\fi\else\let\@edm@act\relax\fi% \ifx\@edm@act\relax$$\fi} {\ifx\@edm@act\relax$$\fi} \newcommand{\to}{\rightarrow} %%% \newcommand{\\*}{\\} %%% Arrays \let\arraystretch\@empty \newenvironment{array} {\let\\=\@HEVEA@bsbs\let\@hevea@amper=\@HEVEA@amper\@array} {\end@array} \newenvironment{tabular} {\let\\=\@HEVEA@bsbs\let\@hevea@amper=\@HEVEA@amper\@tabular} {\end@tabular} \newenvironment{tabular*} {\let\\=\@HEVEA@bsbs\let\@hevea@amper=\@HEVEA@amper\@tabular*} {\end@tabular*} %%%%% Arrays with attribute argument \newenvironment{Array} {\let\\=\@HEVEA@bsbs\let\@hevea@amper=\@HEVEA@amper\@Array} {\end@Array} \newenvironment{Tabular} {\let\\=\@HEVEA@bsbs\let\@hevea@amper=\@HEVEA@amper\@Tabular} {\end@Tabular} \newenvironment{Tabular*} {\let\\=\@HEVEA@bsbs\let\@hevea@amper=\@HEVEA@amper\@Tabular*} {\end@Tabular*} %%% Equations \def\@changelabel {\let\@oldlabel\label% \renewcommand{\label}[1]{\@oldlabel[~]{##1}}} \newcommand{\eqno}[1]{\qquad#1} \newenvironment{equation}{\[\@changelabel\refstepcounter{equation}}{\eqno{(\theequation)}\]} \newenvironment{eqnarray*}{$$\begin{array}{rcl}}{\end{array}$$} \gdef\@yes@number{\eqno{(\theequation)}} \gdef\@no@number{\addtocounter{equation}{-1}} \newcommand{\@nonumber}{\global\let\@number\@no@number} \newcommand{\@yesnumber}{\global\let\@number\@yes@number} \let\nonumber\@nonumber \newcounter{@eqna@col} \newcommand{\lefteqn}[1]{\begin{ensuredisplaymath}\raggedright#1\end{ensuredisplaymath}} \let\@HEVEA@lefteqn\lefteqn \newenvironment{eqnarray} {\@ifundefined{@eqna@inside}{\def\@eqna@inside{}}{\hva@warn{Nested eqnarray}}% \[\@changelabel\def\@currentlabel{\theequation}% \setcounter{@eqna@col}{0}\@yesnumber\stepcounter{equation} \let\@PBS=\@HEVEA@bsbs \let\@PAM=\@HEVEA@amper \renewcommand{\lefteqn}[1]{\let\lefteqn\@HEVEA@lefteqn\multicolumn{3-\value{@eqna@col}}{l}{\ifthenelse{\value{@eqna@col}=0}{\qquad}{}##1}\setcounter{@eqna@col}{2}} \newcommand{\@eqna@complete} {\whiledo{\value{@eqna@col}<2}{&}} \renewcommand{\@hevea@amper} {\ifthenelse{\value{@eqna@col}<2} {\stepcounter{@eqna@col}\@PAM} {\hva@warn{Extra column in eqnarray}}} \renewcommand{\\}[1][]{\@eqna@complete\@PAM\@number\setcounter{@eqna@col}{0}\@yesnumber\stepcounter{equation}\@PBS} \@array{rclr}} {\\{}\addtocounter{equation}{-1}\end@array\]} \def\mathrm#1{{\rm#1}} \def\mathtt#1{{\tt#1}} \def\mathit#1{{\it#1}} \def\mathbf#1{{\bf#1}} \def\mathcal#1{{\cal#1}} \def\mathsf#1{{\sf#1}} \def\scriptstyle{\ifmathml{\scriptsize}\else\scriptsize\fi} \def\scriptscriptstyle{\ifmathml{\scriptsize\@incsize{-1}}\else\scriptsize\@incsize{-1}\fi} \def\textstyle{\ifmathml\@style{mtext}\fi} \def\textsuperscript#1{\ensuremath{^{\mbox{#1}}}} %\def\textsubscript#1{\ensuremath{_{\mbox{#1}}}}%existe pas! %%%%% Figures and tables \setenvclass{figure}{figure} %%General \caption command: #1 -> env name, #2 -> \caption arg \newcommand{\hva@caption}[2] {\refstepcounter{#1}\begin{hva@capted}\csname #1name\endcsname{} \csname the#1\endcsname: #2\end{hva@capted}} \newcommand{\@figrule}{\begin{center}\@hr{.8\linewidth}{2pt}\end{center}} \newenvironment{figure}[1][] {\@forcecommand{\caption}[2][]{\hva@caption{figure}{##2}}% \@open@quote{\envclass@attr{figure}}\@figrule} {\@figrule\@close@quote} \newenvironment{figure*}[1][]{\begin{figure}[#1]}{\end{figure}} \setenvclass{table}{table} \newenvironment{table}[1][] {\@forcecommand{\caption}[2][]{\hva@caption{table}{##2}}% \@open@quote{\envclass@attr{table}}\@figrule% }{\@figrule\@close@quote} \newenvironment{table*}[1][]{\begin{table}[#1]}{\end{table}} \@forcecommand{\suppressfloats}[1][]{} \newcounter{topnumber} \newcounter{bottomnumber} \newcounter{totalnumber} \newcounter{dbltopnumber} %% Page Styles \def\pagestyle#1{} \def\thispagestyle#1{} %%% No table of figures/tables \def\listoffigures{} \def\listoftables{} \newcommand{\contentsline}[3]{} \newcommand{\numberline}[2]{} \newcommand{\addtocontents}[2]{} \newcommand{\markright}[1]{} \newcommand{\markboth}[2]{} \newcommand{\pagenumbering}[1]{} \newcommand{\twocolumn}[1][]{} \newcommand{\onecolumn}{} %%% Stackrel et compagine \newcommand{\stackrel}[2]{\mathop{#2}\limits^{\scriptsize{}#1}\nolimits} \def\space@varray{1} \newenvironment{@varray} {\prim@def{\@table@attributes}{style="border:0;border-spacing:\space@varray{};border-collapse:separate" class="cellpadding0"}\def\space@varray{0}% \begin{array}{c}} {\end{array}} %%% OLD DEFINITIONS : rediscovered, only \textoverline redefined in hevea.hva %%% \newcommand{\textoverline}[1]{\hva@warn{overline ignored in text mode}#1} \def\overline#1{\ifdisplay \begin{@varray}\hline #1\end{@varray}\else\textoverline{#1}\fi} \newcommand{\textunderline}[1]{{\@style{U}#1}} \def\underline#1{\ifdisplay \begin{@varray}#1\\\hline\end{@varray}\else\textunderline{#1}\fi} %%%Miscleanous, title stuff %\input{common-math.hva} \newcommand{\thanks}[1]{\footnote{#1}} \newenvironment{titlepage}{}{} \newcommand{\and}{\quad} \newcommand{\title}[1]{\gdef{\@title}{#1}\global\let\@@title\relax} \newcommand{\@titlebis}[1] {\ifu\@@title\gdef{\@title}{#1}\title@tohaux{#1}\fi} \newcommand{\@titleaux}[1]{\gdef{\@title}{#1}} \newcommand{\author}[1]{\gdef{\@author}{#1}\global\let\author\@gooble} \newcommand{\date}[1]{\gdef{\@date}{#1}\global\let\date\@gooble} %% Lists \setenvclass{li-itemize}{li-itemize} \newstyle{.li-itemize}{margin:1ex 0ex;} \newcommand{\item}[1][]{\hva@warn{\item outside a list-making environment}} \newcommand{\@itemitemize}[1][!*!] {\@itemize@li{\envclass@attr{li-itemize}}\ifthenelse{\equal{#1}{!*!}}{}{\hva@warn{Optional argument to \item in itemize environment}{#1}}} \setenvclass{li-enumerate}{li-enumerate} \newstyle{.li-enumerate}{margin:1ex 0ex;} \newcommand{\@itemenumerate}[1][!*!] {\let\@currentlabel\csname the\@enumcitem\endcsname% \stepcounter{\@itemcount}\@enumerate@linum{\envclass@attr{li-enumerate}}\ifthenelse{\equal{#1}{!*!}}{}{\hva@warn{Ignored optional argument to \item in enumerate enironment}}} %environement itemize \setenvclass{itemize}{itemize} \newenvironment{itemize} {\@open{ul}{\envclass@attr{itemize}}\let\item\@itemitemize} {\@close{ul}} \newcounter{enumcount} \newcommand{\@enumstyle} {\ifthenelse{\value{enumcount}=1}{type=1}{}% \ifthenelse{\value{enumcount}=2}{type=a}{}% \ifthenelse{\value{enumcount}=3}{type=i}{}% \ifthenelse{\value{enumcount}=4}{type=A}{}} \newcommand{\@enumcitem} {\ifthenelse{\value{enumcount}=1}{itemi}{}% \ifthenelse{\value{enumcount}=2}{itemii}{}% \ifthenelse{\value{enumcount}=3}{itemiii}{}% \ifthenelse{\value{enumcount}=4}{itemiiii}{}% \ifthenelse{\value{enumcount}>4}{itemv}{}} \newcounter{itemi} \newcounter{itemii} \renewcommand{\theitemii}{\theitemi(\alph{itemii})} \newcounter{itemiii} \renewcommand{\theitemiii}{\theitemii\roman{itemiii}} \newcounter{itemiiii} \renewcommand{\theitemiiii}{\theitemiii(\Alph{itemiiii})} \newcounter{itemv} \renewcommand{\theitemv}{\theitemiiii} \newcommand{\itemi}{itemi} \newcommand{\itemii}{itemii} \newcommand{\itemiii}{itemiii} \newcommand{\itemiiii}{itemiiii} \newcommand{\itemv}{itemv} %environment enumerate \setenvclass{enumerate}{enumerate} \newenvironment{enumerate} {\stepcounter{enumcount}% \@open{OL}{\envclass@attr[ ]{enumerate}\@enumstyle}% \let\item\@itemenumerate% \let\@itemcount\csname\@enumcitem\endcsname% \setcounter{\@itemcount}{0}} {\@close{OL}\addtocounter{enumcount}{-1}} % %% Modified to support styles e.g. %%
    , %%
    %% ONLY CHANGES : 1) class=list added to \@open{DL} argument %% 2) \@dt replaced by \@list@dtdd %% Remove these to get original behaviour % \newcommand{\setlistclass}[1] {\setenvclass{list}{\getenvclass{#1}}% \setenvclass{dt-list}{\getenvclass{dt-#1}}% \setenvclass{dd-list}{\getenvclass{dd-#1}}} \setenvclass{list}{list} \setenvclass{dt-list}{dt-list} \setenvclass{dd-list}{dd-list} \newenvironment{list}[2] {\@open{dl}{\envclass@attr{list}} \renewcommand{\item}[1][#1]{\@dtdd{##1}{\envclass@attr{dt-list}}{\envclass@attr{dd-list}}}% \@forcecommand{\makelabel}[1]{##1}% #2%exec }{\@close{dl}} \setenvclass{description}{description} \setenvclass{dt-description}{dt-description} \setenvclass{dd-description}{dd-description} \newstyle{.dd-description}{margin:0ex 0ex 1ex 4ex;} \newstyle{.dt-description}{margin:0ex;} \newenvironment{@list@description}[2] {\@open{dl}{\envclass@attr{description}}% \renewcommand{\item}[1][#1]{\@dtdd{##1}{\envclass@attr{dt-description}}{\envclass@attr{dd-description}}}% \@forcecommand{\makelabel}[1]{##1}% #2%exec }{\@close{dl}} \newenvironment{description}{\begin{@list@description}{}{\renewcommand{\makelabel}[1]{\textbf{##1}}}}{\end{@list@description}} \setenvclass{trivlist}{trivlist} \setenvclass{dt-trivlist}{dt-trivlist} \setenvclass{dd-trivlist}{dd-trivlist} \newenvironment{trivlist} {\setlistclass{trivlist}\begin{list}{}{}}{\end{list}} %% Input... \newcommand{\listfiles}{} %% Line breaking \newcommand{\linebreak}[1][4]{\ifthenelse{#1=4}{\vspace{1em}}{}} \newcommand{\nolinebreak}[1][4]{} \newcommand{\sloppy}{} \newcommand{\fussy}{} \newenvironment{sloppypar}{}{} \newcommand{\goodbreak}{} %%%%%%%%%%%% Ignore hyphenation \newcommand{\-}{} \newcommand{\hyphenation}[1]{} %% Page Breaking \newcommand{\pagebreak}[1][]{} \newcommand{\nopagebreak}[1][]{} \newcommand{\enlargethispage}[1]{} \newcommand{\enlargethispage*}[1]{} \newcommand{\newpage}{} \newcommand{\clearpage}{} \newcommand{\cleardoublepage}{} %%Lengths are ignored \newcommand{\newlength}[1] {\if@toplevel\begin{toimage}\newlength{#1}\end{toimage}\fi} \newcommand{\setlength}[2] {\if@toplevel\begin{toimage}\setlength{#1}{#2}\end{toimage}\fi} \newcommand{\addtolength}[2] {\if@toplevel\begin{toimage}\addtolength{#1}{#2}\end{toimage}\fi} \newcommand{\settowidth}[2]{} \newcommand{\settodepth}[2]{} \newcommand{\settoheight}[2]{} \newcommand{\fill}{} \newcommand{\stretch}[1]{} %%%%%%%%%%%%%%%% \def\makeatletter{} \def\makeatother{} %%%%%%%%%%%% Ignore head and foot specifications \def\cfoot{} \def\chead{} \newcommand{\rfoot}[2][]{} \newcommand{\lfoot}[2][]{} \newcommand{\rhead}[2][]{} \newcommand{\lhead}[2][]{} \newcommand{\chaptermark}[1]{} \newcommand{\sectionmark}[1]{} \newcommand{\oddsidemargin}{} \newcommand{\evensidemargin}{} %%%%%%%% various commands \def\protect{} \def\fancyplain#1#2{} \def\newblock{} \def\nobreak{} \def\newdimen#1{} \newenvironment{samepage}{}{} \def\raggedbottom{} \def\emergencystretch#1{} %%%%%%%%%%%% A few texisms \newcommand{\long}{} \newcommand{\newline}{\@br} \newcommand{\expandafter}{} %% Arrays and tabular \newcommand{\extracolsep}[1]{} \newcommand{\cline}[1]{\hva@warn{\cline changed into \hline}\hline} \newcommand{\cases}[1]{\left\{\begin{array}{l>{$}l<{$}}#1\end{array}\right.} \newcommand{\endcases}{} %%% tabularx \newenvironment{tabularx}[2]{\begin{tabular}{#2}}{\end{tabular}} \newcolumntype{X}{p{}} %%% AtEof \newcommand{\AtEndOfFile}[1]{\addtokens{\@ateof}{#1}} %%% To save global options \newsavebox{\@document@opts} %%% AtBeginDocument and AtEndDocument \newtokens{\@atbegindocument} \newcommand{\AtBeginDocument}[1]{\addtokens{\@atbegindocument}{#1}} \AtBeginDocument{\@begin@document} \AtBeginDocument {\@set@ttmode%set the value of tt_mode in Lexscan now that \tt is defined. \begin{toimage} \pagestyle{empty} \thispagestyle{empty} \begin{document} \end{toimage}} \newtokens{\@atenddocument} \newcommand{\AtEndDocument}[1]{\addtokens{\@atenddocument}{#1}} \def\@final@footer{% \iffooter\ifhtml \@print{} \fi\@footer\fi} \AtEndDocument {\@imagenopt% \begin{toimage} \end{document} \end{toimage}} %%% Boxes \newcommand{\textfbox}[1]{\hva@warn{\fbox in text}\mbox{#1}} \def\fbox#1{% \ifdisplay\begin{tabular}{|c|}\hline#1\end{array}\else \textfbox{#1}\fi} \newcommand{\hbox}[1]{\hva@warn{\hbox}\mbox{#1}} \newcommand{\displaystyle}{\ifdisplay\else\hva@warn{\displaystyle ignored}\fi} %%% Paragraphs \let\par\@empty \AtBeginDocument{\let\par\hva@par} %%% References \newcommand{\@currentlabel}{} %%% Index references \newcommand{\hva@idx@counter}[1]{\def\csname #1@idx@counter\endcsname{}} \hva@idx@counter{part}% \hva@idx@counter{chapter}% \hva@idx@counter{section}% \hva@idx@counter{subsection}% \hva@idx@counter{subsubsection}% \hva@idx@counter{paragraph}% \hva@idx@counter{subparagraph}% \newcommand{\@indexlabel}{} \newcommand{\refstepcounter}[1] {\let\@currentlabel\csname the#1\endcsname% \ifu\csname #1@idx@counter\endcsname\else% \let\@indexlabel\csname the#1\endcsname\fi% \stepcounter{#1}} %%% Aux files \newcommand{\@fst}[2]{#1} \newcounter{labelorder} \newcommand{\newlabel}[2] {\stepcounter{labelorder}% \prim@def\csname #1@label@order\endcsname{\thelabelorder}% \@newlabel{#1}{\@funcall{\@fst}{#2}}} %Also define section id to change \newcommand{\new@anchor@label}[3] {\def\csname #1@named@sec\endcsname{#2}% \newlabel{#2}{#3}} \newcommand{\@writefile}[2]{} \newcommand{\@setckpt}[2]{} \newcommand{\std@label}[2][]{\@locname{#2}{#1}\@auxwrite{#2}{\@currentlabel}} \newcommand{\insec@label}[2][] {\ifu\csname\@the@sec{}@label@seen\endcsname \def\csname\@the@sec{}@label@seen\endcsname{#2}% \def\csname\@the@sec{}@named@sec\endcsname{#2}% #1\@@auxwrite{\@the@sec}{#2}{\@currentlabel}\else \def\@tmp{#2}% \ifx\@tmp\csname\@the@sec{}@label@seen\endcsname\else \std@label[#1]{#2}\fi\fi} \newcommand{\label}[2][] {\ife\@the@sec\std@label[#1]{#2}\else\insec@label[#1]{#2}\fi} %%No label translation any longer \newcommand{\@check@anchor@label}[1]{#1} \newcommand{\ref}[1]{\@locref{\@check@anchor@label{#1}}{\@auxread{#1}}} \newcommand{\pageref}[1]{\@locref{#1}{??}} \let\@input\input%appears inside aux files \newcommand{\@readhaux}[1] {\@hauxinit% \@iffileexists{#1.haux} {\@try{\input{#1.haux}}{\hva@warn{Failure while reading .haux}}} {}% \@hauxfinal} \newcommand{\@readaux}[1]{\input{#1.aux}} \newcommand{\@readauxorhaux}[2] {\@stopoutput\@stopimage% \ifthenelse{\@fileexists{#1.aux} \and \not \boolean{fixpoint}} {\@try {\@readaux{#1}} {\hva@warn{Failure while reading .aux, reading .haux}\@readhaux{#2}}} {\@readhaux{#2}}% \@restartoutput\@restartimage} \AtBeginDocument {\@sawdocumenttrue\@save@macros\@readauxorhaux{\@basein}{\jobname}} %%%%%%%%%%% Bibliography \newcommand{\bibdata}[1]{} \newcommand{\bibliography}[1] {\@auxdowrite{\@print{\bibdata}\{\@getprint{#1}\} }% \@iffileexists{\jobname.hbbl} {\input{\jobname.hbbl}} {\@iffileexists{\jobname.bbl} {\input{\jobname.bbl}} {}}} \newcommand{\bibstyle}[1]{} \newcommand{\@bibliographystyle}[1] {\@auxdowrite{\@print{\bibstyle}\{\@getprint{#1}\} }} \newcommand{\bibliographystyle}[1] {\AtBeginDocument{\@bibliographystyle{#1}}} \AtBeginDocument{\let\bibliographystyle\@bibliographystyle} \newcommand{\citation}[1]{} \newcommand{\nocite}[1] {\@auxdowrite{\@print{\citation}\{\@getprint{#1}\} }} \setenvclass{thebibliography}{thebibliography} \setenvclass{dt-thebibliography}{dt-thebibliography} \setenvclass{dd-thebibliography}{dd-thebibliography} \newcommand{\refname}{References} \newenvironment{thebibliography}[1] {\@end{thebibliography}%Execute sectionning command in outer scope \@bibliosection{\refname}% \@begin{thebibliography}% \setlistclass{thebibliography}% \begin{list}{\stepcounter{heveabib}\theheveabib}{\let\makelabel\@biblabel}} {\end{list}} \newcounter{heveabib}\newcommand{\bibtaghook}[1]{#1}% \newcommand{\bibitem}[2][!*!] {\ifthenelse{\equal{#1}{!*!}} {\refstepcounter{heveabib}\@bibwrite{\theheveabib}{\bibtaghook{#2}}} {\@bibwrite{#1}{\bibtaghook{#2}}}\item[#2]} \newcommand{\@open@cite@one}{[} \newcommand{\@open@cite@two}{} \newcommand{\@cite@pre}[1]{} \newcommand{\@close@cite}{]} \newcommand{\@sep@cite}{,} \newcommand{\@sep@cite@space}{ } \newcommand{\@post@cite}{,} \newcommand{\@bib@post}[1]{\ifthenelse{\equal{#1}{}}{}{\@post@cite{} #1}} %%%%%%%%%%% Footnotes \newcommand{\@footnotelevel}{document}% \newcommand{\flushdef}[1]{\def\@footnotelevel{#1}} \let\footnoteflush\@footnoteflush \def\footnote@c{footnote}%indirection to footnote counter \newcommand{\footnotesep}[1]{} \newcounter{savenote}\newcounter{onemark} \newcommand{\@fnmarktext}[1]{% \setcounter{savenote}{\value{footnote}}% \setcounter{footnote}{#1}% \thefootnote% \setcounter{footnote}{\value{savenote}}} \newcommand{\@fnmarknote}[1]{% \setcounter{savenote}{\value{footnote}}% \setcounter{footnote}{#1}% \@notenotestyle{\thefootnote}% \setcounter{footnote}{\value{savenote}}} %%%%%%%%%%%%%%%%%% \newcommand{\footnotemark}[1][!*!]{% \ifthenelse{\equal{#1}{!*!}}% {\stepcounter{\footnote@c}\@stepanchor{\value{\footnote@c}}\setcounter{onemark}{\value{\footnote@c}}}% {\setcounter{onemark}{#1}}% \ifu\csname text@seen@\@anchorval{\value{onemark}}\endcsname% \global\let\csname text@seen@\@anchorval{\value{onemark}}\endcsname\relax %\typeout{Defined text@seen@\@anchorval{\value{onemark}}}% \@notetextstyle{\@noteref{note}{text} {\@anchorval{\value{onemark}}} {\@fnmarktext{\value{onemark}}}}\else \@notetextstyle{\@notepointer{note} {\@anchorval{\value{onemark}}} {\@fnmarktext{\value{onemark}}}}\fi } %Text of footnote. \newcommand{\footnotetext}[2][\value{\footnote@c}] {\@footnotetext{#1}{\@open@footnotetext{}#2\@close@footnotetext}} \newcommand{\footnote}[2][!*!]{% \ifthenelse{\equal{#1}{!*!}} {\footnotemark\footnotetext{#2}} {\footnotemark[#1]\footnotetext[#1]{#2}}} %%% For defining Sectioning commands \newif\if@refs\@refstrue \newenvironment{@norefs} {\@refsfalse% \renewcommand{\@openlocref}[1]{}\renewcommand{\@closelocref}{}% \renewcommand{\@aelement}[3][]{##3}\renewcommand{\label}[2][]{}\renewcommand{\ref}[1]{\@auxread{##1}}\renewcommand{\footnote}[1]{}} {} \newcounter{secnumdepth}\setcounter{secnumdepth}{3}% \newcounter{tocdepth}\setcounter{tocdepth}{2}% \newcommand{\@altdepth}[3]{\ifthenelse{\value{secnumdepth} > #1}{#2}{#3}} \newcommand{\@checkdepth}[2]{\@altdepth{#1}{#2}{}} \newcommand{\@alttocdepth}[3]{\ifthenelse{\value{tocdepth} > #1}{#2}{#3}}% \newcommand{\@checktocdepth}[2]{\@alttocdepth{#1}{#2}{}}% %% Putting (or not putting) section numbers in table of content \newcommand{\@addsecnumber@yes}[3]{\@checkdepth{#1}{#2\quad}#3} \newcommand{\@addsecnumber@no}[3]{#3} \newcommand{\tocnumber}{\let\@addsecnumber\@addsecnumber@yes} \newcommand{\notocnumber}{\let\@addsecnumber\@addsecnumber@no} \notocnumber \newcounter{tocanchor} %\newcommand{\@doaddtoc}[3] %{%\stepcounter{tocanchor}% %\@auxdowrite{\@print{\@@addtocsec{htoc}}\{\@fmt@sec\}\{#1\}\{\@checkdepth{#1}{\@print{\@print}\{#2\}\@print{\quad{}}}\begin{@norefs}\@subst@expn{#3}\end{@norefs}\}\@print{ %}}} \newcommand{\@doaddtoc}[3] {%\stepcounter{tocanchor}% \@auxdowrite{\@print{\@@addtocsec{htoc}}\{\@getprintnostyle{\@sec@id@attr}\}\{#1\}\{\@checkdepth{#1}{\@print{\@print}\{#2\}\@print{\quad{}}}\begin{@norefs}\@subst@expn{#3}\end{@norefs}\}\@print{ }}} %%section identifiers \newcounter{@sec} \newcommand{\@fmt@sec}{sec\arabic{@sec}} \newcommand{\@step@sec} {\stepcounter{@sec}% \ifu\csname\@fmt@sec{}@named@sec\endcsname\def\@sec@id@attr{\@fmt@sec}\else \def\@sec@id@attr{\csname\@fmt@sec{}@named@sec\endcsname}\fi \let\@the@sec\@fmt@sec \def\@secid{\@getprint{id="\@sec@id@attr" }\let\@secid\relax}} \let\@secid\relax \newcommand{\end@step@sec}{\let\@the@sec\relax} \let\@the@sec\relax %% \newcommand{\@makesection}[7]{% \newcommand{\csname @#3@level\endcsname}{#2}% \newcommand{#1}[2][]{% \@secbegin\@step@sec\@checkdepth{#2}{\refstepcounter{#3}}% \ifoptarg\@checktocdepth{#2}{\@doaddtoc{#2}{#5}{##1}}% \cuthere{#3}{\@addsecnumber{#2}{#5}{##1}}\else \@checktocdepth{#2}{\@doaddtoc{#2}{#5}{##2{}}} \cuthere{#3}{\@addsecnumber{#2}{#5}{\begin{@norefs}##2{}\end{@norefs}}}\fi #4\@secanchor% \@altdepth{#2}{#5#6}{}% %{\@alttocdepth{#2}{\@locname{htoc\thetocanchor}{#5}#6}{#5#6}} %{\@checktocdepth{#2}{\@locname{htoc\thetocanchor}{}}}% ##2{}#7\end@step@sec\@secend}% \newcommand{#1*}[1]{% \@secbegin\@step@sec\cuthere{#3}{##1}% #4\@secanchor{}##1{}#7\@secend}}% %%%%%%%%%%%%%% % Images % %%%%%%%%%%%%%% \newcounter{image} \newcommand{\heveaimageext}{.png} \newcommand{\heveaimagedir}{} \renewcommand{\theimage}{\@arabic{image}} \newcommand{\imageflush}[1][] {\@imageflush\stepcounter{image}% \imgsrc[#1]{\ife\heveaimagedir\else\heveaimagedir/\fi\jobname@base\theimage\heveaimageext}} %%%%%%%%%% Compatibility with old hevea \url \AtBeginDocument{\@ifundefined{url}{\input{compat.hva}}{}} %%%%%%%%% Time stuff %Change footnote counter when formatting title/autor/date \newcommand{\@fmt@title}[1] {{\def\footnote@c{titlenote}\let\thefootnote\thetitlenote#1}} \AtBeginDocument {\@ifundefined{theyear} {\renewcommand{\today}{\hva@warn{\today needs '-exec xxdate.exe' option}}} {\renewcommand{\theHour}{\@twoarabic{Hour}} \renewcommand{\thehour}{\@twoarabic{hour}} \renewcommand{\theminute}{\@twoarabic{minute}} \renewcommand{\thesecond}{\@twoarabic{second}}}% %Format date after \today is defined \ifu\@title\fi\let\title\@titlebis} %%End AtBeginDocument %%%%%%%% Day and month formats \def\default@day {\ifthenelse{\value{day}=1}{\theday\textsuperscript{st}} {\ifthenelse{\value{day}=21}{\theday\textsuperscript{st}} {\ifthenelse{\value{day}=31}{\theday\textsuperscript{st}} {\ifthenelse{\value{day}=2}{\theday\textsuperscript{nd}} {\ifthenelse{\value{day}=22}{\theday\textsuperscript{nd}} {\ifthenelse{\value{day}=3}{\theday\textsuperscript{rd}} {\ifthenelse{\value{day}=23}{\theday\textsuperscript{rd}} {\theday\textsuperscript{th}}}}}}}}}% \def\default@month {\ifthenelse{\value{month}=1}{January} {\ifthenelse{\value{month}=2}{February} {\ifthenelse{\value{month}=3}{March} {\ifthenelse{\value{month}=4}{April} {\ifthenelse{\value{month}=5}{May} {\ifthenelse{\value{month}=6}{June} {\ifthenelse{\value{month}=7}{July} {\ifthenelse{\value{month}=8}{August} {\ifthenelse{\value{month}=9}{September} {\ifthenelse{\value{month}=10}{October} {\ifthenelse{\value{month}=11}{November} {\ifthenelse{\value{month}=12}{December}{} }}}}}}}}}}}}% %%%%%%%% Default today slightly differs from english babel today \newcommand\today{\default@month~\theday, \theyear} %%%%%%%%%%%%%% Defined counter printing functions \newcommand{\@arabic}[1]{\@pad{0}{3}{\arabic{#1}}} \newcommand{\@twoarabic}[1]{\@pad{0}{2}{\arabic{#1}}} %%%%%%%%%%%%%%% Une horreur qui peut etre utile \newcommand{\newverbenv}[1] {\@stopimage% \let{\csname #1\endcsname}\verbatim \let{\csname end#1\endcsname}\endverbatim \@restartimage} \newcommand{\@noiso}[1]{\ifiso\isofalse#1\isotrue\else#1\fi} \newcommand{\@rawchars}[1]{\ifraw#1\else\rawtrue#1\rawfalse\fi} %%%%%%%%%%%%%%%%% Ignoring arguments \newcommand{\@skipopt}[1][!*!]{} \newcommand{\@skiparg}[1]{} %%%%Utility \newcommand{\@opencell}[3]{\@open{table}{#1}\@open{tr}{#2}\@open{td}{#3}} \newcommand{\@closecell}{\@force{td}\@close{tr}\@close{table}} %%%%%%%%%%%%%%%%% Length as percent \def\linewidth{@percent} \def\textwidth{@percent} \def\hsize{@percent} \def\baselineskip{1ex} %%%%%%%%%%%%%%%%% Toc \newstyle{.toc}{list-style:none;} \setenvclass{toc}{toc} \setenvclass{li-toc}{li-toc} \newenvironment{tocenv} {\setenvclass{itemize}{\getenvclass{toc}}% \setenvclass{li-itemize}{\getenvclass{li-toc}}% \begin{itemize}} {\end{itemize}} \newcommand{\tocitem}[1][] {\ifoptarg\item[#1]\else\item\fi} %%%%%%%%tocname changed to contentsname (standard) \newcommand{\contentsname}{Contents} \newcommand{\@readtoc}[2] {\@tocsection{#2} \@iffileexists{\jobname.#1}{\input{\jobname.#1}}{}} \newcommand{\tableofcontents}{\@readtoc{htoc}{\contentsname}} \newcommand{\addcontentsline}[3] {\@auxdowrite{{\@nostyle\@print{\@addcontentsline}{\{h#1\}\{\csname @#2@level\endcsname\}}\{\@subst{#3}\}\@print{ }}}} %%%%%%%%% Minipage %Manage footnotes in minipage, as latex does % 1. Use counter mpfootnote % 2. Flush notes at end \newcounter{mpfootnote} \renewcommand{\thempfootnote}{\alph{mpfootnote}} \newenvironment{minipage}[2][] {\hva@warn{minipage, output may be poor}% \renewcommand{\@footnotelevel}{document}\@footnotesub% \setcounter{mpfootnote}{0}% \def\footnote@c{mpfootnote}% \@minipage\@start@text} {\@end@text\@footnoteflush@sticky{document}\@endfootnotesub\end@minipage} %%%%% Extension des environnments hevea en lecture de fichier \newcommand{\rawhtmlinput}[1] {\@scaninput{\begin{rawhtml}}{#1}{\end{rawhtml}}} \newcommand{\rawtextinput}[1] {\@scaninput{\begin{rawtext}}{#1}{\end{rawtext}}} \newcommand{\rawinput}[1] {\@scaninput{\begin{raw}}{#1}{\end{raw}}} %%%Default definitions that can be redefined by babel \newcommand\prefacename{Preface} \newcommand\bibname{Bibliography} \newcommand\chaptername{Chapter} \newcommand\listfigurename{List of Figures} \newcommand\listtablename{List of Tables} \newcommand\indexname{Index} \newcommand\figurename{Figure} \newcommand\tablename{Table} \newcommand\enclname{encl} \newcommand\ccname{cc} \newcommand\headtoname{To} \newcommand\pagename{Page} \newcommand\headpagename{Page} \newcommand\seename{see} \newcommand\alsoseename{see also} \newcommand\dq{No-dq} %%% Footer \newif\iffooter\footertrue \def\heveaurl{http://hevea.inria.fr} \newcommand{\footertext} {This document was translated from \LaTeX{} by \footahref{\heveaurl/index.html}{\hevea}.} \newcommand{\@footer} {\rule{}{}\begin{quote}\em\footertext\end{quote}} %%%%% Compat %\let\@hva@newstack\hva@newstack hevea-2.09/colscan.mll0000644004317100512160000000265011763416753014732 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: colscan.mll,v 1.7 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) { open Lexing exception Error of string ;; } rule one = parse | ' '+ {one lexbuf} | ('0'|'1')?'.'?['0'-'9']* {let lxm = lexeme lexbuf in try float_of_string lxm with _ -> assert false} | "" {raise (Error "Syntax error in color argument")} and other = parse ' '* ',' {one lexbuf} | "" {raise (Error "Syntax error in color argument")} and three = parse "" {let fst = one lexbuf in let snd = other lexbuf in let thrd = other lexbuf in fst,snd,thrd} and four = parse "" {let fst = one lexbuf in let snd = other lexbuf in let thrd = other lexbuf in let fourth = other lexbuf in fst,snd,thrd,fourth} hevea-2.09/french-common.hva0000644004317100512160000000367110725472667016044 0ustar marangetcristal%%%% Hevea support for babel option 'french'. % %%%% Support for %%%% - date %%%% - names of various part descriptors (contentsname etc.) %%%% - special quotations (\glqq et.) % \newcommand{\french@quotes} {\def{\flqq}{\@print@u{0171}}% \def{\glqq}{\@print@u{8222}}% \def{\glqq}{\@print@u{8222}}% \def{\grqq}{\@print@u{8220}}% \def{\glq}{\@print@u{8218}}% \def{\grq}{\@print@u{8216}}% \def{\frqq}{\@print@u{0187}}% \def{\flq}{\@print@u{8249}}% \def{\frq}{\@print@u{8250}}% \let\og\flqq\let\fg\frqq% }% \newcommand{\common@french@babel}{% \french@quotes% \def\french@day {\ifthenelse{\value{day}=1}{\theday\textsuperscript{er}}{\theday}}% \def\csname f@month1\endcsname{janvier}% \def\csname f@month2\endcsname{f\'evrier}% \def\csname f@month3\endcsname{mars}% \def\csname f@month4\endcsname{avril}% \def\csname f@month5\endcsname{mai}% \def\csname f@month6\endcsname{juin}% \def\csname f@month7\endcsname{juillet}% \def\csname f@month8\endcsname{ao\^ut}% \def\csname f@month9\endcsname{septembre}% \def\csname f@month10\endcsname{octobre}% \def\csname f@month11\endcsname{novembre}% \def\csname f@month12\endcsname{d\'ecembre}% \def\french@month{\csname f@month\arabic{month}\endcsname}% \@ifundefined{theyear}{}{\def\today{\theday~\french@month~\theyear}}% \def\prefacename{Pr\'eface}% \def\refname{R\'ef\'erences}% \def\abstractname{R\'esum\'e}% \def\bibname{Bibliographie}% \def\chaptername{Chapitre}% \def\appendixname{Annexe}% \def\contentsname{Table des mati\`eres}% \def\listfigurename{Liste des figures}% \def\listtablename{Liste des tableaux}% \def\indexname{Index}% \def\figurename{Figure}% \def\tablename{Tableau}% \def\partname{Partie}% \def\enclname{P.~J.}% \def\ccname{Copie \`a}% \def\headtoname{A}% \def\pagename{Page}% \def\headpagename{Page}% \def\seename{voir}% \def\alsoseename{voir aussi}% \def\footertext{Ce document a \'et\'e traduit de \LaTeX{} par \ahref{\heveaurl}{\hevea}}% }% %%% \newif\ifFrenchItemizeSpacing \let\FrenchLabelItem\relax %%%hevea-2.09/plain.hva0000644004317100512160000000171512017660721014373 0ustar marangetcristal%%%%%%% Internal basic commands for package b\newcommand{\relax}{} \newcommand{\@empty}{} \newcommand{\@gooble}[1]{} \let\@gobble\@gooble %%%%%% Iter #1 on #3, a #2 separated list of non-empty elements \def\@iter #1#2#3{% %\hva@warn{\@iter '#1' '#2' '#3'}% \def\@test{#3}% \ifx\@test\@empty\else \def\@@iter##1#2{% %\hva@warn{\@@iter '##1'}% \def\@test{##1}% \ifx\@test\@empty \let\@next\relax\else #1{##1}% \let\@next\@@iter\fi \@next}% \@callsubst{\@@iter}{#3#2#2}\fi} %%%%%%%%%% eat leading spaces in argument \def\@eatspaces#1,{#1}% %%%%% \newcommand{\@Let}[2]{\ifu#2\else\let#1#2\fi} \newcommand{\IfDisplay}[2]{\ifdisplay#1\else#2\fi} \newcommand{\@non@kk}[2][]{} \newcommand{\@non@k}[1][]{\@non@kk} \newcommand{\NoCommand}[1]{\@non@k} %%%shortcuts for defining/using strange csname %%% \newcommand{\@namedef}[1]{\def\csname#1\endcsname} \newcommand{\@nameuse}[1]{\csname#1\endcsname} hevea-2.09/README0000644004317100512160000000767112204704117013453 0ustar marangetcristal This is HEVEA, version 2.09, a fast Latex to HTML translator. ADVERTISEMENT HEVEA is a LaTeX to HTML translator. The input language is a fairly complete subset of LaTeX2e (old LaTeX style is also accepted) and the output language is HTML that is (hopefully) correct with respect to version 5. Exotic symbols are translated into the so-called HTML 'entities', in other words into references to UNICODE chararacters. HEVEA understands LaTeX macro definitions. Simple user style files are understood with little or no modifications. Furthermore, HEVEA customization is done by writing LaTeX code. HEVEA is written in Objective Caml, as many lexers. It is quite fast and flexible. Using HEVEA it is possible to translate large documents such as manuals, books, etc. very quickly. All documents are translated as one single HTML file. Then, the output file can be cut into smaller files, using the companion program HACHA. LAW For legal matters see the LICENSE File. CONTENTS This distribution includes HEVEA sources. CONTACTS mail: Luc.Maranget@inria.fr home page: http://hevea.inria.fr/ DOCUMENTATION On-line documentation is available at http://hevea.inria.fr/doc/ DISTRIBUTION By FTP ftp://ftp.inria.fr/INRIA/moscova/hevea/ By HTTP http://hevea.inria.fr/distri/ REQUIREMENTS HEVEA is written in Objective Caml version 3.12 or later (Ocaml). It compiles under Ocaml, which should thus be properly installed. More information on Ocaml can be found at http://caml.inria.fr/ocaml/ However there exists binary distributions of HEVEA for PCs Those are provided by external packagers, see hevea home page for a (partial) list. There also exist a Win-32 distribution, by Philip A. Viton, see http://facweb.knowlton.ohio-state.edu/pviton/support/hevea.html HEVEA is fully functional when other software are installed * A modern LaTeX installation including dvips. * The ghostcript Postcript interpreter. * the netpbm image processing package. ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM However, these softwares are optional and hevea runs without them. INSTALLATION FROM THE SOURCE DISTRIBUTION Download the source distribution http://hevea.inria.fr/distri/hevea-2.09.tar.gz Unzip, gunzip hevea-2.09.tar.gz Untar, tar xf hevea-2.09.tar Go to the source directory cd hevea-2.09 CONFIGURATION There are a few configuration variables at the beginning of the Makefile. * TARGET TARGET=opt makes hevea compile under ocamlopt, the Objective Caml compiler that produces native code. This is the default. TARGET=byte makes hevea compile under ocamlc, the Objective Caml compiler that produces bytecode. Using opt, hevea is about three times as fast than using byte. However, some Ocaml installations may only provide ocamlc. * LIBDIR is the library directory of hevea, that contains hevea style files. It defaults to /usr/local/lib/hevea. * BINDIR is the directory where to install, hevea, hacha and imagen. It defaults to /usr/local/bin. MAKE Once configuration variables are set, type: make Then, install hevea binary in BINDIR and hevea library files in LIBDIR (This might require gaining root privilege) make install ** Note that the hevea.sty file, is simply copied to LIBDIR. It remains users responsability to make it accessible to LaTeX. Some packagers make additional installation efforts as regards this file. ** hevea build now uses ocamlbuild by default, in case of trouble, try: 'make all-make' Once hevea is installed, you can remove the sources. IN CASE OF TROUBLE. - You do need version 3.12 (or newer) of the Objective Caml System. Older versions of OCaml cannot compile hevea 2.09. hevea-2.09/noimage.ml0000644004317100512160000000163512017660721014542 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let start () = () and stop () = () and restart () = () ;; let put _ = () and put_char _ = () ;; let dump _ image lexbuf = image lexbuf let page () = () ;; let finalize _ = false ;; hevea-2.09/html.ml0000644004317100512160000004347612017700472014076 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Output function for a strange html model : - Text elements can occur anywhere and are given as in latex - A new grouping construct is given (open_group () ; close_group ()) *) open Misc open HtmlCommon open Printf exception Error of string let addvsize x = flags.vsize <- flags.vsize + x (* Calls to other modules that are in the interface *) let over, erase_display, _begin_item_display, _end_item_display, force_item_display, item_display, do_close_display, do_open_display_varg, do_open_display, do_close_maths, do_open_maths, put_in_math, math_put, math_put_char, left, right = if !Parse_opts.mathml then begin MathML.over, MathML.erase_display, MathML.begin_item_display, MathML.end_item_display, MathML.force_item_display, MathML.item_display, MathML.close_display, MathML.open_display_varg, MathML.open_display, MathML.close_maths, MathML.open_maths, MathML.put_in_math, MathML.put, MathML.put_char, MathML.left, MathML.right end else begin HtmlMath.over, HtmlMath.erase_display, HtmlMath.begin_item_display, HtmlMath.end_item_display, HtmlMath.force_item_display, HtmlMath.item_display, (fun () -> HtmlMath.close_display false), (HtmlMath.open_display_varg false), (fun () -> HtmlMath.open_display false), HtmlMath.close_maths, HtmlMath.open_maths, HtmlMath.put_in_math, HtmlMath.put, HtmlMath.put_char, HtmlMath.left, HtmlMath.right end let int_sup_sub, limit_sup_sub, standard_sup_sub = if !Parse_opts.mathml then MathML.int_sup_sub, MathML.limit_sup_sub, MathML.standard_sup_sub else HtmlMath.int_sup_sub, HtmlMath.limit_sup_sub, HtmlMath.standard_sup_sub let set_out out = !cur_out.out <- out and stop () = MyStack.push stacks.s_active !cur_out.out ; !cur_out.out <- Out.create_null () and restart () = !cur_out.out <- MyStack.pop stacks.s_active (* acces to flags *) let is_empty () = flags.empty let put s = if flags.in_math then math_put s else HtmlCommon.put s let put_char c = if flags.in_math then math_put_char c else HtmlCommon.put_char c let put_unicode i = OutUnicode.html_put put put_char i let loc_name _ = () (* freeze everyting and change output file *) let open_chan chan = open_group "" ; !cur_out.out <- Out.create_chan chan let close_chan () = Out.close !cur_out.out ; !cur_out.out <- Out.create_buff () ; close_group () let to_style f = let old_flags = copy_flags flags in open_block INTERN "" ; (* clearstyle () ; *) f () ; let r = to_pending !cur_out.pending !cur_out.active in erase_block INTERN ; set_flags flags old_flags ; r let get_current_output () = Out.to_string !cur_out.out let finalize check = if check then begin check_stacks () end else begin (* Flush output in case of fatal error *) let rec close_rec () = if not (MyStack.empty out_stack) then begin match MyStack.pop out_stack with | Freeze _ -> close_rec () | Normal (_,_,pout) -> Out.copy !cur_out.out pout.out ; cur_out := pout ; close_rec () end in close_rec () end ; Out.close !cur_out.out ; !cur_out.out <- Out.create_null () let put_separator () = put "\n" let unskip () = Out.unskip !cur_out.out; if flags.blank then flags.empty <- true let put_tag tag = put tag let put_nbsp () = if !Lexstate.whitepre || (flags.in_math && !Parse_opts.mathml) then begin put_char ' ' end else put_unicode OutUnicode.nbsp let put_open_group () = put_char '{' let put_close_group () = put_char '}' let infomenu _ = () and infonode _opt _num _arg = () and infoextranode _num _arg _text = () let image arg n = if flags.in_pre && !Parse_opts.pedantic then begin warning "Image tag inside preformatted block, ignored" end else begin put " "" then begin put arg; put_char ' ' end ; put "src=\"" ; put n ; if !Parse_opts.pedantic then begin put "\" alt=\"" ; put n end ; put "\">" end type saved = HtmlCommon.saved let check = HtmlCommon.check and hot = HtmlCommon.hot let forget_par () = None let rec do_open_par () = match pblock () with | GROUP -> let pending = to_pending !cur_out.pending !cur_out.active in let a,b,_ = top_out out_stack in ignore (close_block_loc check_empty GROUP) ; do_open_par () ; open_block a b ; !cur_out.pending <- pending | P -> Misc.warning "Opening P twice" (* An error in fact ! *) | s -> if !verbose > 2 then Printf.eprintf "Opening par below: '%s'\n" (string_of_block s) ; open_block P "" let open_par () = do_open_par () let rec do_close_par () = match pblock () with | GROUP -> let pending = to_pending !cur_out.pending !cur_out.active in let a,b,_ = top_out out_stack in ignore (close_block_loc check_empty GROUP) ; let r = do_close_par () in open_block a b ; !cur_out.pending <- pending ; r | P -> ignore (close_flow_loc check_blank P) ; true | _ -> false let close_par () = do_close_par () (* Find P, maybe above groups *) let rec find_prev_par () = match pblock () with | P -> true | GROUP -> let x = pop_out out_stack in let r = find_prev_par () in push_out out_stack x ; r | _ -> false let rec do_close_prev_par () = match pblock () with | P -> ignore (close_flow_loc check_blank P) | GROUP -> let pending = to_pending !cur_out.pending !cur_out.active in let b,a,_ = top_out out_stack in ignore (close_block_loc check_empty GROUP) ; do_close_prev_par () ; open_block b a ; !cur_out.pending <- pending | _ -> assert false let close_prev_par () = do_close_prev_par () ; flags.saw_par <- true let rec do_par () = match pblock () with | P -> ignore (close_flow_loc check_blank P) ; open_block P "" | GROUP -> let pending = to_pending !cur_out.pending !cur_out.active in let b,a,_ = top_out out_stack in ignore (close_block_loc check_empty GROUP) ; do_par () ; open_block b a ; !cur_out.pending <- pending | s -> if !verbose > 2 then Printf.eprintf "Opening par below: '%s'\n" (string_of_block s) ; open_block P "" let par _ = do_par () (* Interface open block: manage par above *) let open_block_loc = open_block (* save a reference to basic open_block *) let open_block_with_par ss s a = if transmit_par s && find_prev_par () then begin if !verbose > 2 then begin Printf.eprintf "OPEN: %s, closing par\n" ss ; Printf.eprintf "BEFORE: " ; pretty_stack out_stack end ; close_prev_par () ; if !verbose > 2 then begin Printf.eprintf "AFTER: " ; pretty_stack out_stack end end ; open_block_loc s a let open_block ss a = open_block_with_par ss (find_block ss) a let open_display () = if find_prev_par () then begin close_prev_par () end ; do_open_display () and open_display_varg a = if find_prev_par () then begin close_prev_par () end ; do_open_display_varg a and close_display () = do_close_display () ; if flags.saw_par then begin flags.saw_par <- false ; open_par () end let open_maths display = if display && find_prev_par () then begin close_prev_par () end ; do_open_maths display and close_maths display = do_close_maths display ; if flags.saw_par then begin flags.saw_par <- false ; open_par () end let wrap_close close_block s = let s = find_block s in begin match s with GROUP -> () | _ -> ignore (close_par ()) end ; begin match s with | UL|OL -> if flags.nitems > 0 then close_block LI else warning "List with no item" | DL -> if flags.nitems > 0 then close_block DD else warning "List with no item" | _ -> () end ; close_block s ; if flags.saw_par then begin flags.saw_par <- false ; if !verbose > 2 then begin Misc.warning "RE-OPEN PAR:" ; Printf.eprintf "BEFORE: " ; pretty_stack out_stack end ; open_par () ; if !verbose > 2 then begin Printf.eprintf "AFTER: " ; pretty_stack out_stack end end let force_block_with_par s content = ignore (close_par ()) ; force_block s content and close_block_with_par s = ignore (close_par ()) ; close_block s and erase_block_with_par s = ignore (close_par ()) ; erase_block s and force_block s content = wrap_close (fun s -> force_block s content) s and close_block s = wrap_close close_block s and erase_block s = wrap_close erase_block s and close_flow s = prerr_endline ("FLOW: "^s) ; wrap_close close_flow s let skip_line = skip_line and flush_out = flush_out and close_group = close_group and open_aftergroup = open_aftergroup and open_group = open_group and insert_block s attr = if find_prev_par () then warning "Ignoring \\centering or \\ragged..." else insert_block (find_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 and to_string = to_string (****************************************) (* Table stuff, must take P into acount *) (****************************************) let open_table border htmlargs = let _,arg_b, arg = if flags.in_math && !Parse_opts.mathml then "mtable","frame = \"solid\"","" else "table","border=1",htmlargs in (* open_block will close P (and record that) if appropriate *) if border then open_block_with_par "table" TABLE (arg_b^" "^arg) else open_block_with_par "table" TABLE arg let new_row () = if flags.in_math && !Parse_opts.mathml then open_block_loc (OTHER "mtr") "" else open_block_loc TR "" let attribut name = function | "" -> "" | s -> " "^name^"="^s and as_colspan = function | 1 -> "" | n -> " colspan="^string_of_int n and as_colspan_mathml = function | 1 -> "" | n -> " columnspan= \""^string_of_int n^"\"" and style param value = if value = "" then "" else sprintf "%s:%s;" param value let as_align f span border = match f with Tabular.Align {Tabular.vert=v ; Tabular.hor=h ; Tabular.wrap=w ; Tabular.width=_} -> sprintf "style=\"%s%s%s%s\" %s" (style "vertical-align" v) (style "text-align" h) (if border then "border:solid 1px;" else "") (if w then "" else "white-space:nowrap") (as_colspan span) | _ -> raise (Misc.Fatal ("as_align")) let as_align_mathml f span = match f with Tabular.Align {Tabular.vert=v ; Tabular.hor=h } -> attribut "rowalign" ("\""^v^"\"")^ attribut "columnalign" ("\""^h^"\"")^ as_colspan_mathml span | _ -> raise (Misc.Fatal ("as_align_mathml")) let open_direct_cell attrs span = if flags.in_math && !Parse_opts.mathml then begin open_block_loc (OTHER "mtd") (attrs^as_colspan_mathml span); do_open_display () end else open_block_loc TD (attrs^as_colspan span) let open_cell format span _ border = if flags.in_math && !Parse_opts.mathml then begin open_block_loc (OTHER "mtd") (as_align_mathml format span); do_open_display () end else open_block_loc TD (as_align format span border) (* By contrast closing/erasing TD, may in some occasions implies closing some internal P => use wrapped close functions *) let erase_cell () = if flags.in_math && !Parse_opts.mathml then begin erase_display (); erase_block_with_par (OTHER "mtd") end else erase_block_with_par TD and close_cell content = if flags.in_math && !Parse_opts.mathml then begin do_close_display (); force_block_with_par (OTHER "mtd") "" end else force_block_with_par TD content and do_close_cell () = if flags.in_math && !Parse_opts.mathml then begin do_close_display (); close_block_with_par (OTHER "mtd") end else close_block_with_par TD and open_cell_group () = open_group "" and close_cell_group () = close_group () and erase_cell_group () = erase_group () let erase_row () = if flags.in_math && !Parse_opts.mathml then HtmlCommon.erase_block (OTHER "mtr") else HtmlCommon.erase_block TR and close_row () = if flags.in_math && !Parse_opts.mathml then HtmlCommon.close_block (OTHER "mtr") else HtmlCommon.close_block TR let close_table () = begin if flags.in_math && !Parse_opts.mathml then HtmlCommon.close_block (OTHER "mtable") else HtmlCommon.close_block TABLE end ; if flags.saw_par then begin flags.saw_par <- false ; open_par () end let make_border _ = () let inside_format = Tabular.Align {Tabular.hor="center" ; Tabular.vert = "" ; Tabular.wrap = false ; Tabular.pre = "" ; Tabular.post = "" ; Tabular.width = Length.Default} and hline_format = Tabular.Align {Tabular.hor="center" ; Tabular.vert = "top" ; Tabular.wrap = false ; Tabular.pre = "" ; Tabular.post = "" ; Tabular.width = Length.Default} let make_inside s multi = if not (multi) then begin if pblock ()=TD || pblock() = (OTHER "mtd") then begin close_cell " "; open_cell inside_format 1 0 false; put s; end else begin open_cell inside_format 1 0 false; put s; close_cell " " end; end let make_hline w noborder = if noborder then begin new_row (); if not (flags.in_math && !Parse_opts.mathml) then begin open_direct_cell "class=\"hbar\"" w ; close_cell "" end else begin open_cell hline_format w 0 false; close_mods () ; put ""; force_item_display (); close_cell "" end; close_row (); end (* HR is not correct inside P *) let horizontal_line attr width height = if find_prev_par () then begin close_prev_par () end ; horizontal_line attr width height ; if flags.saw_par then begin flags.saw_par <- false ; open_par () end (* Lists also have to take P into account *) let rec do_li s = match pblock () with | P -> let pend = to_pending !cur_out.pending !cur_out.active in ignore (close_flow_loc check_blank P) ; do_li s ; !cur_out.pending <- pend | LI -> ignore (close_flow_loc no_check LI) ; open_block_loc LI s | GROUP -> let pend = to_pending !cur_out.pending !cur_out.active in let a,b,_ = top_out out_stack in ignore (close_block_loc check_empty GROUP) ; do_li s ; open_block_loc a b ; !cur_out.pending <- pend | _ -> assert false let item s = if !verbose > 2 then begin prerr_string "=> item: stack=" ; pretty_stack out_stack end ; if flags.nitems > 0 then begin do_li s end else begin let saved = let pending = to_pending !cur_out.pending !cur_out.active in do_close_mods () ; ignore (close_par ()) ; (* in case some par opened before first \item *) let r = Out.to_string !cur_out.out in !cur_out.pending <- pending ; r in open_block_loc LI s ; do_put saved end ; if !verbose > 2 then begin prerr_string "<= item: stack=" ; pretty_stack out_stack end ; flags.nitems <- flags.nitems+1 let nitem = item and set_dcount s = flags.dcount <- s (*********************************************) (* s1 and s2 below are attributes to DR/DD *) (*********************************************) let emit_dt_dd scan true_scan arg s1 s2 = open_block_loc DT s1 ; if flags.dcount <> "" then scan ("\\refstepcounter{"^ flags.dcount^"}") ; true_scan ("\\makelabel{"^arg^"}") ; ignore (close_block_loc no_check DT) ; open_block_loc DD s2 let rec do_dt_dd scan true_scan arg s1 s2 = match pblock () with | P -> let pend = to_pending !cur_out.pending !cur_out.active in ignore (close_flow_loc check_blank P) ; do_dt_dd scan true_scan arg s1 s2 ; !cur_out.pending <- pend | DD -> ignore (close_flow_loc no_check DD) ; emit_dt_dd scan true_scan arg s1 s2 | GROUP -> let pend = to_pending !cur_out.pending !cur_out.active in let a,b,_ = top_out out_stack in ignore (close_block_loc check_empty GROUP) ; do_dt_dd scan true_scan arg s1 s2 ; open_block_loc a b ; !cur_out.pending <- pend | _ -> assert false let ditem scan arg s1 s2 = if !verbose > 2 then begin Printf.eprintf "=> DITEM: %s %s %s\n" arg s1 s2 ; prerr_string "ditem: stack=" ; pretty_stack out_stack end ; let true_scan = if flags.nitems = 0 then begin let pending = to_pending !cur_out.pending !cur_out.active in do_close_mods () ; ignore (close_par ()) ; (* in case some par opened before first \item *) let saved = Out.to_string !cur_out.out in !cur_out.pending <- pending ; (fun arg -> do_put saved ; scan arg) end else scan in begin if flags.nitems > 0 then do_dt_dd scan true_scan arg s1 s2 else emit_dt_dd scan true_scan arg s1 s2 end ; flags.nitems <- flags.nitems+1 ; if !verbose > 2 then begin Printf.eprintf "<= DITEM: %s %s %s\n" arg s1 s2 ; prerr_string "ditem: stack=" ; pretty_stack out_stack end ; hevea-2.09/cleveref.hva0000644004317100512160000001455212117627514015072 0ustar marangetcristal\ProvidesPackage{cleveref} \RequirePackage{labeltype} \@primitives{cleveref} %%alias mechanism \newcommand{\crefalias}[2]{\def\csname @cr@#1@alias\endcsname{#2}} \newcommand{\@cr@alias}[1] {\ifu\csname @cr@#1@alias\endcsname{}#1\else\csname @cr@#1@alias\endcsname\fi} \crefalias{item}{enumi} %%extend \@deflabeltype from labeltype \let\@cr@old@deflabeltype\@deflabeltype \renewcommand{\@deflabeltype}[2] {\@cr@old@deflabeltype{#1}{#2}% \prim@def\csname @cf@#1@type\endcsname{\@cr@alias{#2}}} %%Use alias mechanism for appendix %%rely on \@base being either article or book \newcommand{\@cr@article@appendix}{% \@auxdowrite{\@print{\crefalias}\{section\}\{appendix\}\newline}% \@auxdowrite{\@print{\crefalias}\{subsection\}\{subappendix\}\newline}% \@auxdowrite{\@print{\crefalias}\{subsubsection\}\{subsubappendix\}\newline}% } \newcommand{\@cr@book@appendix}{% \@auxdowrite{\@print{\crefalias}\{chapter\}\{appendix\}\newline}% \@auxdowrite{\@print{\crefalias}\{section\}\{subappendix\}\newline}% \@auxdowrite{\@print{\crefalias}\{subsection\}\{subsubappendix\}\newline}% } \let\@cr@old@appendix\appendix \renewcommand{\appendix} {\@cr@old@appendix% \csname @cr@\@base{}@appendix\endcsname} %%Some internal conditions, with defaults \newif\if@cref@capitalise\@cref@capitalisefalse \newif\if@cref@abbrev\@cref@abbrevtrue \newif\if@cref@nameinlink\@cref@nameinlinkfalse \DeclareOption{nameinlink}{\@cref@nameinlinktrue} \DeclareOption{capitalise}{\@cref@capitalisetrue} \DeclareOption{capitalize}{\@cref@capitalisetrue} %Ignore multi-language hooks support \newcommand{\cref@addlanguagedefs}[2] {\def\csname cref@language@#1@defs\endcsname{#2}} %Define internal names %#1 cref/Cref #2 type #3 name #4 plural #5 extension (ignored) %%% section names from type \newcommand{\@@crefname}[5] {%\hva@warn{@@crefname '#1' '#2' #3' '#4' '#5'}% \def\csname #1@#2@name\endcsname{#3}% \def\csname #1@#2@name@plural\endcsname{#4}} \newcommand{\@@crefname@nondef}[5] {%\hva@warn{@@crefname@nondef '#1' '#2' #3' '#4' '#5'}% \ifu\csname #1@#2@name\endcsname\def\csname #1@#2@name\endcsname{#3}\else %\hva@warn{NO DEF for '#1' '#2'} \fi% \ifu\csname #1@#2@name@plural\endcsname\def\csname #1@#2@name@plural\endcsname{#4}\fi} %%Define others \def\@cr@cref@other{Cref} \def\@cr@Cref@other{cref} \newcommand{\@cr@other}[1]{\csname @cr@#1@other\endcsname} \let\@cr@cref@othercom\MakeUppercase \def\@cr@Cref@othercom{\if@cref@capitalise\let\@next\relax\else\let\@next\MakeLowercase\fi\@next} \newcommand{\@@crefname@other}[5]{ \@@crefname@nondef {\csname @cr@#1@other\endcsname} {#2} {\csname @cr@#1@othercom\endcsname #3} {\csname @cr@#1@othercom\endcsname #4} {#5}} \newcommand{\@crefname}[5]{% \@@crefname{#1}{#2}{#3}{#4}{#5}% \@@crefname@other{#1}{#2}{#3}{#4}{#5}} \newcommand{\crefname}[3]{\@crefname{cref}{#1}{#2}{#3}{}} \newcommand{\Crefname}[3]{\@crefname{Cref}{#1}{#2}{#3}{}} \newcommand{\crefname@preamble}[3]{\@crefname{cref}{#1}{#2}{#3}{@preamble}} \newcommand{\Crefname@preamble}[3]{\@crefname{Cref}{#1}{#2}{#3}{@preamble}} %For some reason all this must be defined... \iftrue \newcommand{\crefrangeconjunction}{ to\nobreakspace}% \newcommand\crefrangepreconjunction{}% \newcommand\crefrangepostconjunction{}% \newcommand{\crefpairconjunction}{ and\nobreakspace}% \newcommand{\crefmiddleconjunction}{, }% \newcommand{\creflastconjunction}{ and\nobreakspace}% \newcommand{\crefpairgroupconjunction}{ and\nobreakspace}% \newcommand{\crefmiddlegroupconjunction}{, }% \newcommand{\creflastgroupconjunction}{, and\nobreakspace}% \fi \input{crlang.hva} %%% \newcommand{\@@cr@secname}[2] {%\hva@warn@prim{SEC: '#1' '#2'}% %\typeout{TYPE: '#2'}% \ifu#2 ??\else\ifu\csname #1@#2@name\endcsname \hva@warn@prim{No name for type #2}??\else \csname #1@#2@name\endcsname\fi\fi} %% \newcommand{\@@cr@secname@plural}[2] {%\hva@warn{SEC: '#1' '#2'}% %\typeout{TYPE: '#2'}% \ifu#2 ??\else\ifu\csname #1@#2@name@plural\endcsname \hva@warn@prim{No name for type #2}??\else \csname #1@#2@name@plural\endcsname\fi\fi} \newcommand{\@cr@secname}[2]{\@@cr@secname{#1}{\csname @cf@#2@type\endcsname}} \newcommand{\@cr@secname@plural}[2]{\@@cr@secname@plural{#1}{\csname @cf@#2@type\endcsname}} \newcommand{\namecref}[1]{\@cr@secname{cref}{#1}} \newcommand{\nameCref}[1]{\@cr@secname{Cref}{#1}} \newcommand{\namecrefs}[1]{\@cr@secname@plural{cref}{#1}} \newcommand{\nameCrefs}[1]{\@cr@secname@plural{Cref}{#1}} \newcommand{\@cr@fmt}[3]{#2#1#3} \newcommand{\@cr@apply@fmt}[1] {\@cr@fmt{\@auxread{#1}}{\@openlocref{#1}}{\@closelocref}} \newcommand{\crefdefaultlabelformat}{\@cr@def{\@cr@fmt}{3}} \newcommand{\@@cr@fmt}[5] {\if@cref@nameinlink \@cr@fmt{\@@cr@secname{#1}{#2}~#3}{#4}{#5} \else\@@cr@secname{#1}{#2}~\@cr@fmt{#3}{#4}{#5}\fi} \newcommand{\@cr@def@fmt}[2] {\@cr@def@withother {\csname @\@cr@other{#1}@#2@fmt\endcsname} {\csname @cr@#1@othercom\endcsname} {\csname @#1@#2@fmt\endcsname}{3}} \newcommand{\crefformat}[1]{\@cr@def@fmt{cref}{#1}} \newcommand{\Crefformat}[1]{\@cr@def@fmt{Cref}{#1}} \newcommand{\@cr@find@fmt}[2]{% \ifu#2\def\@next{\@@cr@fmt{#1}{#2}}\else \ifu\csname @#1@#2@fmt\endcsname\def\@next{\@@cr@fmt{#1}{#2}}\else \let\@next\csname @#1@#2@fmt\endcsname\fi\fi\@next} \newcommand{\@cr@fmt@one}[2] {\@cr@find@fmt {#1}{\csname @cf@#2@type\endcsname} {\@auxread{#2}}{\@openlocref{#2}}{\@closelocref}} \newcommand{\@cr@fmt@two}[3] {\@cr@secname@plural{#1}{#2}~\@cr@apply@fmt{#2}\crefpairconjunction\@cr@apply@fmt{#3}} \newcommand{\@cr@ref}[2]{\@cr@sort@labels{#1}{#2}} %%% \newcommand{\cref}[1]{\@cr@ref{cref}{#1}} \newcommand{\Cref}[1]{\@cr@ref{Cref}{#1}} %%%%%%%Ranges, much easier no customisation (yet ?) \newcommand{\@cr@range}[3] {\@cr@secname@plural{#1}{#2}~\crefrangepreconjunction\@cr@apply@fmt{#2}\crefrangeconjunction\@cr@apply@fmt{#3}\crefrangepostconjunction} \newcommand{\crefrange}[2]{\@cr@range{cref}{#1}{#2}} \newcommand{\Crefrange}[2]{\@cr@range{Cref}{#1}{#2}} %%%%%%% %%We redefine \AtBeginDocument so as to collect lask invokation %%That way, last language def is executed now %%and preamble \crefname will override it \let\@cr@AtBeginDocument\AtBeginDocument \newtokens{\@cr@at} \renewcommand{\AtBeginDocument}[1]{\addtokens{\@cr@at}{#1}} \ExecuteOptions{english} \ProcessOptions*% \let\AtBeginDocument\@cr@AtBeginDocument \undef\@cr@AtBeginDocument %%%execute option, code, notice that we do execute all of it \@cr@at\csname cref@language@\cref@language{}@defs\endcsname \undef\@cr@at %%%The only problem is the non automatic definition of Capitalized %%%counterparts for \crfename hevea-2.09/auxx.mli0000644004317100512160000000235112113135426014251 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val rset : string -> string -> unit val rget : string -> string val bset : string -> string -> unit val bget : bool -> string -> string option val init : string -> unit val final : string -> unit val finalize : bool -> bool val bwrite : string -> string -> unit val rwrite : string -> string -> unit val rwrite2 : string -> string -> string -> unit val swrite : string -> unit val addtoc : string -> int -> string -> unit val hot_start : unit -> unit type saved val check : unit -> saved val hot : saved -> unit hevea-2.09/install.sh0000755004317100512160000000153211773307172014600 0ustar marangetcristal#! /bin/sh -e . ./config.sh cpv () { echo "$1 -> $2" cp $1 ${DESTDIR}$2 } mkdirv () { mkdir -p ${DESTDIR}$1 } install () { SRC=$1 shift DEST=$1 shift mkdirv $DEST for f in $* do cpv $SRC/$f $DEST done } installbin () { mkdirv $BINDIR EXT=$1 shift for f in $* do cpv $f.$EXT $BINDIR/$f done } case $1 in byte|opt) TARGET=$1 ;; *) echo "Usage: install.sh (byte|opt)" 1>&2 exit 2 ;; esac install . $LIBDIR imagen xxcharset.exe xxdate.exe contents_motif.gif next_motif.gif previous_motif.gif $ALLLIB install . $LATEXLIBDIR hevea.sty install html $LIBDIR/html $HTMLLIB install text $LIBDIR/text $TEXTLIB install info $LIBDIR/info $INFOLIB MAPPINGS=`( cd ./mappings && echo *.map )` install mappings $LIBDIR/mappings $MAPPINGS installbin $TARGET hevea hacha esponja bibhva cpv imagen $BINDIRhevea-2.09/index.hva0000644004317100512160000000102510610637202014364 0ustar marangetcristal\@primitives{index} \newsavebox{\@indexbox} \newcommand{\index}[2][default] {\if@refs% \sbox{\@indexbox}{\@indexwrite[#1]{#2}{\@indexlabel}}% side effect \@locname{\usebox{\@indexbox}}{}% \fi} \newcommand{\index*}[2][default] {\if@refs\sbox{\@indexbox}{\@indexwrite[#1]{#2}{\@indexlabel}}% side effect \@locname{\usebox{\@indexbox}}{#2}\fi} \newcommand{\printindex}[1][default]{\@printindex[#1]} \newcommand{\makeindex}{\newindex{default}{idx}{ind}{Index}} \newcommand{\see}[2]{\seename\ \textit{#1}} \newcommand{\@vwritefile}[2]{} hevea-2.09/winfonts.hva0000644004317100512160000001344112017660721015136 0ustar marangetcristal\input{winstyles.hva}% %%vert \newcommand{\@vert@table}[2][\@@barsz] {\setcounter{@c}{(#2)}% \@open{div}{class="vbar" style="height:\arabic{@c}em; margin:0ex #1;"}\@force{div}}% \renewcommand{\csname\delim@name{\vert}\endcsname}[1] {\@vert@table{#1}}% \renewcommand{\csname\delim@name{|}\endcsname}[1] {\@vert@table{#1}}% \let\mid@vert\mid@vert@txt %%Vert \newcommand{\@Vert@table}[1] {\@vert@table[\@barsz]{#1}\@itemdisplay\@vert@table[\@barsz]{#1}}% \renewcommand{\csname\delim@name{\Vert}\endcsname}[1] {\@Vert@table{#1}}% \renewcommand{\csname\delim@name{\|}\endcsname}[1] {\@Vert@table{#1}}% %%Parenthesis \let\top@parleft\top@parleft@txt \let\mid@parleft\mid@parleft@txt \let\dow@parleft\dow@parleft@txt \let\top@parright\top@parright@txt \let\mid@parright\mid@parright@txt \let\dow@parright\dow@parright@txt %cell align \newcommand{\win@left@cell}{style="text-align:left"} \newcommand{\win@right@cell}{style="text-align:right"} \newcommand{\win@center@cell}{style="text-align:center"} %%Square brackets %Left \newcommand{\@bracell}[2][] {\@open{tr}{}\@open{td}{class="bracell"#1}% #2\@close{td}\@close{tr}} \newcommand{\@hbarcell}[1] {\@open{tr}{}\@open{td}{class="bracell hbar" style="width:#1;"}% \@force{td}\@close{tr}} \newcommand{\@leftsqbra@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delimleft"}% \@hbarcell{\@@@barsz}% \@bracell[ \win@left@cell]{\@@vbar[style="height:\arabic{@c}em;"]}% \@hbarcell{\@@@barsz}% \@close{table}}% \renewcommand{\csname\delim@name{[}\endcsname}[1] {\@leftsqbra@table{#1}}% %Right \newcommand{\@rightsqbra@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delimright"}% \@hbarcell{\@@@barsz}% \@bracell[ \win@right@cell]{\@@vbar[style="height:\arabic{@c}em;"]}% \@hbarcell{\@@@barsz}% \@close{table}}% \renewcommand{\csname\delim@name{]}\endcsname}[1] {\@rightsqbra@table{#1}}% %Left ceil \newcommand{\@lceil@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delimleft"}% \@hbarcell{\@@@@barsz}% \@bracell[ \win@left@cell]{\@@vbar[style="height:\arabic{@c}em;"]}% \@close{table}}% \renewcommand{\csname\delim@name{\lceil}\endcsname}[1] {\@lceil@table{#1}}% %Left floor \newcommand{\@lfloor@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delimleft"}% \@bracell[ \win@left@cell]{\@@vbar[style="height:\arabic{@c}em;"]}% \@hbarcell{\@@@@barsz}% \@close{table}}% \renewcommand{\csname\delim@name{\lfloor}\endcsname}[1] {\@lfloor@table{#1}}% %Right ceil \newcommand{\@rceil@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delimright"}% \@hbarcell{\@@@@barsz}% \@bracell[ \win@right@cell]{\@@vbar[style="height:\arabic{@c}em;"]}% \@close{table}}% \renewcommand{\csname\delim@name{\rceil}\endcsname}[1] {\@rceil@table{#1}}% %Right floor \newcommand{\@rfloor@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delimright"}% \@bracell[ \win@right@cell"]{\@@vbar[style="height:\arabic{@c}em;"]}% \@hbarcell{\@@@@barsz}% \@close{table}}% \renewcommand{\csname\delim@name{\rfloor}\endcsname}[1] {\@rfloor@table{#1}}% %%Curly braces \let\curlybra@ext\curlybra@ext@txt \let\leftcurlybra@ext\leftcurlybra@ext@txt \let\leftcurlybra@top\leftcurlybra@top@txt \let\leftcurlybra@mid\leftcurlybra@mid@txt \let\leftcurlybra@dow\leftcurlybra@dow@txt \let\rightcurlybra@ext\rightcurlybra@ext@txt \let\rightcurlybra@top\rightcurlybra@top@txt \let\rightcurlybra@mid\rightcurlybra@mid@txt \let\rightcurlybra@dow\rightcurlybra@dow@txt %%Moustache \let\lmous@top\lmous@top@txt \let\lmous@mid\lmous@mid@txt \let\lmous@dow\lmous@dow@txt \let\rmous@top\rmous@top@txt \let\rmous@mid\rmous@mid@txt \let\rmous@dow\rmous@dow@txt %%Arrows \newcommand{\@uparrow@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delim"}% \@bracell{\@print@u{X25B2}}% \@bracell[ \win@center@cell] {\@vert@table{\arabic{@c}}}% \@close{table}}% \newcommand{\@downarrow@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delim"}% \@bracell[ \win@center@cell] {\@open{div}{class="vbar" style="height:\arabic{@c}em;"}\@force{div}}% \@bracell{\@print@u{X25BC}}% \@close{table}}% \newcommand{\@updownarrow@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delim"}% \@bracell{\@print@u{X25B2}}% \@bracell[ \win@center@cell] {\@open{div}{class="vbar" style="height:\arabic{@c}em;"}\@force{div}}% \@bracell{\@print@u{X25BC}}% \@close{table}}% \renewcommand{\csname\delim@name{\uparrow}\endcsname}[1] {\@uparrow@table{#1}}% \renewcommand{\csname\delim@name{\downarrow}\endcsname}[1] {\@downarrow@table{#1}}% \renewcommand{\csname\delim@name{\updownarrow}\endcsname}[1] {\@updownarrow@table{#1}}% %%%Double arrows \newcommand{\@Mid@table}[1] {\@open{table}{class="delim"}\@open{tr}{ style="vertical-align:middle"}% \@open{td}{class="bracell"}\@vert@table[1px]{#1}\@close{td}% \@open{td}{class="bracell"}\@vert@table[1px]{#1}\@close{td}% \@close{tr}\@close{table}} \newcommand{\@Uparrow@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delim"}% \@bracell{\@print@u{X25B2}}% \@bracell[ \win@center@cell] {\@Mid@table{\arabic{@c}}}% \@close{table}}% \newcommand{\@Downarrow@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delim"}% \@bracell[ \win@center@cell] {\@Mid@table{\arabic{@c}}}% \@bracell{\@print@u{X25BC}}% \@close{table}}% \newcommand{\@Updownarrow@table}[1] {\setcounter{@c}{(#1)}% \@open{table}{class="delim"}% \@bracell{\@print@u{X25B2}}% \@bracell[ \win@center@cell] {\@Mid@table{\arabic{@c}}}% \@bracell{\@print@u{X25BC}}% \@close{table}}% \renewcommand{\csname\delim@name{\Uparrow}\endcsname}[1] {\@Uparrow@table{#1}}% \renewcommand{\csname\delim@name{\Downarrow}\endcsname}[1] {\@Downarrow@table{#1}}% \renewcommand{\csname\delim@name{\Updownarrow}\endcsname}[1] {\@Updownarrow@table{#1}}% %%% Composite arrows \renewcommand{\hva@righthead}{>} \renewcommand{\hva@lefthead}{<} \renewcommand{\hva@lrt}{/} \renewcommand{\hva@llt}{\char92} \renewcommand{\hva@ult}{/} \renewcommand{\hva@urt}{\char92} \renewcommand{\hva@utr}{/\char92} \renewcommand{\hva@dtr}{\char92/} hevea-2.09/cross.mli0000644004317100512160000000226410367352272014431 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* To store an association anchor -> filename *) val add : string -> string -> unit (* To retrieve associations, the filename retrieved can be changed at the very last moment by the change function given as argument *) (* fullname change file name: format reference from file 'file' to 'name' *) val fullname : (string -> string) -> string -> string -> string (* Dump the whole cross-reference table *) val dump : string -> (string -> string) -> unit hevea-2.09/Makefile0000644004317100512160000000272712050475153014234 0ustar marangetcristal#### Standard configuration parameters # Compile using ocamlopt, to use ocamlc set TARGET=byte TARGET=opt # Install prefix PREFIX=/usr/local # Library directory of hevea LIBDIR=$(PREFIX)/lib/hevea # Where to install programms BINDIR=$(PREFIX)/bin #Where to install hevea.sty LATEXLIBDIR=$(PREFIX)/lib/hevea ##### Advanced configuration parameters SUF= DIR= OCAMLC=$(DIR)ocamlc$(SUF) #OCAMLFLAGS=-w +a-4-9 -warn-error +a OCAMLFLAGS=-w +a-4-9 OCAMLCI=$(OCAMLC) OCAMLOPT=$(DIR)ocamlopt$(SUF) OCAMLLEX=$(DIR)ocamllex$(SUF) -q OCBFLAGS=-j 4 -classic-display #### End of configuration parameters #### The Makefile uses ocamlbuild if present. PGM=hevea.byte hacha.byte esponja.byte bibhva.byte PGMNATIVE=$(PGM:.byte=.native) all: $(TARGET) install: config.sh ./install.sh $(TARGET) byte: ocb-byte opt: ocb-opt both: ocb-both include libs.def config.sh: Makefile libs.def @(echo PGM=\"$(PGM)\" &&\ echo PGMNATIVE=\"$(PGMNATIVE)\" &&\ echo BINDIR=$(BINDIR) &&\ echo LIBDIR=$(LIBDIR) &&\ echo LATEXLIBDIR=$(LATEXLIBDIR) &&\ echo OCAMLFLAGS=\"$(OCAMLFLAGS)\" &&\ echo OCBFLAGS=\"$(OCBFLAGS)\" &&\ echo ALLLIB=\"$(ALLLIB)\" && \ echo HTMLLIB=\"$(HTMLLIB)\" && \ echo TEXTLIB=\"$(TEXTLIB)\" && \ echo INFOLIB=\"$(INFOLIB)\" ) > $@ clean:: config.sh sh ocb.sh clean && rm config.sh ocb-byte: config.sh sh ocb.sh byte ocb-opt: config.sh sh ocb.sh opt ocb-both: config.sh sh ocb.sh both ocb: ocb-$(TARGET) clean:: rm -f *~ #*# html/*~ html/#*# text/*~ text/#*# info/*~ info/#*# hevea-2.09/url.mll0000644004317100512160000000547312017660721014105 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* en Automatique. Distributed only by permission. *) (* *) (* *) (***********************************************************************) (* URL encoding and decoding, As the issue is still pending, apply to fragment only! *) { open Printf type url = { scheme : string option ; authority : string option ; path : string ; query : string option ; fragment : string option ; } exception Error } let hex = ['0'-'9''A'-'F''a'-'f'] rule break = parse | ([^':''/''?''#']+ as scheme ':') ? ("//" ([^'/''?''#']* as authority)) ? ([^'?''#']* as path) ('?' [^'#']* as query)? ('#' (_* as fragment))? { {scheme; authority; path; query; fragment;} } | "" { raise Error } and do_decode putc = parse | '%' (hex as a) (hex as b) { let n = try int_of_string (sprintf "0x%c%c" a b) with _ -> assert false in putc (Char.chr n) ; do_decode putc lexbuf } | _ as c { putc c ; do_decode putc lexbuf } | eof { () } { (* See http://www.lunatech-research.com/archives/2009/02/03/what-every-web-developer-must-know-about-url-encoding/#Thereservedcharactersarenotwhatyouthinktheyare *) let do_encode_fragment putc put c = match c with | 'a'..'z' | 'A'..'Z' | '0'..'9' | '-' | '_' | '~' | '.' -> putc c | _ -> put (sprintf "%%%02X" (Char.code c)) let do_encode putc put specific u = let len = String.length u in for k =0 to len-1 do let c = String.unsafe_get u k in specific putc put c done let apply putc put f u = begin match u.scheme with | None -> () | Some s -> f s ; putc ':' end ; begin match u.authority with | None -> () | Some s -> put "//" ; f s end ; f u.path ; begin match u.query with | None -> () | Some s -> putc '?' ; f s end ; begin match u.fragment with | None -> () | Some s -> putc '#' ; f s end ; () let _encode putc put u = let u = break (MyLexing.from_string u) in apply putc put (do_encode putc put do_encode_fragment) u let _decode putc put u = let u = break (MyLexing.from_string u) in let do_decode s = do_decode putc (MyLexing.from_string s) in apply putc put do_decode u let encode_fragment putc put u = do_encode putc put do_encode_fragment u let decode_fragment putc _put u = do_decode putc (MyLexing.from_string u) } hevea-2.09/verb.mli0000644004317100512160000000170207303451221014220 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: verb.mli,v 1.9 2001-05-25 12:37:32 maranget Exp $ *) (***********************************************************************) exception VError of string module type S = sig end module Make (Dest : OutManager.S) (Image : ImageManager.S) (Scan : Latexscan.S) : S hevea-2.09/buff.mli0000644004317100512160000000167607304505330014220 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: buff.mli,v 1.4 2001-05-28 17:28:55 maranget Exp $ *) (***********************************************************************) type t val create : unit -> t val put_char : t -> char -> unit val put : t -> string -> unit val to_string : t -> string val reset : t -> unit hevea-2.09/tabular.mli0000644004317100512160000000227307303451221014720 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: tabular.mli,v 1.11 2001-05-25 12:37:29 maranget Exp $ *) (***********************************************************************) exception Error of string type align = {hor : string ; mutable vert : string ; wrap : bool ; mutable pre : string ; mutable post : string ; width : Length.t} type format = Align of align | Inside of string | Border of string val border : bool ref val pretty_format : format -> string val pretty_formats : format array -> unit val main : string Lexstate.arg -> format array hevea-2.09/myStack.mli0000644004317100512160000000273010562663770014716 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: myStack.mli,v 1.2 2007-02-08 18:12:08 maranget Exp $ *) (***********************************************************************) exception Fatal of string type 'a t val create : string -> 'a t val create_init : string -> 'a -> 'a t val reset : 'a t -> unit val name : 'a t -> string val push : 'a t -> 'a -> unit val pop : 'a t -> 'a val top : 'a t -> 'a val top2 : 'a t -> 'a val pretty : ('a -> string) -> 'a t -> unit val length : 'a t -> int val empty : 'a t -> bool val rev : 'a t -> unit val map : 'a t -> ('a -> 'a) -> unit type 'a saved val empty_saved : 'a saved val save : 'a t -> 'a saved val restore : 'a t -> 'a saved -> unit val finalize : 'a t -> ('a -> bool) -> ('a -> unit) -> unit (* finalize now p f apply f to now elements until now is empty or p is true for one element *) hevea-2.09/lstlang3.hva0000644004317100512160000000004311524022160014777 0ustar marangetcristal\input{\@hevealibdir/lstlang3.sty} hevea-2.09/pub.fra0000644004317100512160000000222410516142271014041 0ustar marangetcristalJ'ai la joie d'anoncer la nouvelle release d'HEVEA. HEVEA, version 1.09 un traducteur rapide de LaTeX vers HTML. HEVEA traduit un sous-ensemble quasi complet de LaTeX2e vers HTML 4.0 transitionel. Plus d'information en QUOI DE NEUF ? Par rapport la version prcdente, il y a, entre autres - De nouveaux packages ifpdf, chngcntr, inputenc (encodage latins 8bits) eurosym (hevea passe l'euro avec un petit retard), textcomp, longtable, supertabular. - Plus de libert (au fait hevea est du logiciel libre) Un truc bizarre a disparu. On peut maintenant mettre \title{...} aprs \bgin{document} si on a envie. - Plus de propret Le HTML gnr est je crois, plus propre, emploi massif des feuilles de styles, paragraphes rendus par l'lment P. ATTENTION Pour compiler hevea 1.09, il faut ocaml (au moins) 3.07. Une version Windows compile est disponible, merci Ph. Viton. Les packagers Linux ne tarderont pas adopter la nouvelle version. hevea-2.09/subst.mll0000644004317100512160000001155712125271032014434 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: subst.mll,v 1.20 2012-06-05 14:55:39 maranget Exp $ *) (***********************************************************************) { open Printf open Misc open Lexstate let subst_buff = Out.create_buff () ;; } let command_name = '\\' ((['@''A'-'Z' 'a'-'z']+ '*'?) | [^ 'A'-'Z' 'a'-'z'] | "\\*") rule subst expn = parse | '#' ['1'-'9'] as lxm {if is_plain '#' then begin let i = Char.code (lxm.[1]) - Char.code '1' in scan_arg (fun arg -> scan_this_arg_list (subst expn) arg) i end else Out.put subst_buff lxm ; subst expn lexbuf} | '#' '#' {if is_plain '#' then Out.put_char subst_buff '#' else Out.put subst_buff "##" ; subst expn lexbuf} | "\\#" | '\\' | [^'\\' '#']+ {Out.blit subst_buff lexbuf ; subst expn lexbuf} | "\\@print" as lxm {Save.start_echo () ; let _ = Save.arg lexbuf in let real_arg = Save.get_echo () in Out.put subst_buff lxm ; Out.put subst_buff real_arg ; subst expn lexbuf} | command_name as cmd { if expn then begin try let pat,body = Latexmacros.find_fail cmd in begin match body with | Subst _ when not (Latexmacros.get_saved_macro cmd) -> if !verbose > 2 then eprintf "EXPAND: %s\n" cmd ; let args = make_stack cmd pat lexbuf in Out.put_char subst_buff '{' ; scan_body (function | Subst body -> scan_this_list (subst expn) body | _ -> assert false) body args ; Out.put_char subst_buff '}' | _ -> Out.put subst_buff cmd end with Latexmacros.Failed -> Out.put subst_buff cmd end else begin Out.put subst_buff cmd end ; subst expn lexbuf} | eof {()} | "" {raise (Error "Empty lexeme in subst")} and do_translate = parse | "\\@print" as lxm {fun f -> Save.start_echo () ; let _ = Save.arg lexbuf in let real_arg = Save.get_echo () in Out.put subst_buff lxm ; Out.put subst_buff real_arg ; do_translate lexbuf f} | command_name {fun f -> Out.blit subst_buff lexbuf ; do_translate lexbuf f} | _ as lxm {fun f -> Out.put_char subst_buff (f lxm) ; do_translate lexbuf f} | eof {fun _ -> Out.to_string subst_buff} { let sharp_inside s = try ignore (String.index s '#') ; true with Not_found -> false let do_do_subst_this expn ({arg=arg ; subst=env} as x) = if not (is_top env) && sharp_inside arg then begin if !verbose > 1 then begin Printf.fprintf stderr "subst_this : [%s]\n" arg ; prerr_args () end ; let _ = scan_this_arg (subst expn) x in let r = Out.to_string subst_buff in if !verbose > 1 then prerr_endline ("subst_this ["^arg^"] = "^r); r end else arg let sharp_inside_list xs = List.exists sharp_inside xs let do_do_subst_this_list expn ({arg=xs ; subst=env} as x) = if not (is_top env) && sharp_inside_list xs then begin if !verbose > 1 then begin fprintf stderr "subst_this_list : [%a]\n" Lexstate.pretty_body xs ; prerr_args () end ; let _ = scan_this_arg_list (subst expn) x in let r = Out.to_list subst_buff in if !verbose > 1 then eprintf "subst_this_list [%a] = [%a]\n" Lexstate.pretty_body xs Lexstate.pretty_body r ; r end else xs let do_subst_this_list x = String.concat "" (do_do_subst_this_list false x) let do_subst_this x = do_do_subst_this false x let subst_list {arg=args ; subst=env} = List.map (fun arg -> do_subst_this {arg=arg; subst=env}) args let subst_this s = do_subst_this (mkarg s (get_subst ())) let subst_arg lexbuf = do_subst_this (save_arg lexbuf) and subst_opt def lexbuf = do_do_subst_this_list false (save_opt def lexbuf) let subst_body lexbuf = do_do_subst_this_list false (save_body lexbuf) let subst_arg_list lexbuf = do_do_subst_this_list false (save_body lexbuf) let subst_expn_arg lexbuf = do_do_subst_this true (save_arg lexbuf) let subst_expn_body lexbuf = do_do_subst_this_list true (save_body lexbuf) let translate f s = let lexbuf = MyLexing.from_string s in do_translate lexbuf f let lowercase s = translate Char.lowercase s and uppercase s = translate Char.uppercase s } hevea-2.09/crlang.hva0000644004317100512160000042127512112707235014543 0ustar marangetcristal\DeclareOption{english}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ to\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ and\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ and\nobreakspace}% \def\crefpairgroupconjunction@preamble{ and\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{, and\nobreakspace}% % \Crefname@preamble{equation}{Equation}{Equations}% \Crefname@preamble{figure}{Figure}{Figures}% \Crefname@preamble{table}{Table}{Tables}% \Crefname@preamble{page}{Page}{Pages}% \Crefname@preamble{part}{Part}{Parts}% \Crefname@preamble{chapter}{Chapter}{Chapters}% \Crefname@preamble{section}{Section}{Sections}% \Crefname@preamble{appendix}{Appendix}{Appendices}% \Crefname@preamble{enumi}{Item}{Items}% \Crefname@preamble{footnote}{Footnote}{Footnotes}% \Crefname@preamble{theorem}{Theorem}{Theorems}% \Crefname@preamble{lemma}{Lemma}{Lemmas}% \Crefname@preamble{corollary}{Corollary}{Corollaries}% \Crefname@preamble{proposition}{Proposition}{Propositions}% \Crefname@preamble{definition}{Definition}{Definitions}% \Crefname@preamble{result}{Result}{Results}% \Crefname@preamble{example}{Example}{Examples}% \Crefname@preamble{remark}{Remark}{Remarks}% \Crefname@preamble{note}{Note}{Notes}% \Crefname@preamble{algorithm}{Algorithm}{Algorithms}% \Crefname@preamble{listing}{Listing}{Listings}% \Crefname@preamble{line}{Line}{Lines}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname@preamble{equation}{Eq.}{Eqs.}% \crefname@preamble{figure}{Fig.}{Figs.}% \else% \crefname@preamble{equation}{Equation}{Equations}% \crefname@preamble{figure}{Figure}{Figures}% \fi% \crefname@preamble{page}{Page}{Pages}% \crefname@preamble{table}{Table}{Tables}% \crefname@preamble{part}{Part}{Parts}% \crefname@preamble{chapter}{Chapter}{Chapters}% \crefname@preamble{section}{Section}{Sections}% \crefname@preamble{appendix}{Appendix}{Appendices}% \crefname@preamble{enumi}{Item}{Items}% \crefname@preamble{footnote}{Footnote}{Footnotes}% \crefname@preamble{theorem}{Theorem}{Theorems}% \crefname@preamble{lemma}{Lemma}{Lemmas}% \crefname@preamble{corollary}{Corollary}{Corollaries}% \crefname@preamble{proposition}{Proposition}{Propositions}% \crefname@preamble{definition}{Definition}{Definitions}% \crefname@preamble{result}{Result}{Results}% \crefname@preamble{example}{Example}{Examples}% \crefname@preamble{remark}{Remark}{Remarks}% \crefname@preamble{note}{Note}{Notes}% \crefname@preamble{algorithm}{Algorithm}{Algorithms}% \crefname@preamble{listing}{Listing}{Listings}% \crefname@preamble{line}{Line}{Lines}% % \else% capitalise unset \if@cref@abbrev% \crefname@preamble{equation}{eq.}{eqs.}% \crefname@preamble{figure}{fig.}{figs.}% \else% \crefname@preamble{equation}{equation}{equations}% \crefname@preamble{figure}{figure}{figures}% \fi% \crefname@preamble{page}{page}{pages}% \crefname@preamble{table}{table}{tables}% \crefname@preamble{part}{part}{parts}% \crefname@preamble{chapter}{chapter}{chapters}% \crefname@preamble{section}{section}{sections}% \crefname@preamble{appendix}{appendix}{appendices}% \crefname@preamble{enumi}{item}{items}% \crefname@preamble{footnote}{footnote}{footnotes}% \crefname@preamble{theorem}{theorem}{theorems}% \crefname@preamble{lemma}{lemma}{lemmas}% \crefname@preamble{corollary}{corollary}{corollaries}% \crefname@preamble{proposition}{proposition}{propositions}% \crefname@preamble{definition}{definition}{definitions}% \crefname@preamble{result}{result}{results}% \crefname@preamble{example}{example}{examples}% \crefname@preamble{remark}{remark}{remarks}% \crefname@preamble{note}{note}{notes}% \crefname@preamble{algorithm}{algorithm}{algorithms}% \crefname@preamble{listing}{listing}{listings}% \crefname@preamble{line}{line}{lines}% \fi% \def\cref@language{english}% }}% end \AtBeginDocument and \DeclareOption \cref@addlanguagedefs{english}{% \PackageInfo{cleveref}{loaded `english' language definitions} \renewcommand{\crefrangeconjunction}{ to\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ and\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ and\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ and\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{, and\nobreakspace}% % \Crefname{equation}{Equation}{Equations}% \Crefname{figure}{Figure}{Figures}% \Crefname{subfigure}{Figure}{Figures}% \Crefname{table}{Table}{Tables}% \Crefname{subtable}{Table}{Tables}% \Crefname{page}{Page}{Pages}% \Crefname{part}{Part}{Parts}% \Crefname{chapter}{Chapter}{Chapters}% \Crefname{section}{Section}{Sections}% \Crefname{subsection}{Section}{Sections}% \Crefname{subsubsection}{Section}{Sections}% \Crefname{appendix}{Appendix}{Appendices}% \Crefname{subappendix}{Appendix}{Appendices}% \Crefname{subsubappendix}{Appendix}{Appendices}% \Crefname{subsubsubappendix}{Appendix}{Appendices}% \Crefname{enumi}{Item}{Items}% \Crefname{enumii}{Item}{Items}% \Crefname{enumiii}{Item}{Items}% \Crefname{enumiv}{Item}{Items}% \Crefname{enumv}{Item}{Items}% \Crefname{footnote}{Footnote}{Footnotes}% \Crefname{theorem}{Theorem}{Theorems}% \Crefname{lemma}{Lemma}{Lemmas}% \Crefname{corollary}{Corollary}{Corollaries}% \Crefname{proposition}{Proposition}{Propositions}% \Crefname{definition}{Definition}{Definitions}% \Crefname{result}{Result}{Results}% \Crefname{example}{Example}{Examples}% \Crefname{remark}{Remark}{Remarks}% \Crefname{note}{Note}{Notes}% \Crefname{algorithm}{Algorithm}{Algorithms}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Line}{Lines}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname{equation}{Eq.}{Eqs.}% \crefname{figure}{Fig.}{Figs.}% \crefname{subfigure}{Fig.}{Figs.}% \else% \crefname{equation}{Equation}{Equations}% \crefname{figure}{Figure}{Figures}% \crefname{subfigure}{Figure}{Figures}% \fi% \crefname{page}{Page}{Pages}% \crefname{table}{Table}{Tables}% \crefname{subtable}{Table}{Tables}% \crefname{part}{Part}{Parts}% \crefname{chapter}{Chapter}{Chapters}% \crefname{section}{Section}{Sections}% \crefname{subsection}{Section}{Sections}% \crefname{subsubsection}{Section}{Sections}% \crefname{appendix}{Appendix}{Appendices}% \crefname{subappendix}{Appendix}{Appendices}% \crefname{subsubappendix}{Appendix}{Appendices}% \crefname{subsubsubappendix}{Appendix}{Appendices}% \crefname{enumi}{Item}{Items}% \crefname{enumii}{Item}{Items}% \crefname{enumiii}{Item}{Items}% \crefname{enumiv}{Item}{Items}% \crefname{enumv}{Item}{Items}% \crefname{footnote}{Footnote}{Footnotes}% \crefname{theorem}{Theorem}{Theorems}% \crefname{lemma}{Lemma}{Lemmas}% \crefname{corollary}{Corollary}{Corollaries}% \crefname{proposition}{Proposition}{Propositions}% \crefname{definition}{Definition}{Definitions}% \crefname{result}{Result}{Results}% \crefname{example}{Example}{Examples}% \crefname{remark}{Remark}{Remarks}% \crefname{note}{Note}{Notes}% \crefname{algorithm}{Algorithm}{Algorithms}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Line}{Lines}% % \else% capitalise unset \if@cref@abbrev% \crefname{equation}{eq.}{eqs.}% \crefname{figure}{fig.}{figs.}% \crefname{subfigure}{fig.}{figs.}% \else% \crefname{equation}{equation}{equations}% \crefname{figure}{figure}{figures}% \crefname{subfigure}{figure}{figures}% \fi% \crefname{table}{table}{tables}% \crefname{subtable}{table}{tables}% \crefname{page}{page}{pages}% \crefname{part}{part}{parts}% \crefname{chapter}{chapter}{chapters}% \crefname{section}{section}{sections}% \crefname{subsection}{section}{sections}% \crefname{subsubsection}{section}{sections}% \crefname{appendix}{appendix}{appendices}% \crefname{subappendix}{appendix}{appendices}% \crefname{subsubappendix}{appendix}{appendices}% \crefname{subsubsubappendix}{appendix}{appendices}% \crefname{enumi}{item}{items}% \crefname{enumii}{item}{items}% \crefname{enumiii}{item}{items}% \crefname{enumiv}{item}{items}% \crefname{enumv}{item}{items}% \crefname{footnote}{footnote}{footnotes}% \crefname{theorem}{theorem}{theorems}% \crefname{lemma}{lemma}{lemmas}% \crefname{corollary}{corollary}{corollaries}% \crefname{proposition}{proposition}{propositions}% \crefname{definition}{definition}{definitions}% \crefname{result}{result}{results}% \crefname{example}{example}{examples}% \crefname{remark}{remark}{remarks}% \crefname{note}{note}{notes}% \crefname{algorithm}{algorithm}{algorithms}% \crefname{listing}{listing}{listings}% \crefname{line}{line}{lines}% \fi}% end \cref@addlangagedefs \DeclareOption{german}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ bis\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ und\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ und\nobreakspace}% \def\crefpairgroupconjunction@preamble{ und\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ und\nobreakspace}% % \Crefname@preamble{equation}{Gleichung}{Gleichungen}% \Crefname@preamble{figure}{Abbildung}{Abbildungen}% \Crefname@preamble{table}{Tabelle}{Tabellen}% \Crefname@preamble{page}{Seite}{Seiten}% \Crefname@preamble{part}{Teil}{Teile}% \Crefname@preamble{chapter}{Kapitel}{Kapitel}% \Crefname@preamble{section}{Abschnitt}{Abschnitte}% \Crefname@preamble{appendix}{Anhang}{Anh\"ange}% \Crefname@preamble{enumi}{Punkt}{Punkte}% \Crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}% \Crefname@preamble{theorem}{Theorem}{Theoreme}% \Crefname@preamble{lemma}{Lemma}{Lemmata}% \Crefname@preamble{corollary}{Korollar}{Korollare}% \Crefname@preamble{proposition}{Satz}{S\"atze}% \Crefname@preamble{definition}{Definition}{Definitionen}% \Crefname@preamble{result}{Ergebnis}{Ergebnisse}% \Crefname@preamble{example}{Beispiel}{Beispiele}% \Crefname@preamble{remark}{Bemerkung}{Bemerkungen}% \Crefname@preamble{note}{Anmerkung}{Anmerkungen}% \Crefname@preamble{algorithm}{Algorithmus}{Algorithmen}% \Crefname@preamble{listing}{Listing}{Listings}% \Crefname@preamble{line}{Zeile}{Zeilen}% % \crefname@preamble{equation}{Gleichung}{Gleichungen}% \crefname@preamble{figure}{Abbildung}{Abbildungen}% \crefname@preamble{table}{Tabelle}{Tabellen}% \crefname@preamble{page}{Seite}{Seiten}% \crefname@preamble{part}{Teil}{Teile}% \crefname@preamble{chapter}{Kapitel}{Kapitel}% \crefname@preamble{section}{Abschnitt}{Abschnitte}% \crefname@preamble{appendix}{Anhang}{Anh\"ange}% \crefname@preamble{enumi}{Punkt}{Punkte}% \crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}% \crefname@preamble{theorem}{Theorem}{Theoreme}% \crefname@preamble{lemma}{Lemma}{Lemmata}% \crefname@preamble{corollary}{Korollar}{Korollare}% \crefname@preamble{proposition}{Satz}{S\"atze}% \crefname@preamble{definition}{Definition}{Definitionen}% \crefname@preamble{result}{Ergebnis}{Ergebnisse}% \crefname@preamble{example}{Beispiel}{Beispiele}% \crefname@preamble{remark}{Bemerkung}{Bemerkungen}% \crefname@preamble{note}{Anmerkung}{Anmerkungen}% \crefname@preamble{algorithm}{Algorithmus}{Algorithmen}% \crefname@preamble{listing}{Listing}{Listings}% \crefname@preamble{line}{Zeile}{Zeilen}% \def\cref@language{german}% }}% end \AtBeginDocument and \DeclareOption \cref@addlanguagedefs{german}{% \PackageInfo{cleveref}{loaded `german language definitions} \renewcommand{\crefrangeconjunction}{ bis\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ und\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ und\nobreakspace}% % \Crefname{equation}{Gleichung}{Gleichungen}% \Crefname{figure}{Abbildung}{Abbildungen}% \Crefname{subfigure}{Abbildung}{Abbildungen}% \Crefname{table}{Tabelle}{Tabellen}% \Crefname{subtable}{Tabelle}{Tabellen}% \Crefname{page}{Seite}{Seiten}% \Crefname{part}{Teil}{Teile}% \Crefname{chapter}{Kapitel}{Kapitel}% \Crefname{section}{Abschnitt}{Abschnitte}% \Crefname{subsection}{Abschnitt}{Abschnitte}% \Crefname{subsubsection}{Abschnitt}{Abschnitte}% \Crefname{appendix}{Anhang}{Anh\"ange}% \Crefname{subappendix}{Anhang}{Anh\"ange}% \Crefname{subsubappendix}{Anhang}{Anh\"ange}% \Crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \Crefname{enumi}{Punkt}{Punkte}% \Crefname{enumii}{Punkt}{Punkte}% \Crefname{enumiii}{Punkt}{Punkte}% \Crefname{enumiv}{Punkt}{Punkte}% \Crefname{enumv}{Punkt}{Punkte}% \Crefname{footnote}{Fu\ss note}{Fu\ss noten}% \Crefname{theorem}{Theorem}{Theoreme}% \Crefname{lemma}{Lemma}{Lemmata}% \Crefname{corollary}{Korollar}{Korollare}% \Crefname{proposition}{Satz}{S\"atze}% \Crefname{definition}{Definition}{Definitionen}% \Crefname{result}{Ergebnis}{Ergebnisse}% \Crefname{example}{Beispiel}{Beispiele}% \Crefname{remark}{Bemerkung}{Bemerkungen}% \Crefname{note}{Anmerkung}{Anmerkungen}% \Crefname{algorithm}{Algorithmus}{Algorithmen}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Zeile}{Zeilen}% % \crefname{equation}{Gleichung}{Gleichungen}% \crefname{figure}{Abbildung}{Abbildungen}% \crefname{subfigure}{Abbildung}{Abbildungen}% \crefname{table}{Tabelle}{Tabellen}% \crefname{subtable}{Tabelle}{Tabellen}% \crefname{page}{Seite}{Seiten}% \crefname{part}{Teil}{Teile}% \crefname{chapter}{Kapitel}{Kapitel}% \crefname{section}{Abschnitt}{Abschnitte}% \crefname{subsection}{Abschnitt}{Abschnitte}% \crefname{subsubsection}{Abschnitt}{Abschnitte}% \crefname{appendix}{Anhang}{Anh\"ange}% \crefname{subappendix}{Anhang}{Anh\"ange}% \crefname{subsubappendix}{Anhang}{Anh\"ange}% \crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \crefname{enumi}{Punkt}{Punkte}% \crefname{enumii}{Punkt}{Punkte}% \crefname{enumiii}{Punkt}{Punkte}% \crefname{enumiv}{Punkt}{Punkte}% \crefname{enumv}{Punkt}{Punkte}% \crefname{footnote}{Fu\ss note}{Fu\ss noten}% \crefname{theorem}{Theorem}{Theoreme}% \crefname{lemma}{Lemma}{Lemmata}% \crefname{corollary}{Korollar}{Korollare}% \crefname{proposition}{Satz}{S\"atze}% \crefname{definition}{Definition}{Definitionen}% \crefname{result}{Ergebnis}{Ergebnisse}% \crefname{example}{Beispiel}{Beispiele}% \crefname{remark}{Bemerkung}{Bemerkungen}% \crefname{note}{Anmerkung}{Anmerkungen}% \crefname{algorithm}{Algorithmus}{Algorithmen}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Zeile}{Zeilen}}% end \cref@addlangagedefs \DeclareOption{ngerman}{% \ExecuteOptions{german} \def\cref@language{ngerman}} \cref@addlanguagedefs{ngerman}{% \PackageInfo{cleveref}{loaded `ngerman' language definitions} \renewcommand{\crefrangeconjunction}{ bis\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ und\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ und\nobreakspace}% % \Crefname{equation}{Gleichung}{Gleichungen}% \Crefname{figure}{Abbildung}{Abbildungen}% \Crefname{subfigure}{Abbildung}{Abbildungen}% \Crefname{table}{Tabelle}{Tabellen}% \Crefname{subtable}{Tabelle}{Tabellen}% \Crefname{page}{Seite}{Seiten}% \Crefname{part}{Teil}{Teile}% \Crefname{chapter}{Kapitel}{Kapitel}% \Crefname{section}{Abschnitt}{Abschnitte}% \Crefname{subsection}{Abschnitt}{Abschnitte}% \Crefname{subsubsection}{Abschnitt}{Abschnitte}% \Crefname{appendix}{Anhang}{Anh\"ange}% \Crefname{subappendix}{Anhang}{Anh\"ange}% \Crefname{subsubappendix}{Anhang}{Anh\"ange}% \Crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \Crefname{enumi}{Punkt}{Punkte}% \Crefname{enumii}{Punkt}{Punkte}% \Crefname{enumiii}{Punkt}{Punkte}% \Crefname{enumiv}{Punkt}{Punkte}% \Crefname{enumv}{Punkt}{Punkte}% \Crefname{footnote}{Fu\ss note}{Fu\ss noten}% \Crefname{theorem}{Theorem}{Theoreme}% \Crefname{lemma}{Lemma}{Lemmata}% \Crefname{corollary}{Korollar}{Korollare}% \Crefname{proposition}{Satz}{S\"atze}% \Crefname{definition}{Definition}{Definitionen}% \Crefname{result}{Ergebnis}{Ergebnisse}% \Crefname{example}{Beispiel}{Beispiele}% \Crefname{remark}{Bemerkung}{Bemerkungen}% \Crefname{note}{Anmerkung}{Anmerkungen}% \Crefname{algorithm}{Algorithmus}{Algorithmen}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Zeile}{Zeilen}% % \crefname{equation}{Gleichung}{Gleichungen}% \crefname{figure}{Abbildung}{Abbildungen}% \crefname{subfigure}{Abbildung}{Abbildungen}% \crefname{table}{Tabelle}{Tabellen}% \crefname{subtable}{Tabelle}{Tabellen}% \crefname{page}{Seite}{Seiten}% \crefname{part}{Teil}{Teile}% \crefname{chapter}{Kapitel}{Kapitel}% \crefname{section}{Abschnitt}{Abschnitte}% \crefname{subsection}{Abschnitt}{Abschnitte}% \crefname{subsubsection}{Abschnitt}{Abschnitte}% \crefname{appendix}{Anhang}{Anh\"ange}% \crefname{subappendix}{Anhang}{Anh\"ange}% \crefname{subsubappendix}{Anhang}{Anh\"ange}% \crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \crefname{enumi}{Punkt}{Punkte}% \crefname{enumii}{Punkt}{Punkte}% \crefname{enumiii}{Punkt}{Punkte}% \crefname{enumiv}{Punkt}{Punkte}% \crefname{enumv}{Punkt}{Punkte}% \crefname{footnote}{Fu\ss note}{Fu\ss noten}% \crefname{theorem}{Theorem}{Theoreme}% \crefname{lemma}{Lemma}{Lemmata}% \crefname{corollary}{Korollar}{Korollare}% \crefname{proposition}{Satz}{S\"atze}% \crefname{definition}{Definition}{Definitionen}% \crefname{result}{Ergebnis}{Ergebnisse}% \crefname{example}{Beispiel}{Beispiele}% \crefname{remark}{Bemerkung}{Bemerkungen}% \crefname{note}{Anmerkung}{Anmerkungen}% \crefname{algorithm}{Algorithmus}{Algorithmen}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Zeile}{Zeilen}}% end \cref@addlangagedefs \DeclareOption{dutch}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ tot\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ en\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ en\nobreakspace}% \def\crefpairgroupconjunction@preamble{ en\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ en\nobreakspace}% % \Crefname@preamble{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \Crefname@preamble{figure}{Figuur}{Figuren}% \Crefname@preamble{table}{Tabel}{Tabellen}% \Crefname@preamble{page}{Pagina}{Pagina's}% \Crefname@preamble{part}{Deel}{Delen}% \Crefname@preamble{chapter}{Hoofdstuk}{Hoofdstuken}% \Crefname@preamble{section}{Paragraaf}{Paragrafen}% \Crefname@preamble{appendix}{Appendix}{Appendices}% \Crefname@preamble{enumi}{Punt}{Punten}% \Crefname@preamble{footnote}{Voetnote}{Voetnoten}% \Crefname@preamble{lemma}{Lemma}{Lemma's}% \Crefname@preamble{corollary}{Corollarium}{Corollaria}% \Crefname@preamble{proposition}{Bewering}{Beweringen}% \Crefname@preamble{definition}{Definitie}{Definities}% \Crefname@preamble{result}{Resultaat}{Resultaten}% \Crefname@preamble{example}{Voorbeeld}{Voorbeelden}% \Crefname@preamble{remark}{Opmerking}{Opmerkingen}% \Crefname@preamble{note}{Aantekening}{Aantekeningen}% \Crefname@preamble{algorithm}{Algoritme}{Algoritmen}% \Crefname@preamble{listing}{Listing}{Listings}% \Crefname@preamble{line}{Lijn}{Lijnen}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname@preamble{equation}{Verg.}{Verg's.}% \crefname@preamble{figure}{Fig.}{Fig's.}% \else% \crefname@preamble{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \crefname@preamble{figure}{Figuur}{Figuren}% \fi% \crefname@preamble{page}{Pagina}{Pagina's}% \crefname@preamble{table}{Tabel}{Tabellen}% \crefname@preamble{part}{Deel}{Delen}% \crefname@preamble{chapter}{Hoofdstuk}{Hoofdstukken}% \crefname@preamble{section}{Paragraaf}{Paragrafen}% \crefname@preamble{appendix}{Appendix}{Appendices}% \crefname@preamble{enumi}{Punt}{Punten}% \crefname@preamble{footnote}{Voetnote}{Voetnoten}% \crefname@preamble{theorem}{Theorema}{Theorema's}% \crefname@preamble{lemma}{Lemma}{Lemma's}% \crefname@preamble{corollary}{Corollarium}{Corollaria}% \crefname@preamble{proposition}{Bewering}{Beweringen}% \crefname@preamble{definition}{Definitie}{Definities}% \crefname@preamble{result}{Resultaat}{Resultaten}% \crefname@preamble{example}{Voorbeeld}{Voorbeelden}% \crefname@preamble{remark}{Opmerking}{Opmerkingen}% \crefname@preamble{note}{Aantekening}{Aantekeningen}% \crefname@preamble{algorithm}{Algoritme}{Algoritmen}% \crefname@preamble{listing}{Listing}{Listings}% \crefname@preamble{line}{Lijn}{Lijnen}% % \else% capitalise unset \if@cref@abbrev% \crefname@preamble{equation}{verg.}{verg's.}% \crefname@preamble{figure}{fig.}{fig's.}% \else% \crefname@preamble{equation}{vergel\ij{}king}{vergel\ij{}kingen}% \crefname@preamble{figure}{figuur}{figuren}% \fi% \crefname@preamble{page}{pagina}{pagina's}% \crefname@preamble{table}{tabel}{tabellen}% \crefname@preamble{part}{deel}{delen}% \crefname@preamble{chapter}{hoofdstuk}{hoofdstukken}% \crefname@preamble{section}{paragraaf}{paragrafen}% \crefname@preamble{appendix}{appendix}{appendices}% \crefname@preamble{enumi}{punt}{punten}% \crefname@preamble{footnote}{voetnote}{voetnoten}% \crefname@preamble{theorem}{theorema}{theorema's}% \crefname@preamble{lemma}{lemma}{lemma's}% \crefname@preamble{corollary}{corollarium}{corollaria}% \crefname@preamble{proposition}{bewering}{beweringen}% \crefname@preamble{definition}{definitie}{definities}% \crefname@preamble{result}{resultaat}{resultaten}% \crefname@preamble{example}{voorbeeld}{voorbeelden}% \crefname@preamble{remark}{opmerking}{opmerkingen}% \crefname@preamble{note}{aantekening}{aantekeningen}% \crefname@preamble{algorithm}{algoritme}{algoritmen}% \crefname@preamble{listing}{listing}{listings}% \crefname@preamble{line}{lijn}{lijnen}% \fi% \def\cref@language{dutch}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{dutch}{% \PackageInfo{cleveref}{loaded `dutch' language definitions} \renewcommand{\crefrangeconjunction}{ tot\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ en\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ en\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ en\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ en\nobreakspace}% % \Crefname{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \Crefname{figure}{Figuur}{Figuren}% \Crefname{subfigure}{Figuur}{Figuren}% \Crefname{table}{Tabel}{Tabellen}% \Crefname{subtable}{Tabel}{Tabellen}% \Crefname{page}{Pagina}{Pagina's}% \Crefname{part}{Deel}{Delen}% \Crefname{chapter}{Hoofdstuk}{Hoofdstuken}% \Crefname{section}{Paragraaf}{Paragrafen}% \Crefname{subsection}{Paragraaf}{Paragrafen}% \Crefname{subsubsection}{Paragraaf}{Paragrafen}% \Crefname{appendix}{Appendix}{Appendices}% \Crefname{subappendix}{Appendix}{Appendices}% \Crefname{subsubappendix}{Appendix}{Appendices}% \Crefname{subsubsubappendix}{Appendix}{Appendices}% \Crefname{enumi}{Punt}{Punten}% \Crefname{enumii}{Punt}{Punten}% \Crefname{enumiii}{Punt}{Punten}% \Crefname{enumiv}{Punt}{Punten}% \Crefname{enumv}{Punt}{Punten}% \Crefname{footnote}{Voetnote}{Voetnoten}% \Crefname{theorem}{Theorema}{Theorema's}% \Crefname{lemma}{Lemma}{Lemma's}% \Crefname{corollary}{Corollarium}{Corollaria}% \Crefname{proposition}{Bewering}{Beweringen}% \Crefname{definition}{Definitie}{Definities}% \Crefname{result}{Resultaat}{Resultaten}% \Crefname{example}{Voorbeeld}{Voorbeelden}% \Crefname{remark}{Opmerking}{Opmerkingen}% \Crefname{note}{Aantekening}{Aantekeningen}% \Crefname{algorithm}{Algoritme}{Algoritmen}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Lijn}{Lijnen}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname{equation}{Verg.}{Verg's.}% \crefname{figure}{Fig.}{Fig's.}% \crefname{subfigure}{Fig.}{Fig's.}% \else% \crefname{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \crefname{figure}{Figuur}{Figuren}% \crefname{subfigure}{Figuur}{Figuren}% \fi% \crefname{table}{Tabel}{Tabellen}% \crefname{subtable}{Tabel}{Tabellen}% \crefname{page}{Pagina}{Pagina's}% \crefname{part}{Deel}{Delen}% \crefname{chapter}{Hoofdstuk}{Hoofdstukken}% \crefname{section}{Paragraaf}{Paragrafen}% \crefname{appendix}{Appendix}{Appendices}% \crefname{enumi}{Punt}{Punten}% \crefname{footnote}{Voetnote}{Voetnoten}% \crefname{theorem}{Theorema}{Theorema's}% \crefname{lemma}{Lemma}{Lemma's}% \crefname{corollary}{Corollarium}{Corollaria}% \crefname{proposition}{Bewering}{Beweringen}% \crefname{definition}{Definitie}{Definities}% \crefname{result}{Resultaat}{Resultaten}% \crefname{example}{Voorbeeld}{Voorbeelden}% \crefname{remark}{Opmerking}{Opmerkingen}% \crefname{note}{Aantekening}{Aantekeningen}% \crefname{algorithm}{Algoritme}{Algoritmen}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Lijn}{Lijnen}% % \else% capitalise unset \if@cref@abbrev% \crefname{equation}{verg.}{verg's.}% \crefname{figure}{fig.}{fig's.}% \crefname{subfigure}{fig.}{fig's.}% \else% \crefname{equation}{vergel\ij{}king}{vergel\ij{}kingen}% \crefname{figure}{figuur}{figuren}% \crefname{subfigure}{figuur}{figuren}% \fi% \crefname{table}{tabel}{tabellen}% \crefname{subtable}{tabel}{tabellen}% \crefname{page}{pagina}{pagina's}% \crefname{part}{deel}{delen}% \crefname{chapter}{hoofdstuk}{hoofdstukken}% \crefname{section}{paragraaf}{paragrafen}% \crefname{appendix}{appendix}{appendices}% \crefname{enumi}{punt}{punten}% \crefname{footnote}{voetnote}{voetnoten}% \crefname{theorem}{theorema}{theorema's}% \crefname{lemma}{lemma}{lemma's}% \crefname{corollary}{corollarium}{corollaria}% \crefname{proposition}{bewering}{beweringen}% \crefname{definition}{definitie}{definities}% \crefname{result}{resultaat}{resultaten}% \crefname{example}{voorbeeld}{voorbeelden}% \crefname{remark}{opmerking}{opmerkingen}% \crefname{note}{aantekening}{aantekeningen}% \crefname{algorithm}{algoritme}{algoritmen}% \crefname{listing}{listing}{listings}% \crefname{line}{lijn}{lijnen}% \fi}% end \cref@addlanguagedefs \DeclareOption{french}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ \`a\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ et\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ et\nobreakspace}% \def\crefpairgroupconjunction@preamble{ et\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{, et\nobreakspace}% % \Crefname@preamble{equation}{{\'E}quation}{{\'E}quations}% \Crefname@preamble{figure}{Figure}{Figures}% \Crefname@preamble{table}{Tableau}{Tableaux}% \Crefname@preamble{page}{Page}{Pages}% \Crefname@preamble{part}{Partie}{Parties}% \Crefname@preamble{chapter}{Chapitre}{Chapitres}% \Crefname@preamble{section}{Section}{Sections}% \Crefname@preamble{appendix}{Annexe}{Annexes}% \Crefname@preamble{enumi}{Point}{Points}% \Crefname@preamble{footnote}{Note}{Notes}% \Crefname@preamble{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \Crefname@preamble{lemma}{Lemme}{Lemmes}% \Crefname@preamble{corollary}{Corollaire}{Corollaires}% \Crefname@preamble{proposition}{Proposition}{Propositions}% \Crefname@preamble{definition}{D\'efinition}{D\'efinitions}% \Crefname@preamble{result}{R\'esultat}{R\'esultats}% \Crefname@preamble{example}{Exemple}{Exemples}% \Crefname@preamble{remark}{Remarque}{Remarques}% \Crefname@preamble{algorithm}{Algorithme}{Algorithmes}% \Crefname@preamble{listing}{Liste}{Listes}% \Crefname@preamble{line}{Ligne}{Lignes}% % \if@cref@capitalise% capitalise set \crefname@preamble{equation}{{\'E}quation}{{\'E}quations}% \crefname@preamble{figure}{Figure}{Figures}% \crefname@preamble{table}{Tableau}{Tableaux}% \crefname@preamble{page}{Page}{Pages}% \crefname@preamble{part}{Partie}{Parties}% \crefname@preamble{chapter}{Chapitre}{Chapitres}% \crefname@preamble{section}{Section}{Sections}% \crefname@preamble{appendix}{Annexe}{Annexes}% \crefname@preamble{enumi}{Point}{Points}% \crefname@preamble{footnote}{Note}{Notes}% \crefname@preamble{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \crefname@preamble{lemma}{Lemme}{Lemmes}% \crefname@preamble{corollary}{Corollaire}{Corollaires}% \crefname@preamble{proposition}{Proposition}{Propositions}% \crefname@preamble{definition}{D\'efinition}{D\'efinitions}% \crefname@preamble{result}{R\'esultat}{R\'esultats}% \crefname@preamble{example}{Exemple}{Exemples}% \crefname@preamble{remark}{Remarque}{Remarques}% \crefname@preamble{note}{Commentaire}{Commentaires}% \crefname@preamble{algorithm}{Algorithme}{Algorithmes}% \crefname@preamble{listing}{Liste}{Listes}% \crefname@preamble{line}{Ligne}{Lignes}% % \else% capitalise unset \crefname@preamble{equation}{{\'e}quation}{{\'e}quations}% \crefname@preamble{figure}{figure}{figures}% \crefname@preamble{table}{tableau}{tableaux}% \crefname@preamble{page}{page}{pages}% \crefname@preamble{part}{partie}{parties}% \crefname@preamble{chapter}{chapitre}{chapitres}% \crefname@preamble{section}{section}{sections}% \crefname@preamble{appendix}{annexe}{annexes}% \crefname@preamble{enumi}{point}{points}% \crefname@preamble{footnote}{note}{notes}% \crefname@preamble{theorem}{th\'eor\`eme}{th\'eor\`emes}% \crefname@preamble{lemma}{lemme}{lemmes}% \crefname@preamble{corollary}{corollaire}{corollaires}% \crefname@preamble{proposition}{proposition}{propositions}% \crefname@preamble{definition}{d\'efinition}{d\'efinitions}% \crefname@preamble{result}{r\'esultat}{r\'esultats}% \crefname@preamble{example}{exemple}{exemples}% \crefname@preamble{remark}{remarque}{remarques}% \crefname@preamble{note}{commentaire}{commentaires}% \crefname@preamble{algorithm}{algorithme}{algorithmes}% \crefname@preamble{listing}{liste}{listes}% \crefname@preamble{line}{ligne}{lignes}% \fi% \def\cref@language{french}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{french}{% \PackageInfo{cleveref}{loaded `french' language definitions} \renewcommand{\crefrangeconjunction}{ \`a\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ et\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ et\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ et\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ et\nobreakspace}% % \Crefname{equation}{{\'E}quation}{{\'E}quations}% \Crefname{figure}{Figure}{Figures}% \Crefname{subfigure}{Figure}{Figures}% \Crefname{table}{Tableau}{Tableaux}% \Crefname{subtable}{Tableau}{Tableaux}% \Crefname{page}{Page}{Pages}% \Crefname{part}{Partie}{Parties}% \Crefname{chapter}{Chapitre}{Chapitres}% \Crefname{section}{Section}{Sections}% \Crefname{subsection}{Section}{Sections}% \Crefname{subsubsection}{Section}{Sections}% \Crefname{appendix}{Annexe}{Annexes}% \Crefname{subappendix}{Annexe}{Annexes}% \Crefname{subsubappendix}{Annexe}{Annexes}% \Crefname{subsubsubappendix}{Annexe}{Annexes}% \Crefname{enumi}{Point}{Points}% \Crefname{enumii}{Point}{Points}% \Crefname{enumiii}{Point}{Points}% \Crefname{enumiv}{Point}{Points}% \Crefname{enumv}{Point}{Points}% \Crefname{footnote}{Note}{Notes}% \Crefname{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \Crefname{lemma}{Lemme}{Lemmes}% \Crefname{corollary}{Corollaire}{Corollaires}% \Crefname{proposition}{Proposition}{Propositions}% \Crefname{definition}{D\'efinition}{D\'efinitions}% \Crefname{result}{R\'esultat}{R\'esultats}% \Crefname{example}{Exemple}{Exemples}% \Crefname{remark}{Remarque}{Remarques}% \Crefname{note}{Commentaire}{Commentaires}% \Crefname{algorithm}{Algorithme}{Algorithmes}% \Crefname{listing}{Liste}{Listes}% \Crefname{line}{Ligne}{Lignes}% % \if@cref@capitalise% capitalise set \crefname{equation}{{\'E}quation}{{\'E}quations}% \crefname{figure}{Figure}{Figures}% \crefname{subfigure}{Figure}{Figures}% \crefname{table}{Tableau}{Tableaux}% \crefname{subtable}{Tableau}{Tableaux}% \crefname{page}{Page}{Pages}% \crefname{part}{Partie}{Parties}% \crefname{chapter}{Chapitre}{Chapitres}% \crefname{section}{Section}{Sections}% \crefname{subsection}{Section}{Sections}% \crefname{subsubsection}{Section}{Sections}% \crefname{appendix}{Annexe}{Annexes}% \crefname{subappendix}{Annexe}{Annexes}% \crefname{subsubappendix}{Annexe}{Annexes}% \crefname{subsubsubappendix}{Annexe}{Annexes}% \crefname{enumi}{Point}{Points}% \crefname{enumii}{Point}{Points}% \crefname{enumiii}{Point}{Points}% \crefname{enumiv}{Point}{Points}% \crefname{enumv}{Point}{Points}% \crefname{footnote}{Note}{Notes}% \crefname{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \crefname{lemma}{Lemme}{Lemmes}% \crefname{corollary}{Corollaire}{Corollaires}% \crefname{proposition}{Proposition}{Propositions}% \crefname{definition}{D\'efinition}{D\'efinitions}% \crefname{result}{R\'esultat}{R\'esultats}% \crefname{example}{Exemple}{Exemples}% \crefname{remark}{Remarque}{Remarques}% \crefname{note}{Commentaire}{Commentaires}% \crefname{algorithm}{Algorithme}{Algorithmes}% \crefname{listing}{Liste}{Listes}% \crefname{line}{Ligne}{Lignes}% % \else% capitalise unset \crefname{equation}{{\'e}quation}{{\'e}quations}% \crefname{figure}{figure}{figures}% \crefname{subfigure}{figure}{figures}% \crefname{table}{tableau}{tableaux}% \crefname{subtable}{tableau}{tableaux}% \crefname{page}{page}{pages}% \crefname{part}{partie}{parties}% \crefname{chapter}{chapitre}{chapitres}% \crefname{section}{section}{sections}% \crefname{subsection}{section}{sections}% \crefname{subsubsection}{section}{sections}% \crefname{appendix}{annexe}{annexes}% \crefname{subappendix}{annexe}{annexes}% \crefname{subsubappendix}{annexe}{annexes}% \crefname{subsubsubappendix}{annexe}{annexes}% \crefname{enumi}{point}{points}% \crefname{enumii}{point}{points}% \crefname{enumiii}{point}{points}% \crefname{enumiv}{point}{points}% \crefname{enumv}{point}{points}% \crefname{footnote}{note}{notes}% \crefname{theorem}{th\'eor\`eme}{th\'eor\`emes}% \crefname{lemma}{lemme}{lemmes}% \crefname{corollary}{corollaire}{corollaires}% \crefname{proposition}{proposition}{propositions}% \crefname{definition}{d\'efinition}{d\'efinitions}% \crefname{result}{r\'esultat}{r\'esultats}% \crefname{example}{exemple}{exemples}% \crefname{remark}{remarque}{remarques}% \crefname{note}{commentaire}{commentaires}% \crefname{algorithm}{algorithme}{algorithmes}% \crefname{listing}{liste}{listes}% \crefname{line}{ligne}{lignes}% \fi}% end \cref@loadlanguagedefs \DeclareOption{spanish}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ a\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ y\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ y\nobreakspace}% \def\crefpairgroupconjunction@preamble{ y\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ y\nobreakspace}% % \Crefname@preamble{equation}{Ecuaci\'on}{Ecuaciones}% \Crefname@preamble{figure}{Figura}{Figuras}% \Crefname@preamble{table}{Cuadro}{Cuadros}% \Crefname@preamble{page}{P\'agina}{P\'aginas}% \Crefname@preamble{part}{Parte}{Partes}% \Crefname@preamble{chapter}{Cap\'itulo}{Cap\'itulos}% \Crefname@preamble{section}{Apartado}{Apartados}% \Crefname@preamble{appendix}{Ap\'endice}{Ap\'endices}% \Crefname@preamble{enumi}{Punto}{Puntos}% \Crefname@preamble{footnote}{Nota}{Notas}% \Crefname@preamble{theorem}{Teorema}{Teoremas}% \Crefname@preamble{lemma}{Lema}{Lemas}% \Crefname@preamble{corollary}{Corolario}{Corolarios}% \Crefname@preamble{proposition}{Proposici\'on}{Proposiciones}% \Crefname@preamble{definition}{Definici\'on}{Definiciones}% \Crefname@preamble{result}{Resultado}{Resultados}% \Crefname@preamble{example}{Ejemplo}{Ejemplos}% \Crefname@preamble{remark}{Observaci\'on}{Observaciones}% \Crefname@preamble{note}{Nota}{Notas}% \Crefname@preamble{algorithm}{Algoritmo}{Algoritmos}% \Crefname@preamble{listing}{Listado}{Listados}% \Crefname@preamble{line}{L\'inea}{L\'ineas}% % \if@cref@capitalise% capitalise set \crefname@preamble{equation}{Ecuaci\'on}{Ecuaciones}% \crefname@preamble{figure}{Figura}{Figuras}% \crefname@preamble{table}{Cuadro}{Cuadros}% \crefname@preamble{page}{P\'agina}{P\'aginas}% \crefname@preamble{part}{Parte}{Partes}% \crefname@preamble{chapter}{Cap\'itulo}{Cap\'itulos}% \crefname@preamble{section}{Apartado}{Apartados}% \crefname@preamble{appendix}{Ap\'endice}{Ap\'endices}% \crefname@preamble{enumi}{Punto}{Puntos}% \crefname@preamble{footnote}{Nota}{Notas}% \crefname@preamble{theorem}{Teorema}{Teoremas}% \crefname@preamble{lemma}{Lema}{Lemas}% \crefname@preamble{corollary}{Corolario}{Corolarios}% \crefname@preamble{proposition}{Proposici\'on}{Proposiciones}% \crefname@preamble{definition}{Definici\'on}{Definiciones}% \crefname@preamble{result}{Resultado}{Resultados}% \crefname@preamble{example}{Ejemplo}{Ejemplos}% \crefname@preamble{remark}{Observaci\'on}{Observaciones}% \crefname@preamble{note}{Nota}{Notas}% \crefname@preamble{algorithm}{Algoritmo}{Algoritmos}% \crefname@preamble{listing}{Listado}{Listados}% \crefname@preamble{line}{L\'inea}{L\'ineas}% % \else% capitalise unset \crefname@preamble{equation}{ecuaci\'on}{ecuaciones}% \crefname@preamble{figure}{figura}{figuras}% \crefname@preamble{table}{cuadro}{cuadros}% \crefname@preamble{page}{p\'agina}{p\'aginas}% \crefname@preamble{part}{parte}{partes}% \crefname@preamble{chapter}{cap\'itulo}{cap\'itulos}% \crefname@preamble{section}{apartado}{apartados}% \crefname@preamble{appendix}{ap\'endice}{ap\'endices}% \crefname@preamble{enumi}{punto}{puntos}% \crefname@preamble{footnote}{nota}{notas}% \crefname@preamble{theorem}{teorema}{teoremas}% \crefname@preamble{lemma}{lema}{lemas}% \crefname@preamble{corollary}{corolario}{corolarios}% \crefname@preamble{proposition}{proposici\'on}{proposiciones}% \crefname@preamble{definition}{definici\'on}{definiciones}% \crefname@preamble{result}{resultado}{resultados}% \crefname@preamble{example}{ejemplo}{ejemplos}% \crefname@preamble{remark}{observaci\'on}{observaciones}% \crefname@preamble{note}{nota}{notas}% \crefname@preamble{algorithm}{algoritmo}{algoritmos}% \crefname@preamble{listing}{listado}{listados}% \crefname@preamble{line}{l\'inea}{l\'ineas}% \fi% \def\cref@language{spanish}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{spanish}{% \PackageInfo{cleveref}{loaded `spanish' language definitions} \renewcommand{\crefrangeconjunction}{ a\nobreakspace}% \renewcommand{\crefrangepreconjunction}{}% \renewcommand{\crefrangepostconjunction}{}% \renewcommand{\crefpairconjunction}{ y\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ y\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ y\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ y\nobreakspace}% % \Crefname{equation}{Ecuaci\'on}{Ecuaciones}% \Crefname{figure}{Figura}{Figuras}% \Crefname{subfigure}{Figura}{Figuras}% \Crefname{table}{Cuadro}{Cuadros}% \Crefname{subtable}{Cuadro}{Cuadros}% \Crefname{page}{P\'agina}{P\'aginas}% \Crefname{part}{Parte}{Partes}% \Crefname{chapter}{Cap\'itulo}{Cap\'itulos}% \Crefname{section}{Apartado}{Apartados}% \Crefname{subsection}{Apartado}{Apartados}% \Crefname{subsubsection}{Apartado}{Apartados}% \Crefname{appendix}{Ap\'endice}{Ap\'endices}% \Crefname{subappendix}{Ap\'endice}{Ap\'endices}% \Crefname{subsubappendix}{Ap\'endice}{Ap\'endices}% \Crefname{subsubsubappendix}{Ap\'endice}{Ap\'endices}% \Crefname{enumi}{Punto}{Puntos}% \Crefname{enumii}{Punto}{Puntos}% \Crefname{enumiii}{Punto}{Puntos}% \Crefname{enumiv}{Punto}{Puntos}% \Crefname{enumv}{Punto}{Puntos}% \Crefname{footnote}{Nota}{Notas}% \Crefname{theorem}{Teorema}{Teoremas}% \Crefname{lemma}{Lema}{Lemas}% \Crefname{corollary}{Corolario}{Corolarios}% \Crefname{proposition}{Proposici\'on}{Proposiciones}% \Crefname{definition}{Definici\'on}{Definiciones}% \Crefname{result}{Resultado}{Resultados}% \Crefname{example}{Ejemplo}{Ejemplos}% \Crefname{remark}{Observaci\'on}{Observaci\'on}% \Crefname{note}{Nota}{Notas}% \Crefname{algorithm}{Algoritmo}{Algoritmos}% \Crefname{listing}{Listado}{Listados}% \Crefname{line}{L\'inea}{L\'ineas}% % \if@cref@capitalise% capitalise set \crefname{equation}{Ecuaci\'on}{Ecuaciones}% \crefname{figure}{Figura}{Figuras}% \crefname{subfigure}{Figura}{Figuras}% \crefname{table}{Cuadro}{Cuadros}% \crefname{subtable}{Cuadro}{Cuadros}% \crefname{page}{P\'agina}{P\'aginas}% \crefname{part}{Parte}{Partes}% \crefname{chapter}{Cap\'itulo}{Cap\'itulos}% \crefname{section}{Apartado}{Apartados}% \crefname{subsection}{Apartado}{Apartados}% \crefname{subsubsection}{Apartado}{Apartados}% \crefname{appendix}{Ap\'endice}{Ap\'endices}% \crefname{subappendix}{Ap\'endice}{Ap\'endices}% \crefname{subsubappendix}{Ap\'endice}{Ap\'endices}% \crefname{subsubsubappendix}{Ap\'endice}{Ap\'endices}% \crefname{enumi}{Punto}{Puntos}% \crefname{enumii}{Punto}{Puntos}% \crefname{enumiii}{Punto}{Puntos}% \crefname{enumiv}{Punto}{Puntos}% \crefname{enumv}{Punto}{Puntos}% \crefname{footnote}{Nota}{Notas}% \crefname{theorem}{Teorema}{Teoremas}% \crefname{lemma}{Lema}{Lemas}% \crefname{corollary}{Corolario}{Corolarios}% \crefname{proposition}{Proposici\'on}{Proposiciones}% \crefname{definition}{Definici\'on}{Definiciones}% \crefname{result}{Resultado}{Resultados}% \crefname{example}{Ejemplo}{Ejemplos}% \crefname{remark}{Observaci\'on}{Observaci\'ones}% \crefname{note}{Nota}{Notas}% \crefname{algorithm}{Algoritmo}{Algoritmos}% \crefname{listing}{Listado}{Listados}% \crefname{line}{L\'inea}{L\'ineas}% % \else% capitalise unset \crefname{equation}{ecuaci\'on}{ecuaciones}% \crefname{figure}{figura}{figuras}% \crefname{subfigure}{figura}{figuras}% \crefname{table}{cuadro}{cuadros}% \crefname{subtable}{cuadro}{cuadros}% \crefname{page}{p\'agina}{p\'aginas}% \crefname{part}{parte}{partes}% \crefname{chapter}{cap\'itulo}{cap\'itulos}% \crefname{section}{apartado}{apartados}% \crefname{subsection}{apartado}{apartados}% \crefname{subsubsection}{apartado}{apartados}% \crefname{appendix}{ap\'endice}{ap\'endices}% \crefname{subappendix}{ap\'endice}{ap\'endices}% \crefname{subsubappendix}{ap\'endice}{ap\'endices}% \crefname{subsubsubappendix}{ap\'endice}{ap\'endices}% \crefname{enumi}{punto}{puntos}% \crefname{enumii}{punto}{puntos}% \crefname{enumiii}{punto}{puntos}% \crefname{enumiv}{punto}{puntos}% \crefname{enumv}{punto}{puntos}% \crefname{footnote}{nota}{notas}% \crefname{theorem}{teorema}{teoremas}% \crefname{lemma}{lema}{lemas}% \crefname{corollary}{corolario}{corolarios}% \crefname{proposition}{proposici\'on}{proposiciones}% \crefname{definition}{definici\'on}{definiciones}% \crefname{result}{resultado}{resultados}% \crefname{example}{ejemplo}{ejemplos}% \crefname{remark}{observaci\'on}{observaci\'ones}% \crefname{note}{nota}{notas}% \crefname{algorithm}{algoritmo}{algoritmos}% \crefname{listing}{listado}{listados}% \crefname{line}{l\'inea}{l\'ineas}% \fi}% end \cref@loadlanguagedefs \DeclareOption{italian}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ a\nobreakspace}% \def\crefrangepreconjunction@preamble{da\nobreakspace}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ e\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ e\nobreakspace}% \def\crefpairgroupconjunction@preamble{ e\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ e\nobreakspace}% % \Crefname@preamble{equation}{Equazione}{Equazioni}% \Crefname@preamble{figure}{Figura}{Figure}% \Crefname@preamble{table}{Tabella}{Tabelle}% \Crefname@preamble{page}{Pagina}{Pagine}% \Crefname@preamble{part}{Parte}{Parti}% \Crefname@preamble{chapter}{Capitolo}{Capitoli}% \Crefname@preamble{section}{Sezione}{Sezioni}% \Crefname@preamble{appendix}{Appendice}{Appendici}% \Crefname@preamble{enumi}{Voce}{Voci}% \Crefname@preamble{footnote}{Nota}{Note}% \Crefname@preamble{theorem}{Teorema}{Teoremi}% \Crefname@preamble{lemma}{Lemma}{Lemmi}% \Crefname@preamble{corollary}{Corollario}{Corollari}% \Crefname@preamble{proposition}{Proposizione}{Proposizioni}% \Crefname@preamble{definition}{Definizioni}{Definizioni}% \Crefname@preamble{result}{Risultato}{Risultati}% \Crefname@preamble{example}{esempio}{esempi}% \Crefname@preamble{remark}{Osservazione}{Osservazioni}% \Crefname@preamble{note}{Nota}{Note}% \Crefname@preamble{algorithm}{Algoritmo}{Algoritmi}% \Crefname@preamble{listing}{Elenco}{Elenchi}% \Crefname@preamble{line}{Linea}{Linee}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname@preamble{equation}{Eq.}{Eq.}% \crefname@preamble{figure}{Fig.}{Fig.}% \else% \crefname@preamble{equation}{Equazione}{Equazioni}% \crefname@preamble{figure}{Figura}{Figure}% \fi% \crefname@preamble{table}{Tabella}{Tabelle}% \crefname@preamble{page}{Pagina}{Pagine}% \crefname@preamble{part}{Parte}{Parti}% \crefname@preamble{chapter}{Capitolo}{Capitoli}% \crefname@preamble{section}{Sezione}{Sezioni}% \crefname@preamble{appendix}{Appendice}{Appendici}% \crefname@preamble{enumi}{Voce}{Voci}% \crefname@preamble{footnote}{Nota}{Note}% \crefname@preamble{theorem}{Teorema}{Teoremi}% \crefname@preamble{lemma}{Lemma}{Lemmi}% \crefname@preamble{corollary}{Corollario}{Corollari}% \crefname@preamble{proposition}{Proposizione}{Proposizioni}% \crefname@preamble{definition}{Definizione}{Definizioni}% \crefname@preamble{result}{Risultato}{Risultati}% \crefname@preamble{example}{Esempio}{Esempi}% \crefname@preamble{remark}{Osservazione}{Osservazioni}% \crefname@preamble{note}{Nota}{Note}% \crefname@preamble{algorithm}{Algoritmo}{Algoritmi}% \crefname@preamble{listing}{Elenco}{Elenchi}% \crefname@preamble{line}{Linea}{Linee}% % \else% capitalise unset \if@cref@abbrev% \crefname@preamble{equation}{eq.}{eq.}% \crefname@preamble{figure}{fig.}{fig.}% \else% \crefname@preamble{equation}{equazione}{equazioni}% \crefname@preamble{figure}{figura}{figure}% \fi% \crefname@preamble{table}{tabella}{tabelle}% \crefname@preamble{page}{pagina}{pagine}% \crefname@preamble{part}{parte}{parti}% \crefname@preamble{chapter}{capitolo}{capitoli}% \crefname@preamble{section}{sezione}{sezioni}% \crefname@preamble{appendix}{appendice}{appendici}% \crefname@preamble{enumi}{voce}{voci}% \crefname@preamble{footnote}{nota}{note}% \crefname@preamble{theorem}{teorema}{teoremi}% \crefname@preamble{lemma}{lemma}{lemmi}% \crefname@preamble{corollary}{corollario}{corollari}% \crefname@preamble{proposition}{proposizione}{proposizioni}% \crefname@preamble{definition}{definizione}{definizioni}% \crefname@preamble{result}{risultato}{risultati}% \crefname@preamble{example}{esempio}{esempi}% \crefname@preamble{remark}{osservazione}{osservazioni}% \crefname@preamble{note}{nota}{note}% \crefname@preamble{algorithm}{algoritmo}{algoritmi}% \crefname@preamble{listing}{elenco}{elenchi}% \crefname@preamble{line}{linea}{linee}% \fi% \def\cref@language{italian}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{italian}{% \PackageInfo{cleveref}{loaded `italian' language definitions} \renewcommand{\crefrangeconjunction}{ a\nobreakspace}% \renewcommand\crefrangepreconjunction{da\nobreakspace}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ e\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ e\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ e\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ e\nobreakspace}% % \Crefname{equation}{Equazione}{Equazioni}% \Crefname{figure}{Figura}{Figure}% \Crefname{subfigure}{Figura}{Figure}% \Crefname{table}{Tabella}{Tabelle}% \Crefname{subtable}{Tabella}{Tabelle}% \Crefname{page}{Pagina}{Pagine}% \Crefname{part}{Parte}{Parti}% \Crefname{chapter}{Capitolo}{Capitoli}% \Crefname{section}{Sezione}{Sezioni}% \Crefname{subsection}{Sezione}{Sezioni}% \Crefname{subsubsection}{Sezione}{Sezioni}% \Crefname{appendix}{Appendice}{Appendici}% \Crefname{subappendix}{Appendice}{Appendici}% \Crefname{subsubappendix}{Appendice}{Appendici}% \Crefname{subsubsubappendix}{Appendice}{Appendici}% \Crefname{enumi}{Voce}{Voci}% \Crefname{enumii}{Voce}{Voci}% \Crefname{enumiii}{Voce}{Voci}% \Crefname{enumiv}{Voce}{Voci}% \Crefname{enumv}{Voce}{Voci}% \Crefname{footnote}{Nota}{Note}% \Crefname{theorem}{Teorema}{Teoremi}% \Crefname{lemma}{Lemma}{Lemmi}% \Crefname{corollary}{Corollario}{Corollari}% \Crefname{proposition}{Proposizione}{Proposizioni}% \Crefname{definition}{Definizione}{Definizione}% \Crefname{result}{Risultato}{Risultati}% \Crefname{example}{esempio}{esempi}% \Crefname{remark}{Osservazione}{Osservazioni}% \Crefname{note}{Nota}{Note}% \Crefname{algorithm}{Algoritmo}{Algoritmi}% \Crefname{listing}{Elenco}{Elenchi}% \Crefname{line}{Linea}{Linee}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname{equation}{Eq.}{Eq.}% \crefname{figure}{Fig.}{Fig.}% \crefname{subfigure}{Fig.}{Fig.}% \else% \crefname{equation}{Equazione}{Equazioni}% \crefname{figure}{Figura}{Figure}% \crefname{figure}{Figura}{Figure}% \fi% \crefname{table}{Tabella}{Tabelle}% \crefname{page}{Pagina}{Pagine}% \crefname{subtable}{Tabella}{Tabelle}% \crefname{part}{Parte}{Parti}% \crefname{chapter}{Capitolo}{Capitoli}% \crefname{section}{Sezione}{Sezioni}% \crefname{subsection}{Sezione}{Sezioni}% \crefname{subsubsection}{Sezione}{Sezioni}% \crefname{appendix}{Appendice}{Appendici}% \crefname{subappendix}{Appendice}{Appendici}% \crefname{subsubappendix}{Appendice}{Appendici}% \crefname{subsubsubappendix}{Appendice}{Appendici}% \crefname{enumi}{Voce}{Voci}% \crefname{enumii}{Voce}{Voci}% \crefname{enumiii}{Voce}{Voci}% \crefname{enumiv}{Voce}{Voci}% \crefname{enumv}{Voce}{Voci}% \crefname{footnote}{Nota}{Note}% \crefname{theorem}{Teorema}{Teoremi}% \crefname{lemma}{Lemma}{Lemmi}% \crefname{corollary}{Corollario}{Corollari}% \crefname{proposition}{Proposizione}{Proposizioni}% \crefname{definition}{Definizione}{Definizione}% \crefname{result}{Risultato}{Risultati}% \crefname{example}{Esempio}{Esempi}% \crefname{remark}{Osservazione}{Osservazioni}% \crefname{note}{Nota}{Note}% \crefname{algorithm}{Algoritmo}{Algoritmi}% \crefname{listing}{Elenco}{Elenchi}% \crefname{line}{Linea}{Linee}% % \else% capitalise unset \if@cref@abbrev% \crefname{equation}{eq.}{eq.}% \crefname{figure}{fig.}{fig.}% \crefname{subfigure}{fig.}{fig.}% \else% \crefname{equation}{equazione}{equazioni}% \crefname{figure}{figura}{figure}% \crefname{figure}{figura}{figure}% \fi% \crefname{table}{tabella}{tabelle}% \crefname{page}{pagina}{pagine}% \crefname{subtable}{tabella}{tabelle}% \crefname{part}{parte}{parti}% \crefname{chapter}{capitolo}{capitoli}% \crefname{section}{sezione}{sezioni}% \crefname{subsection}{sezione}{sezioni}% \crefname{subsubsection}{sezione}{sezioni}% \crefname{appendix}{appendice}{appendici}% \crefname{subappendix}{appendice}{appendici}% \crefname{subsubappendix}{appendice}{appendici}% \crefname{subsubsubappendix}{appendice}{appendici}% \crefname{enumi}{voce}{voci}% \crefname{enumii}{voce}{voci}% \crefname{enumiii}{voce}{voci}% \crefname{enumiv}{voce}{voci}% \crefname{enumv}{voce}{voci}% \crefname{footnote}{nota}{note}% \crefname{theorem}{teorema}{teoremi}% \crefname{lemma}{lemma}{lemmi}% \crefname{corollary}{corollario}{corollari}% \crefname{proposition}{proposizione}{proposizioni}% \crefname{definition}{definizione}{definizione}% \crefname{result}{risultato}{risultati}% \crefname{example}{esempio}{esempi}% \crefname{remark}{osservazione}{osservazioni}% \crefname{note}{nota}{note}% \crefname{algorithm}{algoritmo}{algoritmi}% \crefname{listing}{elenco}{elenchi}% \crefname{line}{linea}{linee}% \fi}% end \cref@loadlanguagedefs \DeclareOption{russian}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{--}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ \cyri\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ \cyri\nobreakspace}% \def\crefpairgroupconjunction@preamble{ \cyri\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble% {, \cyra\ \cyrt\cyra\cyrk\cyrzh\cyre\nobreakspace}% % \Crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \Crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \Crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \Crefname@preamble{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname@preamble{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \Crefname@preamble{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \Crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \Crefname@preamble{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \Crefname@preamble{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \Crefname@preamble{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \Crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \Crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \Crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \Crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \Crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \Crefname@preamble{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \Crefname@preamble{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \Crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \else% \crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \fi% \crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \crefname@preamble{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname@preamble{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname@preamble{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \crefname@preamble{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname@preamble{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname@preamble{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname@preamble{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \crefname@preamble{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname@preamble{section}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname@preamble{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname@preamble{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname@preamble{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd.}% \crefname@preamble{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% \crefname@preamble{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrm.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname@preamble{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname@preamble{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname@preamble{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyrery}% \crefname@preamble{section}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname@preamble{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname@preamble{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyrery}% \crefname@preamble{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname@preamble{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname@preamble{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname@preamble{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname@preamble{page}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra\cyrh}% \crefname@preamble{part}% {\cyrch\cyra\cyrs\cyrt\cyrsftsn}% {\cyrch\cyra\cyrs\cyrt\cyri}% \fi% \def\cref@language{russian}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{russian}{% \PackageInfo{cleveref}{loaded `russian' language definitions} \renewcommand{\crefrangeconjunction}{--}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ \cyri\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ \cyri\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ \cyri\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}% {, \cyra\ \cyrt\cyra\cyrk\cyrzh\cyre\nobreakspace}% % \Crefname{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \Crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \Crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \Crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \Crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% \Crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \Crefname{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{subsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{subsubsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \Crefname{subappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya} \Crefname{subsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya} \Crefname{subsubsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya} \Crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \Crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \Crefname{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \Crefname{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \Crefname{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \Crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \Crefname{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \Crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \Crefname{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \Crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \Crefname{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{subfigure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiv}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumv}% {\CYRP.}% {\CYRP.\cyrp.}% \else% abbrev unset \crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \fi% \crefname{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% \crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \crefname{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsubsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \crefname{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname{section}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{subsection}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{subsubsection}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{subappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{subsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{subsubsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% \crefname{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{subfigure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd.}% \crefname{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% \crefname{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% \crefname{example}% {\cyrp\cyrr\cyri\cyrm.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% \crefname{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% \crefname{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyrery}% \crefname{section}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsection}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsubsection}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyrery}% \crefname{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname{example}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname{page}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra\cyrh}% \crefname{part}% {\cyrch\cyra\cyrs\cyrt\cyrsftsn}% {\cyrch\cyra\cyrs\cyrt\cyri}% \fi}% end \cref@loadlanguagedefs \DeclareOption{ukrainian}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{--}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ \cyrii\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ \cyrii\nobreakspace}% \def\crefpairgroupconjunction@preamble{ \cyrt\cyra\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble% {, \cyra\ \cyrt\cyra\cyrk\cyro\cyrzh\nobreakspace}% % \Crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \Crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \Crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \Crefname@preamble{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname@preamble{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname@preamble{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \Crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \Crefname@preamble{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \Crefname@preamble{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \Crefname@preamble{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \Crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \Crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \Crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \Crefname@preamble{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \Crefname@preamble{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \Crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \else% \crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \fi% \crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \crefname@preamble{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname@preamble{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname@preamble{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \crefname@preamble{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname@preamble{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname@preamble{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \crefname@preamble{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname@preamble{section}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname@preamble{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname@preamble{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname@preamble{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}% \crefname@preamble{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% \crefname@preamble{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrk\cyrl.}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname@preamble{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname@preamble{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname@preamble{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyri}% \crefname@preamble{section}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname@preamble{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname@preamble{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyri}% \crefname@preamble{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname@preamble{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname@preamble{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname@preamble{page}% {\cyrs\cyrt\cyro\cyrr\cyri\cyrn\cyrc\cyrii}% {\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra\cyrh}% \crefname@preamble{part}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyri}% \fi% \def\cref@language{ukrainian}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{ukrainian}{% \PackageInfo{cleveref}{loaded `ukrainian' language definitions} \renewcommand{\crefrangeconjunction}{--}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ \cyrii\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ \cyrii\nobreakspace}% \renewcommand{\crefpairgroupconjunction}% { \cyrt\cyra\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}% {, \cyra\ \cyrt\cyra\cyrk\cyro\cyrzh\nobreakspace}% % \Crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \Crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \Crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \Crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \Crefname{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{subsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{subsubsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{subappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{subsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{subsubsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \Crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \Crefname{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \Crefname{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \Crefname{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \Crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \Crefname{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \Crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \Crefname{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \Crefname{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \Crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{subfigure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiv}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumv}% {\CYRP.}% {\CYRP.\cyrp.}% \else% abbrev unset \crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \fi% \crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \crefname{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsubsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \crefname{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \crefname{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname{section}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{subsection}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{subsubsection}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{subappendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{subsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{subsubsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% \crefname{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{subfigure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}% \crefname{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% \crefname{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}% \crefname{example}% {\cyrp\cyrr\cyri\cyrk\cyrl.}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% \crefname{note}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% \crefname{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyri}% \crefname{section}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsection}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsubsection}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subappendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyri}% \crefname{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname{example}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{note}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname{page}% {\cyrs\cyrt\cyro\cyrr\cyri\cyrn\cyrc\cyrii}% {\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra\cyrh}% \crefname{part}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyri}% \fi}% end \cref@loadlanguagedefs \DeclareOption{norsk}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ til\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ og\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ og\nobreakspace}% \def\crefpairgroupconjunction@preamble{ og\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ og\nobreakspace}% % \Crefname@preamble{equation}{Likning}{Likningene}% \Crefname@preamble{figure}{Figur}{Figurene}% \Crefname@preamble{table}{Tabell}{Tabellene}% \Crefname@preamble{page}{Side}{Siden}% \Crefname@preamble{part}{Del}{Delene}% \Crefname@preamble{chapter}{Kapittel}{Kapitlene}% \Crefname@preamble{section}{Avsnitt}{Avsnittene}% \Crefname@preamble{appendix}{Tillegg}{Tilleggene}% \Crefname@preamble{enumi}{Punkt}{Punktene}% \Crefname@preamble{footnote}{Fotnote}{Fotnotene}% \Crefname@preamble{theorem}{Teorem}{Teoremene}% \Crefname@preamble{lemma}{Lemma}{Lemma}% \Crefname@preamble{corollary}{Korollar}{Korollarene}% \Crefname@preamble{proposition}{P\aa stand}{P\aa standene}% \Crefname@preamble{definition}{Definisjon}{Definisjonene}% \Crefname@preamble{result}{Resultat}{Resultatene}% \Crefname@preamble{example}{Eksempel}{Eksemplene}% \Crefname@preamble{remark}{Bemerkning}{Bemerkningene}% \Crefname@preamble{note}{Note}{Notene}% \Crefname@preamble{algorithm}{Algoritme}{Algoritmene}% \Crefname@preamble{listing}{Opplisting}{Opplistingene}% \Crefname@preamble{line}{Linje}{Linjene}% % \if@cref@capitalise% \crefname@preamble{page}{Side}{Siden}% \crefname@preamble{equation}{Likning}{Likningene}% \crefname@preamble{figure}{Figur}{Figurene}% \crefname@preamble{table}{Tabell}{Tabellene}% \crefname@preamble{part}{Del}{Delene}% \crefname@preamble{chapter}{Kapittel}{Kapitlene}% \crefname@preamble{section}{Avsnitt}{Avsnittene}% \crefname@preamble{appendix}{Tillegg}{Tilleggene}% \crefname@preamble{enumi}{Punkt}{Punktene}% \crefname@preamble{footnote}{Fotnote}{Fotnotene}% \crefname@preamble{theorem}{Teorem}{Teoremene}% \crefname@preamble{lemma}{Lemma}{Lemma}% \crefname@preamble{corollary}{Korollar}{Korollarene}% \crefname@preamble{proposition}{P\aa stand}{P\aa standene}% \crefname@preamble{definition}{Definisjon}{Definisjonene}% \crefname@preamble{result}{Resultat}{Resultatene}% \crefname@preamble{example}{Eksempel}{Eksemplene}% \crefname@preamble{remark}{Bemerkning}{Bemerkningene}% \crefname@preamble{note}{Note}{Notene}% \crefname@preamble{algorithm}{Algoritme}{Algoritmene}% \crefname@preamble{listing}{Opplisting}{Opplistingene}% \crefname@preamble{line}{Linje}{Linjene}% % \else% \crefname@preamble{equation}{likning}{likningene}% \crefname@preamble{figure}{figur}{figurene}% \crefname@preamble{table}{tabell}{tabeller}% \crefname@preamble{page}{side}{siden}% \crefname@preamble{part}{del}{delene}% \crefname@preamble{chapter}{kapittel}{kapitlene}% \crefname@preamble{section}{avsnitt}{avsnittene}% \crefname@preamble{appendix}{tillegg}{tilleggene}% \crefname@preamble{enumi}{punkt}{punktene}% \crefname@preamble{footnote}{fotnote}{fotnotene}% \crefname@preamble{theorem}{teorem}{teoremene}% \crefname@preamble{lemma}{lemma}{lemma}% \crefname@preamble{corollary}{korollar}{korollarene}% \crefname@preamble{proposition}{p\aa stand}{p\aa standene}% \crefname@preamble{definition}{definisjon}{definisjonene}% \crefname@preamble{result}{resultat}{resultatene}% \crefname@preamble{example}{eksempel}{eksemplene}% \crefname@preamble{remark}{bemerkning}{bemerkningene}% \crefname@preamble{note}{note}{notene}% \crefname@preamble{algorithm}{algoritme}{algoritmene}% \crefname@preamble{listing}{opplisting}{opplistingene}% \crefname@preamble{line}{linje}{linjene}% \fi% \def\cref@language{norsk}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{norsk}{% \PackageInfo{cleveref}{loaded `norsk' language definitions} \renewcommand{\crefrangeconjunction}{ til\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ og\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ og\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ og\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ og\nobreakspace}% % \Crefname{equation}{Likning}{Likningene}% \Crefname{figure}{Figur}{Figurene}% \Crefname{subfigure}{Figur}{Figurene}% \Crefname{table}{Tabell}{Tabellene}% \Crefname{subtable}{Tabell}{Tabellene}% \Crefname{page}{Side}{Siden}% \Crefname{part}{Del}{Delene}% \Crefname{chapter}{Kapittel}{Kapitlene}% \Crefname{section}{Avsnitt}{Avsnittene}% \Crefname{subsection}{Avsnitt}{Avsnittene}% \Crefname{subsubsection}{Avsnitt}{Avsnittene}% \Crefname{appendix}{Tillegg}{Tilleggene}% \Crefname{subappendix}{Tillegg}{Tilleggene}% \Crefname{subsubappendix}{Tillegg}{Tilleggene}% \Crefname{subsubsubappendix}{Tillegg}{Tilleggene}% \Crefname{enumi}{Punkt}{Punktene}% \Crefname{enumii}{Punkt}{Punktene}% \Crefname{enumiii}{Punkt}{Punktene}% \Crefname{enumiv}{Punkt}{Punktene}% \Crefname{enumv}{Punkt}{Punktene}% \Crefname{footnote}{Fotnote}{Fotnotene}% \Crefname{theorem}{Teorem}{Teoremene}% \Crefname{lemma}{Lemma}{Lemma}% \Crefname{corollary}{Korollar}{Korollarene}% \Crefname{proposition}{P\aa stand}{P\aa standene}% \Crefname{definition}{Definisjon}{Definisjonene}% \Crefname{result}{Resultat}{Resultatene}% \Crefname{example}{Eksempel}{Eksemplene}% \Crefname{remark}{Bemerkning}{Bemerkningene}% \Crefname{note}{Note}{Notene}% \Crefname{algorithm}{Algoritme}{Algoritmene}% \Crefname{listing}{Opplisting}{Opplistingene}% \Crefname{line}{Linje}{Linjene}% % \if@cref@capitalise% \crefname{equation}{Likning}{Likningene}% \crefname{figure}{Figur}{Figurene}% \crefname{subfigure}{Figur}{Figurene}% \crefname{table}{Tabell}{Tabellene}% \crefname{subtable}{Tabell}{Tabellene}% \crefname{page}{Side}{Siden}% \crefname{part}{Del}{Delene}% \crefname{chapter}{Kapittel}{Kapitlene}% \crefname{section}{Avsnitt}{Avsnittene}% \crefname{subsection}{Avsnitt}{Avsnittene}% \crefname{subsubsection}{Avsnitt}{Avsnittene}% \crefname{appendix}{Tillegg}{Tilleggene}% \crefname{subappendix}{Tillegg}{Tilleggene}% \crefname{subsubappendix}{Tillegg}{Tilleggene}% \crefname{subsubsubappendix}{Tillegg}{Tilleggene}% \crefname{enumi}{Punkt}{Punktene}% \crefname{enumii}{Punkt}{Punktene}% \crefname{enumiii}{Punkt}{Punktene}% \crefname{enumiv}{Punkt}{Punktene}% \crefname{enumv}{Punkt}{Punktene}% \crefname{footnote}{Fotnote}{Fotnotene}% \crefname{theorem}{Teorem}{Teoremene}% \crefname{lemma}{Lemma}{Lemma}% \crefname{corollary}{Korollar}{Korollarene}% \crefname{proposition}{P\aa stand}{P\aa standene}% \crefname{definition}{Definisjon}{Definisjonene}% \crefname{result}{Resultat}{Resultatene}% \crefname{example}{Eksempel}{Eksemplene}% \crefname{remark}{Bemerkning}{Bemerkningene}% \crefname{note}{Note}{Notene}% \crefname{algorithm}{Algoritme}{Algoritmene}% \crefname{listing}{Opplisting}{Opplistingene}% \crefname{line}{Linje}{Linjene}% % \else% \crefname{equation}{likning}{likningene}% \crefname{figure}{figur}{figurene}% \crefname{subfigure}{figur}{figurene}% \crefname{table}{tabell}{tabellene}% \crefname{subtable}{tabell}{tabellene}% \crefname{page}{side}{siden}% \crefname{part}{del}{delene}% \crefname{chapter}{kapittel}{kapitlene}% \crefname{section}{avsnitt}{avsnittene}% \crefname{subsection}{avsnitt}{avsnittene}% \crefname{subsubsection}{avsnitt}{avsnittene}% \crefname{appendix}{tillegg}{tilleggene}% \crefname{subappendix}{tillegg}{tilleggene}% \crefname{subsubappendix}{tillegg}{tilleggene}% \crefname{subsubsubappendix}{tillegg}{tilleggene}% \crefname{enumi}{punkt}{punktene}% \crefname{enumii}{punkt}{punktene}% \crefname{enumiii}{punkt}{punktene}% \crefname{enumiv}{punkt}{punktene}% \crefname{enumv}{punkt}{punktene}% \crefname{footnote}{fotnote}{fotnotene}% \crefname{theorem}{teorem}{teoremene}% \crefname{lemma}{lemma}{lemma}% \crefname{corollary}{korollar}{korollarene}% \crefname{proposition}{p\aa stand}{p\aa standene}% \crefname{definition}{definisjon}{definisjonene}% \crefname{result}{resultat}{resultatene}% \crefname{example}{eksempel}{eksemplene}% \crefname{remark}{bemerkning}{bemerkningene}% \crefname{note}{note}{notene}% \crefname{algorithm}{algoritme}{algoritmene}% \crefname{listing}{opplisting}{opplistingene}% \crefname{line}{linje}{linjene}% \fi}% end \cref@loadlanguagedefs \DeclareOption{danish}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ til\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ og\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ og\nobreakspace}% \def\crefpairgroupconjunction@preamble{ og\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ og\nobreakspace}% % \Crefname@preamble{equation}{Ligning}{Ligninger}% \Crefname@preamble{figure}{Figur}{Figurer}% \Crefname@preamble{table}{Tabel}{Tabeller}% \Crefname@preamble{page}{Side}{Sider}% \Crefname@preamble{part}{Del}{Dele}% \Crefname@preamble{chapter}{Kapitel}{Kapitler}% \Crefname@preamble{section}{Afsnit}{Afsnit}% \Crefname@preamble{appendix}{Appendiks}{Appendiks}% \Crefname@preamble{enumi}{Punkt}{Punkter}% \Crefname@preamble{footnote}{Fodnote}{Fodnoter}% \Crefname@preamble{theorem}{Teorem}{Teoremer}% \Crefname@preamble{lemma}{Lemma}{Lemma}% \Crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \Crefname@preamble{proposition}{Udsagn}{Udsagn}% \Crefname@preamble{definition}{Definition}{Definitioner}% \Crefname@preamble{result}{Resultat}{Resultater}% \Crefname@preamble{example}{Eksempel}{Eksempler}% \Crefname@preamble{remark}{Bem\ae rkning}{Bem\ae rkninger}% \Crefname@preamble{note}{Note}{Noter}% \Crefname@preamble{algorithm}{Algoritme}{Algoritmer}% \Crefname@preamble{line}{Linje}{Linjer}% % \if@cref@capitalise% \crefname@preamble{equation}{Ligning}{Ligninger}% \crefname@preamble{figure}{Figur}{Figurer}% \crefname@preamble{table}{Tabel}{Tabeller}% \crefname@preamble{page}{Side}{Sider}% \crefname@preamble{part}{Del}{Dele}% \crefname@preamble{chapter}{Kapitel}{Kapitler}% \crefname@preamble{section}{Afsnit}{Afsnit}% \crefname@preamble{appendix}{Appendiks}{Appendiks}% \crefname@preamble{enumi}{Punkt}{Punkter}% \crefname@preamble{footnote}{Fodnote}{Fodnoter}% \crefname@preamble{theorem}{Teorem}{Teoremer}% \crefname@preamble{lemma}{Lemma}{Lemma}% \crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \crefname@preamble{proposition}{Udsagn}{Udsagn}% \crefname@preamble{definition}{Definition}{Definitioner}% \crefname@preamble{result}{Resultat}{Resultater}% \crefname@preamble{example}{Eksempel}{Eksempler}% \crefname@preamble{remark}{Bem\ae rkning}{Bem\ae rkninger}% \crefname@preamble{note}{Note}{Noter}% \crefname@preamble{algorithm}{Algoritme}{Algoritmer}% \crefname@preamble{line}{Linje}{Linjer}% % \else% \crefname@preamble{equation}{ligning}{ligninger}% \crefname@preamble{figure}{figur}{figurer}% \crefname@preamble{table}{tabel}{tabeller}% \crefname@preamble{page}{side}{sider}% \crefname@preamble{part}{del}{dele}% \crefname@preamble{chapter}{kapitel}{kapitler}% \crefname@preamble{section}{afsnit}{afsnit}% \crefname@preamble{appendix}{appendiks}{appendiks}% \crefname@preamble{enumi}{punkt}{punkter}% \crefname@preamble{footnote}{fodnote}{fodnoter}% \crefname@preamble{theorem}{teorem}{teoremer}% \crefname@preamble{lemma}{lemma}{lemma}% \crefname@preamble{corollary}{f\o lgeslutning}{f\o lgeslutninger}% \crefname@preamble{proposition}{udsagn}{udsagn}% \crefname@preamble{definition}{definition}{definitioner}% \crefname@preamble{result}{resultat}{resultater}% \crefname@preamble{example}{eksempel}{eksempler}% \crefname@preamble{remark}{bem\ae rkning}{bem\ae rkninger}% \crefname@preamble{note}{note}{noter}% \crefname@preamble{algorithm}{algoritme}{algoritmer}% \crefname@preamble{line}{linje}{linjer}% \fi% \def\cref@language{danish}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{danish}{% \PackageInfo{cleveref}{loaded `danish' language definitions} \renewcommand{\crefrangeconjunction@preamble}{ til\nobreakspace}% \renewcommand\crefrangepreconjunction@preamble{}% \renewcommand\crefrangepostconjunction@preamble{}% \renewcommand{\crefpairconjunction@preamble}{ og\nobreakspace}% \renewcommand{\crefmiddleconjunction@preamble}{, }% \renewcommand{\creflastconjunction@preamble}{ og\nobreakspace}% \renewcommand{\crefpairgroupconjunction@preamble}{ og\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction@preamble}{, }% \renewcommand{\creflastgroupconjunction@preamble}{ og\nobreakspace}% % \Crefname{equation}{Ligning}{Ligninger}% \Crefname{figure}{Figur}{Figurer}% \Crefname{subfigure}{Figur}{Figurer}% \Crefname{table}{Tabel}{Tabeller}% \Crefname{subtable}{Tabel}{Tabeller}% \Crefname{page}{Side}{Sider}% \Crefname{part}{Del}{Dele}% \Crefname{chapter}{Kapitel}{Kapitler}% \Crefname{section}{Afsnit}{Afsnit}% \Crefname{subsection}{Afsnit}{Afsnit}% \Crefname{subsubsection}{Afsnit}{Afsnit}% \Crefname{appendix}{Appendiks}{Appendiks}% \Crefname{subappendix}{Appendiks}{Appendiks}% \Crefname{subsubappendix}{Appendiks}{Appendiks}% \Crefname{subsubsubappendix}{Appendiks}{Appendiks}% \Crefname{enumi}{Punkt}{Punkter}% \Crefname{enumii}{Punkt}{Punkter}% \Crefname{enumiii}{Punkt}{Punkter}% \Crefname{enumiv}{Punkt}{Punkter}% \Crefname{enumv}{Punkt}{Punkter}% \Crefname{footnote}{Fodnote}{Fodnoter}% \Crefname{theorem}{Teorem}{Teoremer}% \Crefname{lemma}{Lemma}{Lemma}% \Crefname{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \Crefname{proposition}{Udsagn}{Udsagn}% \Crefname{definition}{Definition}{Definitioner}% \Crefname{result}{Resultat}{Resultater}% \Crefname{example}{Eksempel}{Eksempler}% \Crefname{remark}{Bem\ae rkning}{Bem\ae rkninger}% \Crefname{note}{Note}{Noter}% \Crefname{algorithm}{Algoritme}{Algoritmer}% \Crefname{line}{Linje}{Linjer}% % \if@cref@capitalise% \crefname{equation}{Ligning}{Ligninger}% \crefname{figure}{Figur}{Figurer}% \crefname{subfigure}{Figur}{Figurer}% \crefname{table}{Tabel}{Tabeller}% \crefname{subtable}{Tabel}{Tabeller}% \crefname{page}{Side}{Sider}% \crefname{part}{Del}{Dele}% \crefname{chapter}{Kapitel}{Kapitler}% \crefname{section}{Afsnit}{Afsnit}% \crefname{subsection}{Afsnit}{Afsnit}% \crefname{subsubsection}{Afsnit}{Afsnit}% \crefname{appendix}{Appendiks}{Appendiks}% \crefname{subappendix}{Appendiks}{Appendiks}% \crefname{subsubappendix}{Appendiks}{Appendiks}% \crefname{subsubsubappendix}{Appendiks}{Appendiks}% \crefname{enumi}{Punkt}{Punkter}% \crefname{enumii}{Punkt}{Punkter}% \crefname{enumiii}{Punkt}{Punkter}% \crefname{enumiv}{Punkt}{Punkter}% \crefname{enumv}{Punkt}{Punkter}% \crefname{footnote}{Fodnote}{Fodnoter}% \crefname{theorem}{Teorem}{Teoremer}% \crefname{lemma}{Lemma}{Lemma}% \crefname{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \crefname{proposition}{Udsagn}{Udsagn}% \crefname{definition}{Definition}{Definitioner}% \crefname{result}{Resultat}{Resultater}% \crefname{example}{Eksempel}{Eksempler}% \crefname{remark}{Bem\ae rkning}{Bem\ae rkninger}% \crefname{note}{Note}{Noter}% \crefname{algorithm}{Algoritme}{Algoritmer}% \crefname{line}{Linje}{Linjer}% % \else% \crefname{equation}{ligning}{ligninger}% \crefname{figure}{figur}{figurer}% \crefname{subfigure}{figur}{figurer}% \crefname{table}{tabel}{tabeller}% \crefname{subtable}{tabel}{tabeller}% \crefname{page}{side}{sider}% \crefname{part}{del}{dele}% \crefname{chapter}{kapitel}{kapitler}% \crefname{section}{afsnit}{afsnit}% \crefname{subsection}{afsnit}{afsnit}% \crefname{subsubsection}{afsnit}{afsnit}% \crefname{appendix}{appendiks}{appendiks}% \crefname{subappendix}{appendiks}{appendiks}% \crefname{subsubappendix}{appendiks}{appendiks}% \crefname{subsubsubappendix}{appendiks}{appendiks}% \crefname{enumi}{punkt}{punkter}% \crefname{enumii}{punkt}{punkter}% \crefname{enumiii}{punkt}{punkter}% \crefname{enumiv}{punkt}{punkter}% \crefname{enumv}{punkt}{punkter}% \crefname{footnote}{fodnote}{fodnoter}% \crefname{theorem}{teorem}{teoremer}% \crefname{lemma}{lemma}{lemma}% \crefname{corollary}{f\o lgeslutning}{f\o lgeslutninger}% \crefname{proposition}{udsagn}{udsagn}% \crefname{definition}{definition}{definitioner}% \crefname{result}{resultat}{resultater}% \crefname{example}{eksempel}{eksempler}% \crefname{remark}{bem\ae rkning}{bem\ae rkninger}% \crefname{note}{note}{noter}% \crefname{algorithm}{algoritme}{algoritmer}% \crefname{line}{linje}{linjer}% \fi}% end \cref@loadlanguagedefs \DeclareOption{esperanto}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ \^gis\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ kaj\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ kaj\nobreakspace}% \def\crefpairgroupconjunction@preamble{ kaj\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ kaj\nobreakspace}% \Crefname@preamble{equation}{Ekvacio}{Ekvacioj}% \Crefname@preamble{part}{Parto}{Partoj}% \Crefname@preamble{chapter}{\^Capitro}{\^Capitroj}% \Crefname@preamble{section}{Sekcio}{Sekcioj}% \Crefname@preamble{appendix}{Aldono}{Aldonoj}% \Crefname@preamble{enumi}{Punkto}{Punktoj}% \Crefname@preamble{footnote}{Piednoto}{Piednotoj}% \Crefname@preamble{figure}{Figuro}{Figuroj}% \Crefname@preamble{table}{Tabelo}{Tabeloj}% \Crefname@preamble{theorem}{Teoremo}{Teoremoj}% \Crefname@preamble{lemma}{Lemo}{Lemoj}% \Crefname@preamble{corollary}{Korolario}{Korolarioj}% \Crefname@preamble{proposition}{Propozicio}{Propozicioj}% \Crefname@preamble{definition}{Defino}{Definoj}% \Crefname@preamble{result}{Rezulto}{Rezultoj}% \Crefname@preamble{example}{Ekzemplo}{Ekzemploj}% \Crefname@preamble{remark}{Rimarko}{Rimarkoj}% \Crefname@preamble{note}{Noto}{Notoj}% \Crefname@preamble{algorithm}{Algoritmo}{Algoritmoj}% \Crefname@preamble{listing}{Listado}{Listadoj}% \Crefname@preamble{line}{Linio}{Linioj}% \if@cref@capitalise% \crefname@preamble{equation}{Ekvacio}{Ekvacioj}% \crefname@preamble{part}{Parto}{Partoj}% \crefname@preamble{chapter}{\^Capitro}{\^Capitroj}% \crefname@preamble{section}{Sekcio}{Sekcioj}% \crefname@preamble{appendix}{Aldono}{Aldonoj}% \crefname@preamble{enumi}{Punkto}{Punktoj}% \crefname@preamble{footnote}{Piednoto}{Piednotoj}% \crefname@preamble{figure}{Figuro}{Figuroj}% \crefname@preamble{table}{Tabelo}{Tabeloj}% \crefname@preamble{theorem}{Teoremo}{Teoremoj}% \crefname@preamble{lemma}{Lemo}{Lemoj}% \crefname@preamble{corollary}{Korolario}{Korolarioj}% \crefname@preamble{proposition}{Propozicio}{Propozicioj}% \crefname@preamble{definition}{Defino}{Definoj}% \crefname@preamble{result}{Rezulto}{Rezultoj}% \crefname@preamble{example}{Ekzemplo}{Ekzemploj}% \crefname@preamble{remark}{Rimarko}{Rimarkoj}% \crefname@preamble{note}{Noto}{Notoj}% \crefname@preamble{algorithm}{Algoritmo}{Algoritmoj}% \crefname@preamble{listing}{Listado}{Listadoj}% \crefname@preamble{line}{Linio}{Linioj}% \else% \crefname@preamble{equation}{ekvacio}{ekvacioj}% \crefname@preamble{part}{parto}{partoj}% \crefname@preamble{chapter}{\^capitro}{\^capitroj}% \crefname@preamble{section}{sekcio}{sekcioj}% \crefname@preamble{appendix}{aldono}{aldonoj}% \crefname@preamble{enumi}{punkto}{punktoj}% \crefname@preamble{footnote}{piednoto}{piednotoj}% \crefname@preamble{figure}{figuro}{figuroj}% \crefname@preamble{table}{tabelo}{tabeloj}% \crefname@preamble{theorem}{teoremo}{teoremoj}% \crefname@preamble{lemma}{lemo}{lemoj}% \crefname@preamble{corollary}{korolario}{korolarioj}% \crefname@preamble{proposition}{propozicio}{propozicioj}% \crefname@preamble{definition}{defino}{definoj}% \crefname@preamble{result}{rezulto}{rezultoj}% \crefname@preamble{example}{ekzemplo}{ekzemploj}% \crefname@preamble{remark}{rimarko}{rimarkoj}% \crefname@preamble{note}{noto}{notoj}% \crefname@preamble{algorithm}{algoritmo}{algoritmoj}% \crefname@preamble{listing}{listado}{listadoj}% \crefname@preamble{line}{linio}{linioj}% \fi% \def\cref@language{esperanto}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{esperanto}{% \PackageInfo{cleveref}{loaded `esperanto' language definitions} \renewcommand{\crefrangeconjunction}{ \^gis\nobreakspace}% \renewcommand{\crefrangepreconjunction}{}% \renewcommand{\crefrangepostconjunction}{}% \renewcommand{\crefpairconjunction}{ kaj\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ kaj\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ kaj\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ kaj\nobreakspace}% \Crefname{equation}{Ekvacio}{Ekvacioj}% \Crefname{part}{Parto}{Partoj}% \Crefname{chapter}{\^Capitro}{\^Capitroj}% \Crefname{section}{Sekcio}{Sekcioj}% \Crefname{appendix}{Aldono}{Aldonoj}% \Crefname{enumi}{Punkto}{Punktoj}% \Crefname{footnote}{Piednoto}{Piednotoj}% \Crefname{figure}{Figuro}{Figuroj}% \Crefname{table}{Tabelo}{Tabeloj}% \Crefname{theorem}{Teoremo}{Teoremoj}% \Crefname{lemma}{Lemo}{Lemoj}% \Crefname{corollary}{Korolario}{Korolarioj}% \Crefname{proposition}{Propozicio}{Propozicioj}% \Crefname{definition}{Defino}{Definoj}% \Crefname{result}{Rezulto}{Rezultoj}% \Crefname{example}{Ekzemplo}{Ekzemploj}% \Crefname{remark}{Rimarko}{Rimarkoj}% \Crefname{note}{Noto}{Notoj}% \Crefname{algorithm}{Algoritmo}{Algoritmoj}% \Crefname{listing}{Listado}{Listadoj}% \Crefname{line}{Linio}{Linioj}% \if@cref@capitalise% \crefname{equation}{Ekvacio}{Ekvacioj}% \crefname{part}{Parto}{Partoj}% \crefname{chapter}{\^Capitro}{\^Capitroj}% \crefname{section}{Sekcio}{Sekcioj}% \crefname{appendix}{Aldono}{Aldonoj}% \crefname{enumi}{Punkto}{Punktoj}% \crefname{footnote}{Piednoto}{Piednotoj}% \crefname{figure}{Figuro}{Figuroj}% \crefname{table}{Tabelo}{Tabeloj}% \crefname{theorem}{Teoremo}{Teoremoj}% \crefname{lemma}{Lemo}{Lemoj}% \crefname{corollary}{Korolario}{Korolarioj}% \crefname{proposition}{Propozicio}{Propozicioj}% \crefname{definition}{Defino}{Definoj}% \crefname{result}{Rezulto}{Rezultoj}% \crefname{example}{Ekzemplo}{Ekzemploj}% \crefname{remark}{Rimarko}{Rimarkoj}% \crefname{note}{Noto}{Notoj}% \crefname{algorithm}{Algoritmo}{Algoritmoj}% \crefname{listing}{Listado}{Listadoj}% \crefname{line}{Linio}{Linioj}% \else% \crefname{equation}{ekvacio}{ekvacioj}% \crefname{part}{parto}{partoj}% \crefname{chapter}{\^capitro}{\^capitroj}% \crefname{section}{sekcio}{sekcioj}% \crefname{appendix}{aldono}{aldonoj}% \crefname{enumi}{punkto}{punktoj}% \crefname{footnote}{piednoto}{piednotoj}% \crefname{figure}{figuro}{figuroj}% \crefname{table}{tabelo}{tabeloj}% \crefname{theorem}{teoremo}{teoremoj}% \crefname{lemma}{lemo}{lemoj}% \crefname{corollary}{korolario}{korolarioj}% \crefname{proposition}{propozicio}{propozicioj}% \crefname{definition}{defino}{definoj}% \crefname{result}{rezulto}{rezultoj}% \crefname{example}{ekzemplo}{ekzemploj}% \crefname{remark}{rimarko}{rimarkoj}% \crefname{note}{noto}{notoj}% \crefname{algorithm}{algoritmo}{algoritmoj}% \crefname{listing}{listado}{listadoj}% \crefname{line}{linio}{linioj}% \fi}% end \cref@loadlanguagedefs hevea-2.09/count.ml0000644004317100512160000000214312017660721014246 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Map extension for counting occurrences *) module type S = sig type key type count val empty : count val incr : key -> count -> count val fold : (key -> int -> 'b -> 'b) -> count -> 'b -> 'b end module Make(K:Map.OrderedType) = struct include Map.Make(K) type count = int t let incr k m = let v = try find k m with Not_found -> 0 in add k (v+1) m end hevea-2.09/multind.hva0000644004317100512160000000037007055235155014745 0ustar marangetcristal\usepackage{index} \renewcommand{\makeindex}[1]{\newindex{#1}{#1}{#1.hind}{Index}} \let\oldprintindex=\printindex \renewcommand{\printindex}[2]{\@indexname[#1]{#2}\oldprintindex[#1]} \let\oldindex=\index \renewcommand{\index}[2]{\oldindex[#1]{#2}} hevea-2.09/lexstate.mli0000644004317100512160000001164512017660721015127 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type action = | Subst of string list | Toks of string list | CamlCode of (Lexing.lexbuf -> unit) val pretty_body : out_channel -> string list -> unit val body_to_string : string list -> string val pretty_action : action -> unit val is_empty_list : string list -> bool type pat = string list * string list val pretty_pat : pat -> unit val is_subst : action -> bool val latex_pat: string list -> int -> pat val zero_pat : pat val one_pat : pat type subst type 'a arg = {arg : 'a ; subst : subst } val mkarg : 'a -> subst -> 'a arg val string_to_arg : 'a -> 'a arg val top_subst : subst val get_subst : unit -> subst exception Error of string type alltt = Not | Inside | Macro val effective : alltt -> bool val raw_chars : bool ref val display : bool ref val in_math : bool ref val alltt : alltt ref val whitepre: bool ref val optarg : bool ref val styleloaded : bool ref val activebrace : bool ref val html : bool ref val text : bool ref val alltt_loaded : bool ref val is_plain : char -> bool val set_plain : char -> unit val unset_plain : char -> unit val plain_back : bool -> char -> unit val withinLispComment : bool ref val afterLispCommentNewlines : int ref type case = Upper | Lower | Neutral val case : case ref type closenv val top_level : unit -> bool val is_top : subst -> bool val prerr_args : unit -> unit val full_pretty_subst : subst -> unit val pretty_lexbuf : Lexing.lexbuf -> unit val scan_arg : (string list arg -> 'a) -> int -> 'a val scan_body : (action -> 'a) -> action -> subst -> 'a val stack_lexbuf : Lexing.lexbuf MyStack.t val previous_lexbuf : unit -> Lexing.lexbuf val record_lexbuf : Lexing.lexbuf -> subst -> unit val top_lexstate : unit -> bool (* Saving and restoring lexstates on a stack *) val protect_save_string : (Lexing.lexbuf -> string) -> Lexing.lexbuf -> string val save_lexstate : unit -> unit val restore_lexstate : unit -> unit val start_lexstate : unit -> unit val start_lexstate_subst : subst -> unit (* Total checkpoint of lexstate *) type saved_lexstate val check_lexstate : unit -> saved_lexstate val hot_lexstate : saved_lexstate -> unit val flushing : bool ref val stack_in_math : bool MyStack.t val stack_display : bool MyStack.t val stack_alltt : alltt MyStack.t val start_normal: subst -> unit val end_normal : unit -> unit (* Super/Sub-script parsing *) type sup_sub = { limits : Misc.limits option; sup : string arg; sub : string arg; } val unoption : string arg option -> string arg val save_sup_sub : Lexing.lexbuf -> sup_sub val save_sup : Lexing.lexbuf -> string arg option val save_sub : Lexing.lexbuf -> string arg option (* Give next char in entry, may raise Not_found, if no next char is available *) val full_peek_char : Lexing.lexbuf -> char (* Argument parsing *) type ok = | No of string | Yes of string list val from_ok : ok arg -> string list arg val save_arg : Lexing.lexbuf -> string arg val save_body : Lexing.lexbuf -> string list arg val save_filename : Lexing.lexbuf -> string arg val save_verbatim : Lexing.lexbuf -> string arg val save_opt : string -> Lexing.lexbuf -> string list arg val save_opts : string list -> Lexing.lexbuf -> ok arg list val save_arg_with_delim : string -> Lexing.lexbuf -> string arg val save_xy_arg : Lexing.lexbuf -> string arg val save_cite_arg : Lexing.lexbuf -> (string list) arg val pretty_ok : ok -> string val skip_opt : Lexing.lexbuf -> unit val skip_csname : Lexing.lexbuf -> unit val make_stack : string -> pat -> Lexing.lexbuf -> subst val scan_this : (Lexing.lexbuf -> 'a ) -> string -> 'a val scan_this_list : (Lexing.lexbuf -> 'a ) -> string list -> 'a val scan_this_arg : (Lexing.lexbuf -> 'a ) -> string arg -> 'a val scan_this_arg_list : (Lexing.lexbuf -> 'a ) -> string list arg -> 'a val scan_this_may_cont : (Lexing.lexbuf -> 'a ) -> Lexing.lexbuf -> subst -> string arg -> 'a val scan_this_list_may_cont : (Lexing.lexbuf -> 'a ) -> Lexing.lexbuf -> subst -> string list arg -> 'a val real_input_file : int -> (Lexing.lexbuf -> unit) -> string -> in_channel -> unit val input_file : int -> (Lexing.lexbuf -> unit) -> string -> unit val register_cell : string -> bool ref -> unit val unregister_cell : string -> unit type saved val checkpoint : unit -> saved val hot_start : saved -> unit hevea-2.09/esp.ml0000644004317100512160000001611012124017612013676 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open Printf open Mysys exception Failed module type Config = sig val pess : bool val move : bool end module Make(C:Config) = struct let input_protect f name = try let chan = open_in name in try let r = f chan in begin try close_in chan with _ -> () end ; r with e -> begin try close_in chan with _ -> () end ; raise e with | Sys_error _msg as e -> raise e let output_protect f name = try let chan = open_out name in try let r = f chan in begin try close_out chan with _ -> () end ; r with e -> begin try close_out chan with _ -> () end ; raise e with | Sys_error _msg as e -> raise e let lex_this vdef f name = try input_protect (fun input -> let lexbuf = Lexing.from_channel input in Location.set name lexbuf ; Emisc.reset () ; let r = f lexbuf in Location.restore () ; r) name with | Emisc.LexError s -> if !Emisc.verbose > 0 then output_char stderr '\n' ; Location.print_fullpos () ; Printf.fprintf stderr "Lexer error: %s\n" s ; Location.restore () ; vdef | Sys_error _ as e -> raise e | e -> Location.restore () ; raise e let lex_this_out vdef f name_in name_out = try input_protect (fun input -> let lexbuf = Lexing.from_channel input in Location.set name_in lexbuf ; Emisc.reset () ; output_protect (fun out -> let r = f out lexbuf in Location.restore () ; r) name_out) name_in with | Emisc.LexError s -> if !Emisc.verbose > 0 then output_char stderr '\n' ; Location.print_fullpos () ; Printf.fprintf stderr "Lexer error: %s\n" s ; Location.restore () ; vdef | Sys_error _ as e -> raise e | e -> Location.restore () ; raise e let process cls in_name input output = let rec do_rec lexbuf = match Htmlparse.main cls lexbuf with | [] -> () | ts -> if C.pess then Pp.trees output (Explode.trees ts) else Ultra.main output ts ; do_rec lexbuf in try let lexbuf = Lexing.from_channel input in Location.set in_name lexbuf ; Emisc.reset () ; do_rec lexbuf ; Location.restore () ; true with | Emisc.LexError s -> if !Emisc.verbose > 0 then output_char stderr '\n' ; Location.print_fullpos () ; Printf.fprintf stderr "Lexer error: %s\n" s ; Location.restore () ; false | Htmlparse.Error s -> if !Emisc.verbose > 0 then output_char stderr '\n' ; Location.print_fullpos () ; Printf.fprintf stderr "Parser error: %s\n" s ; Htmllex.ptop () ; Htmllex.reset () ; Location.restore () ; false | e -> Location.restore () ; raise e let classes in_name input = try let lexbuf = Lexing.from_channel input in Location.set in_name lexbuf ; Emisc.reset () ; let cls = Htmllex.classes lexbuf in Location.restore () ; Some cls with | Emisc.LexError s -> if !Emisc.verbose > 0 then output_char stderr '\n' ; Location.print_fullpos () ; Printf.fprintf stderr "Lexer error: %s\n" s ; Location.restore () ; None | e -> Location.restore () ; raise e let chop_extension name = try Filename.chop_extension name with Invalid_argument _ -> name let do_mk_out name ext = Filename.concat (Filename.dirname name) (chop_extension (Filename.basename name) ^ ext) let mk_out in_name = do_mk_out in_name ".tmp" and mk_esp in_name = do_mk_out in_name ".esp" let read_size name = input_protect in_channel_length name (* Move output file to final destination if optimiser yields some gain *) let check_output ok in_name out_name = let final_name = if ok then begin let size_in = read_size in_name and size_out = read_size out_name in let final_name = if size_in > size_out then begin let dst = if C.move then in_name else mk_esp in_name in rename out_name dst ; dst end else begin remove out_name ; in_name end in if !Emisc.verbose > 0 then begin eprintf "Optimized %s: %d -> %d, %0.2f%%\n" final_name size_in size_out ((float (size_in-size_out) *. 100.0) /. float size_in) end ; final_name end else begin remove out_name ; in_name end in final_name let phase1 in_name = let out_name = mk_out in_name in begin try let input = open_in in_name in let cls = if C.pess then None else try classes in_name input with e -> close_in input ; raise e in close_in input ; let input = open_in in_name in let out = try open_out out_name with Sys_error _ as e -> close_in input ; raise e in let ok = try process cls in_name input out with e -> close_in input ; close_out out ; raise e in close_in input ; close_out out ; check_output ok in_name out_name with | Sys_error msg -> Printf.fprintf stderr "File error: %s\n" msg ; in_name | e -> remove out_name ; raise e end let phase2 name = try let open Emisc in let sts = lex_this StringCount.empty Lexstyle.get name in let m,_ = StringCount.fold (fun st nocc (m,n as p) -> let withclass = 8 + String.length st + nocc * 4 and noclass = nocc * String.length st in if withclass < noclass then let cl = sprintf "c%03i" n in StringMap.add st cl m,n+1 else p) sts (StringMap.empty,0) in if !Emisc.verbose > 1 then begin eprintf "New classes:\n" ; StringMap.iter (fun st cl -> Emisc.dump_class stderr cl st) m ; () end ; let out_name = mk_out name in let ok = lex_this_out false (fun out lexbuf -> Lexstyle.set m out lexbuf) name out_name in check_output ok name out_name with | Sys_error msg -> Printf.fprintf stderr "File error: %s\n" msg ; name let file name = if !Emisc.verbose > 0 then begin Printf.fprintf stderr "Optimizing file: %s...\n%!" name end ; let name = phase1 name in if not C.pess then ignore (phase2 name) end hevea-2.09/htmlMath.ml0000644004317100512160000003441612017660721014704 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let header = "$Id: htmlMath.ml,v 1.49 2012-06-05 14:55:39 maranget Exp $" open Misc open Parse_opts open HtmlCommon open MyStack let delay_stack = MyStack.create "delay_stack" (* delaying output .... *) let delay f = if !verbose > 2 then prerr_flags "=> delay" ; push stacks.s_vsize flags.vsize ; flags.vsize <- 0; push delay_stack f ; open_block DELAY "" ; if !verbose > 2 then prerr_flags "<= delay" let flush x = if !verbose > 2 then prerr_flags ("=> flush arg is ``"^string_of_int x^"''"); try_close_block DELAY ; let ps,_,pout = pop_out out_stack in if ps <> DELAY then raise (Misc.Fatal ("html: Flush attempt on: "^string_of_block ps)) ; let mods = as_envs !cur_out.active !cur_out.pending in do_close_mods () ; let old_out = !cur_out in cur_out := pout ; let f = pop delay_stack in f x ; Out.copy old_out.out !cur_out.out ; flags.empty <- false ; flags.blank <- false ; !cur_out.pending <- mods ; flags.vsize <- max (pop stacks.s_vsize) flags.vsize ; if !verbose > 2 then prerr_flags "<= flush" (* put functions *) let put = HtmlCommon.put and put_char = HtmlCommon.put_char let put_in_math s = if flags.in_pre && !pedantic then put s else begin put ""; put s; put ""; flags.empty <- false; flags.blank <- false; end (*----------*) (* DISPLAYS *) (*----------*) let display_cell_arg tdarg = let arg = if !displayverb then "class=\"vdcell\"" else "class=\"dcell\"" in match tdarg with | "" -> arg | _ -> arg ^ " " ^ tdarg let open_display_cell tdarg = open_block TD (display_cell_arg tdarg) let begin_item_display f is_freeze = if !verbose > 2 then begin Printf.fprintf stderr "begin_item_display: ncols=%d empty=%s" flags.ncols (sbool flags.empty) ; prerr_newline () end ; open_display_cell "" ; open_block DFLOW "" ; if is_freeze then freeze f and end_item_display () = let f,is_freeze = pop_freeze () in let _ = close_flow_loc check_empty DFLOW in if close_flow_loc check_empty TD then flags.ncols <- flags.ncols + 1; if !verbose > 2 then begin Printf.fprintf stderr "end_item_display: ncols=%d stck: " flags.ncols; pretty_stack out_stack end; flags.vsize,f,is_freeze (******************************************************** * * * To open display with vertical alignment arguments * * * *********************************************************) let open_display_varg centering varg = if !verbose > 2 then begin Printf.fprintf stderr "open_display: " end ; try_open_display () ; open_block (DISPLAY centering) varg ; open_display_cell "" ; open_block DFLOW "" ; if !verbose > 2 then begin pretty_cur !cur_out ; prerr_endline "" end (* let open_display_varg_harg centering varg harg = if !verbose > 2 then begin Printf.fprintf stderr "open_display: " end ; try_open_display () ; open_block (DISPLAY centering) (varg^harg); open_display_cell "" ; open_block DFLOW "" ; if !verbose > 2 then begin pretty_cur !cur_out ; prerr_endline "" end *) let open_display centering = open_display_varg centering "style=\"vertical-align:middle\"" (* argument force forces the display structure, when false, the TABLE/TR/TD may be spared in two situation 1. No display cell at all (n=0) 2. One display cell, one empty cell *) let close_display force = if !verbose > 2 then begin prerr_flags "=> close_display " ; pretty_stack out_stack ; Out.debug stderr !cur_out.out end ; if not (flush_freeze ()) then begin close_flow DFLOW ; if !verbose > 3 then begin Printf.eprintf "Just closed DFLOW " ; pretty_stack out_stack ; Out.debug stderr !cur_out.out end ; let n = flags.ncols in if !verbose > 2 then Printf.fprintf stderr "=> close_display, ncols=%d\n" n ; if (n = 0 && not flags.blank && not force) then begin if !verbose > 2 then begin prerr_string "No Display n=0" ; (Out.debug stderr !cur_out.out); prerr_endline "" end; let active = !cur_out.active and pending = !cur_out.pending in do_close_mods () ; let ps,_,_pout = pop_out out_stack in if ps <> TD then failclose "close_display" ps TD ; do_close_mods () ; try_close_block TD ; let ps,_,ppout = pop_out out_stack in begin match ps with | DISPLAY _ -> () | _ -> failclose "close_display" ps (DISPLAY false) end; try_close_block ps ; let old_out = !cur_out in cur_out := ppout ; do_close_mods () ; Out.copy old_out.out !cur_out.out ; flags.empty <- false ; flags.blank <- false ; !cur_out.pending <- as_envs active pending end else if (n=1 && flags.blank && not force) then begin if !verbose > 2 then begin prerr_string "No display n=1"; (Out.debug stderr !cur_out.out); prerr_endline "" ; end; close_flow FORGET ; let active = !cur_out.active and pending = !cur_out.pending in let ps,_,pout = pop_out out_stack in begin match ps with | DISPLAY _ -> () | _ -> failclose "close_display" ps (DISPLAY false) end ; try_close_block ps ; let old_out = !cur_out in cur_out := pout ; do_close_mods () ; Out.copy_no_tag old_out.out !cur_out.out ; flags.empty <- false ; flags.blank <- false ; !cur_out.pending <- as_envs active pending end else begin if !verbose > 2 then begin prerr_string ("One Display n="^string_of_int n) ; (Out.debug stderr !cur_out.out); prerr_endline "" end; flags.empty <- flags.blank ; close_flow TD ; close_flow (DISPLAY false) end ; try_close_display () end ; if !verbose > 2 then prerr_flags ("<= close_display") let do_item_display force = if !verbose > 2 then begin prerr_endline ("Item Display ncols="^string_of_int flags.ncols^" table_inside="^sbool flags.table_inside^", force="^sbool force) ; pretty_stack out_stack end ; if (force && not flags.empty) || flags.table_inside then begin let f,is_freeze = pop_freeze () in push stacks.s_saved_inside (pop stacks.s_saved_inside || flags.table_inside) ; flags.table_inside <- false ; let active = !cur_out.active and pending = !cur_out.pending in flags.ncols <- flags.ncols + 1 ; close_flow DFLOW ; close_flow TD ; if !verbose > 2 then begin prerr_endline "Added Item to Display" ; Out.debug stderr !cur_out.out ; end; open_display_cell "" ; open_block DFLOW "" ; !cur_out.pending <- as_envs active pending ; !cur_out.active <- [] ; if is_freeze then push out_stack (Freeze f) end else begin if !verbose > 2 then begin Out.debug stderr !cur_out.out ; prerr_endline "No Item" ; prerr_endline ("flags: empty="^sbool flags.empty^" blank="^sbool flags.blank) end end let item_display () = do_item_display false and force_item_display () = do_item_display true let erase_display () = erase_block DFLOW ; erase_block TD ; erase_block (DISPLAY false); try_close_display () let open_maths display = push stacks.s_in_math flags.in_math; flags.in_math <- true; open_group ""; if display then open_display true let close_maths display = (* force a table in that case, because we want to apply style class *) if display then close_display true ; close_group () ; flags.in_math <- pop stacks.s_in_math (* vertical display *) let open_vdisplay center display = if !verbose > 1 then prerr_endline "open_vdisplay"; if not display then raise (Misc.Fatal ("VDISPLAY in non-display mode")); open_block TABLE (display_arg center !verbose) and close_vdisplay () = if !verbose > 1 then prerr_endline "close_vdisplay"; close_block TABLE and open_vdisplay_row trarg tdarg = if !verbose > 1 then prerr_endline "open_vdisplay_row"; open_block TR trarg ; open_display_cell tdarg ; open_display false and close_vdisplay_row () = if !verbose > 1 then prerr_endline "close_vdisplay_row"; close_display false ; force_block TD " " ; close_block TR (* Sup/Sub stuff *) let put_sup_sub display scanner (arg : string Lexstate.arg) = if display then open_display false else open_block INTERN "" ; scanner arg ; if display then close_display false else close_block INTERN let reput_sup_sub tag = function | "" -> () | s -> open_block INTERN "" ; clearstyle () ; if not (flags.in_pre && !pedantic) then begin put_char '<' ; put tag ; put_char '>' end ; put s ; if not (flags.in_pre && !pedantic) then begin put "' end ; close_block INTERN let standard_sup_sub scanner what sup sub display = let sup,fsup = hidden_to_string (fun () -> put_sup_sub display scanner sup) in let sub,fsub = hidden_to_string (fun () -> put_sup_sub display scanner sub) in if display && (fsub.table_inside || fsup.table_inside) then begin force_item_display () ; open_vdisplay false display ; if sup <> "" then begin open_vdisplay_row "" "" ; clearstyle () ; put sup ; close_vdisplay_row () end ; open_vdisplay_row "" "" ; what (); close_vdisplay_row () ; if sub <> "" then begin open_vdisplay_row "" "" ; clearstyle () ; put sub ; close_vdisplay_row () end ; close_vdisplay () ; force_item_display () end else begin what (); reput_sup_sub "sub" sub ; reput_sup_sub "sup" sup end let limit_sup_sub scanner what sup sub display = let sup = to_string (fun () -> put_sup_sub display scanner sup) and sub = to_string (fun () -> put_sup_sub display scanner sub) in if sup = "" && sub = "" then what () else begin force_item_display () ; open_vdisplay false display ; open_vdisplay_row "" "style=\"text-align:center\"" ; put sup ; close_vdisplay_row () ; open_vdisplay_row "" "style=\"text-align:center\"" ; what () ; close_vdisplay_row () ; open_vdisplay_row "" "style=\"text-align:center\"" ; put sub ; close_vdisplay_row () ; close_vdisplay () ; force_item_display () end let int_sup_sub something vsize scanner what sup sub display = let sup = to_string (fun () -> put_sup_sub display scanner sup) and sub = to_string (fun () -> put_sup_sub display scanner sub) in if something then begin force_item_display () ; what () ; force_item_display () end ; if sup <> "" || sub <> "" then begin open_vdisplay false display ; open_vdisplay_row "" "style=\"text-align:left\"" ; put sup ; close_vdisplay_row () ; open_vdisplay_row "" "style=\"text-align:left\"" ; for _i = 2 to vsize do skip_line () done ; close_vdisplay_row () ; open_vdisplay_row "" "style=\"text-align:left\"" ; put sub ; close_vdisplay_row () ; close_vdisplay () ; force_item_display () end let insert_vdisplay open_fun = if !verbose > 2 then begin prerr_flags "=> insert_vdisplay" ; end ; try let mods = to_pending !cur_out.pending !cur_out.active in let bs,bargs,bout = pop_out out_stack in if bs <> DFLOW then failclose "insert_vdisplay" bs DFLOW ; let ps,pargs,pout = pop_out out_stack in if ps <> TD then failclose "insert_vdisplay" ps TD ; let pps,ppargs,ppout = pop_out out_stack in let center = match pps with | DISPLAY b -> b | _ -> failclose "insert_vdisplay" pps (DISPLAY false) in let new_out = create_status_from_scratch false [] in push_out out_stack (DISPLAY false,ppargs,new_out) ; push_out out_stack (ps,pargs,pout) ; push_out out_stack (bs,bargs,bout) ; close_display false ; cur_out := ppout ; let () = open_fun center in (* force bool -> unit' type *) do_put (Out.to_string new_out.out) ; flags.empty <- false ; flags.blank <- false ; if !verbose > 2 then begin prerr_string "insert_vdisplay -> " ; pretty_mods stderr mods ; prerr_newline () end ; if !verbose > 2 then prerr_flags "<= insert_vdisplay" ; mods with PopFreeze -> raise (UserError "\\over should be properly parenthesized") let line_in_vdisplay_row () = open_block TR "" ; open_block TD "class=\"hbar\"" ; (* close_mods () ; line_in_table () ; *) force_block TD "" ; force_block TR "" let over _lexbuf = let mods = insert_vdisplay (fun center -> open_vdisplay center true ; open_vdisplay_row "" "style=\"text-align:center\"") in close_vdisplay_row () ; line_in_vdisplay_row () ; open_vdisplay_row "" "style=\"text-align:center\"" ; close_mods () ; open_mods mods ; freeze (fun () -> close_vdisplay_row () ; close_vdisplay ()) (* Gestion of left and right delimiters *) let left _ k_delim k = let _,f,is_freeze = end_item_display () in delay (fun vsize -> begin_item_display (fun () -> ()) false ; k_delim vsize ; ignore (end_item_display ()) ; begin_item_display (fun () -> ()) false ; k vsize ; let _ = end_item_display () in ()) ; begin_item_display f is_freeze let right _ k_delim = let vsize,f,is_freeze = end_item_display () in begin_item_display (fun () -> ()) false ; k_delim vsize; ignore (end_item_display ()) ; flush vsize ; begin_item_display f is_freeze ; vsize hevea-2.09/keyval.hva0000644004317100512160000000021110634524554014557 0ustar marangetcristal\ProvidesPackage{keyval} \@primitives{keyval} \newcommand{\setkeys}[2] {\begin{toimage} \setkeys{#1}{#2} \end{toimage}\@setkeys{#1}{#2}} hevea-2.09/cutOut.ml0000644004317100512160000000323412202203731014371 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet MOSCOVA, INRIA Rocquencourt *) (* *) (* Copyright 2006 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) module type Config = sig val small_length : int end module Make(C:Config) = struct module Out = DoOut.Make(struct let small_length = 256 end) type t = { out : Out.t ; name : string } let get_name { name = name } = name let create name do_it = { out = do_it () ; name = name } let create_buff name = create name Out.create_buff and create_null () = create "NULL" Out.create_null and create_chan name = create name (fun () -> Out.create_chan (open_out name)) and close { out = out } = Out.close out let put { out = out } s = Out.put out s and put_char { out = out } c = Out.put_char out c and is_empty { out = out } = Out.is_empty out and to_string { out = out } = Out.to_string out and to_chan chan { out = out } = Out.to_chan chan out and copy { out = out1 } { out = out2 } = Out.copy out1 out2 and flush { out = out } = Out.flush out let debug chan { out; name; } = Printf.fprintf chan "Out=%s\n" name ; Out.debug chan out ; () end hevea-2.09/hanging.hva0000644004317100512160000000076512017660721014707 0ustar marangetcristal\ProvidesPackage{hanging} %%Basically does nothing but eating arguments \newcommand{\hangpara}[2]{} \newcounter{@hang} \newcommand{\@hang@style}[2] {\newstyle{div.hangparas#1 P}{text-indent:-#2;padding-left:#2;}} \newenvironment{hangparas}[2] {\stepcounter{@hang}% \@auxdowrite{\string\@hang@style\{\arabic{@hang}\}\{\css@length{#1}\} }% \@open{div}{class="hangparas\arabic{@hang}"}}{\@close{div}} \newenvironment{hangpunct}{}{} \newcommand{\nhpt}{.} \let\nhlq\@hevea@backquote \let\nhrq\@hevea@quote hevea-2.09/hevea.ml0000644004317100512160000001723012017700472014207 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let header = "$Id: hevea.ml,v 1.4 2011-12-07 13:05:57 maranget Exp $" open Misc open Parse_opts let scan_get_prim, scan_main, no_prelude, scan_print_env_pos, dest_finalize,image_finalize = match !Parse_opts.destination with | Html when name_in <> "" -> let module Scan = Latexscan.Make (Html) (Image) in let module MakeIt = Zyva.Make (Html) (Image) (Scan) in let module Rien = MakeIt (Videoc.Make) in let module RienBis = MakeIt (Package.Make) in let module RienTer = MakeIt (Verb.Make) in Scan.get_prim, Scan.main, Scan.no_prelude, Scan.print_env_pos, Html.finalize, Image.finalize | Html -> let module Scan = Latexscan.Make (Html) (Noimage) in let module Otherscan = Videoc.Make (Html) (Noimage) (Scan) in let module Verbscan = Verb.Make (Html) (Noimage) (Scan) in let module OptScan = Package.Make (Html) (Image) (Scan) in Scan.get_prim, Scan.main, Scan.no_prelude, Scan.print_env_pos, Html.finalize, Noimage.finalize | Text -> let module Scan = Latexscan.Make (Text) (Noimage) in let module Verbscan = Verb.Make (Text) (Noimage) (Scan) in let module OptScan = Package.Make (Text) (Image) (Scan) in Scan.get_prim, Scan.main, Scan.no_prelude, Scan.print_env_pos, Text.finalize,Noimage.finalize | Info -> let module Scan = Latexscan.Make (Info) (Noimage) in let module Verbscan = Verb.Make (Info) (Noimage) (Scan) in let module OptScan = Package.Make (Info) (Image) (Scan) in Scan.get_prim, Scan.main, Scan.no_prelude, Scan.print_env_pos, Info.finalize, Noimage.finalize ;; let prerr_error msg = Location.print_pos () ; if msg <> "" then prerr_endline msg ;; let prerr_bug msg = prerr_error msg ; prerr_endline " (if input is plain LaTeX, please report to Luc.Maranget@inria.fr)" and prerr_not_supported msg = prerr_error msg ; prerr_endline "You ran into hevea limitations, sorrry" ;; let finalize check = try let changed = Auxx.finalize check in let changed = Index.finalize check || changed in let image_changed = image_finalize check in dest_finalize check ; if !verbose > 0 && Parse_opts.name_out <> "" then begin prerr_endline ("Output is in file: "^Parse_opts.name_out) end ; changed,image_changed with e -> if check then raise e else begin prerr_bug ("Uncaught exception in finalize: "^Printexc.to_string e) ; prerr_endline "Adios" ; exit 2 end ;; let read_style name = let oldverb = !verbose in if !verbose > 0 then verbose := oldverb ; begin try let name,chan = Myfiles.open_tex name in if !verbose > 0 then begin prerr_endline ("read_style: "^name) end ; let buf = Lexing.from_channel chan in Location.set name buf; begin try scan_main buf with Misc.EndInput -> () end ; close_in chan ; Location.restore () with | Myfiles.Except-> () end ; verbose := oldverb ;; let read_prog prog = try let real_prog = Myfiles.find prog and name = Filename.temp_file "hevea" ".hva" in begin match Sys.command (real_prog^" >"^name) with | 0 -> read_style name | _ -> warning ("Could not exec program file: "^real_prog) end ; Mysys.remove name with | Not_found -> warning ("Could not find program file: "^prog) let read_tex name_in = Save.set_verbose !silent !verbose ; begin try match name_in with | "" -> Lexstate.real_input_file !verbose scan_main "" stdin | _ -> Lexstate.input_file !verbose scan_main name_in with | Misc.EndDocument -> () end let main () = verbose := !readverb ; read_style "hevea.hva" ; let rec do_rec = function [] -> () | File x::rest -> do_rec rest ; read_style x | Prog x::rest -> do_rec rest ; read_prog x in let styles = Parse_opts.styles in do_rec styles ; if Parse_opts.filter then no_prelude () ; if !Parse_opts.fixpoint then begin let image_changed = ref false in let saved = Hot.checkpoint () in let rec do_rec i = read_tex name_in ; let changed,image_changed_now = finalize true in image_changed := !image_changed || image_changed_now ; if changed then begin Hot.start saved ; Auxx.hot_start () ; Misc.message ("Run, run, again...") ; do_rec (i+1) end else begin Misc.message ("Fixpoint reached in "^string_of_int i^" step(s)") ; if !image_changed then begin Misc.message ("Now, I am running imagen for you") ; let _ = Sys.command (Filename.concat Mylib.libdir "imagen"^ " "^Misc.get_image_opt ()^" "^base_out) in () end end in do_rec 1 end else begin read_tex name_in ; let _ = finalize true in () end ; (* Optimisation *) if !optimize then begin match !destination with | Html -> if name_in <> "" then begin Emisc.verbose := !Misc.verbose ; let module E = Esp.Make (struct let pess = false let move = true end) in begin try E.file name_out with Esp.Failed -> warning "Esponja failed, optimisation not performed" end end | Text|Info -> () end ;; let _ = begin try main () ; exit 0 with | Misc.Close s -> prerr_error ("Environment nesting error: "^s) ; scan_print_env_pos () | Html.Error s -> prerr_error ("Error while writing HTML:\n\t"^s) | Text.Error s -> prerr_error ("Error while writing Text:\n\t"^s) | Info.Error s -> prerr_error ("Error while writing Info:\n\t"^s) | InfoRef.Error s -> prerr_error ("Error while writing Info:\n\t"^s) | Misc.ScanError s -> prerr_error ("Error while reading LaTeX:\n\t"^s) | Lexstate.Error s -> prerr_error ("Error while reading LaTeX:\n\t"^s) | Verb.VError s -> prerr_error ("Error while reading verbatim LaTeX:\n\t"^s) | Colscan.Error s -> prerr_error ("Error while reading LaTeX style colors:\n\t"^s) | Save.Error s -> prerr_error ("Error while reading LaTeX macros arguments:\n\t"^s) | Tabular.Error s -> prerr_error ("Error while reading table format:\n\t"^s) | Get.Error s -> prerr_error ("Error while getting a value:\n\t"^s) | Misc.UserError s -> prerr_error ("User error:\n\t"^s) | Myfiles.Error s -> prerr_error ("File error:\n\t"^s) | Misc.NoSupport s -> prerr_not_supported s | Misc.Fatal s -> prerr_bug ("Fatal error: "^s) | MyStack.Fatal s -> prerr_bug ("Fatal stack error, "^s) (* | x -> prerr_bug ("Fatal error, spurious exception:\n\t"^Printexc.to_string x) *) end ; let _ = finalize false in if !verbose = 0 then Mysys.remove Parse_opts.name_out ; prerr_endline "Adios" ; exit 2 ;; hevea-2.09/emisc.ml0000644004317100512160000000210712017660721014216 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: emisc.ml,v 1.3 2006-10-09 08:25:16 maranget Exp $ *) (***********************************************************************) open Printf let verbose = ref 0 let basefont = ref 3 let reset () = basefont := 3 let dump_class chan cl st = fprintf chan ".%s{%s}\n" cl st module Strings = Set.Make(String) module StringMap = Map.Make(String) module StringCount = Count.Make(String) exception LexError of string hevea-2.09/cut.mli0000644004317100512160000000237412017660721014070 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* "$Id: cut.mli,v 1.4 2006-11-10 08:28:46 maranget Exp $" *) type toc_style = Normal | Both | Special exception Error of string module type Config = sig val verbose : int val name_in : string val name_out : string val toc_style : toc_style val cross_links : bool val small_length : int end module Make (Config:Config) : sig val dir : string option val base : string val real_name : string -> string val check_changed : string -> string val start_phase : unit -> unit val do_lex : Lexing.lexbuf -> bool end hevea-2.09/xspace.hva0000644004317100512160000000005610563036154014551 0ustar marangetcristal\ProvidesPackage{xspace} \@primitives{xspace} hevea-2.09/bookcommon.hva0000644004317100512160000000360610507223111015422 0ustar marangetcristal\setcounter {secnumdepth}{2} \newcounter {part} \newcounter {chapter} \newcounter {section}[chapter] \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \newcounter {footnote}[chapter] \newcounter {titlenote} \setenvclass{part}{part} \setenvclass{chapter}{chapter} \setenvclass{section}{section} \setenvclass{subsection}{subsection} \setenvclass{subsubsection}{subsubsection} \setenvclass{paragraph}{paragraph} \setenvclass{subparagraph}{subparagraph} \newcounter {anchornote} \renewcommand \theanchornote{{\@nostyle\arabic{chapter}.\arabic{anchornote}}} \renewcommand \thepart {\Roman{part}} \renewcommand \thesection {\thechapter.\arabic{section}} \renewcommand\thesubsection {\thesection.\arabic{subsection}} \renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}} \renewcommand\theparagraph {\thesubsubsection.\arabic{paragraph}} \renewcommand\thesubparagraph {\theparagraph.\arabic{subparagraph}} \flushdef{chapter} \newcommand{\partname}{Part} \renewcommand{\chaptername}{Chapter} \newcommand{\appendixname}{Appendix} %%%%%%%%%%% Initial cutting \newcommand{\cuttingunit}{chapter} %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\appendix}{% \renewcommand{\chaptername}{\appendixname}% \setcounter{chapter}{0}% \renewcommand{\thechapter}{\Alph{chapter}}} \newcounter{equation}[chapter] \renewcommand{\theequation}{\thechapter.\arabic{equation}} \newcounter{figure}[chapter] \renewcommand{\thefigure}{\thechapter.\arabic{figure}} \newcounter{table}[chapter] \renewcommand{\thetable}{\thechapter.\arabic{table}} \newcommand\abstractname{Abstract} \newenvironment{abstract}{\begin{quote}{\bf \abstractname: }}{\end{quote}} \newcommand{\@indexsection}[1]{\chapter*{#1}} \newcommand{\@bibliosection}[1]{\chapter*{#1}} \newcommand{\@tocsection}[1]{\chapter*{#1}} \newcommand{\@base}{book} \setcounter{tocdepth}{2} hevea-2.09/saveUtils.ml0000644004317100512160000000373212017660721015102 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Save module utilities *) let verbose = ref 0 and silent = ref false ;; let set_verbose s v = silent := s ; verbose := v ;; exception Error of string ;; exception Delim of string ;; let seen_par = ref false ;; let brace_nesting = ref 0 and arg_buff = Out.create_buff () and echo_buff = Out.create_buff () and tag_buff = Out.create_buff () ;; let echo = ref false ;; let get_echo () = echo := false ; Out.to_string echo_buff and start_echo () = echo := true ; Out.reset echo_buff ;; let empty_buffs () = brace_nesting := 0 ; Out.reset arg_buff ; echo := false ; Out.reset echo_buff ; Out.reset tag_buff ;; let error s = empty_buffs () ; raise (Error s) ;; let my_int_of_string s = try int_of_string s with Failure "int_of_string" -> error ("Integer argument expected: ``"^s^"''") exception Eof ;; exception LimitEof of Misc.limits option ;; exception NoOpt ;; let put_echo s = if !echo then Out.put echo_buff s and put_echo_char c = if !echo then Out.put_char echo_buff c and blit_echo lb = if !echo then Out.blit echo_buff lb ;; let put_both s = put_echo s ; Out.put arg_buff s ;; let blit_both lexbuf = blit_echo lexbuf ; Out.blit arg_buff lexbuf let put_both_char c = put_echo_char c ; Out.put_char arg_buff c ;; hevea-2.09/mappings/0000755004317100512160000000000012204704147014401 5ustar marangetcristalhevea-2.09/mappings/ISO-8859-6.map0000644004317100512160000000526710412520074016314 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA4 0x00A4 0xAC 0x060C 0xAD 0x00AD 0xBB 0x061B 0xBF 0x061F 0xC1 0x0621 0xC2 0x0622 0xC3 0x0623 0xC4 0x0624 0xC5 0x0625 0xC6 0x0626 0xC7 0x0627 0xC8 0x0628 0xC9 0x0629 0xCA 0x062A 0xCB 0x062B 0xCC 0x062C 0xCD 0x062D 0xCE 0x062E 0xCF 0x062F 0xD0 0x0630 0xD1 0x0631 0xD2 0x0632 0xD3 0x0633 0xD4 0x0634 0xD5 0x0635 0xD6 0x0636 0xD7 0x0637 0xD8 0x0638 0xD9 0x0639 0xDA 0x063A 0xE0 0x0640 0xE1 0x0641 0xE2 0x0642 0xE3 0x0643 0xE4 0x0644 0xE5 0x0645 0xE6 0x0646 0xE7 0x0647 0xE8 0x0648 0xE9 0x0649 0xEA 0x064A 0xEB 0x064B 0xEC 0x064C 0xED 0x064D 0xEE 0x064E 0xEF 0x064F 0xF0 0x0650 0xF1 0x0651 0xF2 0x0652 hevea-2.09/mappings/ISO-8859-9.map0000644004317100512160000000640010412520074016305 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x00A1 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x00A4 0xA5 0x00A5 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x00A9 0xAA 0x00AA 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x00AF 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x00B4 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x00B8 0xB9 0x00B9 0xBA 0x00BA 0xBB 0x00BB 0xBC 0x00BC 0xBD 0x00BD 0xBE 0x00BE 0xBF 0x00BF 0xC0 0x00C0 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x00C3 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x00C6 0xC7 0x00C7 0xC8 0x00C8 0xC9 0x00C9 0xCA 0x00CA 0xCB 0x00CB 0xCC 0x00CC 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD0 0x011E 0xD1 0x00D1 0xD2 0x00D2 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x00D8 0xD9 0x00D9 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x0130 0xDE 0x015E 0xDF 0x00DF 0xE0 0x00E0 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x00E3 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x00E6 0xE7 0x00E7 0xE8 0x00E8 0xE9 0x00E9 0xEA 0x00EA 0xEB 0x00EB 0xEC 0x00EC 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF0 0x011F 0xF1 0x00F1 0xF2 0x00F2 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x00F8 0xF9 0x00F9 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x0131 0xFE 0x015F 0xFF 0x00FF hevea-2.09/mappings/ISO-8859-10.map0000644004317100512160000000640010412520074016355 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x0104 0xA2 0x0112 0xA3 0x0122 0xA4 0x012A 0xA5 0x0128 0xA6 0x0136 0xA7 0x00A7 0xA8 0x013B 0xA9 0x0110 0xAA 0x0160 0xAB 0x0166 0xAC 0x017D 0xAD 0x00AD 0xAE 0x016A 0xAF 0x014A 0xB0 0x00B0 0xB1 0x0105 0xB2 0x0113 0xB3 0x0123 0xB4 0x012B 0xB5 0x0129 0xB6 0x0137 0xB7 0x00B7 0xB8 0x013C 0xB9 0x0111 0xBA 0x0161 0xBB 0x0167 0xBC 0x017E 0xBD 0x2015 0xBE 0x016B 0xBF 0x014B 0xC0 0x0100 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x00C3 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x00C6 0xC7 0x012E 0xC8 0x010C 0xC9 0x00C9 0xCA 0x0118 0xCB 0x00CB 0xCC 0x0116 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD0 0x00D0 0xD1 0x0145 0xD2 0x014C 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x0168 0xD8 0x00D8 0xD9 0x0172 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x00DD 0xDE 0x00DE 0xDF 0x00DF 0xE0 0x0101 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x00E3 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x00E6 0xE7 0x012F 0xE8 0x010D 0xE9 0x00E9 0xEA 0x0119 0xEB 0x00EB 0xEC 0x0117 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF0 0x00F0 0xF1 0x0146 0xF2 0x014D 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x0169 0xF8 0x00F8 0xF9 0x0173 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x00FD 0xFE 0x00FE 0xFF 0x0138 hevea-2.09/mappings/ISO-8859-1.map0000644004317100512160000000600010507243763016305 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x00A1 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x00A4 0xA5 0x00A5 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x00A9 0xAA 0x00AA 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x00AF 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x00B4 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x00B8 0xB9 0x00B9 0xBA 0x00BA 0xBB 0x00BB 0xBC 0x00BC 0xBD 0x00BD 0xBE 0x00BE 0xBF 0x00BF 0xC0 0x00C0 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x00C3 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x00C6 0xC7 0x00C7 0xC8 0x00C8 0xC9 0x00C9 0xCA 0x00CA 0xCB 0x00CB 0xCC 0x00CC 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD0 0x00D0 0xD1 0x00D1 0xD2 0x00D2 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x00D8 0xD9 0x00D9 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x00DD 0xDE 0x00DE 0xDF 0x00DF 0xE0 0x00E0 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x00E3 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x00E6 0xE7 0x00E7 0xE8 0x00E8 0xE9 0x00E9 0xEA 0x00EA 0xEB 0x00EB 0xEC 0x00EC 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF0 0x00F0 0xF1 0x00F1 0xF2 0x00F2 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x00F8 0xF9 0x00F9 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x00FD 0xFE 0x00FE 0xFF 0x00FF hevea-2.09/mappings/ISO-8859-8.map0000644004317100512160000000545410412520074016314 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x00A4 0xA5 0x00A5 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x00A9 0xAA 0x00D7 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x00AF 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x00B4 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x00B8 0xB9 0x00B9 0xBA 0x00F7 0xBB 0x00BB 0xBC 0x00BC 0xBD 0x00BD 0xBE 0x00BE 0xDF 0x2017 0xE0 0x05D0 0xE1 0x05D1 0xE2 0x05D2 0xE3 0x05D3 0xE4 0x05D4 0xE5 0x05D5 0xE6 0x05D6 0xE7 0x05D7 0xE8 0x05D8 0xE9 0x05D9 0xEA 0x05DA 0xEB 0x05DB 0xEC 0x05DC 0xED 0x05DD 0xEE 0x05DE 0xEF 0x05DF 0xF0 0x05E0 0xF1 0x05E1 0xF2 0x05E2 0xF3 0x05E3 0xF4 0x05E4 0xF5 0x05E5 0xF6 0x05E6 0xF7 0x05E7 0xF8 0x05E8 0xF9 0x05E9 0xFA 0x05EA 0xFD 0x200E 0xFE 0x200F hevea-2.09/mappings/windows-1252.map0000644004317100512160000000570410547475266017206 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x20AC 0x82 0x201A 0x83 0x0192 0x84 0x201E 0x85 0x2026 0x86 0x2020 0x87 0x2021 0x88 0x02C6 0x89 0x2030 0x8A 0x0160 0x8B 0x2039 0x8C 0x0152 0x8E 0x017D 0x91 0x2018 0x92 0x2019 0x93 0x201C 0x94 0x201D 0x95 0x2022 0x96 0x2013 0x97 0x2014 0x98 0x02DC 0x99 0x2122 0x9A 0x0161 0x9B 0x203A 0x9C 0x0153 0x9E 0x017E 0x9F 0x0178 0xA0 0x00A0 0xA1 0x00A1 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x00A4 0xA5 0x00A5 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x00A9 0xAA 0x00AA 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x00AF 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x00B4 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x00B8 0xB9 0x00B9 0xBA 0x00BA 0xBB 0x00BB 0xBC 0x00BC 0xBD 0x00BD 0xBE 0x00BE 0xBF 0x00BF 0xC0 0x00C0 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x00C3 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x00C6 0xC7 0x00C7 0xC8 0x00C8 0xC9 0x00C9 0xCA 0x00CA 0xCB 0x00CB 0xCC 0x00CC 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD0 0x00D0 0xD1 0x00D1 0xD2 0x00D2 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x00D8 0xD9 0x00D9 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x00DD 0xDE 0x00DE 0xDF 0x00DF 0xE0 0x00E0 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x00E3 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x00E6 0xE7 0x00E7 0xE8 0x00E8 0xE9 0x00E9 0xEA 0x00EA 0xEB 0x00EB 0xEC 0x00EC 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF0 0x00F0 0xF1 0x00F1 0xF2 0x00F2 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x00F8 0xF9 0x00F9 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x00FD 0xFE 0x00FE 0xFF 0x00FF hevea-2.09/mappings/US-ASCII.map0000644004317100512160000000320010412520074016242 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F hevea-2.09/mappings/ISO-8859-2.map0000644004317100512160000000640010412520074016276 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x0104 0xA2 0x02D8 0xA3 0x0141 0xA4 0x00A4 0xA5 0x013D 0xA6 0x015A 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x0160 0xAA 0x015E 0xAB 0x0164 0xAC 0x0179 0xAD 0x00AD 0xAE 0x017D 0xAF 0x017B 0xB0 0x00B0 0xB1 0x0105 0xB2 0x02DB 0xB3 0x0142 0xB4 0x00B4 0xB5 0x013E 0xB6 0x015B 0xB7 0x02C7 0xB8 0x00B8 0xB9 0x0161 0xBA 0x015F 0xBB 0x0165 0xBC 0x017A 0xBD 0x02DD 0xBE 0x017E 0xBF 0x017C 0xC0 0x0154 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x0102 0xC4 0x00C4 0xC5 0x0139 0xC6 0x0106 0xC7 0x00C7 0xC8 0x010C 0xC9 0x00C9 0xCA 0x0118 0xCB 0x00CB 0xCC 0x011A 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x010E 0xD0 0x0110 0xD1 0x0143 0xD2 0x0147 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x0150 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x0158 0xD9 0x016E 0xDA 0x00DA 0xDB 0x0170 0xDC 0x00DC 0xDD 0x00DD 0xDE 0x0162 0xDF 0x00DF 0xE0 0x0155 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x0103 0xE4 0x00E4 0xE5 0x013A 0xE6 0x0107 0xE7 0x00E7 0xE8 0x010D 0xE9 0x00E9 0xEA 0x0119 0xEB 0x00EB 0xEC 0x011B 0xED 0x00ED 0xEE 0x00EE 0xEF 0x010F 0xF0 0x0111 0xF1 0x0144 0xF2 0x0148 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x0151 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x0159 0xF9 0x016F 0xFA 0x00FA 0xFB 0x0171 0xFC 0x00FC 0xFD 0x00FD 0xFE 0x0163 0xFF 0x02D9 hevea-2.09/mappings/ISO-8859-15.map0000644004317100512160000000640010412520074016362 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x00A1 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x20AC 0xA5 0x00A5 0xA6 0x0160 0xA7 0x00A7 0xA8 0x0161 0xA9 0x00A9 0xAA 0x00AA 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x00AF 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x017D 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x017E 0xB9 0x00B9 0xBA 0x00BA 0xBB 0x00BB 0xBC 0x0152 0xBD 0x0153 0xBE 0x0178 0xBF 0x00BF 0xC0 0x00C0 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x00C3 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x00C6 0xC7 0x00C7 0xC8 0x00C8 0xC9 0x00C9 0xCA 0x00CA 0xCB 0x00CB 0xCC 0x00CC 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD0 0x00D0 0xD1 0x00D1 0xD2 0x00D2 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x00D8 0xD9 0x00D9 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x00DD 0xDE 0x00DE 0xDF 0x00DF 0xE0 0x00E0 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x00E3 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x00E6 0xE7 0x00E7 0xE8 0x00E8 0xE9 0x00E9 0xEA 0x00EA 0xEB 0x00EB 0xEC 0x00EC 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF0 0x00F0 0xF1 0x00F1 0xF2 0x00F2 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x00F8 0xF9 0x00F9 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x00FD 0xFE 0x00FE 0xFF 0x00FF hevea-2.09/mappings/macintosh.map0000644004317100512160000000600010507255512017062 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x00C4 0x81 0x00C5 0x82 0x00C7 0x83 0x00C9 0x84 0x00D1 0x85 0x00D6 0x86 0x00DC 0x87 0x00E1 0x88 0x00E0 0x89 0x00E2 0x8A 0x00E4 0x8B 0x00E3 0x8C 0x00E5 0x8D 0x00E7 0x8E 0x00E9 0x8F 0x00E8 0x90 0x00EA 0x91 0x00EB 0x92 0x00ED 0x93 0x00EC 0x94 0x00EE 0x95 0x00EF 0x96 0x00F1 0x97 0x00F3 0x98 0x00F2 0x99 0x00F4 0x9A 0x00F6 0x9B 0x00F5 0x9C 0x00FA 0x9D 0x00F9 0x9E 0x00FB 0x9F 0x00FC 0xA0 0x2020 0xA1 0x00B0 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x00A7 0xA5 0x2022 0xA6 0x00B6 0xA7 0x00DF 0xA8 0x00AE 0xA9 0x00A9 0xAA 0x2122 0xAB 0x00B4 0xAC 0x00A8 0xAD 0x2260 0xAE 0x00C6 0xAF 0x00D8 0xB0 0x221E 0xB1 0x00B1 0xB2 0x2264 0xB3 0x2265 0xB4 0x00A5 0xB5 0x00B5 0xB6 0x2202 0xB7 0x2211 0xB8 0x220F 0xB9 0x03C0 0xBA 0x222B 0xBB 0x00AA 0xBC 0x00BA 0xBD 0x2126 0xBE 0x00E6 0xBF 0x00F8 0xC0 0x00BF 0xC1 0x00A1 0xC2 0x00AC 0xC3 0x221A 0xC4 0x0192 0xC5 0x2248 0xC6 0x2206 0xC7 0x00AB 0xC8 0x00BB 0xC9 0x2026 0xCA 0x00A0 0xCB 0x00C0 0xCC 0x00C3 0xCD 0x00D5 0xCE 0x0152 0xCF 0x0153 0xD0 0x2013 0xD1 0x2014 0xD2 0x201C 0xD3 0x201D 0xD4 0x2018 0xD5 0x2019 0xD6 0x00F7 0xD7 0x25CA 0xD8 0x00FF 0xD9 0x0178 0xDA 0x2044 0xDB 0x20AC 0xDC 0x2039 0xDD 0x203A 0xDE 0xFB01 0xDF 0xFB02 0xE0 0x2021 0xE1 0x00B7 0xE2 0x201A 0xE3 0x201E 0xE4 0x2030 0xE5 0x00C2 0xE6 0x00CA 0xE7 0x00C1 0xE8 0x00CB 0xE9 0x00C8 0xEA 0x00CD 0xEB 0x00CE 0xEC 0x00CF 0xED 0x00CC 0xEE 0x00D3 0xEF 0x00D4 0xF0 0x0000 0xF1 0x00D2 0xF2 0x00DA 0xF3 0x00DB 0xF4 0x00D9 0xF5 0x0131 0xF6 0x02C6 0xF7 0x02DC 0xF8 0x00AF 0xF9 0x02D8 0xFA 0x02D9 0xFB 0x02DA 0xFC 0x00B8 0xFD 0x02DD 0xFE 0x02DB 0xFF 0x02C7 hevea-2.09/mappings/ISO-8859-3.map0000644004317100512160000000624510412520074016306 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x0126 0xA2 0x02D8 0xA3 0x00A3 0xA4 0x00A4 0xA6 0x0124 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x0130 0xAA 0x015E 0xAB 0x011E 0xAC 0x0134 0xAD 0x00AD 0xAF 0x017B 0xB0 0x00B0 0xB1 0x0127 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x00B4 0xB5 0x00B5 0xB6 0x0125 0xB7 0x00B7 0xB8 0x00B8 0xB9 0x0131 0xBA 0x015F 0xBB 0x011F 0xBC 0x0135 0xBD 0x00BD 0xBF 0x017C 0xC0 0x00C0 0xC1 0x00C1 0xC2 0x00C2 0xC4 0x00C4 0xC5 0x010A 0xC6 0x0108 0xC7 0x00C7 0xC8 0x00C8 0xC9 0x00C9 0xCA 0x00CA 0xCB 0x00CB 0xCC 0x00CC 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD1 0x00D1 0xD2 0x00D2 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x0120 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x011C 0xD9 0x00D9 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x016C 0xDE 0x015C 0xDF 0x00DF 0xE0 0x00E0 0xE1 0x00E1 0xE2 0x00E2 0xE4 0x00E4 0xE5 0x010B 0xE6 0x0109 0xE7 0x00E7 0xE8 0x00E8 0xE9 0x00E9 0xEA 0x00EA 0xEB 0x00EB 0xEC 0x00EC 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF1 0x00F1 0xF2 0x00F2 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x0121 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x011D 0xF9 0x00F9 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x016D 0xFE 0x015D 0xFF 0x02D9 hevea-2.09/mappings/ISO-8859-7.map0000644004317100512160000000633110412520074016306 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x2018 0xA2 0x2019 0xA3 0x00A3 0xA4 0x20AC 0xA5 0x20AF 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x00A9 0xAA 0x037A 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAF 0x2015 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x0384 0xB5 0x0385 0xB6 0x0386 0xB7 0x00B7 0xB8 0x0388 0xB9 0x0389 0xBA 0x038A 0xBB 0x00BB 0xBC 0x038C 0xBD 0x00BD 0xBE 0x038E 0xBF 0x038F 0xC0 0x0390 0xC1 0x0391 0xC2 0x0392 0xC3 0x0393 0xC4 0x0394 0xC5 0x0395 0xC6 0x0396 0xC7 0x0397 0xC8 0x0398 0xC9 0x0399 0xCA 0x039A 0xCB 0x039B 0xCC 0x039C 0xCD 0x039D 0xCE 0x039E 0xCF 0x039F 0xD0 0x03A0 0xD1 0x03A1 0xD3 0x03A3 0xD4 0x03A4 0xD5 0x03A5 0xD6 0x03A6 0xD7 0x03A7 0xD8 0x03A8 0xD9 0x03A9 0xDA 0x03AA 0xDB 0x03AB 0xDC 0x03AC 0xDD 0x03AD 0xDE 0x03AE 0xDF 0x03AF 0xE0 0x03B0 0xE1 0x03B1 0xE2 0x03B2 0xE3 0x03B3 0xE4 0x03B4 0xE5 0x03B5 0xE6 0x03B6 0xE7 0x03B7 0xE8 0x03B8 0xE9 0x03B9 0xEA 0x03BA 0xEB 0x03BB 0xEC 0x03BC 0xED 0x03BD 0xEE 0x03BE 0xEF 0x03BF 0xF0 0x03C0 0xF1 0x03C1 0xF2 0x03C2 0xF3 0x03C3 0xF4 0x03C4 0xF5 0x03C5 0xF6 0x03C6 0xF7 0x03C7 0xF8 0x03C8 0xF9 0x03C9 0xFA 0x03CA 0xFB 0x03CB 0xFC 0x03CC 0xFD 0x03CD 0xFE 0x03CE hevea-2.09/mappings/windows-1251.map0000644004317100512160000000576410547475266017213 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0402 0x81 0x0403 0x82 0x201A 0x83 0x0453 0x84 0x201E 0x85 0x2026 0x86 0x2020 0x87 0x2021 0x88 0x20AC 0x89 0x2030 0x8A 0x0409 0x8B 0x2039 0x8C 0x040A 0x8D 0x040C 0x8E 0x040B 0x8F 0x040F 0x90 0x0452 0x91 0x2018 0x92 0x2019 0x93 0x201C 0x94 0x201D 0x95 0x2022 0x96 0x2013 0x97 0x2014 0x99 0x2122 0x9A 0x0459 0x9B 0x203A 0x9C 0x045A 0x9D 0x045C 0x9E 0x045B 0x9F 0x045F 0xA0 0x00A0 0xA1 0x040E 0xA2 0x045E 0xA3 0x0408 0xA4 0x00A4 0xA5 0x0490 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x0401 0xA9 0x00A9 0xAA 0x0404 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x0407 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x0406 0xB3 0x0456 0xB4 0x0491 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x0451 0xB9 0x2116 0xBA 0x0454 0xBB 0x00BB 0xBC 0x0458 0xBD 0x0405 0xBE 0x0455 0xBF 0x0457 0xC0 0x0410 0xC1 0x0411 0xC2 0x0412 0xC3 0x0413 0xC4 0x0414 0xC5 0x0415 0xC6 0x0416 0xC7 0x0417 0xC8 0x0418 0xC9 0x0419 0xCA 0x041A 0xCB 0x041B 0xCC 0x041C 0xCD 0x041D 0xCE 0x041E 0xCF 0x041F 0xD0 0x0420 0xD1 0x0421 0xD2 0x0422 0xD3 0x0423 0xD4 0x0424 0xD5 0x0425 0xD6 0x0426 0xD7 0x0427 0xD8 0x0428 0xD9 0x0429 0xDA 0x042A 0xDB 0x042B 0xDC 0x042C 0xDD 0x042D 0xDE 0x042E 0xDF 0x042F 0xE0 0x0430 0xE1 0x0431 0xE2 0x0432 0xE3 0x0433 0xE4 0x0434 0xE5 0x0435 0xE6 0x0436 0xE7 0x0437 0xE8 0x0438 0xE9 0x0439 0xEA 0x043A 0xEB 0x043B 0xEC 0x043C 0xED 0x043D 0xEE 0x043E 0xEF 0x043F 0xF0 0x0440 0xF1 0x0441 0xF2 0x0442 0xF3 0x0443 0xF4 0x0444 0xF5 0x0445 0xF6 0x0446 0xF7 0x0447 0xF8 0x0448 0xF9 0x0449 0xFA 0x044A 0xFB 0x044B 0xFC 0x044C 0xFD 0x044D 0xFE 0x044E 0xFF 0x044F hevea-2.09/mappings/ISO-8859-5.map0000644004317100512160000000640010412520074016301 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x0401 0xA2 0x0402 0xA3 0x0403 0xA4 0x0404 0xA5 0x0405 0xA6 0x0406 0xA7 0x0407 0xA8 0x0408 0xA9 0x0409 0xAA 0x040A 0xAB 0x040B 0xAC 0x040C 0xAD 0x00AD 0xAE 0x040E 0xAF 0x040F 0xB0 0x0410 0xB1 0x0411 0xB2 0x0412 0xB3 0x0413 0xB4 0x0414 0xB5 0x0415 0xB6 0x0416 0xB7 0x0417 0xB8 0x0418 0xB9 0x0419 0xBA 0x041A 0xBB 0x041B 0xBC 0x041C 0xBD 0x041D 0xBE 0x041E 0xBF 0x041F 0xC0 0x0420 0xC1 0x0421 0xC2 0x0422 0xC3 0x0423 0xC4 0x0424 0xC5 0x0425 0xC6 0x0426 0xC7 0x0427 0xC8 0x0428 0xC9 0x0429 0xCA 0x042A 0xCB 0x042B 0xCC 0x042C 0xCD 0x042D 0xCE 0x042E 0xCF 0x042F 0xD0 0x0430 0xD1 0x0431 0xD2 0x0432 0xD3 0x0433 0xD4 0x0434 0xD5 0x0435 0xD6 0x0436 0xD7 0x0437 0xD8 0x0438 0xD9 0x0439 0xDA 0x043A 0xDB 0x043B 0xDC 0x043C 0xDD 0x043D 0xDE 0x043E 0xDF 0x043F 0xE0 0x0440 0xE1 0x0441 0xE2 0x0442 0xE3 0x0443 0xE4 0x0444 0xE5 0x0445 0xE6 0x0446 0xE7 0x0447 0xE8 0x0448 0xE9 0x0449 0xEA 0x044A 0xEB 0x044B 0xEC 0x044C 0xED 0x044D 0xEE 0x044E 0xEF 0x044F 0xF0 0x2116 0xF1 0x0451 0xF2 0x0452 0xF3 0x0453 0xF4 0x0454 0xF5 0x0455 0xF6 0x0456 0xF7 0x0457 0xF8 0x0458 0xF9 0x0459 0xFA 0x045A 0xFB 0x045B 0xFC 0x045C 0xFD 0x00A7 0xFE 0x045E 0xFF 0x045F hevea-2.09/mappings/KOI8-R.map0000644004317100512160000000600010544514432016006 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x2500 0x81 0x2502 0x82 0x250C 0x83 0x2510 0x84 0x2514 0x85 0x2518 0x86 0x251C 0x87 0x2524 0x88 0x252C 0x89 0x2534 0x8A 0x253C 0x8B 0x2580 0x8C 0x2584 0x8D 0x2588 0x8E 0x258C 0x8F 0x2590 0x90 0x2591 0x91 0x2592 0x92 0x2593 0x93 0x2320 0x94 0x25A0 0x95 0x2219 0x96 0x221A 0x97 0x2248 0x98 0x2264 0x99 0x2265 0x9A 0x00A0 0x9B 0x2321 0x9C 0x00B0 0x9D 0x00B2 0x9E 0x00B7 0x9F 0x00F7 0xA0 0x2550 0xA1 0x2551 0xA2 0x2552 0xA3 0x0451 0xA4 0x2553 0xA5 0x2554 0xA6 0x2555 0xA7 0x2556 0xA8 0x2557 0xA9 0x2558 0xAA 0x2559 0xAB 0x255A 0xAC 0x255B 0xAD 0x255C 0xAE 0x255D 0xAF 0x255E 0xB0 0x255F 0xB1 0x2560 0xB2 0x2561 0xB3 0x0401 0xB4 0x2562 0xB5 0x2563 0xB6 0x2564 0xB7 0x2565 0xB8 0x2566 0xB9 0x2567 0xBA 0x2568 0xBB 0x2569 0xBC 0x256A 0xBD 0x256B 0xBE 0x256C 0xBF 0x00A9 0xC0 0x044E 0xC1 0x0430 0xC2 0x0431 0xC3 0x0446 0xC4 0x0434 0xC5 0x0435 0xC6 0x0444 0xC7 0x0433 0xC8 0x0445 0xC9 0x0438 0xCA 0x0439 0xCB 0x043A 0xCC 0x043B 0xCD 0x043C 0xCE 0x043D 0xCF 0x043E 0xD0 0x043F 0xD1 0x044F 0xD2 0x0440 0xD3 0x0441 0xD4 0x0442 0xD5 0x0443 0xD6 0x0436 0xD7 0x0432 0xD8 0x044C 0xD9 0x044B 0xDA 0x0437 0xDB 0x0448 0xDC 0x044D 0xDD 0x0449 0xDE 0x0447 0xDF 0x044A 0xE0 0x042E 0xE1 0x0410 0xE2 0x0411 0xE3 0x0426 0xE4 0x0414 0xE5 0x0415 0xE6 0x0424 0xE7 0x0413 0xE8 0x0425 0xE9 0x0418 0xEA 0x0419 0xEB 0x041A 0xEC 0x041B 0xED 0x041C 0xEE 0x041D 0xEF 0x041E 0xF0 0x041F 0xF1 0x042F 0xF2 0x0420 0xF3 0x0421 0xF4 0x0422 0xF5 0x0423 0xF6 0x0416 0xF7 0x0412 0xF8 0x042C 0xF9 0x042B 0xFA 0x0417 0xFB 0x0428 0xFC 0x042D 0xFD 0x0429 0xFE 0x0427 0xFF 0x042A hevea-2.09/mappings/ISO-8859-14.map0000644004317100512160000000640010412520074016361 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x1E02 0xA2 0x1E03 0xA3 0x00A3 0xA4 0x010A 0xA5 0x010B 0xA6 0x1E0A 0xA7 0x00A7 0xA8 0x1E80 0xA9 0x00A9 0xAA 0x1E82 0xAB 0x1E0B 0xAC 0x1EF2 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x0178 0xB0 0x1E1E 0xB1 0x1E1F 0xB2 0x0120 0xB3 0x0121 0xB4 0x1E40 0xB5 0x1E41 0xB6 0x00B6 0xB7 0x1E56 0xB8 0x1E81 0xB9 0x1E57 0xBA 0x1E83 0xBB 0x1E60 0xBC 0x1EF3 0xBD 0x1E84 0xBE 0x1E85 0xBF 0x1E61 0xC0 0x00C0 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x00C3 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x00C6 0xC7 0x00C7 0xC8 0x00C8 0xC9 0x00C9 0xCA 0x00CA 0xCB 0x00CB 0xCC 0x00CC 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD0 0x0174 0xD1 0x00D1 0xD2 0x00D2 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x1E6A 0xD8 0x00D8 0xD9 0x00D9 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x00DD 0xDE 0x0176 0xDF 0x00DF 0xE0 0x00E0 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x00E3 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x00E6 0xE7 0x00E7 0xE8 0x00E8 0xE9 0x00E9 0xEA 0x00EA 0xEB 0x00EB 0xEC 0x00EC 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF0 0x0175 0xF1 0x00F1 0xF2 0x00F2 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x1E6B 0xF8 0x00F8 0xF9 0x00F9 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x00FD 0xFE 0x0177 0xFF 0x00FF hevea-2.09/mappings/windows-1257.map0000644004317100512160000000556010547475266017213 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x20AC 0x82 0x201A 0x84 0x201E 0x85 0x2026 0x86 0x2020 0x87 0x2021 0x89 0x2030 0x8B 0x2039 0x8D 0x00A8 0x8E 0x02C7 0x8F 0x00B8 0x91 0x2018 0x92 0x2019 0x93 0x201C 0x94 0x201D 0x95 0x2022 0x96 0x2013 0x97 0x2014 0x99 0x2122 0x9B 0x203A 0x9D 0x00AF 0x9E 0x02DB 0xA0 0x00A0 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x00A4 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00D8 0xA9 0x00A9 0xAA 0x0156 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x00C6 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x00B4 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x00F8 0xB9 0x00B9 0xBA 0x0157 0xBB 0x00BB 0xBC 0x00BC 0xBD 0x00BD 0xBE 0x00BE 0xBF 0x00E6 0xC0 0x0104 0xC1 0x012E 0xC2 0x0100 0xC3 0x0106 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x0118 0xC7 0x0112 0xC8 0x010C 0xC9 0x00C9 0xCA 0x0179 0xCB 0x0116 0xCC 0x0122 0xCD 0x0136 0xCE 0x012A 0xCF 0x013B 0xD0 0x0160 0xD1 0x0143 0xD2 0x0145 0xD3 0x00D3 0xD4 0x014C 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x0172 0xD9 0x0141 0xDA 0x015A 0xDB 0x016A 0xDC 0x00DC 0xDD 0x017B 0xDE 0x017D 0xDF 0x00DF 0xE0 0x0105 0xE1 0x012F 0xE2 0x0101 0xE3 0x0107 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x0119 0xE7 0x0113 0xE8 0x010D 0xE9 0x00E9 0xEA 0x017A 0xEB 0x0117 0xEC 0x0123 0xED 0x0137 0xEE 0x012B 0xEF 0x013C 0xF0 0x0161 0xF1 0x0144 0xF2 0x0146 0xF3 0x00F3 0xF4 0x014D 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x0173 0xF9 0x0142 0xFA 0x015B 0xFB 0x016B 0xFC 0x00FC 0xFD 0x017C 0xFE 0x017E 0xFF 0x02D9 hevea-2.09/mappings/ISO-8859-11.map0000644004317100512160000000623010412520074016357 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x0E01 0xA2 0x0E02 0xA3 0x0E03 0xA4 0x0E04 0xA5 0x0E05 0xA6 0x0E06 0xA7 0x0E07 0xA8 0x0E08 0xA9 0x0E09 0xAA 0x0E0A 0xAB 0x0E0B 0xAC 0x0E0C 0xAD 0x0E0D 0xAE 0x0E0E 0xAF 0x0E0F 0xB0 0x0E10 0xB1 0x0E11 0xB2 0x0E12 0xB3 0x0E13 0xB4 0x0E14 0xB5 0x0E15 0xB6 0x0E16 0xB7 0x0E17 0xB8 0x0E18 0xB9 0x0E19 0xBA 0x0E1A 0xBB 0x0E1B 0xBC 0x0E1C 0xBD 0x0E1D 0xBE 0x0E1E 0xBF 0x0E1F 0xC0 0x0E20 0xC1 0x0E21 0xC2 0x0E22 0xC3 0x0E23 0xC4 0x0E24 0xC5 0x0E25 0xC6 0x0E26 0xC7 0x0E27 0xC8 0x0E28 0xC9 0x0E29 0xCA 0x0E2A 0xCB 0x0E2B 0xCC 0x0E2C 0xCD 0x0E2D 0xCE 0x0E2E 0xCF 0x0E2F 0xD0 0x0E30 0xD1 0x0E31 0xD2 0x0E32 0xD3 0x0E33 0xD4 0x0E34 0xD5 0x0E35 0xD6 0x0E36 0xD7 0x0E37 0xD8 0x0E38 0xD9 0x0E39 0xDA 0x0E3A 0xDF 0x0E3F 0xE0 0x0E40 0xE1 0x0E41 0xE2 0x0E42 0xE3 0x0E43 0xE4 0x0E44 0xE5 0x0E45 0xE6 0x0E46 0xE7 0x0E47 0xE8 0x0E48 0xE9 0x0E49 0xEA 0x0E4A 0xEB 0x0E4B 0xEC 0x0E4C 0xED 0x0E4D 0xEE 0x0E4E 0xEF 0x0E4F 0xF0 0x0E50 0xF1 0x0E51 0xF2 0x0E52 0xF3 0x0E53 0xF4 0x0E54 0xF5 0x0E55 0xF6 0x0E56 0xF7 0x0E57 0xF8 0x0E58 0xF9 0x0E59 0xFA 0x0E5A 0xFB 0x0E5B hevea-2.09/mappings/ISO-8859-16.map0000644004317100512160000000640010412520074016363 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x0104 0xA2 0x0105 0xA3 0x0141 0xA4 0x20AC 0xA5 0x201E 0xA6 0x0160 0xA7 0x00A7 0xA8 0x0161 0xA9 0x00A9 0xAA 0x0218 0xAB 0x00AB 0xAC 0x0179 0xAD 0x00AD 0xAE 0x017A 0xAF 0x017B 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x010C 0xB3 0x0142 0xB4 0x017D 0xB5 0x201D 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x017E 0xB9 0x010D 0xBA 0x0219 0xBB 0x00BB 0xBC 0x0152 0xBD 0x0153 0xBE 0x0178 0xBF 0x017C 0xC0 0x00C0 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x0102 0xC4 0x00C4 0xC5 0x0106 0xC6 0x00C6 0xC7 0x00C7 0xC8 0x00C8 0xC9 0x00C9 0xCA 0x00CA 0xCB 0x00CB 0xCC 0x00CC 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x00CF 0xD0 0x0110 0xD1 0x0143 0xD2 0x00D2 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x0150 0xD6 0x00D6 0xD7 0x015A 0xD8 0x0170 0xD9 0x00D9 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x0118 0xDE 0x021A 0xDF 0x00DF 0xE0 0x00E0 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x0103 0xE4 0x00E4 0xE5 0x0107 0xE6 0x00E6 0xE7 0x00E7 0xE8 0x00E8 0xE9 0x00E9 0xEA 0x00EA 0xEB 0x00EB 0xEC 0x00EC 0xED 0x00ED 0xEE 0x00EE 0xEF 0x00EF 0xF0 0x0111 0xF1 0x0144 0xF2 0x00F2 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x0151 0xF6 0x00F6 0xF7 0x015B 0xF8 0x0171 0xF9 0x00F9 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x0119 0xFE 0x021B 0xFF 0x00FF hevea-2.09/mappings/ISO-8859-13.map0000644004317100512160000000640010412520074016360 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x201D 0xA2 0x00A2 0xA3 0x00A3 0xA4 0x00A4 0xA5 0x201E 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00D8 0xA9 0x00A9 0xAA 0x0156 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x00C6 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x00B2 0xB3 0x00B3 0xB4 0x201C 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x00F8 0xB9 0x00B9 0xBA 0x0157 0xBB 0x00BB 0xBC 0x00BC 0xBD 0x00BD 0xBE 0x00BE 0xBF 0x00E6 0xC0 0x0104 0xC1 0x012E 0xC2 0x0100 0xC3 0x0106 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x0118 0xC7 0x0112 0xC8 0x010C 0xC9 0x00C9 0xCA 0x0179 0xCB 0x0116 0xCC 0x0122 0xCD 0x0136 0xCE 0x012A 0xCF 0x013B 0xD0 0x0160 0xD1 0x0143 0xD2 0x0145 0xD3 0x00D3 0xD4 0x014C 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x0172 0xD9 0x0141 0xDA 0x015A 0xDB 0x016A 0xDC 0x00DC 0xDD 0x017B 0xDE 0x017D 0xDF 0x00DF 0xE0 0x0105 0xE1 0x012F 0xE2 0x0101 0xE3 0x0107 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x0119 0xE7 0x0113 0xE8 0x010D 0xE9 0x00E9 0xEA 0x017A 0xEB 0x0117 0xEC 0x0123 0xED 0x0137 0xEE 0x012B 0xEF 0x013C 0xF0 0x0161 0xF1 0x0144 0xF2 0x0146 0xF3 0x00F3 0xF4 0x014D 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x0173 0xF9 0x0142 0xFA 0x015B 0xFB 0x016B 0xFC 0x00FC 0xFD 0x017C 0xFE 0x017E 0xFF 0x2019 hevea-2.09/mappings/ISO-8859-4.map0000644004317100512160000000640010412520074016300 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x0080 0x81 0x0081 0x82 0x0082 0x83 0x0083 0x84 0x0084 0x85 0x0085 0x86 0x0086 0x87 0x0087 0x88 0x0088 0x89 0x0089 0x8A 0x008A 0x8B 0x008B 0x8C 0x008C 0x8D 0x008D 0x8E 0x008E 0x8F 0x008F 0x90 0x0090 0x91 0x0091 0x92 0x0092 0x93 0x0093 0x94 0x0094 0x95 0x0095 0x96 0x0096 0x97 0x0097 0x98 0x0098 0x99 0x0099 0x9A 0x009A 0x9B 0x009B 0x9C 0x009C 0x9D 0x009D 0x9E 0x009E 0x9F 0x009F 0xA0 0x00A0 0xA1 0x0104 0xA2 0x0138 0xA3 0x0156 0xA4 0x00A4 0xA5 0x0128 0xA6 0x013B 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x0160 0xAA 0x0112 0xAB 0x0122 0xAC 0x0166 0xAD 0x00AD 0xAE 0x017D 0xAF 0x00AF 0xB0 0x00B0 0xB1 0x0105 0xB2 0x02DB 0xB3 0x0157 0xB4 0x00B4 0xB5 0x0129 0xB6 0x013C 0xB7 0x02C7 0xB8 0x00B8 0xB9 0x0161 0xBA 0x0113 0xBB 0x0123 0xBC 0x0167 0xBD 0x014A 0xBE 0x017E 0xBF 0x014B 0xC0 0x0100 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x00C3 0xC4 0x00C4 0xC5 0x00C5 0xC6 0x00C6 0xC7 0x012E 0xC8 0x010C 0xC9 0x00C9 0xCA 0x0118 0xCB 0x00CB 0xCC 0x0116 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x012A 0xD0 0x0110 0xD1 0x0145 0xD2 0x014C 0xD3 0x0136 0xD4 0x00D4 0xD5 0x00D5 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x00D8 0xD9 0x0172 0xDA 0x00DA 0xDB 0x00DB 0xDC 0x00DC 0xDD 0x0168 0xDE 0x016A 0xDF 0x00DF 0xE0 0x0101 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x00E3 0xE4 0x00E4 0xE5 0x00E5 0xE6 0x00E6 0xE7 0x012F 0xE8 0x010D 0xE9 0x00E9 0xEA 0x0119 0xEB 0x00EB 0xEC 0x0117 0xED 0x00ED 0xEE 0x00EE 0xEF 0x012B 0xF0 0x0111 0xF1 0x0146 0xF2 0x014D 0xF3 0x0137 0xF4 0x00F4 0xF5 0x00F5 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x00F8 0xF9 0x0173 0xFA 0x00FA 0xFB 0x00FB 0xFC 0x00FC 0xFD 0x0169 0xFE 0x016B 0xFF 0x02D9 hevea-2.09/mappings/windows-1250.map0000644004317100512160000000570410547475266017204 0ustar marangetcristal0x00 0x0000 0x01 0x0001 0x02 0x0002 0x03 0x0003 0x04 0x0004 0x05 0x0005 0x06 0x0006 0x07 0x0007 0x08 0x0008 0x09 0x0009 0x0A 0x000A 0x0B 0x000B 0x0C 0x000C 0x0D 0x000D 0x0E 0x000E 0x0F 0x000F 0x10 0x0010 0x11 0x0011 0x12 0x0012 0x13 0x0013 0x14 0x0014 0x15 0x0015 0x16 0x0016 0x17 0x0017 0x18 0x0018 0x19 0x0019 0x1A 0x001A 0x1B 0x001B 0x1C 0x001C 0x1D 0x001D 0x1E 0x001E 0x1F 0x001F 0x20 0x0020 0x21 0x0021 0x22 0x0022 0x23 0x0023 0x24 0x0024 0x25 0x0025 0x26 0x0026 0x27 0x0027 0x28 0x0028 0x29 0x0029 0x2A 0x002A 0x2B 0x002B 0x2C 0x002C 0x2D 0x002D 0x2E 0x002E 0x2F 0x002F 0x30 0x0030 0x31 0x0031 0x32 0x0032 0x33 0x0033 0x34 0x0034 0x35 0x0035 0x36 0x0036 0x37 0x0037 0x38 0x0038 0x39 0x0039 0x3A 0x003A 0x3B 0x003B 0x3C 0x003C 0x3D 0x003D 0x3E 0x003E 0x3F 0x003F 0x40 0x0040 0x41 0x0041 0x42 0x0042 0x43 0x0043 0x44 0x0044 0x45 0x0045 0x46 0x0046 0x47 0x0047 0x48 0x0048 0x49 0x0049 0x4A 0x004A 0x4B 0x004B 0x4C 0x004C 0x4D 0x004D 0x4E 0x004E 0x4F 0x004F 0x50 0x0050 0x51 0x0051 0x52 0x0052 0x53 0x0053 0x54 0x0054 0x55 0x0055 0x56 0x0056 0x57 0x0057 0x58 0x0058 0x59 0x0059 0x5A 0x005A 0x5B 0x005B 0x5C 0x005C 0x5D 0x005D 0x5E 0x005E 0x5F 0x005F 0x60 0x0060 0x61 0x0061 0x62 0x0062 0x63 0x0063 0x64 0x0064 0x65 0x0065 0x66 0x0066 0x67 0x0067 0x68 0x0068 0x69 0x0069 0x6A 0x006A 0x6B 0x006B 0x6C 0x006C 0x6D 0x006D 0x6E 0x006E 0x6F 0x006F 0x70 0x0070 0x71 0x0071 0x72 0x0072 0x73 0x0073 0x74 0x0074 0x75 0x0075 0x76 0x0076 0x77 0x0077 0x78 0x0078 0x79 0x0079 0x7A 0x007A 0x7B 0x007B 0x7C 0x007C 0x7D 0x007D 0x7E 0x007E 0x7F 0x007F 0x80 0x20AC 0x82 0x201A 0x84 0x201E 0x85 0x2026 0x86 0x2020 0x87 0x2021 0x89 0x2030 0x8A 0x0160 0x8B 0x2039 0x8C 0x015A 0x8D 0x0164 0x8E 0x017D 0x8F 0x0179 0x91 0x2018 0x92 0x2019 0x93 0x201C 0x94 0x201D 0x95 0x2022 0x96 0x2013 0x97 0x2014 0x99 0x2122 0x9A 0x0161 0x9B 0x203A 0x9C 0x015B 0x9D 0x0165 0x9E 0x017E 0x9F 0x017A 0xA0 0x00A0 0xA1 0x02C7 0xA2 0x02D8 0xA3 0x0141 0xA4 0x00A4 0xA5 0x0104 0xA6 0x00A6 0xA7 0x00A7 0xA8 0x00A8 0xA9 0x00A9 0xAA 0x015E 0xAB 0x00AB 0xAC 0x00AC 0xAD 0x00AD 0xAE 0x00AE 0xAF 0x017B 0xB0 0x00B0 0xB1 0x00B1 0xB2 0x02DB 0xB3 0x0142 0xB4 0x00B4 0xB5 0x00B5 0xB6 0x00B6 0xB7 0x00B7 0xB8 0x00B8 0xB9 0x0105 0xBA 0x015F 0xBB 0x00BB 0xBC 0x013D 0xBD 0x02DD 0xBE 0x013E 0xBF 0x017C 0xC0 0x0154 0xC1 0x00C1 0xC2 0x00C2 0xC3 0x0102 0xC4 0x00C4 0xC5 0x0139 0xC6 0x0106 0xC7 0x00C7 0xC8 0x010C 0xC9 0x00C9 0xCA 0x0118 0xCB 0x00CB 0xCC 0x011A 0xCD 0x00CD 0xCE 0x00CE 0xCF 0x010E 0xD0 0x0110 0xD1 0x0143 0xD2 0x0147 0xD3 0x00D3 0xD4 0x00D4 0xD5 0x0150 0xD6 0x00D6 0xD7 0x00D7 0xD8 0x0158 0xD9 0x016E 0xDA 0x00DA 0xDB 0x0170 0xDC 0x00DC 0xDD 0x00DD 0xDE 0x0162 0xDF 0x00DF 0xE0 0x0155 0xE1 0x00E1 0xE2 0x00E2 0xE3 0x0103 0xE4 0x00E4 0xE5 0x013A 0xE6 0x0107 0xE7 0x00E7 0xE8 0x010D 0xE9 0x00E9 0xEA 0x0119 0xEB 0x00EB 0xEC 0x011B 0xED 0x00ED 0xEE 0x00EE 0xEF 0x010F 0xF0 0x0111 0xF1 0x0144 0xF2 0x0148 0xF3 0x00F3 0xF4 0x00F4 0xF5 0x0151 0xF6 0x00F6 0xF7 0x00F7 0xF8 0x0159 0xF9 0x016F 0xFA 0x00FA 0xFB 0x0171 0xFC 0x00FC 0xFD 0x00FD 0xFE 0x0163 0xFF 0x02D9 hevea-2.09/import.hva0000644004317100512160000000123610723547637014614 0ustar marangetcristal\ProvidesPackage{import} \@primitives{import} \newcommand{\@imp@dir}{} \hva@newstack{@imp} \newcommand{\@imp@import}[3] {% \@imp@set{#2}% \@push@imp{\@imp@dir}% \renewcommand{\@imp@dir}{#2}% #1{#3}% \@pop@imp{\@imp@dir}% \@imp@set{\@imp@dir}% } \newcommand{\import}[2]{\@imp@import{\input}{#1}{#2}} \newcommand{\includefrom}[2]{\@imp@import{\include}{#1}{#2}} %%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\@imp@sub}[3] {% \@push@imp{\@imp@dir}% \prim@def\@imp@dir{\@imp@dir{}#2}% \@imp@set{\@imp@dir}% #1{#3}% \@pop@imp{\@imp@dir}% \@imp@set{\@imp@dir}% } \newcommand{\subimport}[2]{\@imp@sub{\input}{#1}{#2}} \newcommand{\subincludefrom}[2]{\@imp@sub{\include}{#1}{#2}} %%%% hevea-2.09/thread.ml0000644004317100512160000000242612017660721014371 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let uptable = Hashtbl.create 17 and nexttable = Hashtbl.create 17 and prevtable = Hashtbl.create 17 ;; let setup file upname = Hashtbl.add uptable file upname and setprev file prevname = Hashtbl.add prevtable file prevname let setnext file nextname = Hashtbl.add nexttable file nextname ;; let setprevnext prev now = if prev <> "" then begin Hashtbl.add nexttable prev now ; Hashtbl.add prevtable now prev end ;; let next name = Hashtbl.find nexttable name and up name = Hashtbl.find uptable name and prev name = Hashtbl.find prevtable name ;; hevea-2.09/spaces.hva0000644004317100512160000000072410417501234014540 0ustar marangetcristal\def\@{} \def\ { } \def\:{ } \def\,{~} \def\!{} \def\;{~} \def\ {\@print{ }} \def\frenchspacing{} \def\nonfrenchspacing{} \def\/{} \newcommand{\hspace*}[1]{\hspace{#1}} \newcommand{\vspace*}[1]{\vspace{#1}} \newcommand{\addvspace}[1]{\vspace{#1}} \def\cr{\\} \def\smallskip{\vspace*{1em}} \def\medskip{\vspace*{1em}} \def\bigskip{\vspace*{2em}} \def\enspace{\hspace*{1em}} \def\quad{\hspace*{2em}} \def\qquad{\hspace*{4em}} %% Paragraphs \def\noindent{} \def\indent{} hevea-2.09/location.mli0000644004317100512160000000204407304505330015074 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type saved val check : unit -> saved val hot : saved -> unit val get : unit -> string val set : string -> Lexing.lexbuf -> unit val restore : unit -> unit type t val get_pos : unit -> t val print_pos : unit -> unit val print_fullpos : unit -> unit val print_this_pos : t -> unit val print_this_fullpos : t -> unit hevea-2.09/listings.hva0000644004317100512160000010035012017660721015117 0ustar marangetcristal\ProvidesPackage{listings} \RequirePackage{keyval} \@primitives{listings} %%%%%%%%%%% interface keyval \def\lst@define@key#1#2{\define@key{lst}{#1}{\@funcall{#2}{##1}}} \newenvironment{lst@protect} {\@clearstyle\def\%{\@print{\%}}% \def\#{\@print{\#}}% \def\${\@print{\$}}% \def\{{\@print{\{}}% \def\}{\@print{\}}}% \def\_{\@print{\_}}% \def\&{\@print{\&}}% \def\ref{\@print{\ref}}} {} \def\lst@define@key@opt#1#2#3{\define@key{lst}{#1}[#3] {\@callopt{#2}{\begin{lst@protect}##1\end{lst@protect}}}} \def\ignore@key#1{\define@key{lst}{#1}{}} %%%%%%%%%%% % Helpers % %%%%%%%%%%% \def\lstinfo#1{\typeout{LST, #1}} \def\lst@iter#1#2{%\hva@warn{\lst@iter '#1' '#2'}% \@iter#1,{#2}} %For getting rid of two (optional) levels of braces \def\lst@eat@again#1XXX#2{\@callsubst{#2}{#1\@empty\@empty\@empty\@empty\@empty}} \def\lst@eat@key#1XXX#2{\@callsubst{\lst@eat@again}{#1XXX#2}} %%%%%%%% Interface with keyval \def\lstset#1{\@setkeys{lst}{#1}} %%%%%%%% Def if not empty \newcommand{\lst@defne}[2]{\ifx#1\@empty\def#1{#2}\fi} %%%%%%%%%%%%% % Toks regs % %%%%%%%%%%%%% \newcommand{\lst@Empty}[1]{\let#1\@empty} %%%%%%%%%%%% % Hooks % %%%%%%%%%%%% \newcommand{\lst@Hook}[1] {\newtokens{\csname lsthk@#1\endcsname}} \newcommand{\lst@ResetHook}[1] {\resettokens{\csname lsthk@#1\endcsname}} \newcommand{\lst@UseHook}[1] {\csname lsthk@#1\endcsname} \newcommand{\lst@AddToHook}[2] {\addtokens{\csname lsthk@#1\endcsname}{#2}} \newcommand{\lst@AddToHookExe}[2] {\lst@AddToHook{#1}{#2}#2} \lst@Hook{EOL}\lst@Hook{InitVarEOL} \lst@Hook{InitVarBOL}\lst@Hook{EveryLine}\lst@Hook{LastLine} \lst@Hook{PreSet} \lst@Hook{InitVar} \lst@Hook{Init} \lst@Hook{DeInit} \lst@Hook{SelectCharTable} \lst@Hook{SetLanguage} \lst@Hook{AfterSetLanguage} \lst@AddToHook{SetLanguage}{\lst@ResetHook{AfterSetLanguage}} \lst@Hook{SetStyle} \def\lststy@{\lsthk@EmptyStyle} \lst@Hook{EmptyStyle} \lst@Hook{EmptyLanguage} \lst@Hook{InlineUnsave} %%Avoid explicit TT in listings, they are useless with style sheets \lst@AddToHook{Init}{\let\tt\@empty} %%%%%%%%%%%% % Keywords % %%%%%%%%%%%% \newtokens{\lst@delete@all@kwd@class}% \def\lst@record@kwd@class#1#2{% %\hva@warn{RECORD '#1' '#2'}% \ifu\csname lst@allkwd@#1\endcsname% \addtokens{\lst@delete@all@kwd@class}{\lst@delete@kwd@class{#1}}\fi% \providecommand{\csname lst@allkwd@#1\endcsname}{}% \lst@AddTo,{\csname lst@allkwd@#1\endcsname}{\lst@normalize{#2}}} \def\lst@delete@kwd@class#1{% %\hva@warn{DELETE '#1'}% \ifu\csname lst@allkwd@#1\endcsname\else \@callprim{\lst@delete@kwds}{\{\csname lst@allkwd@#1\endcsname\}}% \lst@Empty{\csname lst@allkwd@#1\endcsname}\fi} \newcommand{\lst@allotherkeywords}{} \def\lst@record@okwds#1{\lst@AddTo,{\lst@allotherkeywords}{\lst@normalize{#1}}} \newcommand{\lst@alldirectives}{} \def\lst@record@directives#1{\lst@AddTo,{\lst@alldirectives}{\lst@normalize{#1}}} \lst@AddToHook{SetLanguage} {\lst@delete@all@kwd@class% \@callprim{\lst@delete@okwds}{\{\@rawchars{\lst@allotherkeywords}\}}% \@callprim{\lst@delete@directives}{\{\lst@alldirectives\}}} \def\lst@install@kwd#1#2{% %\hva@warn{INSTALL: #2 -> #1}% \def\csname lstk@\lst@normalize{#2}\endcsname{#1}} \def\lst@install@kwds#1#2{% % \hva@warn{RESET: #1}% \lst@delete@kwd@class{#1}% \lst@record@kwd@class{#1}{#2}% \lst@iter{\lst@install@kwd{\csname lst@keywordstyle#1\endcsname}}{#2}} \def\lst@more@kwds#1#2{% % \hva@warn{MORE: #1}% \lst@record@kwd@class{#1}{#2}% \lst@iter{\lst@install@kwd{\csname lst@keywordstyle#1\endcsname}}{#2}} \def\lst@install@directive#1#2{\def\csname lstd@\lst@normalize{#2}\endcsname{#1}} \def\lst@install@directives #1#2{% \lst@directivestrue% \lst@record@directives{#2}% \lst@iter{\lst@install@directive{#1}}{#2}} \def\lst@install@okwds #1#2{% \lst@record@okwds{#2}% \lst@iter{\lst@install@kwd{#1}}{#2}} \def\lst@delete@kwd#1{% %\hva@warn{DELETE #1}% \def\csname lstk@\@rawchars{#1}\endcsname{\lst@identifierstyle}} \def\lst@delete@directive #1{\def\csname lstd@\@rawchars{#1}\endcsname{}} \def\lst@delete@okwds#1{\lst@iter{\lst@delete@okwd}{#1}} \def\lst@delete@kwds#1{%\hva@warn{\lst@delete@kwds '#1'}% \lst@iter{\lst@delete@kwd}{#1}} \def\lst@delete@directives#1{\lst@iter{\lst@delete@directive}{#1}} \def\lst@delete@okwd #1{\def\csname lstk@\@rawchars{#1}\endcsname{}} \def\lst@delay@install#1#2{\lst@AddToHook{AfterSetLanguage} {\lst@install@kwds{#1}{#2}}} \def\lst@delay@more#1#2{\lst@AddToHook{AfterSetLanguage} {\lst@more@kwds{#1}{#2}}} \def\lst@delay@delete#1#2{\lst@AddToHook{AfterSetLanguage}{\lst@delete@kwds{#2}}} \def\lst@keywords@key#1#2\@empty{\lst@install@kwds{#1}{#2}} \def\lst@morekeywords@key#1#2\@empty{\lst@more@kwds{#1}{#2}} \def\lst@deletekeywords@key#1#2\@empty{\lst@delete@kwds{#2}} \define@key{lst}{keywords}[]{\@callsubstopt{\lst@keywords@key}{1}{#1\@empty}} \define@key{lst}{morekeywords}[] {\@callsubstopt{\lst@morekeywords@key}{1}{#1\@empty}} \define@key{lst}{deletekeywords}[] {\@callsubstopt{\lst@deletekeywords@key}{1}{#1\@empty}} %%2nd \define@key{lst}{ndkeywords}[] {\@funcall{\lst@keywords@key}{{2}#1\@empty}} \define@key{lst}{morendkeywords}[] {\@funcall{\lst@morekeywords@key}{{2}#1\@empty}} \define@key{lst}{deletendkeywords}[] {\@funcall{\lst@deletekeywords@key}{{2}#1\@empty}} %%3rd \define@key{lst}{rdkeywords}[]{\@callsubstopt{\lst@keywords@key}{3}{#1\@empty}} \define@key{lst}{morerdkeywords}[] {\@funcall{\lst@morekeywords@key}{{3}#1\@empty}} \define@key{lst}{deleterdkeywords}[] {\@funcall{\lst@deletekeywords@key}{{3}#1\@empty}} %%% Directives \def\lst@delay@dinstall#1#2{\lst@AddToHook{AfterSetLanguage}{\lst@install@directives{#1}{#2}}} \def\lst@delay@ddelete#1{\lst@AddToHook{AfterSetLanguage}{\lst@delete@directives{#1}}} \define@key{lst}{directives}{\lst@delay@dinstall\lst@directivestyle#1} \define@key{lst}{moredirectives}{\lst@delay@dinstall\lst@directivestyle#1} %%%%%%% Styles applied to keywords, strings etc %%%%%% \newcommand{\lst@keywordstyle@key}[2][1] {\def\csname lst@keywordstyle#1\endcsname##1{#2{##1}}} \def\lst@keywordstyle{\csname lst@keywordstyle1\endcsname} \define@key{lst}{keywordstyle}{\@calloptsimple{\lst@keywordstyle@key}{#1}} %\define@key{lst}{keywordstyle}{\def\lst@kwdstyle##1{#1{##1}}} \define@key{lst}{ndkeywordstyle}{\@calloptsimple{\lst@keywordstyle@key}{[2]#1}} \define@key{lst}{rdkeywordstyle}{\@calloptsimple{\lst@keywordstyle@key}{[3]#1}} \define@key{lst}{otherkeywordstyle}{\def\lst@okwdstyle##1{#1{##1}}} \define@key{lst}{directivestyle}{\def\lst@directivestyle##1{#1{##1}}} \define@key{lst}{identifierstyle}[]{\def\lst@identifierstyle##1{#1{##1}}} \define@key{lst}{basicstyle}{\def\lst@basicstyle{#1}} \define@key{lst}{commentstyle}{\def\lst@commentstyle{#1}} \define@key{lst}{stringstyle}{\def\lst@stringstyle{#1}} \lst@AddToHook{EmptyStyle}{\let\lst@stringstyle\@empty} \lst@AddToHook{EmptyStyle}{\let\lst@commentstyle\em} \lst@AddToHook{EmptyStyle}{\let\lst@identifierstyle\@empty} \lst@AddToHook{EmptyStyle}{\let\lst@basicstyle\@empty} \lst@AddToHook{EmptyStyle}{\lst@keywordstyle@key[1]{\bfseries}} \lst@AddToHook{EmptyStyle} {\lst@keywordstyle@key[2]{\csname lst@keywordstyle1\endcsname}} \lst@AddToHook{EmptyStyle} {\lst@keywordstyle@key[3]{\csname lst@keywordstyle1\endcsname}} \lst@AddToHook{EmptyStyle}{\def\lst@okwdstyle{\lst@keywordstyle}} \lst@AddToHook{EmptyStyle}{\def\lst@directivestyle{\lst@keywordstyle}} \lst@AddToHook{EmptyStyle}{\def\lst@directivestyle{\lst@keywordstyle}} %%%%%% Emph identifiers, classes seems to be implemented properly \def\lst@defall#1#2{\def\csname #1\endcsname{#2}} \def\lst@emphstyle@key#1#2\@empty{\lst@defall{lst@emphstyle#1}{#2}} \def\lst@emphstyle{\csname lst@emphstyle1\endcsname} \lst@AddToHook{EmptyStyle}{\let\csname lst@emphstyle1\endcsname\@empty} \define@key{lst}{emphstyle}{\@callsubstopt{\lst@emphstyle@key}{1}{#1\@empty}} \def\lst@record@class#1#2{% \providecommand{\csname lst@allemph@#1\endcsname}{}% \lst@AddTo,{\csname lst@allemph@#1\endcsname}{\lst@normalize{#2}}} \def\lst@delete@class#1{% \ifu\csname lst@allemph@#1\endcsname\else \@callprim{\lst@delete@kwds}{\{\csname lst@allemph@#1\endcsname\}}% \lst@Empty{\csname lst@allemph@#1\endcsname}\fi} \def\lst@moreemph@key#1#2\@empty{% \lst@record@class{#1}{#2}% \lst@iter{\lst@install@kwd{\csname lst@emphstyle#1\endcsname}}{#2}} \define@key{lst}{moreemph}{\@callsubstopt{\lst@moreemph@key}{1}{#1\@empty}} %%%Class number is not checked... \def\lst@deleteemph@key#1#2\@empty{\lst@iter{\lst@delete@kwd}{#2}} \define@key{lst}{deleteemph}{\@callsubstopt{\lst@deleteemph@key}{1}{#1\@empty}} \def\lst@emph@key#1#2\@empty{% \lst@delete@class{#1}% \lst@record@class{#1}{#2}% \lst@iter{\lst@install@kwd{\csname lst@emphstyle#1\endcsname}}{#2}} \define@key{lst}{emph}[]{\@callsubstopt\lst@emph@key{1}{#1\@empty}} %%%%%% Style definitions \define@key{lst}{style}[{}]{\lsthk@SetStyle\csname lst@sty#1\endcsname} \newcommand{\lstdefinestyle}[2] {\def\csname lst@sty#1\endcsname{\lstset{#2}}} %%%%%% Language definitions \newcommand{\lst@define@dd}[2][] {\newcommand{\csname lstdd@\MakeLowercase{#2}\endcsname}{\MakeLowercase{#1}}} \newcommand{\lst@mklang}[2][] {\ifthenelse{\equal{#1}{}} {lstlang@\MakeLowercase{#2}@\csname lstdd@\MakeLowercase{#2}\endcsname} {lstlang@\MakeLowercase{#2}@\MakeLowercase{#1}}} \newcommand{\lst@language@key}[2][] {\lst@UseHook{SetLanguage}% \csname\lst@mklang[#1]{#2}\endcsname% \lst@UseHook{AfterSetLanguage}} % \lst@UseHook{AfterSetLanguage}} \lst@define@key@opt{language}{\lst@language@key}{} \newcommand{\lst@checkdd}[2] {\@ifundefined{lstdd@\MakeLowercase{#1}}{\lst@define@dd[#2]{#1}}{}} %Awfull hack to avoid defining XML language (hevea crash) \def\lst@XML{XML} \newcommand{\lst@definelanguage@}[3] {\def\@tmp{#1}\ifx\@tmp\lst@XML\else \lst@checkdd{#1}{#2}\def\csname\lst@mklang[#2]{#1}\endcsname{\lstset{#3}}\fi} \newcommand{\lst@derivelanguage@}[5] {\lst@checkdd{#1}{#2}% \def\csname\lst@mklang[#2]{#1}\endcsname{\csname\lst@mklang[#4]{#3}\endcsname % \lst@UseHook{AfterSetLanguage}\lst@ResetHook{AfterSetLanguage}% \lstset{#5}}} \lst@define@key@opt{defaultdialect}{\lst@define@dd}{} %%%%%%% Frames \newstyle{.lstlisting}{font-family:monospace;white-space:pre;margin-right:auto;margin-left:0pt;text-align:left} \setenvclass{lstlisting}{lstlisting} \setenvclass{lstframe}{lstframe} \def\lst@bgcolor@in@temp{% \let\old@color\color% \renewcommand{\color}[2][!*!]{\@getstylecolor[##1]{##2}}% \prim@def\lst@temp@bgcolor{background-color:\lst@bgcolor;}% \let\color\old@color} \def\lst@rulecolor@in@temp{% \let\old@color\color% \renewcommand{\color}[2][!*!]{\@getstylecolor[##1]{##2}}% \prim@def\lst@temp@rulecolor{border-color:\lst@rulecolor;}% \let\color\old@color} \def\lst@border@none{border-style:none;} \def\lst@border@leftline{border-left-style:solid;} \def\lst@border@topline{border-top-style:solid;} \def\lst@border@bottomline{border-bottom-style:solid;} \def\lst@border@lines{border-style:solid none;} \def\lst@border@single{border-style:solid;} \def\lst@border@shadowbox{border-style:outset;} \def\lst@frame@in@temp{% \ifu\csname lst@border@\lst@frame\endcsname \prim@def\lst@temp@frame{\lst@see@frame{\lst@frame}}% \else \let\lst@temp@frame\csname lst@border@\lst@frame\endcsname \fi } \let\lst@whitepre\whitepretrue \lst@AddToHook{InitVar} {\ifu\lst@cell@needed \def\@@open@lstbox{\@open{DIV}{\envclass@attr{lstlisting}}}% \def\@close@lstbox{\@close{DIV}}% \else \ifu\lst@bgcolor\def\lst@temp@bgcolor{}\else\lst@bgcolor@in@temp\fi% \ifu\lst@rulecolor\def\lst@temp@rulecolor{}\else\lst@rulecolor@in@temp\fi% \ifu\lst@frame\def\lst@temp@frame{}\else\lst@frame@in@temp\fi% \def\@@open@lstbox{\@opencell{\envclass@attr[ ]{lstframe}style="padding:1ex;\lst@temp@bgcolor\lst@temp@frame\lst@temp@rulecolor"}{}{\envclass@attr{lstlisting}}}% \def\@close@lstbox{\@closecell}% \fi \def\@open@lstbox{\@@open@lstbox\lst@whitepre}} \def\colorwarning{\hva@warn{Colors in listings and 'color' package not loaded}} \define@key{lst}{backgroundcolor} {\ifu\color\colorwarning\else\def\lst@cell@needed{}\def\lst@bgcolor{#1}\fi} \define@key{lst}{frame}{\def\lst@cell@needed{}\def\lst@frame{#1}} \define@key{lst}{rulecolor} {\ifu\color\colorwarning\else\def\lst@cell@needed{}\def\lst@rulecolor{#1}\fi} \lst@iter{\ignore@key} {framexleftmargin,framexrightmargin,framextopmargin,framexbottommargin} \lst@iter{\ignore@key}{fillcolor,rulesepcolor} \lst@iter{\ignore@key}{framesep,rulesep,framerule} \lst@iter{\ignore@key}{frameround,captionpos} %%%%%%% Margins and line shape \def\lst@doindent#1{} \define@key{lst}{indent}{\def\lst@doindent{\hspace{#1}}} \define@key{lst}{xleftmargin}{\def\lst@doindent{\hspace{#1}}} \lst@iter{\ignore@key} {linewitdh,xrightmargin,resetmargin,prebreak,postbreak,% breakindent,breakautoindent} %%%%%%% Lines %%% Those two I don't care \define@key{lst}{numbersep}{} \define@key{lst}{numberblanklines}{} \newcounter{lstlabel}\newcounter{lstlastline} \lst@AddToHook{InitVar}{\let\@currentlabel\thelstlabel} \newcommand{\lst@saved@lastline} {\@ifundefined{lst@intname}{} {\@ifundefined{thelst@saved@\lst@intname} {0} {\value{lst@saved@\lst@intname}}}} \def\@lst@compute@firstline{% \@ifundefined{lst@intname}{\def\lst@firstline{1}} {\@ifundefined{thelst@saved@\lst@intname}{\def\lst@firstline{1}} {\def\lst@firstline{\csname thelst@saved@\lst@intname\endcsname+1}}}} \def\@auto{auto}\def\@last{last} \lst@AddToHook{Init} {\@ifundefined{lst@firstline} {\@lst@compute@firstline} {\ifx\lst@firstline\@auto\@lst@compute@firstline\fi \ifx\lst@firstline\@last\def\lst@firstline{\thelstlastline+1}\fi}} \define@key{lst}{name}{\def\lst@intname{#1}} \define@key{lst}{firstlabel}{\def\lst@firstline{#1}} \define@key{lst}{firstnumber}{\def\lst@firstline{#1}} \define@key{lst}{advancelabel}{\def\lst@firstline{\lst@saved@lastline+#1+1}} \lst@AddToHook{Init}{\setcounter{lstlabel}{\lst@firstline-1}} \lst@AddToHook{DeInit} {\setcounter{lstlastline}{\value{lstlabel}}% \@ifundefined{lst@intname}{} {\@ifundefined{thelst@saved@\lst@intname} {\newcounter{lst@saved@\lst@intname}% \gdef\csname thelst@saved@\lst@intname\endcsname{\arabic{lst@saved@\lst@intname}}} {}% \setcounter{lst@saved@\lst@intname}{\value{lstlabel}}}} \define@key{lst}{labelstyle}{\def\lst@labelstyle##1{{#1{##1}}}} \define@key{lst}{numberstyle}{\def\lst@labelstyle##1{{#1{##1}}}} \newcommand{\lst@labelstyle}[1]{#1} \define@key{lst}{labelstep}{\def\lst@labelstep{#1}} \define@key{lst}{stepnumber}{\def\lst@labelstep{#1}} \lst@AddToHook{InlineUnsave}{\def\lst@labelstep{1}} \lst@AddToHookExe{EmptyStyle}{\def\lst@labelstep{1}} \define@key{lst}{labelsep}{\def{\lst@labelsep}{\hspace{#1}}} \newcommand{\lst@labelsep}{\hspace{1ex}} \newcommand{\lst@pad}[1]{\@pad{\@print{ }}{4}{#1}} \newcommand{\lst@linenumber@}[1] {\lst@labelstyle{\lst@pad{#1}}\lst@labelsep} \newboolean{lst@numbers} \newcommand{\lst@linenumber} {\ifthenelse{\boolean{lst@numbers}} {\ifthenelse{\lst@labelstep=0} {} {\ifthenelse {0=\value{lstlabel}-\(\value{lstlabel}/\lst@labelstep\)*\lst@labelstep} {\lst@linenumber@{\thelstlabel}} {\lst@linenumber@{}}}} {}} \lst@AddToHook{InitVarEOL}{\stepcounter{lstlabel}} \newsavebox{\@prevlines} \newsavebox{\@curline} \ifhtml \ifu\lst@@br\def\lst@@br{ }\fi \def\lst@@@br{\global\let\lst@br\lst@@br}%To avoid output of first line skip \else \ifu\lst@@br\let\lst@@br\@br\fi \let\lst@@@br\lst@@br \fi \lst@AddToHook{Init} {\def\lst@br{}} \newcommand{\lst@forget@lastline} {\sbox{\@curline}{}\setcounter{lst@spaces}{0}\addtocounter{lstlabel}{-1}} \newcommand{\@NewLine@} {\usebox{\@prevlines}\usebox{\@curline}\lst@spaces% \sbox{\@prevlines}{}\sbox{\@curline}{}\global\let\@NewLine\lst@spaces} \lst@AddToHook{EveryLine}{\setcounter{lst@spaces}{0}% \sbox{\@prevlines}{\usebox{\@prevlines}\usebox{\@curline}}% \sbox{\@curline}{\lst@br\@rawchars{\lst@doindent}\lst@linenumber}% \global\let\@NewLine\@NewLine@} \lst@AddToHook{LastLine}{\setcounter{lst@spaces}{0}% \sbox{\@prevlines}{\usebox{\@prevlines}\usebox{\@curline}}% \iflst@showlines\usebox{\@prevlines}\fi\sbox{\@prevlines}{}\sbox{\@curline}{}% \global\let\@NewLine\@NewLine@} \lst@AddToHook{Init}{\sbox{\@prevlines}{}\sbox{\@curline}{}\global\let\@NewLine\lst@spaces} \def\lst@numbers@none{\setboolean{lst@numbers}{false}} \def\lst@numbers@left{\setboolean{lst@numbers}{true}} \let\lst@numbers@right\lst@numbers@left \def\lst@numbers#1{\csname lst@numbers@#1\endcsname} \define@key{lst}{numbers}{\lst@numbers{#1}} \lst@AddToHookExe{EmptyStyle}{\lst@numbers{none}} %%%%%% TeX escapes \define@key{lst}{texcl}[true]{\def\lst@texcl{#1}} \setboolean{lst@texcl}{false} \lst@AddToHook{Init} {\@ifundefined{lst@texcl}{} {\setboolean{lst@texcl}{\lst@boolean{\lst@texcl}}}} \lst@AddToHook{DeInit}{\setboolean{lst@texcl}{false}} \define@key{lst}{mathescape}[true]{\def\lst@mathescape{#1}} \setboolean{lst@mathescape}{false} \lst@AddToHook{Init} {\@ifundefined{lst@mathescape}{} {\setboolean{lst@mathescape}{\lst@boolean{\lst@mathescape}}}} \lst@AddToHook{DeInit}{\setboolean{lst@mathescape}{false}} \def\lst@BET{}\def\lst@EET{} \newcommand{\lst@Esc@key}[2] {\def\lst@BET{\@rawchars{#1}}\def\lst@EET{\@rawchars{#2}}} \define@key{lst}{escapeinside}{\@callsubst{\lst@Esc@key}{#1{}}} \define@key{lst}{escapechar}[{}]{\lst@Esc@key#1#1} \def\lst@escapebegin{} \define@key{lst}{escapebegin}[]{\def\lst@escapebegin{#1}} \def\lst@escapeend{} \define@key{lst}{escapeend}[]{\def\lst@escapeend{#1}} %%%%%% Ignore input \newcommand{\lst@gobble}{0} \define@key{lst}{gobble}{\def\lst@gobble{#1}} \define@key{lst}{first}{\def\lst@first{#1}} \define@key{lst}{firstline}{\def\lst@first{#1}} \define@key{lst}{last}{\def\lst@last{#1}} \define@key{lst}{lastline}{\def\lst@last{#1}} \define@key{lst}{linerange}{\def\lst@linerange{#1}} \lst@AddToHook{PreSet} {\newcommand{\lst@first}{1}\newcommand{\lst@last}{99999}% \let\lst@linerange\@empty} \lst@AddToHook{Init} {\ifx\lst@linerange\@empty \prim@def\lst@linerange{{\lst@first}-{\lst@last}}\fi} % boolean includerangemarker key \define@key{lst}{includerangemarker}[true]{\def\lst@includerangemarker{#1}} \lst@AddToHook{Init} {\@ifundefined{lst@includerangemarker} {\setboolean{lst@includerangemarker}{true}} {\setboolean{lst@includerangemarker}{\lst@boolean{\lst@includerangemarker}}}} %prefix/suffix of markers, one prefix/suffix only \newtokens{\lst@rangebeginprefix}\newtokens{\lst@rangeendprefix}% \newtokens{\lst@rangebeginsuffix}\newtokens{\lst@rangeendsuffix}% \addtokens{\lst@rangebeginprefix}{}\addtokens{\lst@rangeendprefix}{}% \addtokens{\lst@rangebeginsuffix}{}\addtokens{\lst@rangeendsuffix}{}% \define@key{lst}{rangebeginprefix}{\addtokens{\lst@rangebeginprefix}{#1}} \define@key{lst}{rangebeginsuffix}{\addtokens{\lst@rangebeginsuffix}{#1}} \define@key{lst}{rangeendprefix}{\addtokens{\lst@rangeendprefix}{#1}} \define@key{lst}{rangeendsuffix}{\addtokens{\lst@rangeendbeginsuffix}{#1}} \define@key{lst}{rangeprefix} {\addtokens{\lst@rangebeginprefix}{#1}\addtokens{\lst@rangeendprefix}{#1}} \define@key{lst}{rangesuffix} {\addtokens{\lst@rangebeginsuffix}{#1}\addtokens{\lst@rangeendsuffix}{#1}} % boolean print key \define@key{lst}{print}[true]{\def\lst@print{#1}} \lst@AddToHook{Init} {\@ifundefined{lst@print}{\setboolean{lst@print}{true}} {\setboolean{lst@print}{\lst@boolean{\lst@print}}}} % showlines \define@key{lst}{showlines}[true]{\def\lst@showlines{#1}} \lst@AddToHook{Init} {\@ifundefined{lst@showlines} {\setboolean{lst@showlines}{false}} {\setboolean{lst@showlines}{\lst@boolean{\lst@showlines}}}} %%%%%%% Strings \newcommand{\lst@inactivate}[1]{\let#1\@empty} \newcommand{\lst@activate}[1]{#1} \lst@Hook{String} \lst@AddToHook{Init}{\let\lst@do\lst@activate\lst@UseHook{String}} \lst@AddToHook{SetLanguage} {\let\lst@do\lst@inactivate\lst@UseHook{String}} %\newcommand{\lst@stringizer@key@add}[2][] % {\lst@AddToHook{String}{\lst@def@stringizer{#1}{#2}}} %\newcommand{\lst@stringizer@key}[2][] % {\lst@ResetHook{String}\lst@AddToHook{String}{\lst@def@stringizer{#1}{#2}}} %\newcommand{\lst@stringizer@key@delete}[2][]{\lst@ResetHook{String}} %\lst@define@key@opt{stringizer}{\lst@stringizer@key}{} %\lst@define@key@opt{string}{\lst@stringizer@key}{} %\lst@define@key@opt{morestring}{\lst@stringizer@key@add}{} %\lst@define@key@opt{deletestring}{\lst@stringizer@key@delete}{} %%Real keys, that take all three arguments \newcommand{\lst@DS@key}[3] {\def\csname @is@string@#3\endcsname{}}% \newcommand{\lst@SS@key}[3] {\let\lst@do\lst@inactivate\lst@UseHook{String}% \lst@MS@key{#1}{#2}{#3}}% \newcommand{\lst@MS@key}[3] {\ifu\csname @recorded@string@#3\endcsname \let\csname @recorded@string@#3\endcsname\@empty \lst@AddToHook{String} {\lst@do{\csname @is@string@#3\endcsname}}\fi \def\csname @is@string@#3\endcsname{\lst@def@stringizer{#1}{#2}{#3}}}% %%Parse the [][]{} arguments \newcommand{\lst@stringarg@one}[1][b]{\def\lst@arg@one{#1}\lst@stringarg@two} \newcommand{\lst@stringarg@two}[1][stringstyle] {\def\lst@arg@two{#1}\lst@stringarg@three} \newcommand{\lst@stringarg@three}[1] {\lst@cmd{\lst@arg@one}{\lst@arg@two}{#1}} %%%Real key handlers \newcommand{\lst@deletetring@key}{\let\lst@cmd\lst@DS@key\lst@stringarg@one} \newcommand{\lst@string@key}{\let\lst@cmd\lst@SS@key\lst@stringarg@one} \newcommand{\lst@morestring@key}{\let\lst@cmd\lst@MS@key\lst@stringarg@one} \define@key{lst}{deletestring}{\@callsubst{\lst@deletestring@key}{#1}} \define@key{lst}{stringizer}{\@callsubst{\lst@string@key}{#1}} \define@key{lst}{string}{\@callsubst{\lst@string@key}{#1}} \define@key{lst}{morestring}{\@callsubst{\lst@morestring@key}{#1}} % stringspaces \define@key{lst}{stringspaces}[true]{\def\lst@stringspaces{#1}} \define@key{lst}{showstringspaces}[false]{\def\lst@stringspaces{#1}} \setboolean{lst@stringspaces}{false} \lst@AddToHook{Init} {\@ifundefined{lst@stringspaces}{} {\setboolean{lst@stringspaces}{\lst@boolean{\lst@stringspaces}}}} \lst@AddToHook{DeInit}{\setboolean{lst@stringspaces}{false}} %%%%%% Comments % Line comments \newcommand{\lst@LC@key}[3] {\lst@lExtend\lst@DefineComments@LC {\lst@line@comment{#1}{#2}{\@rawchars{#3}}}} \define@key{lst}{commentline}{\lst@LC@key{commentstyle}{#1}} \lst@AddToHookExe{SetLanguage}{\let\lst@DefineComments@LC\@empty} \lst@AddToHook{SelectCharTable}{\lst@DefineComments@LC} % Nested comments \newcommand{\lst@NC@key}[3] {\lst@lExtend\lst@DefineComments@NC {\lst@nested@comment{#1}{\@rawchars{#2}}{\@rawchars{#3}}}} \define@key[2]{lst}{nestedcomment}{\lst@NC@key{commentstyle}{#1}{#2}} \lst@AddToHookExe{SetLanguage}{\let\lst@DefineComments@NC\@empty} \lst@AddToHook{SelectCharTable}{\lst@DefineComments@NC} % Balanced comments \newcommand{\lst@SC@key}[3] {\lst@lExtend\lst@DefineComments@SC {\lst@balanced@comment{#1}{\@rawchars{#2}}{\@rawchars{#3}}}} \define@key[2]{lst}{singlecomment}{\lst@SC@key{commentstyle}{#1}{#2}} \lst@AddToHookExe{SetLanguage}{\let\lst@DefineComments@SC\@empty} \lst@AddToHook{SelectCharTable}{\lst@DefineComments@SC} % Double comments: more or less single comment twice \newcommand{\lst@DC@key}[5] {\lst@lExtend\lst@DefineComments@DC {\lst@balanced@comment{#1}{\@rawchars{#2}}{\@rawchars{#3}}}% \lst@lExtend\lst@DefineComments@DC {\lst@balanced@comment{#1}{\@rawchars{#4}}{\@rawchars{#5}}}} \define@key[4]{lst}{doublecomment}{\lst@DC@key{commentstyle}{#1}{#2}{#3}{#4}} \lst@AddToHookExe{SetLanguage}{\let\lst@DefineComments@DC\@empty} \lst@AddToHook{SelectCharTable}{\lst@DefineComments@DC} %%%%%% New interface for comments grr... \newcommand{\lst@morecomment@d}[5][commentstyle] {\lst@DC@key{#1}{#2}{#3}{#4}{#5}} \newcommand{\lst@morecomment@s}[3][commentstyle]{\lst@SC@key{#1}{#2}{#3}} \newcommand{\lst@morecomment@is}[3][commentstyle] {\hva@warn{Invisible comments not implemented}% \lst@SC@key{#1}{#2}{#3}} \newcommand{\lst@morecomment@n}[3][commentstyle]{\lst@NC@key{#1}{#2}{#3}} %Notice the horible trick to parse morecomment=[l]\\ \def\lst@LC@parse#1#2#3\@empty{\lst@LC@key{#1}{#2}{#3}} \newcommand{\lst@morecomment@l}[1][commentstyle]{\lst@LC@parse{visible}{#1}} \newcommand{\lst@morecomment@il}[1][commentstyle] {\hva@warn{Invisible comments not implemented}% \lst@LC@parse{visible}{#1}} %%% \def\lst@deletecomment@d{\let\lst@DefineComments@DC\@empty} \def\lst@deletecomment@s{\let\lst@DefineComments@SC\@empty} \def\lst@deletecomment@n{\let\lst@DefineComments@NC\@empty} \def\lst@deletecomment@l{\let\lst@DefineComments@LC\@empty} \def\lst@deletecomment@all{% \lst@deletecomment@d\lst@deletecomment@s% \lst@deletecomment@n\lst@deletecomment@l} \def\lst@till@empty#1\@empty{} \newcommand{\lst@morecomment@key}[1][] {\ifu\csname lst@morecomment@#1\endcsname \hva@warn{Unknown comment type '#1'}% \let\lst@next\lst@till@empty\else \let\lst@next\csname lst@morecomment@#1\endcsname\fi \lst@next} \newcommand{\lst@deletecomment@key}[1][] {\ifu\csname lst@deletecomment@#1\endcsname \hva@warn{Unknown comment type '#1'}\else \csname lst@deletecomment@#1\endcsname\fi \lst@till@empty} \newcommand{\lst@comment@key}[1][] {\ifu\csname lst@morecomment@#1\endcsname \hva@warn{Unknown comment type '#1'}% \let\lst@next\lst@till@empty\else \csname lst@deletecomment@all\endcsname \let\lst@next\csname lst@morecomment@#1\endcsname\fi \lst@next} \define@key{lst}{deletecomment}{\@callsubst{\lst@deletecomment@key}{#1\@empty}} \define@key{lst}{comment}{\@callsubst{\lst@comment@key}{#1\@empty}} \define@key{lst}{morecomment}{\@callsubst{\lst@morecomment@key}{#1\@empty}} %%%%%%% General delimiters %Line delimiters \newcommand{\lst@LD@key}[3]{ \lst@lExtend\lst@Define@LD{\lst@line@delim{#1}{#2}{\@rawchars{#3}}}} \lst@AddToHookExe{SetLanguage}{\let\lst@Define@LD\@empty} \lst@AddToHook{SelectCharTable}{\lst@Define@LD} %Single delimiters \newcommand{\lst@SD@key}[4] {\lst@lExtend\lst@Define@SD {\lst@single@delim{#1}{#2}{\@rawchars{#3}}{\@rawchars{#4}}}} \lst@AddToHookExe{SetLanguage}{\let\lst@Define@SD\@empty} \lst@AddToHook{SelectCharTable}{\lst@Define@SD} %%General interface \def\lst@deletedelim@l{\let\lst@Define@LC\@empty} \def\lst@deletedelim@s{\let\lst@Define@SD\@empty} \def\lst@deletedelim@all{\lst@deletedelim@l\lst@deletedelim@s} \newcommand{\lst@deletedelim@key}[1][] {\ifu\csname lst@deletedelim@#1\endcsname \hva@warn{Unknown delimiter type '#1'}\else \csname lst@deletedelim@#1\endcsname\fi \lst@till@empty} %Trick to parse delim=[l]\\ \def\lst@LD@parse#1#2#3\@empty{\lst@LD@key{#1}{#2}{#3}} \newcommand{\lst@moredelim@l}[1][\@empty]{\lst@LD@parse{visible}{#1}} \newcommand{\lst@moredelim@il}[1][\@empty]{\lst@LD@parse{invisible}{#1}} \newcommand{\lst@moredelim@s}[3][\@empty]{\lst@SD@key{visible}{#1}{#2}{#3}} \newcommand{\lst@moredelim@is}[3][\@empty]{\lst@SD@key{invisible}{#1}{#2}{#3}} %Awfull hack to ignore moredelim=*[directive]\# present in lstlang?.sty files %In that case the argument of \lst@moredelim@key is empty %and \lst@moredelim@ is called to eat all arguments up to the final \@empty \newcommand{\lst@moredelim@}{\let\lst@next\lst@till@empty\lst@next} \newcommand{\lst@moredelim@key}[1][] {\ifu\csname lst@moredelim@#1\endcsname \hva@warn{Unknown delimiter type '#1'}% \let\lst@next\lst@till@empty\else \let\lst@next\csname lst@moredelim@#1\endcsname\fi \lst@next} \newcommand{\lst@delim@key}[1][] {\ifu\csname lst@moredelim@#1\endcsname \hva@warn{Unknown delimiter type '#1'}% \let\lst@next\lst@till@empty\else \csname lst@deletedelim@all\endcsname \let\lst@next\csname lst@moredelim@#1\endcsname\fi \lst@next} \define@key{lst}{deletedelim}{\@callsubst{\lst@deletedelim@key}{#1\@empty}} \define@key{lst}{delim}{\@callsubst{\lst@delim@key}{#1\@empty}} \define@key{lst}{moredelim}{\@callsubst{\lst@moredelim@key}{#1\@empty}} %%%%%%% Extended chars and others \def\lst@extendedchars{true} \lst@AddToHook{DeInit}{\setboolean{lst@extendedchars}{true}} \lst@AddToHookExe{SetLanguage}{\setboolean{lst@extendedchars}{true}} \lst@AddToHook{SelectCharTable} {\setboolean{lst@extendedchars}{\lst@boolean{\lst@extendedchars}}} \define@key{lst}{extendedchars}[true]{\def\lst@extendedchars{#1}} \define@key{lst}{showspaces}[true]{\def\lst@showspaces{#1}} \setboolean{lst@showspaces}{false} \lst@AddToHook{Init} {\@ifundefined{lst@showspaces}{} {\setboolean{lst@showspaces}{\lst@boolean{\lst@showspaces}}}} %Tabs... \define@key{lst}{showtabs}[true]{\def\lst@showtabs{#1}} \setboolean{lst@showtabs}{false} \lst@AddToHook{Init} {\@ifundefined{lst@showtabs}{} {\setboolean{lst@showtabs}{\lst@boolean{\lst@showtabs}}}} \lst@AddToHook{DeInit}{\setboolean{lst@showtabs}{false}} \newcommand{\lst@tabsize}{8} \define@key{lst}{tabsize}[8]{\def\lst@tabsize{#1}} \define@key{lst}{tab}{\def\lst@tab{#1}} \lst@iter{\ignore@key}{inputencoding,formfeed} %%%%%%% Alter char categories \def\lst@alsoletter{} \define@key{lst}{alsoletter}{\def\lst@alsoletter{#1}} %%%%%%% Sensitive keywords \lst@AddToHookExe{DeInit}{\setboolean{lst@sensitive}{true}} \lst@AddToHook{SetLanguage}{\setboolean{lst@sensitive}{true}} \define@key{lst}{sensitive}[true]{\setboolean{lst@sensitive}{\lst@boolean{#1}}} %%%%%%% Captions %\lst@AddToHookExe{InlineUnsave} %{\let\lst@caption\@empty% %\let\lst@title\@empty\let\lst@label\@empty} %listing counter \@ifundefined{thechapter} {\newcounter{lstlisting}} {\newcounter{lstlisting}[chapter] \renewcommand\thelstlisting {\ifthenelse{\value{chapter} > 0}{\thechapter.}{}\arabic{lstlisting}}} \lst@AddToHook{InitVar}{\ifu\lst@caption\else\refstepcounter{lstlisting}\fi} %%Keys \define@key{lst}{label}{\def\lst@label{#1}} \define@key{lst}{title}{\def\lst@title{#1}} %\lst@define@key@opt{caption}{\lst@caption@key}{} \define@key{lst}{caption}{\@calloptsimple{\lst@caption@key}{#1}} \newcommand{\lst@caption@key}[2][]{\def\lst@caption{#2}} %%% Output Caption \def\listingname{Listing} \def\@lst@caption {\ifu\lst@caption% \ifu\lst@title\else\begin{center}\lst@title\end{center}\fi\else \begin{center}\listingname~\thelstlisting: % \ifu\lst@label\else\label{\lst@label}\fi\lst@caption\end{center}\\\fi} %%%%%%% Output % Treating spaces with a counter (and not with boxes) enables % optimized style managment \newcounter{lst@spaces} \def\lst@output@space{\stepcounter{lst@spaces}} \lst@AddToHook{Init}{\setcounter{lst@spaces}{0}} \newsavebox{\normalize@box} \def\lst@normalize#1{% \sbox{\normalize@box} {\iflst@sensitive\@rawchars{#1}\else\@rawchars{\MakeLowercase{#1}}\fi}% \usebox{\normalize@box}} \def\lst@output#1#2{% \@NewLine%\lstinfo{OUT: '#1' '#2'}% {\ifu\csname lstk@\lst@normalize{#1}\endcsname \lst@identifierstyle{#2}\else \csname lstk@\lst@normalize{#1}\endcsname{#2}\fi}} \def\lst@output@other#1#2{% \@NewLine%\lstinfo{OTHER: '#1' '#2'}% \ifu\csname lstk@\lst@normalize{#1}\endcsname #2\else {\csname lstk@\lst@normalize{#1}\endcsname{#2}}\fi} \newcounter{lst@save@spaces} \def\save@spaces {\setcounter{lst@save@spaces}{\value{lst@spaces}}\setcounter{lst@spaces}{0}} \def\restore@spaces {\setcounter{lst@spaces}{\value{lst@save@spaces}}} \def\lst@output@directive#1#2{% %\lstinfo{DIRECTIVE: '#1' '#2' '\thelst@spaces'}% \save@spaces\@NewLine\restore@spaces% \ifu\csname lstd@\lst@normalize{#1}\endcsname {\lst@directivestyle{\@print{#}}}% \lst@spaces\lst@output{#1}{#2}\else {\csname lstd@\lst@normalize{#1}\endcsname{\@print{#}\lst@spaces#2}}\fi} %%%%%% Pre and post (already obsolete) \let\lst@pre\@empty \let\lst@post\@empty \define@key{lst}{pre}{\def\lst@pre{#1}} \define@key{lst}{post}{\def\lst@post{#1}} %%% inputencodings (for compatibility only ?) \def\lst@inputencoding@key#1{\inputencoding{#1}} \define@key{lst}{inputencoding}{\lst@inputencoding@key{#1}} %%%%% Column allignement None ! \lst@iter{\ignore@key} {columns,flexiblecolumns,keepspaces,basewidth,fontadjust,aboveskip,belowskip,lineskip,emptylines} %%%%%%% User interface \newcommand{\lstinputlisting}[2][] {\@scaninput{\begin{lstlisting}[#1]{} }{#2}{\end{lstlisting}}} \let\lstdefinelanguage\lst@definelanguage \newcommand{\lstloadlanguage}[1]{} %%%%%% Driver files are loaded directly! \lstset{defaultdialect=[95]Ada, defaultdialect=[68]Algol, defaultdialect=[ANSI]C, defaultdialect=[Objective]Caml, defaultdialect=[1985]Cobol, defaultdialect=[ANSI]C++, defaultdialect=[95]Fortran, defaultdialect=[3.0]Mathematica, defaultdialect=[Standard]Pascal, defaultdialect=[67]Simula, defaultdialect=[plain]TeX} \input{lstlang1.hva} \input{lstlang2.hva} \input{lstlang3.hva} %%%%%%%%%%% Inits \lst@UseHook{SetStyle}\lst@UseHook{EmptyStyle} \lst@UseHook{SetLanguage}\lst@UseHook{EmptyLanguage} \newsavebox{\lst@box} %%%%%% Alternative style, with explicit
    (for copy/paste) \newcommand{\lstavoidwhitepre} {\let\lst@@br\@br% \newstyle{.mouselstlisting}{font-family:monospace;margin-right:auto;margin-left:0pt;text-align:left}% \setenvclass{lstlisting}{mouselstlisting}% \let\lst@whitepre\@empty% \renewcommand{\lst@pad}[1]{\@pad{~}{4}{##1}}} hevea-2.09/esp.mli0000644004317100512160000000202512017660721014055 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: esp.mli,v 1.1 2007-02-09 14:44:50 maranget Exp $ *) (***********************************************************************) exception Failed module type Config = sig val pess : bool val move : bool end module Make(C:Config) : sig val file : string -> unit end (* val process : Emisc.Strings.t option -> string -> in_channel -> out_channel -> bool *) hevea-2.09/html.mli0000644004317100512160000000137111774606345014250 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) include OutManager.S hevea-2.09/thai.hva0000644004317100512160000000003310552666614014216 0ustar marangetcristal\usepackage[thai]{inputenc}hevea-2.09/chngcntr.hva0000644004317100512160000000060510563036154015074 0ustar marangetcristal\ProvidesPackage{chngcntr} \@primitives{chngcntr} %%%%%%%%%%%%%%% \newcommand{\counterwithin*}[2]{\@addtoreset{#1}{#2}} \newcommand{\counterwithin}[2] {\@addtoreset{#1}{#2}% \@namedef{the#1}{\@nameuse{the#2}.\arabic{#1}}} %%%%%%%%%%%%%%% \newcommand{\counterwithout*}[2]{\@removefromreset{#1}{#2}} \newcommand{\counterwithout}[2] {\@removefromreset{#1}{#2}% \@namedef{the#1}{\arabic{#1}}} hevea-2.09/emisc.mli0000644004317100512160000000213312017660721014366 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: emisc.mli,v 1.2 2006-10-09 08:25:16 maranget Exp $ *) (***********************************************************************) val verbose : int ref val basefont : int ref val reset : unit -> unit val dump_class : out_channel -> string -> string -> unit module Strings : Set.S with type elt = string module StringMap : Map.S with type key = string module StringCount : Count.S with type key = string exception LexError of string hevea-2.09/simpleRope.mli0000644004317100512160000000316412017660721015412 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Tibault Suzanne, Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Simple rope data structure *) module type Config = sig val small_length : int end module Make(C:Config) : sig type t (* Basics *) val length : t -> int val of_string : string -> t val singleton : char -> t val empty : t (* Usual strings *) val append : t -> t -> t val append_string : t -> string -> t val append_char : t -> char -> t val sub : t -> int -> int -> t val get : t -> int -> char val iter : (char -> unit) -> t -> unit (* Translations *) val output : out_channel -> t -> unit val debug : out_channel -> t -> unit val blit : t -> string -> int -> unit val to_string : t -> string val to_list : t -> string list val to_list_append : t -> string list -> string list (* Index function *) val index : t -> char -> int val rindex : t -> char -> int (* Hevea specific: erase suffix that validates predicate *) val erase : t -> (char -> bool) -> t end hevea-2.09/latexscan.mll0000644004317100512160000027574112125271032015265 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* $Id: latexscan.mll,v 1.324 2012-06-05 14:55:39 maranget Exp $ *) { open Printf module type S = sig (* external entry points *) val no_prelude : unit -> unit val translate_put_unicode : char -> (unit -> int) -> unit val translate_put_unicode_string : string -> unit val main : Lexing.lexbuf -> unit val expand_command : string -> Lexing.lexbuf -> unit val expand_command_no_skip : string -> Lexing.lexbuf -> unit val print_env_pos : unit -> unit (* additional resources needed for extension modules. *) val cur_env : string ref val new_env : string -> unit val close_env : string -> unit val echo_toimage : unit -> bool val echo_global_toimage : unit -> bool val fun_register : (unit -> unit) -> unit val newif_ref : string -> bool ref -> unit val top_open_block : string -> string -> unit val top_close_block : string -> unit val check_alltt_skip : Lexing.lexbuf -> unit val skip_pop : Lexing.lexbuf -> unit (* 'def' functions for initialisation only *) val def_code : string -> (Lexing.lexbuf -> unit) -> unit val def_name_code : string -> (string -> Lexing.lexbuf -> unit) -> unit val def_fun : string -> (string -> string) -> unit val get_this_main : string -> string val get_this_arg_mbox : string Lexstate.arg -> string val get_prim_onarg : string Lexstate.arg -> string val check_this_main : string -> bool val get_prim : string -> string val get_prim_arg : Lexing.lexbuf -> string val get_prim_opt : string -> Lexing.lexbuf -> string val get_csname : Lexing.lexbuf -> string end module Make (Dest : OutManager.S) (Image : ImageManager.S) = struct open Misc open Parse_opts open Element open Lexing open Latexmacros open Save open Tabular open Lexstate open MyStack open Subst let sbool = function | false -> "false" | true -> "true" let last_letter name = let c = String.get name (String.length name-1) in ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ;; let top_par n = if not (!display || !in_math) then Dest.par n ;; let if_level = ref 0 ;; let cur_env = ref "" and after = ref [] and stack_env = MyStack.create "stack_env" ;; let echo_toimage () = get_level () = 0 && top_level () and echo_global_toimage () = top_level () let stack_env_pretty () = MyStack.pretty (fun (x,_,_) -> x) stack_env let fun_register f = if get_level () > 0 then after := f :: !after ;; let inc_size i = let n = Dest.get_fontsize () in let new_size = if n+i <= 1 then 1 else if n+i >= 7 then 7 else n+i in Dest.open_mod (Font new_size) ;; (* Horizontal display *) let pre_format = ref None let top_open_display () = if !display then begin if !verbose > 1 then prerr_endline "open display" ; match !pre_format with | Some (Align {vert=s}) -> Dest.open_display_varg (sprintf "style=\"vertical-align:%s\"" s) | _ -> Dest.open_display () end and top_item_display () = if !display then begin Dest.item_display () end and top_force_item_display () = if !display then begin Dest.force_item_display () end ;; let top_close_display () = if !display then begin Dest.close_display () end (* Latex environment stuff *) let print_env_pos () = if MyStack.empty stack_env then begin prerr_endline "No Latex environement is pending" end else begin let _,_,pos = MyStack.pop stack_env in Location.print_this_pos pos ; prerr_endline ("Latex environment '"^ !cur_env^"' is pending") end ;; let new_env env = Latexmacros.open_group () ; push stack_env (!cur_env, !after, Location.get_pos ()) ; cur_env := env ; after := [] ; if !verbose > 1 then begin Location.print_pos () ; fprintf stderr "Begin: %s (%d)\n" env (get_level ()) end let error_env close_e open_e = raise (Misc.Close ("Latex env error: '"^close_e^"' closes '"^open_e^"'")) let close_env env = if !verbose > 1 then begin fprintf stderr "End: %s (%d)\n" env (get_level ()) end ; if env = !cur_env then begin let e,a,_ = pop stack_env in let af = !after in (* List.iter (fun f -> f ()) !after ; *) cur_env := e ; after := a ; Latexmacros.close_group () ; List.iter (fun f -> f ()) af end else error_env env !cur_env ;; type env_saved = string * (unit -> unit) list * (string * (unit -> unit) list * Location.t) MyStack.saved let env_check () = !cur_env, !after, MyStack.save stack_env and env_hot (e,a,s) = cur_env := e ; after := a ; MyStack.restore stack_env s type full_save = { hot : Hot.saved; location : Location.saved; env : env_saved ; lexstate : Lexstate.saved_lexstate ; dest : Dest.saved; get : Get.saved; aux : Auxx.saved; } ;; (* Complete internal check/hot start *) let check_all () = { location = Location.check () ; env = env_check () ; hot = Hot.checkpoint () ; lexstate = Lexstate.check_lexstate () ; dest = Dest.check () ; get = Get.check () ; aux = Auxx.check () ; } and hot_all s = Location.hot s.location ; env_hot s.env ; Lexstate.hot_lexstate s.lexstate ; Dest.hot s.dest ; Get.hot s.get ; Auxx.hot s.aux ; Hot.start s.hot ; () ;; (* Top functions for blocks *) type array_type = {math : bool ; border : bool} type in_table = Table of array_type | NoTable | Tabbing ;; let cur_format = ref [||] and stack_format = MyStack.create "stack_format" and cur_col = ref 0 and stack_col = MyStack.create "stack_col" and in_table = ref NoTable and stack_table = MyStack.create_init "stack_table" NoTable and first_col = ref false and first_border = ref false and stack_first = MyStack.create "stack_first" and stack_first_b = MyStack.create "stack_first_b" and in_multi = ref false and stack_multi_flag = MyStack.create "stack_multi_flag" and stack_multi = MyStack.create "stack_multi" ;; let pretty_array_type = function | Table {math = m ; border = b} -> "Table math="^(if m then "+" else "-")^ " border="^(if b then "+" else "-") | NoTable -> "NoTable" | Tabbing -> "Tabbing" let prerr_array_state () = prerr_endline (pretty_array_type !in_table) ; prerr_string " format:"; pretty_formats !cur_format ; prerr_endline "" ; prerr_endline (" cur_col="^string_of_int !cur_col) ; prerr_endline (" first_col="^ (if !first_col then "true" else "false")) ;; let save_array_state () = push stack_format !cur_format ; push stack_col !cur_col ; push stack_table !in_table ; push stack_first !first_col; push stack_first_b !first_border; push stack_multi_flag !in_multi ; in_multi := false ; if !verbose > 1 then begin prerr_endline "Save array state:" ; prerr_array_state () end and restore_array_state () = in_table := pop stack_table ; cur_col := pop stack_col ; cur_format := pop stack_format ; first_col := pop stack_first ; first_border := pop stack_first_b; in_multi := pop stack_multi_flag ; if !verbose > 1 then begin prerr_endline "Restore array state:" ; prerr_array_state () end ;; let top_open_block block args = push stack_table !in_table ; in_table := NoTable ; begin match block with | "pre" -> push stack_display !display ; if !display then begin Dest.item_display () ; display := false end ; Dest.open_block "pre" args | "display" -> push stack_display !display ; display := true ; Dest.open_display_varg args | "table" -> save_array_state () ; in_table := NoTable ; top_force_item_display () ; Dest.open_block "table" args | "tr" -> Dest.open_block "tr" args | "td" -> Dest.open_block "td" args ; top_open_display () | _ -> if !display then begin Dest.item_display () ; Dest.open_block block args ; Dest.open_display () end else Dest.open_block block args end and top_close_block_aux close_fun block = if !verbose > 2 then prerr_endline ("Top close: "^block) ; in_table := pop stack_table ; begin match block with | "pre" -> display := pop stack_display ; close_fun block ; top_item_display () | "display" -> Dest.close_display () ; display := pop stack_display | "table" -> close_fun "table" ; top_force_item_display () ; restore_array_state () | "tr" -> close_fun "tr" | "td" -> top_close_display () ; close_fun "td" | _ -> if !display then begin Dest.close_display () ; close_fun block ; Dest.item_display () end else close_fun block end ;; let top_close_block block = top_close_block_aux Dest.close_block block and top_force_block block = top_close_block_aux (fun name -> Dest.force_block name "") block and top_close_flow block = top_close_block_aux Dest.close_flow block let top_open_group () = top_open_block "" "" ; new_env "" and top_close_group () = if !cur_env = "*mbox" then begin top_close_block "" ; in_math := pop stack_in_math ; display := pop stack_display ; if !display then Dest.item_display () ; close_env "*mbox" end else begin top_close_block "" ; close_env "" end ;; let start_mbox () = push stack_table !in_table ; in_table := NoTable ; push stack_in_math !in_math ; in_math := false ; if !display then Dest.item_display () ; push stack_display !display ; display := false ; Dest.open_block "" "" ; new_env "*mbox" ;; let get_fun_result f lexbuf = if !verbose > 1 then prerr_endline ("get_fun") ; let r = Dest.to_string (fun () -> top_open_group () ; Dest.nostyle () ; f lexbuf ; top_close_group ()) in if !verbose > 1 then begin prerr_endline ("get_fun -> '"^r^"'") end ; r let do_get_this start_lexstate restore_lexstate make_style lexfun {arg=s ; subst=subst} = start_lexstate subst; if !verbose > 1 then prerr_endline ("get_this : '"^s^"'") ; verbose := !verbose - 1; let lexer = MyLexing.from_string s in let r = Dest.to_string (fun () -> if !display then Dest.open_display () ; top_open_group () ; make_style () ; lexfun lexer ; top_close_group () ; if !display then Dest.close_display ()) in verbose := !verbose + 1 ; if !verbose > 1 then begin prerr_endline ("get_this '"^s^"' -> '"^r^"'") end ; restore_lexstate () ; r let do_get_this_list start_lexstate restore_lexstate make_style lexfun {arg=s ; subst=subst} = start_lexstate subst; if !verbose > 1 then eprintf "get_this_list get_this : '%a'\n" pretty_body s ; verbose := !verbose - 1; let lexer = MyLexing.from_list s in let r = Dest.to_string (fun () -> if !display then Dest.open_display () ; top_open_group () ; make_style () ; lexfun lexer ; top_close_group () ; if !display then Dest.close_display ()) in verbose := !verbose + 1 ; if !verbose > 1 then begin if !verbose > 1 then eprintf "get_this_list get_this : '%a' -> '%s'\n" pretty_body s r end ; restore_lexstate () ; r let get_this_arg = do_get_this start_lexstate_subst restore_lexstate (fun () -> ()) and get_this_string main s = do_get_this start_lexstate_subst restore_lexstate (fun () -> ()) main (string_to_arg s) let more_buff = Out.create_buff () ;; let default_format = Tabular.Align {hor="left" ; vert = "" ; wrap = false ; pre = "" ; post = "" ; width = Length.Default} ;; let is_table = function | Table _ -> true | _ -> false and is_noborder_table = function | Table {border = b} -> not b | _ -> false and is_border_table = function | Table {border = b} -> b | _ -> raise (Misc.Fatal "is_border_table") and is_tabbing = function | Tabbing -> true | _ -> false and math_table = function | Table {math = m} -> m | _ -> raise (Misc.Fatal "Array construct outside an array") ;; exception EndInside ;; let is_inside = function Tabular.Inside _ -> true | _ -> false let is_border = function | Tabular.Border _ -> true | _ -> false and as_wrap = function | Tabular.Align {wrap = w} -> w | _ -> false and as_pre = function | Tabular.Align {pre=s} -> s | _ -> raise (Misc.Fatal "as_pre") and as_post = function | Tabular.Align {post=s} -> s | f -> raise (Misc.Fatal ("as_post "^pretty_format f)) ;; let get_col format i = let r = if i >= Array.length format+1 then raise (Misc.ScanError ("This array/tabular column has no specification")) else if i = Array.length format then default_format else format.(i) in if !verbose > 2 then begin fprintf stderr "get_col : %d: " i ; prerr_endline (pretty_format r) ; prerr_string " <- " ; pretty_formats format ; prerr_newline () end ; r ;; (* Paragraph breaks are different in tables *) let par_val t = if is_table t then match get_col !cur_format !cur_col with | Tabular.Align {wrap=false} -> None | _ -> Some 0 else Some 1 let show_inside main format i closing = (* if !verbose > -1 then begin prerr_string ("show_inside: "^string_of_int i) end ; *) let t = ref i in begin try while true do begin match get_col format !t with Tabular.Inside s -> let saved_table = !in_table in if math_table saved_table then scan_this main "$" else scan_this main "{" ; let s = get_this_string main s in if math_table saved_table then scan_this main "$" else scan_this main "}" ; Dest.make_inside s !in_multi; | Tabular.Border s -> Dest.make_border s; if !first_border then first_border := false; | _ -> raise EndInside end ; t := !t+1 done with EndInside -> if (!t = i) && (closing || !first_border) then Dest.make_border " "; end ; (* if !verbose > -1 then prerr_endline (" -> "^string_of_int !t) ; *) !t ;; let rec eat_inside format i b insides = if i >= Array.length format then (i , b , insides) else begin let f = get_col format i in if is_inside f then eat_inside format (i+1) b (insides+1) else if is_border f then eat_inside format (i+1) (b+1) insides else i, b, insides end ;; let rec find_end n format i b insides = match n with 0 -> eat_inside format i b insides | _ -> let f = get_col format i in if is_inside f then find_end n format (i+1) b (insides +1) else if is_border f then find_end n format (i+1) (b+1) insides else find_end (n-1) format (i+1) b insides ;; let find_start i = if !first_border then 0 else i let next_no_border format n = let t = ref n in while is_border (get_col format !t) do t:= !t+1 done; !t ;; let do_open_col main format span insides = let save_table = !in_table in Dest.open_cell format span insides (is_border_table !in_table); if not (as_wrap format) && math_table !in_table then begin display := true ; Dest.open_display () end ; if math_table !in_table && not (as_wrap format) then begin scan_this main "$" end else scan_this main "{" ; pre_format := Some format ; scan_this main (as_pre format) ; pre_format := None ; in_table := save_table let open_col main = let _ = Dest.forget_par () in Dest.open_cell_group () ; cur_col := show_inside main !cur_format !cur_col false; let format = (get_col !cur_format !cur_col) in do_open_col main format 1 0 ;; let open_first_col main = first_col := true ; first_border := true; open_col main ;; let erase_col main = let old_format = get_col !cur_format !cur_col in scan_this main (as_post old_format) ; if math_table !in_table && not (as_wrap old_format) then scan_this main "$" else scan_this main "}" ; if !display then begin Dest.close_display () ; display := false end ; Dest.erase_cell () ; Dest.erase_cell_group () ;; let open_row () = cur_col := 0 ; Dest.new_row () and close_row () = Dest.close_row () ;; let do_hline main = if !verbose > 2 then begin fprintf stderr "hline: %d %d" !cur_col (Array.length !cur_format) ; prerr_newline () end ; erase_col main ; Dest.erase_row () ; Dest.make_hline (Array.length !cur_format) (is_noborder_table !in_table); open_row () ; open_first_col main ;; let do_multi n format main = if !verbose > 2 then begin prerr_string ("multicolumn: n="^string_of_int n^" format:") ; pretty_formats format ; prerr_endline "" end ; erase_col main ; let start_span = find_start !cur_col and k,b,insides = find_end n !cur_format !cur_col 0 0 in let end_span = k - b in in_multi := true; let i = show_inside main format 0 true in Dest.open_cell_group () ; do_open_col main (get_col format i) (end_span - start_span) insides ; push stack_multi (!cur_format,k) ; cur_format := format ; cur_col := i ; ;; let close_col_aux main content is_last = let old_format = get_col !cur_format !cur_col in scan_this main (as_post old_format) ; if math_table !in_table && not (as_wrap old_format) then scan_this main "$" else scan_this main "}" ; if !display then begin Dest.close_display () ; display := false end ; if is_last && Dest.is_empty () then Dest.erase_cell () else begin if !in_multi then begin let _ = show_inside main !cur_format (!cur_col+1) true in in_multi := false ; let f,n = pop stack_multi in cur_format := f ; cur_col := next_no_border f n; cur_col := show_inside main !cur_format !cur_col false; end else begin cur_col := !cur_col + 1; cur_col := show_inside main !cur_format !cur_col true; end; Dest.close_cell content; if !first_col then begin first_col := false; first_border := false; end end ; Dest.close_cell_group () ;; let close_col main content = close_col_aux main content false and close_last_col main content = close_col_aux main content true and close_last_row () = if !first_col then Dest.erase_row () else Dest.close_row () ;; (* Compute functions *) let get_style lexfun {arg=s ; subst=env} = start_normal env ; let lexer = MyLexing.from_string s in let r = Dest.to_style (fun () -> lexfun lexer) in end_normal () ; r (* Image stuff *) let stack_entry = MyStack.create "stack_entry" and stack_out = MyStack.create "stack_out" ;; let start_other_scan env lexfun lexbuf = if !verbose > 1 then begin prerr_endline ("Start other scan ("^env^")") ; stack_env_pretty () ; prerr_endline ("Current env is: '"^ !cur_env^"'") ; pretty (fun x -> x) stack_entry end; save_lexstate () ; push stack_entry env ; rev stack_entry ; lexfun lexbuf ;; let start_image_scan s image lexbuf = start_other_scan "toimage" (fun b -> Image.dump s image b) lexbuf ;; let complete_scan main lexbuf = main lexbuf ; close_env (pop stack_out) ; top_close_block "" ; if !verbose > 1 then begin prerr_endline "Complete scan" ; stack_env_pretty () ; prerr_endline ("Current env is: '"^ !cur_env^"'") end ;; let stop_other_scan comment main lexbuf = if !verbose > 1 then begin prerr_endline "Stop image: env stack is" ; stack_env_pretty () ; prerr_endline ("Current env is: '"^ !cur_env^"'") end; let _ = pop stack_entry in if not comment then close_env !cur_env ; if not (MyStack.empty stack_out) then begin complete_scan main lexbuf ; while not (MyStack.empty stack_out) do let lexbuf = previous_lexbuf () in complete_scan main lexbuf done end ; restore_lexstate () ;; let includes_table = Hashtbl.create 17 and check_includes = ref false ;; let add_includes l = check_includes := true ; List.iter (fun x -> Hashtbl.add includes_table x ()) l ;; let check_include s = not !check_includes || begin try Hashtbl.find includes_table s ; true with Not_found -> false end ;; let mk_out_file () = match Parse_opts.name_out,!Parse_opts.destination with | (""|"-"), Parse_opts.Info -> Out.create_buff () | (""|"-"), _ -> Out.create_chan stdout | x , Parse_opts.Info -> Out.create_chan (open_out (x^".tmp")) | x , _ -> Out.create_chan (open_out x) ;; let no_prelude () = if !verbose > 1 then prerr_endline "Filter mode" ; flushing := true ; let _ = Dest.forget_par () in () ; Dest.set_out (mk_out_file ()) ;; let macro_depth = ref 0 ;; let rec expand_toks main = function | [] -> () | s::rem -> expand_toks main rem ; (* eprintf "Executing tokens: '%s'\n" s ; *) scan_this main s let rec do_expand_command main skip_blanks name lexbuf = let loca = Location.get_pos () in try if !verbose > 1 then begin fprintf stderr "expand_command: '%s'\n" name end ; let cur_subst = get_subst () in let exec = if !alltt_loaded then function | Subst body -> if !verbose > 2 then begin eprintf "user macro: [%a]\n%!" Lexstate.pretty_body body end ; let old_alltt = !alltt in MyStack.push stack_alltt old_alltt ; alltt := (match old_alltt with | Not -> Not | _ -> Macro) ; (* fprintf stderr "Enter: %s, %s -> %s\n" name (debug old_alltt) (debug !alltt) ; *) scan_this_list_may_cont main lexbuf cur_subst (string_to_arg body) ; let _ = MyStack.pop stack_alltt in alltt := (match old_alltt, !alltt with | Not, Inside -> Inside | (Macro|Inside), Not -> Not | _, _ -> old_alltt) (* fprintf stderr "After: %s, %s -> %s\n" name (debug old_alltt) (debug !alltt) *) | Toks l -> expand_toks main l | CamlCode f -> f lexbuf else function | Subst body -> if !verbose > 2 then begin eprintf "user macro: [%a]\n%!" Lexstate.pretty_body body end ; scan_this_list_may_cont main lexbuf cur_subst (string_to_arg body) | Toks l -> expand_toks main l | CamlCode f -> f lexbuf in let pat,body = Latexmacros.find name in let saw_par = if (if !in_math then Latexmacros.invisible name else not (effective !alltt) && is_subst body && last_letter name) then begin if !verbose > 2 then prerr_endline ("skipping blanks ("^name^")"); skip_blanks lexbuf end else begin if !verbose > 2 then begin prerr_endline ("not skipping blanks ("^name^")") end ; false end in let args = make_stack name pat lexbuf in if !verbose > 1 then begin eprintf "Expanding macro '%s' {%i}\n" name !macro_depth ; macro_depth := !macro_depth + 1 end ; scan_body exec body args ; if !verbose > 1 then begin eprintf "Cont after macro '%s', display=%B\n" name !display ; macro_depth := !macro_depth - 1 end ; if saw_par then do_expand_command main skip_blanks "\\par" lexbuf with | Misc.EndDocument|Misc.EndInput as e -> raise e | e -> Location.print_this_pos loca ; eprintf "Giving up command: %s\n" name ; raise e ;; let count_newlines s = let l = String.length s in let rec c_rec i = if i >= l then 0 else match s.[i] with | '\n' -> 1 + c_rec (i+1) | _ -> c_rec (i+1) in c_rec 0 ;; let check_case s = match !case with | Lower -> String.lowercase s | Upper -> String.uppercase s | Neutral -> s and check_case_char c = match !case with | Lower -> Char.lowercase c | Upper -> Char.uppercase c | Neutral -> c let translate_put_unicode c next = if !raw_chars then Dest.put_char c else begin let uni = try OutUnicode.translate_in c next with OutUnicode.CannotTranslate -> raise (Error (if Latexmacros.exists "\\inputencodingname" then sprintf "Encoding %s failed on '%c'" (match Latexmacros.find "\\inputencodingname" with | _,Subst s -> Lexstate.body_to_string s | _,_ -> assert false) c else sprintf "Non-ascii '%c' in input, consider using package inputenc" c)) in try Dest.put_unicode uni with Misc.CannotPut -> Misc.warning (sprintf "Cannot output unicode %s (%c)" (OutUnicode.show uni) c) ; Dest.put_char c end let rec translate_next next = match next () with | -1 -> () | c -> translate_put_unicode (Char.chr c) next ; translate_next next let translate_put_unicode_string s = let next = Misc.next_of_string s in translate_next next let top_open_maths main dodo = push stack_in_math !in_math ; in_math := true ; if !display then Dest.item_display () ; push stack_display !display ; if dodo then begin display := true ; Dest.open_maths dodo; end else begin Dest.open_maths dodo; top_open_display () ; end ; scan_this main "\\normalfont" and top_close_maths dodo = in_math := pop stack_in_math ; if dodo then begin Dest.close_maths dodo end else begin top_close_display () ; Dest.close_maths dodo end ; display := pop stack_display ; if !display then begin Dest.item_display () end ;; } let command_name = '\\' (( ['@''A'-'Z' 'a'-'z']+ '*'?) | [^ 'A'-'Z' 'a'-'z'] | "\\*") let hexa = ['0'-'9''a'-'f'] (* Horreur malheur, enfin sait-on jamais (mauvais transcodage) *) let newline = '\n' | ('\r' '\n') rule main = parse (* comments *) | '%' {do_expand_command main skip_blanks "\\@hevea@percent" lexbuf ; main lexbuf} (* Paragraphs *) | newline {do_expand_command main skip_blanks "\\@hevea@newline" lexbuf ; main lexbuf} (* subscripts and superscripts *) | '_' {do_expand_command main skip_blanks "\\@hevea@underscore" lexbuf ; main lexbuf} | '^' {do_expand_command main skip_blanks "\\@hevea@circ" lexbuf ; main lexbuf} (* Math mode *) | "$" | "$$" as lxm {let dodo = lxm <> "$" in if effective !alltt || not (is_plain '$') then begin Dest.put lxm (* vicious case '$x$$y$' *) end else if dodo && not !display && !in_math then begin scan_this main "${}$" end else begin (* General case *) let math_env = if dodo then "*display" else "*math" in if !in_math then begin top_close_maths dodo ; close_env math_env end else begin new_env math_env ; top_open_maths main dodo ; if dodo then ignore (skip_blanks lexbuf) end end ; main lexbuf } (* Definitions of simple macros *) (* inside tables and array *) | [' ''\n']* '&' {do_expand_command main skip_blanks "\\@hevea@amper" lexbuf ; main lexbuf} (* Substitution *) | '#' ['1'-'9'] {let lxm = lexeme lexbuf in begin if effective !alltt || not (is_plain '#') then Dest.put lxm else let i = Char.code lxm.[1] - Char.code '1' in scan_arg (if !alltt_loaded then (fun arg -> let old_alltt = !alltt in alltt := MyStack.pop stack_alltt ; scan_this_list_may_cont main lexbuf (get_subst ()) arg ; alltt := old_alltt ; MyStack.push stack_alltt old_alltt) else (fun arg -> scan_this_list_may_cont main lexbuf (get_subst ()) arg)) i end ; main lexbuf} (* Commands *) | command_name {let name = lexeme lexbuf in do_expand_command main skip_blanks name lexbuf ; main lexbuf} (* Groups *) | '{' {do_expand_command main skip_blanks "\\@hevea@obrace" lexbuf ; main lexbuf} | '}' {do_expand_command main skip_blanks "\\@hevea@cbrace" lexbuf ; main lexbuf} | eof {()} | ' '+ as lxm {if effective !alltt then Dest.put lxm else begin if !display then for _i = 1 to String.length lxm do Dest.put_nbsp () done else Dest.put_char ' ' end ; main lexbuf} (* Alphabetic characters *) | ['a'-'z' 'A'-'Z']+ as lxm {let lxm = check_case lxm in if !in_math then begin scan_this main "{\\it" ; Dest.put lxm; scan_this main "}" end else Dest.put lxm ; main lexbuf} (* Numbers *) | ['0'-'9']+ {let lxm = lexeme lexbuf in Dest.put lxm; main lexbuf} (* Active characters *) | '-' {do_expand_command main skip_blanks "\\@hevea@minus" lexbuf ; main lexbuf } | '`' {do_expand_command main skip_blanks "\\@hevea@backquote" lexbuf ; main lexbuf } | ''' {do_expand_command main skip_blanks "\\@hevea@quote" lexbuf ; main lexbuf } | '~' {do_expand_command main skip_blanks "\\@hevea@tilde" lexbuf ; main lexbuf } (* Spanish stuff *) | '?' {do_expand_command main skip_blanks "\\@hevea@question" lexbuf ; main lexbuf} | '!' {do_expand_command main skip_blanks "\\@hevea@excl" lexbuf ; main lexbuf} (* German stuff *) | '"' {if is_plain '"' then Dest.put_char '"' (* '"' *) else do_expand_command main skip_blanks "\\@hevea@dquote" lexbuf ; main lexbuf} (* One character *) | "^^" (hexa as lxm1) (hexa as lxm2) {let c = Char.chr (hexa_code lxm1 lxm2) in translate_put_unicode c (fun () -> read_lexbuf lexbuf) ; main lexbuf} | _ as lxm {let lxm = check_case_char lxm in translate_put_unicode lxm (fun () -> read_lexbuf lexbuf) ; main lexbuf} and read_lexbuf = parse | eof { -1 } | "^^" (hexa as lxm1) (hexa as lxm2) { hexa_code lxm1 lxm2 } | _ as lxm { Char.code lxm } and complete_newline = parse | (' ' | newline)* as lxm { lxm } and latex2html_latexonly = parse | '%' + [ ' ' '\t' ] * "\\end{latexonly}" [ ^ '\n' ] * '\n' { () } | _ {latex2html_latexonly lexbuf} | eof {fatal "End of file in latex2html_latexonly"} and latexonly = parse '%'+ ' '* ("END"|"end") ' '+ ("LATEX"|"latex") [^'\n']* '\n' {stop_other_scan true main lexbuf} | '%'+ ' '* ("HEVEA"|"hevea") ' '* {latexonly lexbuf} | '%' {latex_comment lexbuf ; latexonly lexbuf} | "\\end" {let {arg=arg} = save_arg lexbuf in if arg = "latexonly" then begin top_close_block "" ; stop_other_scan false main lexbuf end else if arg = top stack_entry then begin let _ = pop stack_entry in push stack_out arg ; begin match Latexmacros.find (end_env arg) with _,(Subst body) -> scan_this_list_may_cont latexonly lexbuf (get_subst ()) (string_to_arg body) | _,_ -> raise (Misc.ScanError ("Bad closing macro in latexonly: '"^arg^"'")) end end else latexonly lexbuf} | command_name | _ {latexonly lexbuf} | eof {if empty stack_lexbuf then () else begin let lexbuf = previous_lexbuf () in latexonly lexbuf end} and latex_comment = parse '\n' | eof {()} | [^'\n']+ {latex_comment lexbuf} and image = parse '%'+ ' '* ("END"|"end") ' '+ ("IMAGE"|"image") [^'\n']* '\n' {stop_other_scan true main lexbuf} | '%'+ ' '* ("HEVEA"|"hevea") ' '* {image lexbuf} | '%' {let lxm = lexeme lexbuf in Image.put lxm ; image_comment lexbuf ; image lexbuf} (* Substitution in image *) | '#' ['1'-'9'] {let lxm = lexeme lexbuf in let i = Char.code (lxm.[1]) - Char.code '1' in scan_arg (scan_this_arg_list image) i ; image lexbuf} | "\\end" {let lxm = lexeme lexbuf in Save.start_echo () ; let {arg=arg} = save_arg lexbuf in let true_arg = Save.get_echo () in if arg = "toimage" then begin top_close_block "" ; stop_other_scan false main lexbuf end else if arg = top stack_entry then begin let _ = pop stack_entry in push stack_out arg ; begin match Latexmacros.find (end_env arg) with _,(Subst body) -> scan_this_list_may_cont image lexbuf (get_subst ()) (string_to_arg body) | _,_ -> raise (Misc.ScanError ("Bad closing macro in image: '"^arg^"'")) end end else begin Image.put lxm ; Image.put true_arg ; image lexbuf end} | command_name as lxm {begin match lxm with (* Definitions of simple macros, bodies are not substituted *) | "\\def" | "\\gdef" -> Save.start_echo () ; skip_csname lexbuf ; ignore (skip_blanks lexbuf) ; let _ = Save.defargs lexbuf in Image.put lxm ; if (Lexstate.top_level()) then begin let _ = save_arg lexbuf in () end ; let saved = Save.get_echo () in Image.put saved | "\\renewcommand" | "\\newcommand" | "\\providecommand" | "\\renewcommand*" | "\\newcommand*" | "\\providecommand*" -> Save.start_echo () ; let _ = save_arg lexbuf in let _ = save_opts ["0" ; ""] lexbuf in let _ = save_arg lexbuf in Image.put lxm ; let saved = Save.get_echo () in Image.put saved | "\\newenvironment" | "\\renewenvironment" | "\\newenvironment*" | "\\renewenvironment*" -> Save.start_echo () ; let _ = save_arg lexbuf in let _ = save_opts ["0" ; ""] lexbuf in let _ = save_arg lexbuf in let _ = save_arg lexbuf in Image.put lxm ; Image.put (Save.get_echo ()) | _ -> Image.put lxm end ; image lexbuf} | _ {let s = lexeme lexbuf in Image.put s ; image lexbuf} | eof {if empty stack_lexbuf then begin if not filter && top_lexstate () then raise (Misc.ScanError ("No \\end{document} found")) end else begin let lexbuf = previous_lexbuf () in image lexbuf end} and image_comment = parse '\n' {Image.put_char '\n'} | eof {()} | [^'\n']+ {let lxm = lexeme lexbuf in Image.put lxm ; image_comment lexbuf} and mbox_arg = parse | ' '+ | '\n' {mbox_arg lexbuf} | eof {if not (empty stack_lexbuf) then begin let lexbuf = previous_lexbuf () in if !verbose > 2 then begin prerr_endline "Poping lexbuf in mbox_arg" ; pretty_lexbuf lexbuf end ; mbox_arg lexbuf end else raise (Misc.ScanError "End of file in \\mbox argument")} | '{' | ("\\bgroup" ' '* '\n'? ' '*) {start_mbox ()} | "" {raise (Misc.ScanError "Cannot find a \\mbox argument here, use braces")} and no_skip = parse | "" { false } and skip_blanks_pop = parse ' '+ {skip_blanks_pop lexbuf} | '\n' {()} | "" {()} | eof {if not (empty stack_lexbuf) then begin let lexbuf = previous_lexbuf () in if !verbose > 2 then begin prerr_endline "Poping lexbuf in skip_blanks" ; pretty_lexbuf lexbuf end ; skip_blanks_pop lexbuf end else ()} and to_newline = parse | '\n' {()} | _ {Out.put_char more_buff (Lexing.lexeme_char lexbuf 0) ; to_newline lexbuf} | eof {if not (empty stack_lexbuf) then let lexbuf = previous_lexbuf () in to_newline lexbuf} and skip_blanks = parse ' '+ {skip_blanks lexbuf} | '\n' {more_skip lexbuf} | "" { false } and more_skip = parse | ' '+ { false } | (' '* '\n')+ ' '* { true } | "" { false } and skip_spaces = parse ' ' * {()} | eof {()} and skip_false = parse | '%' {if is_plain '%' then skip_comment lexbuf ; skip_false lexbuf} | "\\ifthenelse" {skip_false lexbuf} | "\\if" ['a'-'z' 'A'-'Z''@']+ {if_level := !if_level + 1 ; skip_false lexbuf} | "\\else" ['a'-'z' 'A'-'Z''@']+ {skip_false lexbuf} | "\\else" {if !if_level = 0 then begin if skip_blanks lexbuf then do_expand_command main no_skip "\\par" lexbuf end else skip_false lexbuf} | "\\fi" ['a'-'z' 'A'-'Z']+ {skip_false lexbuf} | "\\fi" {if !if_level = 0 then begin if skip_blanks lexbuf then do_expand_command main no_skip "\\par" lexbuf end else begin if_level := !if_level -1 ; skip_false lexbuf end} | _ {skip_false lexbuf} | "" {raise (Error "End of entry while skipping TeX conditional macro")} and comment = parse | ['%'' ']* ("BEGIN"|"begin") ' '+ ("IMAGE"|"image") {skip_comment lexbuf ; start_image_scan "" image lexbuf ; () } (* Backward compatibility with latex2html *) | [ ' ' '\t' ] * "\\begin{latexonly}" {latex2html_latexonly lexbuf } | ['%'' ']* ("HEVEA"|"hevea") ' '* { () } | ['%'' ']* ("BEGIN"|"begin") ' '+ ("LATEX"|"latex") { skip_to_end_latex lexbuf} | "" { skip_comment lexbuf } and skip_comment = parse | [^ '\n']* {if !verbose > 1 then prerr_endline ("Comment:"^lexeme lexbuf) ; if !flushing then Dest.flush_out () } and skip_to_end_latex = parse | '%' ['%'' ']* ("END"|"end") ' '+ ("LATEX"|"latex") {skip_comment lexbuf ; skip_spaces lexbuf} | _ {skip_to_end_latex lexbuf} | eof {fatal ("End of file in %BEGIN LATEX ... %END LATEX")} { let () = () ;; let check_alltt_skip lexbuf = if not (effective !alltt) then begin if skip_blanks lexbuf then do_expand_command main no_skip "\\par" lexbuf end and skip_pop lexbuf = save_lexstate () ; skip_blanks_pop lexbuf ; restore_lexstate () ;; let def_code name f = def_init name f let def_name_code name f = def_init name (f name) let expand_command name lexbuf = do_expand_command main skip_blanks name lexbuf and expand_command_no_skip name lexbuf = do_expand_command main no_skip name lexbuf ;; (* Direct display math, no env opened *) def_code "\\displaymath" (fun lexbuf -> top_open_maths main true ; skip_pop lexbuf) ; def_code "\\enddisplaymath" (fun _lexbuf -> top_close_maths true) ; () ;; def_code "\\@skip@blanks" (fun lexbuf -> skip_pop lexbuf) ;; def_code "\\@hevea@percent" (fun lexbuf -> if effective !alltt || not (is_plain '%') then begin let lxm = lexeme lexbuf in Dest.put lxm ; main lexbuf end else begin comment lexbuf ; if skip_blanks lexbuf then do_expand_command main no_skip "\\par" lexbuf end) ;; def_code "\\@hevea@newline" (fun lexbuf -> let lxm = complete_newline lexbuf in let nlnum = count_newlines lxm in if !Lexstate.withinLispComment then begin if !verbose > 2 then prerr_endline "NL caught after LispComment" ; raise (Misc.EndOfLispComment nlnum) (* QNC *) end else begin if effective !alltt then begin Dest.put_char '\n' ; Dest.put lxm end else if nlnum >= 1 then expand_command "\\par" lexbuf else Dest.put_separator () end) ;; let warn_under = ref true ;; let sub_sup lxm lexbuf = if effective !alltt || not (is_plain lxm) then Dest.put_char lxm else if not !in_math then begin if !warn_under then warning ("'"^Char.escaped lxm^"' occurring outside math mode") ; Dest.put_char lxm end else begin let sup,sub = match lxm with '^' -> let sup = save_arg lexbuf in let sub = save_sub lexbuf in sup,unoption sub | '_' -> let sub = save_arg lexbuf in let sup = save_sup lexbuf in unoption sup,sub | _ -> assert false in Dest.standard_sup_sub (scan_this_arg main) (fun () -> ()) sup sub !display end ;; def_code "\\@hevea@underscore" (fun lexbuf -> sub_sup '_' lexbuf) ; def_code "\\@hevea@circ" (fun lexbuf -> sub_sup '^' lexbuf) ;; def_code "\\mathop" (fun lexbuf -> let symbol = save_arg lexbuf in let {limits=limits ; sup=sup ; sub=sub} = save_sup_sub lexbuf in begin match limits with | (Some Limits|None) when !display -> Dest.limit_sup_sub (scan_this_arg main) (fun _ -> scan_this_arg main symbol) sup sub !display | (Some IntLimits) when !display -> Dest.int_sup_sub true 3 (scan_this_arg main) (fun () -> scan_this_arg main symbol) sup sub !display | _ -> scan_this_arg main symbol ; Dest.standard_sup_sub (scan_this_arg main) (fun _ -> ()) sup sub !display end) ; def_code "\\@mathop" (fun lexbuf -> let symbol = save_arg lexbuf in let {limits=limits ; sup=sup ; sub=sub} = save_sup_sub lexbuf in begin match limits with | (Some Limits) when !display -> Dest.limit_sup_sub (scan_this_arg main) (fun _ -> scan_this_arg main symbol) sup sub !display | (Some IntLimits|None) when !display -> Dest.int_sup_sub true 3 (scan_this_arg main) (fun () -> scan_this_arg main symbol) sup sub !display | _ -> scan_this_arg main symbol ; Dest.standard_sup_sub (scan_this_arg main) (fun _ -> ()) sup sub !display end) ;; def_code "\\@hevea@obrace" (fun _ -> if !activebrace && is_plain '{' then top_open_group () else begin Dest.put_char '{' end) ; def_code "\\bgroup" (fun lexbuf -> top_open_group () ; check_alltt_skip lexbuf) ;; def_code "\\@hevea@cbrace" (fun _ -> if !activebrace && is_plain '}' then begin top_close_group () end else begin Dest.put_char '}' end) ; def_code "\\egroup" (fun lexbuf -> top_close_group () ; check_alltt_skip lexbuf) ;; def_code "\\@hevea@tilde" (fun _lexbuf -> if effective !alltt || not (is_plain '~') then Dest.put_char '~' else Dest.put_nbsp ()) ;; def_code "\\@hevea@question" (fun lexbuf -> if if_next_char '`' lexbuf then begin gobble_one_char lexbuf ; if effective !alltt then Dest.put "?`" else Dest.put_unicode OutUnicode.iques end else Dest.put_char '?') ;; def_code "\\@hevea@excl" (fun lexbuf -> if if_next_char '`' lexbuf then begin gobble_one_char lexbuf ; if effective !alltt then Dest.put "!`" else Dest.put_unicode OutUnicode.iexcl end else Dest.put_char '!') ;; def_code "\\@hevea@dquote" (fun _lexbuf -> Dest.put_char '"') (* '"' *) ;; let get_this_main arg = get_this_string main arg let check_this_main s = if !verbose > 1 then prerr_endline ("check_this: '"^s^"'"); start_normal (get_subst ()) ; Dest.open_block "temp" ""; let r = try scan_this main s ; true with | _ -> false in Dest.erase_block "temp" ; end_normal () ; if !verbose > 1 then prerr_endline ("check_this: '"^s^"' = "^sbool r); r (* '"' *) let do_get_prim_onarg f arg = let plain_sub = is_plain '_' and plain_sup = is_plain '^' and plain_dollar = is_plain '$' and plain_amper = is_plain '&' and plain_quote = is_plain '\'' and plain_backquote = is_plain '`' and plain_minus = is_plain '-' and plain_dquote = is_plain '"' in unset_plain '_' ; unset_plain '^' ; unset_plain '$' ; unset_plain '&' ; unset_plain '\'' ; unset_plain '`' ; unset_plain '-' ; unset_plain '"' ; let old_raw = !raw_chars in let old_case = !case in case := Neutral ; raw_chars := true ; let restore () = raw_chars := old_raw ; case := old_case ; plain_back plain_sub '_' ; plain_back plain_sup '^' ; plain_back plain_dollar '$' ; plain_back plain_amper '&' ; plain_back plain_quote '\'' ; plain_back plain_backquote '`' ; plain_back plain_minus '-' ; plain_back plain_dquote '"' ; (* '"' *) in try let r = f start_normal end_normal Dest.nostyle main arg in restore () ; r with e -> restore () ; raise e let get_prim_onarg arg = do_get_prim_onarg do_get_this arg let get_prim_onarg_list arg = do_get_prim_onarg do_get_this_list arg let get_prim s = get_prim_onarg (string_to_arg s) let get_prim_arg lexbuf = let arg = save_arg lexbuf in get_prim_onarg arg and get_prim_opt def lexbuf = let arg = save_opt def lexbuf in get_prim_onarg_list arg let get_csname lexbuf = let r = protect_save_string (fun lexbuf -> Save.csname get_prim Subst.subst_this lexbuf) lexbuf in (* eprintf "GET CSNAME: '%s'\n" r ; *) r let def_fun name f = def_code name (fun lexbuf -> let arg = subst_arg lexbuf in scan_this main (f arg)) ;; (* Paragraphs *) let do_unskip () = let _ = Dest.forget_par () in Dest.unskip () ;; def_code "\\unskip" (fun lexbuf -> do_unskip () ; check_alltt_skip lexbuf) ;; def_code "\\hva@par" (fun lexbuf -> if !display || !in_math then begin warning "\\par in display or math mode" end else begin match par_val !in_table with | None -> Dest.put_char ' ' | pval -> top_par pval end ; check_alltt_skip lexbuf) ;; (********************************) (* Tokens to be executed at eof *) (********************************) (* Defined as a token register in latexcommon.hva *) let ateof = "\\@ateof" let after_input lexbuf old_toks = begin try expand_command_no_skip ateof lexbuf with e -> Misc.warning (sprintf "Exception '%s' raised by input handler" (Printexc.to_string e)) end ; ignore (Latexmacros.replace ateof old_toks) (* NB: masks Lexstate.input_file *) let input_file loc_verb main filename lexbuf = let old_toks = Latexmacros.replace ateof (Some (zero_pat, Toks [])) in begin try Lexstate.input_file loc_verb main filename ; with e -> after_input lexbuf old_toks ; raise e end ; after_input lexbuf old_toks (* Styles and packages *) let do_documentclass command lexbuf = Save.start_echo () ; let {arg=opt_arg} = save_opt "" lexbuf in let {arg=arg} = save_arg lexbuf in let real_args = Save.get_echo () in begin try if not !styleloaded then input_file (if !verbose > 0 then 1 else 0) main (arg^".hva") lexbuf with Myfiles.Except | Myfiles.Error _ -> raise (Misc.ScanError ("No base style")) end ; if command = "\\documentstyle" then begin List.iter (fun pack -> scan_this main ("\\usepackage{"^pack^"}")) (Save.cite_arg (MyLexing.from_list ("{"::opt_arg@["}"]))) end else if command = "\\documentclass" then begin let opts = String.concat "" opt_arg in scan_this main (sprintf "\\sbox{\\@document@opts}{%s}" opts) end ; (* Save gobal options *) Image.start () ; Image.put "\\newif\\ifimagen\\imagentrue\n" ; Image.put command ; Image.put real_args ; Image.put_char '\n' ; Dest.set_out (mk_out_file ()) ; Dest.stop () ;; def_name_code "\\documentstyle" do_documentclass ; def_name_code "\\documentclass" do_documentclass ;; let do_input lxm lexbuf = Save.start_echo () ; let arg = get_prim_arg lexbuf in let echo_arg = Save.get_echo () in if lxm <> "\\include" || check_include arg then begin try input_file !verbose main arg lexbuf with | Myfiles.Except -> Image.put lxm ; Image.put echo_arg ; Image.put "\n" | Myfiles.Error _ -> () end ;; def_code "\\input" (do_input "\\input") ; def_code "\\include" (do_input "\\include") ; ;; (* Command definitions *) let do_newcommand lxm lexbuf = Save.start_echo () ; let name = get_csname lexbuf in let nargs = save_opts ["0" ; ""] lexbuf in let body = subst_body lexbuf in let echo () = if echo_toimage () && lxm <> "\\@forcecommand" then begin Image.put lxm ; Image.put (Save.get_echo ()) ; Image.put_char '\n' end in let nargs,(def,defval) = match nargs with [a1 ; a2] -> Get.get_int (from_ok a1), (match a2 with | {arg=No s ; subst=env} -> false,mkarg [s] env | {arg=Yes s ; subst=env} -> true,mkarg s env) | _ -> assert false in let pat = latex_pat (if def then [do_subst_this_list defval] else []) nargs in match lxm with | "\\@forcecommand" -> Latexmacros.def name pat (Subst body) | "\\newcommand"|"\\newcommand*" -> echo () ; if Latexmacros.exists name then warning ("Ignoring (re-)definition of '"^name^"' by \\newcommand") else begin Latexmacros.def name pat (Subst body) end | "\\renewcommand"|"\\renewcommand*" -> if not (Latexmacros.exists name) then begin warning ("Defining '"^name^"' by \\renewcommand") end else echo () ; Latexmacros.def name pat (Subst body) | _ -> echo () ; if not (Latexmacros.exists name) then Latexmacros.def name pat (Subst body) ;; def_name_code "\\renewcommand" do_newcommand ; def_name_code "\\renewcommand*" do_newcommand ; def_name_code "\\newcommand" do_newcommand ; def_name_code "\\newcommand*" do_newcommand ; def_name_code "\\providecommand" do_newcommand ; def_name_code "\\providecommand*" do_newcommand ; def_name_code "\\@forcecommand" do_newcommand ;; def_name_code "\\newcolumntype" (fun lxm lexbuf -> Save.start_echo () ; let old_raw = !raw_chars in raw_chars := true ; let name = get_prim_arg lexbuf in raw_chars := old_raw ; let nargs = save_opt "0" lexbuf in let body = subst_body lexbuf in let rest = Save.get_echo () in if echo_toimage () then Image.put (lxm^rest^"\n") ; let col_cmd = Misc.column_to_command name in if Latexmacros.exists col_cmd then warning ("Not (re)-defining column type '"^name^"' with \\newcolumntype") else Latexmacros.def col_cmd (latex_pat [] (Get.get_int nargs)) (Subst body)) ;; let do_newenvironment lxm lexbuf = Save.start_echo () ; let name = get_prim_arg lexbuf in let nargs,optdef = match save_opts ["0" ; ""] lexbuf with | [x ; y ] -> x,y | _ -> assert false in let body1 = subst_body lexbuf in let body2 = subst_body lexbuf in if echo_toimage () then Image.put (lxm^Save.get_echo ()^"\n") ; let do_defs () = Latexmacros.def (start_env name) (latex_pat (match optdef with | {arg=No _} -> [] | {arg=Yes s ; subst=env} -> [do_subst_this_list (mkarg s env)]) (match nargs with | {arg=No _} -> 0 | {arg=Yes s ; subst=env} -> Get.get_int (mkarg s env))) (Subst body1) ; Latexmacros.def (end_env name) zero_pat (Subst body2) in if lxm = "\\newenvironment" || lxm = "\\newenvironment*" then if Latexmacros.exists (start_env name) || Latexmacros.exists (end_env name) then warning ("Not (re)-defining environment '"^name^"' with "^lxm) else do_defs () else begin if not (Latexmacros.exists (start_env name) && Latexmacros.exists (end_env name)) then warning ("Defining environment '"^name^"' with "^lxm) ; do_defs () end ;; def_name_code "\\newenvironment" do_newenvironment ; def_name_code "\\newenvironment*" do_newenvironment ; def_name_code "\\renewenvironment" do_newenvironment ; def_name_code "\\renewenvironment*" do_newenvironment ;; let do_newcounter name within = try Counter.def_counter name within ; Latexmacros.global_def ("\\the"^name) zero_pat (Subst (["\\arabic{"^name^"}"])) with | Failed -> () let do_newtheorem lxm lexbuf = Save.start_echo () ; let name = get_prim_arg lexbuf in let numbered_like = match save_opts [""] lexbuf with | [x] -> x | _ -> assert false in let caption = subst_arg lexbuf in let within = match save_opts [""] lexbuf with | [x] -> x | _ -> assert false in if echo_global_toimage () then Image.put (lxm^Save.get_echo ()^"\n") ; let cname = match numbered_like,within with {arg=No _},{arg=No _} -> do_newcounter name "" ; name | _,{arg=Yes _} -> let within = get_prim_onarg_list (from_ok within) in do_newcounter name within ; name | {arg=Yes _},_ -> get_prim_onarg_list (from_ok numbered_like) in do_expand_command main no_skip ("\\set@th") (MyLexing.from_string ("{"^name^"}")) ; Latexmacros.global_def (start_env name) zero_pat (Subst ["\\begin{th@env}{"^name^"}{"^cname^"}{"^caption^"}"]) ; Latexmacros.global_def (end_env name) zero_pat (Subst ["\\end{th@env}"]) ;; def_name_code "\\newtheorem" do_newtheorem ; def_name_code "\\renewtheorem" do_newtheorem ;; (* Command definitions, TeX style *) let do_def global lxm lexbuf = Save.start_echo () ; let name = get_csname lexbuf in Save.skip_blanks_init lexbuf ; let args_pat,body = if top_level () then let args_pat = Save.defargs lexbuf in let {arg=body} = save_body lexbuf in args_pat,body else let args_pat = Save.defargs (MyLexing.from_string (subst_this (Save.get_defargs lexbuf))) in let body = subst_body lexbuf in args_pat,body in let real_args = Save.get_echo () in if echo_toimage () || (global && echo_global_toimage ()) then begin Image.put (lxm^real_args) ; Image.put_char '\n' end ; (if global then Latexmacros.global_def else Latexmacros.def) name ([],args_pat) (Subst body) ;; def_name_code "\\def" (do_def false) ; def_name_code "\\gdef" (do_def true) ;; let caml_print s = CamlCode (fun _ -> Dest.put s) ;; def_code "\\prim@def" (fun lexbuf -> let name = get_csname lexbuf in Save.skip_blanks_init lexbuf ; let body = get_prim_arg lexbuf in def name zero_pat (caml_print body)) ;; def_code "\\undef" (fun lexbuf -> let name = get_csname lexbuf in Latexmacros.global_undef name) ;; let do_let global lxm lexbuf = Save.start_echo () ; let name = get_csname lexbuf in Save.skip_equal lexbuf ; let alt = get_csname lexbuf in let real_args = Save.get_echo () in try let nargs,body = Latexmacros.find_fail alt in (if global then global_def else def) name nargs body ; if echo_toimage () || (global && echo_global_toimage ()) then begin Image.put lxm ; Image.put real_args ; Image.put "\n" end with | Failed -> warning ("Not binding "^name^" with "^lxm^", command "^alt^" does not exist") ;; def_name_code "\\let" (do_let false) ; ;; let do_global lxm lexbuf = let next = subst_arg lexbuf in begin match next with | "\\def" -> do_def true (lxm^next) lexbuf | "\\let" -> do_let true (lxm^next) lexbuf | _ -> warning "Ignored \\global" end ;; def_name_code "\\global" do_global ;; (* TeXisms *) def_code "\\noexpand" (fun lexbuf -> let arg = subst_arg lexbuf in Dest.put arg) ;; def_code "\\execafter" (fun lexbuf -> let arg = save_arg lexbuf in let next_arg = save_arg lexbuf in let cur_subst = get_subst () in scan_this_may_cont main lexbuf cur_subst next_arg ; scan_this_may_cont main lexbuf cur_subst arg) ;; def_code "\\csname" (fun lexbuf -> ignore (skip_blanks lexbuf) ; let name = "\\"^get_prim (Save.incsname lexbuf) in check_alltt_skip lexbuf ; expand_command name lexbuf) ;; def_code "\\string" (fun lexbuf -> let arg = subst_arg lexbuf in Dest.put arg) ;; let get_num_arg lexbuf = Save.num_arg lexbuf (fun s -> Get.get_int_string (string_to_arg s)) ;; let top_plain c = if not (is_plain c) then begin set_plain c ; fun_register (fun () -> unset_plain c) end and top_unplain c = if is_plain c then begin unset_plain c ; fun_register (fun () -> set_plain c) end ;; def_code "\\catcode" (fun lexbuf -> let arg = save_arg_with_delim "=" lexbuf in let char = Char.chr (Get.get_int_string arg) in let code = get_num_arg lexbuf in begin match char,code with | ('\\',0) | ('{',1) | ('}',2) | ('$',3) | ('&' ,4) | ('#',6) | ('^',7) | ('_',8) | ('~',13) | ('%',14)|('"',12) -> top_plain char | ('{',(11|12)) | ('}',(11|12)) | ('$',(11|12)) | ('&' ,(11|12)) | ('#',(11|12)) | ('^',(11|12)) | ('_',(11|12)) | ('~',(11|12)) | ('%',(11|12)) | ('\\',(11|12))| ('"',13) -> top_unplain char | _ -> warning "This \\catcode operation is not permitted" end ; main lexbuf) ;; def_code "\\chardef" (fun lexbuf -> let csname = get_csname lexbuf in Save.skip_equal lexbuf ; let i = get_num_arg lexbuf in Latexmacros.def csname zero_pat (Subst [string_of_int i])) ;; (* Complicated use of output blocks *) let displayleft lexbuf = let dprev = !display in MyStack.push stack_display dprev ; display := true ; if not dprev then top_open_display () ; let delim = subst_arg lexbuf in let {sub=sub ; sup=sup} = save_sup_sub lexbuf in Dest.left delim (fun vsize -> scan_this main ("\\process@delim{"^delim^"}{"^string_of_int vsize^"}")) (fun vsize -> Dest.int_sup_sub false vsize (scan_this_arg main) (fun () -> ()) sup sub true) ;; let displayright lexbuf = let delim = subst_arg lexbuf in let vsize = Dest.right delim (fun vsize -> scan_this main ("\\process@delim{"^delim^"}{"^string_of_int vsize^"}")) in let {sup=sup ; sub=sub} = save_sup_sub lexbuf in let do_what = (fun () -> ()) in if vsize > 1 then Dest.int_sup_sub false vsize (scan_this_arg main) do_what sup sub !display else Dest.standard_sup_sub (scan_this_arg main) do_what sup sub !display ; let dprev = MyStack.pop stack_display in if not dprev then top_close_display () ; display := dprev ;; def_code "\\left" (fun lexbuf -> if !display then displayleft lexbuf else expand_command "\\textleft" lexbuf) ;; def_code "\\right" (fun lexbuf -> if !display then displayright lexbuf else expand_command "\\textright" lexbuf) ;; def_code "\\over" (fun lexbuf -> if !display then Dest.over lexbuf else Dest.put_char '/' ; ignore (skip_blanks lexbuf)) ;; def_code "\\MakeUppercase" (fun lexbuf -> let arg = save_arg lexbuf in let old_case = !case in case := Upper ; scan_this_arg main arg ; case := old_case) ; def_code "\\MakeLowercase" (fun lexbuf -> let arg = save_arg lexbuf in let old_case = !case in case := Lower ; scan_this_arg main arg ; case := old_case) ; def_fun "\\uppercase" Subst.uppercase ; def_fun "\\lowercase" Subst.lowercase ; ;; (* list items *) (* def_code "\\@linum" (fun _ -> Dest.nitem ()) ; def_code "\\@li" (fun _ -> Dest.item ()) ; def_code "\\@dt" (fun lexbuf -> let arg = subst_arg lexbuf in Dest.ditem (scan_this main) arg ; check_alltt_skip lexbuf) ;; *) def_code "\\@itemize@li" (fun lexbuf -> Dest.item (get_prim_arg lexbuf)) ; def_code "\\@enumerate@linum" (fun lexbuf -> Dest.nitem (get_prim_arg lexbuf)) ; def_code "\\@dtdd" (fun lexbuf -> let arg = subst_arg lexbuf in let dtclass = get_prim_arg lexbuf in let ddclass = get_prim_arg lexbuf in Dest.ditem (scan_this main) arg dtclass ddclass ; check_alltt_skip lexbuf) ;; (* Html primitives *) def_code "\\@open" (fun lexbuf -> let tag = get_prim_arg lexbuf in let arg = get_prim_arg lexbuf in (* eprintf "\\@open{%s}{%s}\n" tag arg ; *) top_open_block tag arg) ;; def_code "\\@insert" (fun lexbuf -> let tag = get_prim_arg lexbuf in let arg = get_prim_arg lexbuf in Dest.insert_block tag arg ) ;; def_code "\\@close" (fun lexbuf -> let tag = get_prim_arg lexbuf in top_close_block tag) ; def_code "\\@force" (fun lexbuf -> let tag = get_prim_arg lexbuf in top_force_block tag) ; def_code "\\@flow" (fun lexbuf -> let tag = get_prim_arg lexbuf in top_close_flow tag) ; ;; (* Paragraphs, used for closing/re-opening P elts explictely *) let out_par do_it = let have_closed = Dest.close_par () in do_it () ; if have_closed then Dest.open_par () ;; def_code "\\@close@par" (fun lexbuf -> ignore (Dest.close_par ()) ; check_alltt_skip lexbuf) ; def_code "\\@open@par" (fun lexbuf -> Dest.open_par () ; check_alltt_skip lexbuf) ; (* Some material (eg hacha directives) must appear outside P *) def_code "\\@out@par" (fun lexbuf -> let arg = save_arg lexbuf in out_par (fun () -> scan_this_arg main arg)) ; () ;; def_code "\\@print" (fun lexbuf -> let {arg=arg} = save_arg lexbuf in Dest.put arg) ;; let put_unicode_default uc = try let txt = OutUnicode.get_default uc in scan_this main txt with Not_found -> Misc.warning (sprintf "Cannot output that numerical entity: %s" (OutUnicode.show uc)) ; Dest.put_char '?' ;; let put_unicode uc = try Dest.put_unicode uc with Misc.CannotPut -> put_unicode_default uc ;; def_code "\\@print@u" (fun lexbuf -> let {arg=arg} = save_arg lexbuf in let uc = OutUnicode.parse arg in put_unicode uc) ;; def_code "\\@print@u@default" (fun lexbuf -> let {arg=arg} = save_arg lexbuf in let uc = OutUnicode.parse arg in put_unicode_default uc) ;; def_code "\\@def@u@default" (fun lexbuf -> let uc = OutUnicode.parse (subst_arg lexbuf) in let default = subst_arg lexbuf in OutUnicode.def_default uc default) ;; def_code "\\@printnostyle" (fun lexbuf -> let {arg=arg} = save_arg lexbuf in top_open_group () ; Dest.nostyle () ; Dest.put arg ; top_close_group ()) ;; def_code "\\@getprintnostyle" (fun lexbuf -> top_open_group () ; Dest.nostyle () ; let arg = get_prim_arg lexbuf in Dest.put arg ; top_close_group ()) ;; def_code "\\@getprint" (fun lexbuf -> let arg = get_prim_arg lexbuf in let buff = MyLexing.from_string arg in Dest.put (Save.tagout buff)) ; ;; def_code "\\@subst" (fun lexbuf -> let arg = subst_arg lexbuf in Dest.put arg) ; def_code "\\@subst@expn" (fun lexbuf -> let arg = subst_expn_arg lexbuf in Dest.put arg) ;; (* write a string in aux file *) def_code "\\@auxdowrite" (fun lexbuf -> let what = save_arg lexbuf in let s = get_this_arg main what in Auxx.swrite s) ;; (* format toc file *) def_code "\\@addtocsec" (fun lexbuf -> let suf = get_prim_arg lexbuf in let anchor = get_prim_arg lexbuf in let level = get_num_arg lexbuf in let {arg=title} = save_arg lexbuf in Auxx.addtoc suf level (sprintf "\\@locref{%s%s}{\\begin{@norefs}%s\\end{@norefs}}" suf anchor title)) ;; (* Second version with anchor disconnected from toc suffix *) def_code "\\@@addtocsec" (fun lexbuf -> let suf = get_prim_arg lexbuf in let anchor = get_prim_arg lexbuf in let level = get_num_arg lexbuf in let {arg=title} = save_arg lexbuf in Auxx.addtoc suf level (sprintf "\\@locref{%s}{\\begin{@norefs}%s\\end{@norefs}}" anchor title)) ;; def_code "\\@addcontentsline" (fun lexbuf -> let saved = check_all () in try let suf = get_prim_arg lexbuf in let level = get_num_arg lexbuf in let {arg=title} = save_arg lexbuf in Auxx.addtoc suf level title with e -> hot_all saved ; Misc.warning (sprintf "Failure of \\@addcontentsline: %s" (Printexc.to_string e))) ;; def_code "\\@notags" (fun lexbuf -> let arg = save_arg lexbuf in let arg = get_this_arg main arg in let r = let buff = MyLexing.from_string arg in Save.tagout buff in Dest.put r) ;; def_code "\\@anti" (fun lexbuf -> let arg = save_arg lexbuf in let envs = get_style (fun _lex -> Dest.clearstyle () ; main _lex) arg in if !verbose > 2 then begin prerr_string ("Anti result: ") ; List.iter (fun s -> prerr_string (Element.pretty_text s^", ")) envs ; prerr_endline "" end ; Dest.erase_mods envs) ;; let styles_stack = MyStack.create "styles" ;; def_code "\\push@styles" (fun _lexbuf -> let envs = get_style main {arg = "" ; subst=top_subst} in MyStack.push styles_stack envs) ; def_code "\\pop@styles" (fun _lexbuf -> let envs = MyStack.pop styles_stack in Dest.clearstyle () ; List.iter Dest.open_mod (List.rev envs)) ;; def_code "\\@style" (fun lexbuf -> let arg = get_prim_arg lexbuf in Dest.open_mod (Style arg) ) ;; def_code "\\@styleattr" (fun lexbuf -> let tag = get_prim_arg lexbuf in let attr = get_prim_arg lexbuf in Dest.open_mod (StyleAttr (tag, attr))) ; def_code "\\@span" (fun lexbuf -> let attr = get_prim_arg lexbuf in Dest.open_mod (StyleAttr ("span", attr))) ;; def_code "\\@fontcolor" (fun lexbuf -> let arg = get_prim_arg lexbuf in Dest.open_mod (Color arg)) ;; (* def_code "\\@styleset" (fun lexbuf -> let arg = get_prim_arg lexbuf in Dest.open_mod (...)) ;; *) def_code "\\@fontsize" (fun lexbuf -> let arg = save_body lexbuf in Dest.open_mod (Font (Get.get_int arg)) ) ;; def_code "\\@nostyle" (fun lexbuf -> Dest.nostyle () ; check_alltt_skip lexbuf) ;; def_code "\\@clearstyle" (fun lexbuf -> Dest.clearstyle () ; check_alltt_skip lexbuf) ;; def_code "\\@incsize" (fun lexbuf -> let arg = save_body lexbuf in inc_size (Get.get_int arg) ) ;; def_code "\\htmlcolor" (fun lexbuf -> let arg = get_prim_arg lexbuf in Dest.open_mod (Color ("\"#"^arg^"\"")) ) ;; def_code "\\usecounter" (fun lexbuf -> let arg = get_prim_arg lexbuf in Counter.set_counter arg 0 ; Dest.set_dcount arg) ;; def_code "\\@fromlib" (fun lexbuf -> let arg = get_prim_arg lexbuf in start_lexstate (); Mysys.put_from_file (Filename.concat Mylib.libdir arg) Dest.put; restore_lexstate ()) ;; def_code "\\@imageflush" (fun lexbuf -> Image.page () ; check_alltt_skip lexbuf) ;; def_code "\\textalltt" (fun lexbuf -> let opt = get_prim_opt "code" lexbuf in let arg = save_arg lexbuf in let old = !alltt in scan_this main "\\mbox{" ; alltt := Inside ; Dest.open_group opt ; scan_this_arg main arg ; Dest.close_group () ; scan_this main "}" ; alltt := old ) ;; def_code "\\@itemdisplay" (fun _lexbuf -> Dest.force_item_display ()) ;; def_code "\\@br" (fun _lexbuf -> Dest.skip_line ()) ;; (* TeX conditionals *) let testif cell lexbuf = if !cell then check_alltt_skip lexbuf else skip_false lexbuf let setif cell b lexbuf = let old = !cell in fun_register (fun () -> cell := old) ; cell := b ; check_alltt_skip lexbuf ;; let extract_if name = let l = String.length name in if l <= 3 || String.sub name 0 3 <> "\\if" then raise (Error ("Bad newif: "^name)) ; String.sub name 3 (l-3) ;; let def_and_register name f = def name zero_pat (CamlCode f) ;; let tbool = function | true -> "+" | false -> "-" let tverb name cell lexbuf = if !verbose > 1 then fprintf stderr "Testing %s -> %s\n" name (tbool !cell) ; testif cell lexbuf ;; let newif_ref name cell = def_and_register ("\\if"^name) (tverb name cell) ; def_and_register ("\\"^name^"true") (setif cell true) ; def_and_register ("\\"^name^"false") (setif cell false) ; register_cell name cell ; fun_register (fun () -> unregister_cell name) ;; let newif lexbuf = let arg = get_csname lexbuf in begin try let name = extract_if arg in let cell = ref false in newif_ref name cell ; with Latexmacros.Failed -> () end ;; exception FailedFirst ;; let rec norm_body k b = match b with | [] -> 0,b | x::xs -> if k >= String.length x then norm_body 0 xs else k,b let same_body = let rec do_rec k1 k2 b1 b2 = match norm_body k1 b1, norm_body k2 b2 with | (_,[]),(_,[]) -> true | ((_,[]),(_,_::_)) | ((_,_::_),(_,[])) -> false | (k1,(x1::_ as b1)),(k2,(x2::_ as b2)) -> let c1 = x1.[k1] and c2 = x2.[k2] in (* eprintf "k1=%i, c1='%c', k2=%i, c2='%c'\n" k1 c1 k2 c2 ; *) c1 = c2 && do_rec (k1+1) (k2+1) b1 b2 in do_rec 0 0 let same_expn (p1,a1) (p2,a2) = (p1 = p2) && (match a1,a2 with | Subst b1,Subst b2 -> (* eprintf "Check: [%a] [%a]\n" Lexstate.pretty_body b1 Lexstate.pretty_body b2 ; *) same_body b1 b2 | _,_ -> a1 = a2) ;; def_code "\\ifx" (fun lexbuf -> let arg1 = get_csname lexbuf in let arg2 = get_csname lexbuf in let r = try let m1 = try Latexmacros.find_fail arg1 with | Failed -> raise FailedFirst in let m2 = Latexmacros.find_fail arg2 in same_expn m1 m2 with | FailedFirst -> begin try let _ = Latexmacros.find_fail arg2 in false with Failed -> true end | Failed -> false in if !verbose > 2 then prerr_endline ("\\ifx -> "^(if r then "true" else "false")) ; if r then check_alltt_skip lexbuf else skip_false lexbuf) ;; def_code "\\ifu" (fun lexbuf -> let arg1 = get_csname lexbuf in try let _ = Latexmacros.find_fail arg1 in skip_false lexbuf with | Failed -> check_alltt_skip lexbuf) ;; def_code "\\ife" (fun lexbuf -> let arg = get_csname lexbuf in let r = get_prim arg in if r <> "" then skip_false lexbuf else check_alltt_skip lexbuf) ;; def_code "\\newif" newif ;; def_code "\\else" (fun lexbuf -> skip_false lexbuf) ;; def_code "\\fi" (fun lexbuf -> check_alltt_skip lexbuf) ;; let sawdocument = ref false ;; let entities = ref (match !symbol_mode with Entity -> true | _ -> false) ;; newif_ref "symb" (ref (match !symbol_mode with Symbol -> true | _ -> false)) ; newif_ref "entities" entities ; newif_ref "symbtext" (ref (match !symbol_mode with SText -> true | _ -> false)) ; newif_ref "raw" raw_chars ; newif_ref "silent" silent; newif_ref "math" in_math ; newif_ref "whitepre" whitepre ; newif_ref "mmode" in_math ; newif_ref "display" display ; newif_ref "verbd" displayverb ; (* NO NEED AFTER BABEL SUPPORT *) (*newif_ref "french" french ;*) newif_ref "html" html; newif_ref "text" text; newif_ref "info" text; newif_ref "mathml" Parse_opts.mathml; newif_ref "optarg" optarg; newif_ref "styleloaded" styleloaded; newif_ref "activebrace" activebrace; newif_ref "pedantic" pedantic ; newif_ref "fixpoint" fixpoint ; newif_ref "moreentities" moreentities; newif_ref "alltt@loaded" alltt_loaded ; newif_ref "filter" (ref filter) ; newif_ref "@sawdocument" sawdocument ; newif_ref "@warnunder" warn_under ; newif_ref "@dumpindex" Misc.dump_index ; def_code "\\iftrue" (testif (ref true)) ; def_code "\\iffalse" (testif (ref false)) ; ;; def_code "\\if@toplevel" (fun lexbuf -> if echo_global_toimage () then check_alltt_skip lexbuf else skip_false lexbuf) ;; (* Bibliographies *) let bib_ref s1 s2 post = Auxx.swrite ("\\citation{"^s1^"}\n") ; scan_this main ("\\@bibref{\\bibtaghook{"^s1^"}}{"^s2^"}{"^post^"}") ;; let cite_arg key = let key = get_prim ("\\bibtaghook{"^key^"}") in match Auxx.bget true key with | None -> "" | Some s -> s ;; def_code "\\cite" (fun lexbuf -> let opt1 = subst_opt "" lexbuf in let has_opt1 = !optarg in let opt2 = subst_opt "" lexbuf in let has_opt2 = !optarg in check_alltt_skip lexbuf ; let args = save_cite_arg lexbuf in let args = Subst.subst_list args in Dest.open_group "" ; scan_this main "\\@open@cite@one" ; if has_opt1 && has_opt2 then begin if not (is_empty_list opt1) then begin scan_this_list main ("\\@cite@pre{"::opt1@["}"]) end end ; scan_this main "\\@open@cite@two" ; let post = let opt = if has_opt1 && has_opt2 then Some opt2 else if has_opt1 then Some opt1 else None in match opt with | Some s -> String.concat "" s | None -> "" in let rec do_rec = function [] -> () | [x] -> bib_ref x (cite_arg x) post | x::rest -> bib_ref x (cite_arg x) "" ; scan_this main "\\@sep@cite\\@sep@cite@space" ; do_rec rest in do_rec args ; scan_this main "\\@close@cite" ; Dest.close_group ()) ;; (* Includes *) def_code "\\includeonly" (fun lexbuf -> let arg = Save.cite_arg lexbuf in add_includes arg ) ;; (* Foot notes *) def_code "\\@stepanchor" (fun lexbuf -> let mark = Get.get_int (save_body lexbuf) in Foot.step_anchor mark) ; def_code "\\@anchorval" (fun lexbuf -> let mark = Get.get_int (save_body lexbuf) in Dest.put (string_of_int (Foot.get_anchor mark))) ;; def_code "\\@footnotetext" (fun lexbuf -> start_lexstate () ; let mark = Get.get_int (save_body lexbuf) in let text = save_arg lexbuf in let text = do_get_this start_normal end_normal Dest.clearstyle main text in Foot.register mark (get_this_string main ("\\@fnmarknote{"^string_of_int mark^"}")) text ; restore_lexstate ()) ;; let foot_noteflush sticky lexbuf = let sec_here = get_prim_arg lexbuf and sec_notes = get_prim "\\@footnotelevel" in start_lexstate () ; Foot.flush sticky (scan_this main) sec_notes sec_here ; restore_lexstate () ;; def_code "\\@footnoteflush" (foot_noteflush false) ; def_code "\\@footnoteflush@sticky" (foot_noteflush true) ;; def_code "\\@footnotesub" (fun _lexbuf -> Foot.sub_notes ()) ; def_code "\\@endfootnotesub" (fun _ -> Foot.end_notes ()) ;; (* Opening and closing environments *) def_code "\\begin" (fun lexbuf -> let env = get_prim_arg lexbuf in new_env env ; top_open_block "" "" ; let macro = start_env env in let old_envi = save stack_entry in push stack_entry env ; begin try do_expand_command main no_skip macro lexbuf with | e -> restore stack_entry old_envi ; raise e end ; restore stack_entry old_envi) ;; def_code "\\end" (fun lexbuf -> let env = get_prim_arg lexbuf in do_expand_command main no_skip (end_env env) lexbuf ; top_close_block "" ; close_env env) ;; (* To close/reopen envs from their associated commands *) def_code "\\@end" (fun lexbuf -> let env = get_prim_arg lexbuf in top_close_block "" ; close_env env) ;; def_code "\\@begin" (fun lexbuf -> let env = get_prim_arg lexbuf in new_env env ; top_open_block "" "") ;; let append_to_opt o s = match o with | "" -> s | _ -> o ^ " " ^s ;; (*****************************) (* To be called by \document *) (*****************************) def_code "\\@begin@document" (fun lexbuf -> let s = get_prim "\\heveaimagedir" in if s <> "" then begin Misc.set_image_opt (append_to_opt (Misc.get_image_opt ()) ("-todir "^s)) end ; check_alltt_skip lexbuf) ;; def_code "\\@addimagenopt" (fun lexbuf -> let opt = get_prim_arg lexbuf in Misc.set_image_opt (append_to_opt (Misc.get_image_opt ()) opt) ; check_alltt_skip lexbuf) ;; def_code "\\@getimagenopt" (fun lexbuf -> Dest.put (Misc.get_image_opt ()) ; check_alltt_skip lexbuf) ;; def_code "\\@imagenopt" (fun lexbuf -> Image.put ("%Options: "^Misc.get_image_opt ()) ; check_alltt_skip lexbuf) ;; def_code "\\@raise@enddocument" (fun _ -> if not !sawdocument then fatal ("\\end{document} with no \\begin{document}") else if not (MyStack.empty stack_env) then error_env "document" !cur_env else begin raise Misc.EndDocument end) ;; let little_more lexbuf = to_newline lexbuf ; Out.to_string more_buff ;; def_code "\\endinput" (fun lexbuf -> let reste = little_more lexbuf in scan_this main reste ; raise Misc.EndInput) ;; (* Boxes *) def_code "\\mbox" (fun lexbuf -> mbox_arg lexbuf) ;; def_code "\\newsavebox" (fun lexbuf -> let name = get_csname lexbuf in try let _ = find_fail name in warning ("Not (re-)defining '"^name^"' with \\newsavebox") with | Failed -> global_def name zero_pat (CamlCode (fun _ -> ()))) ;; def_code "\\providesavebox" (fun lexbuf -> let name = get_csname lexbuf in try let _ = find_fail name in () with | Failed -> global_def name zero_pat (CamlCode (fun _ -> ()))) ;; let get_this_arg_mbox arg = start_mbox () ; let r = get_this_arg main arg in top_close_group () ; r ;; let do_sbox global name body = if not (Latexmacros.exists name) then warning ("\\sbox on undefined bin '"^name^"'") ; let to_print = get_this_arg_mbox body in (if global then global_def else def) name zero_pat (caml_print to_print) ;; def_code "\\savebox" (fun lexbuf -> let name = get_csname lexbuf in warning "savebox"; skip_opt lexbuf ; skip_opt lexbuf ; let body = save_arg lexbuf in do_sbox false name body) ;; def_code "\\sbox" (fun lexbuf -> let name = get_csname lexbuf in let body = save_arg lexbuf in do_sbox false name body) ; def_code "\\gsbox" (fun lexbuf -> let name = get_csname lexbuf in let body = save_arg lexbuf in do_sbox true name body) ; ;; (* Notice that using a bin name as a command also works, but without erasing actives styles *) def_code "\\usebox" (fun lexbuf -> let name = get_csname lexbuf in top_open_group () ; Dest.nostyle () ; expand_command name lexbuf ; top_close_group () ; ()) ;; def_code "\\lrbox" (fun lexbuf -> close_env "lrbox" ; push stack_display !display ; display := false ; let name = get_csname lexbuf in Dest.open_aftergroup (fun s -> def name zero_pat (caml_print s) ; "") ; start_mbox ()) ;; def_code "\\endlrbox" (fun _ -> top_close_group () ; (* close mbox *) Dest.close_group () ; (* close after group *) display := pop stack_display ; new_env "lrbox") ;; (* External acess to close math mode, preserving text/display *) let start_text () = push stack_table !in_table ; in_table := NoTable ; push stack_in_math !in_math ; in_math := false and end_text () = in_math := pop stack_in_math ; in_table := pop stack_table ;; def_code "\\@start@text" (fun _ -> start_text ()) ; def_code "\\@end@text" (fun _ -> end_text ()) ;; (* chars *) def_code "\\char" (fun lexbuf -> let arg = get_num_arg lexbuf in if not !silent && (arg < 32 || (arg > 127 && arg < 161)) then begin Location.print_pos () ; prerr_endline ("Warning: \\char, check output"); end ; translate_put_unicode (Char.chr arg) (fun () -> -1) ; if not (effective !alltt) then check_alltt_skip lexbuf) ;; def_code "\\symbol" (fun lexbuf -> let arg = get_prim_arg lexbuf in scan_this main ("\\char"^arg)) ;; (* labels *) (* Counters *) let alpha_of_int i = String.make 1 (Char.chr (i-1+Char.code 'a')) and upalpha_of_int i = String.make 1 (Char.chr (i-1+Char.code 'A')) ;; let rec roman_of_int = function 0 -> "" | 1 -> "i" | 2 -> "ii" | 3 -> "iii" | 4 -> "iv" | 9 -> "ix" | i -> if i < 9 then "v"^roman_of_int (i-5) else let d = i / 10 and u = i mod 10 in String.make d 'x'^roman_of_int u ;; let uproman_of_int i = String.uppercase (roman_of_int i) ;; let fnsymbol_of_int = function 0 -> " " | 1 -> "*" | 2 -> "#" | 3 -> "%" | 4 -> "\167" | 5 -> "\182" | 6 -> "||" | 7 -> "**" | 8 -> "##" | 9 -> "%%" | i -> alpha_of_int (i-9) ;; let def_printcount name f = def_code name (fun lexbuf -> let cname = get_prim_arg lexbuf in let cval = Counter.value_counter cname in Dest.put (f cval)) ;; def_printcount "\\arabic" string_of_int ; def_printcount "\\alph" alpha_of_int ; def_printcount "\\Alph" upalpha_of_int ; def_printcount "\\roman" roman_of_int; def_printcount "\\Roman" uproman_of_int; def_printcount "\\fnsymbol" fnsymbol_of_int ;; let pad p l s = for _i = l-String.length s downto 1 do translate_put_unicode_string p done ;; def_code "\\@pad" (fun lexbuf -> let p = get_prim_arg lexbuf in let l = Get.get_int (save_body lexbuf) in let arg = get_prim_arg lexbuf in pad p l arg ; translate_put_unicode_string arg) ;; def_code "\\newcounter" (fun lexbuf -> Save.start_echo () ; let name = get_prim_arg lexbuf in let within = get_prim_opt "" lexbuf in let real_args = Save.get_echo () in if echo_global_toimage () then begin Image.put "\\newcounter" ; Image.put real_args ; Image.put_char '\n' end ; do_newcounter name within) ;; def_code "\\addtocounter" (fun lexbuf -> Save.start_echo () ; let name = get_prim_arg lexbuf in let arg = save_body lexbuf in let real_args = Save.get_echo () in if echo_global_toimage () then begin Image.put "\\addtocounter" ; Image.put real_args ; Image.put_char '\n' end ; Counter.add_counter name (Get.get_int arg)) ;; def_code "\\setcounter" (fun lexbuf -> Save.start_echo () ; let name = get_prim_arg lexbuf in let arg = save_body lexbuf in let real_args = Save.get_echo () in if echo_global_toimage () then begin Image.put "\\setcounter" ; Image.put real_args ; Image.put_char '\n' end ; Counter.set_counter name (Get.get_int arg) ) ;; def_code "\\stepcounter" (fun lexbuf -> Save.start_echo () ; let name = get_prim_arg lexbuf in let real_args = Save.get_echo () in if echo_global_toimage () then begin Image.put "\\stepcounter" ; Image.put real_args ; Image.put_char '\n' end ; Counter.step_counter name) ;; (* spacing *) (* let stack_closed = MyStack.create "stack_closed" ;; def_code "\\@saveclosed" (fun lexbuf -> push stack_closed (Dest.get_last_closed ()) ; check_alltt_skip lexbuf) ;; def_code "\\@restoreclosed" (fun lexbuf -> Dest.set_last_closed (pop stack_closed) ; check_alltt_skip lexbuf) ;; *) exception Cannot ;; def_code "\\@getlength" (fun lexbuf -> let arg = get_prim_arg lexbuf in let pxls = match Get.get_length arg with | Length.Pixel n -> n | Length.Char n -> Length.char_to_pixel n | _ -> 0 in (* eprintf "GET LENGTH: %i\n" pxls ; *) Dest.put (string_of_int pxls)) ;; let do_space (warn:string -> unit) (doit:unit -> unit) lexbuf = let arg = subst_arg lexbuf in try let n = match Length.main (MyLexing.from_string arg) with | Length.Char n -> n | Length.Pixel n -> Length.pixel_to_char n | _ -> raise Cannot in for _i=1 to n do doit () done with Cannot -> warn arg ;; let warn_space name arg = warning (name^" with arg '"^arg^"'") ;; let warn_hspace = warn_space "\\hspace" and warn_vspace = warn_space "\\vspace" ;; def_code "\\hspace" (fun lexbuf -> do_space warn_hspace Dest.put_nbsp lexbuf) ; def_code "\\vspace" (fun lexbuf -> do_space warn_vspace Dest.skip_line lexbuf) ; def_code "\\@vdotsfill" (fun lexbuf -> do_space (fun arg -> warning ("vertical length: "^arg) ; scan_this main "\\vdots") (let fst = ref true in (fun () -> if not !fst then Dest.skip_line () else fst := false ; scan_this main "\\vdots")) lexbuf) ;; (* Explicit groups *) def_code "\\begingroup" (fun lexbuf -> new_env "command-group" ; top_open_block "" "" ; check_alltt_skip lexbuf) ;; def_code "\\endgroup" (fun lexbuf -> top_close_block "" ; close_env !cur_env ; check_alltt_skip lexbuf) ;; (* alltt *) register_init "alltt" (fun () -> def_code "\\alltt" (fun _ -> if !verbose > 1 then prerr_endline "begin alltt" ; alltt := Inside ; fun_register (fun () -> alltt := Not) ; Dest.close_block "" ; Dest.open_block "pre" "") ; def_code "\\endalltt" (fun _ -> if !verbose > 1 then prerr_endline "end alltt" ; Dest.close_block "pre" ; Dest.open_block "" "")) ;; (* Multicolumn *) def_code "\\multicolumn" (fun lexbuf -> if not (is_table !in_table) then raise (ScanError "\\multicolumn should occur in some array") ; let n = Get.get_int (save_body lexbuf) in let format = Tabular.main (save_arg lexbuf) in do_multi n format main) ;; def_code "\\hline" (fun lexbuf -> if not (is_table !in_table) then raise (ScanError "\\hline should occur in some array") ; do_hline main ; skip_blanks_pop lexbuf ; let _ = Dest.forget_par () in ()) ;; (* inside tabbing *) let do_tabul lexbuf = if is_tabbing !in_table then begin do_unskip () ; Dest.close_cell ""; Dest.open_cell default_format 1 0 false end ; skip_blanks_pop lexbuf ;; let tabbing_kill lexbuf = if is_tabbing !in_table then begin do_unskip () ; Dest.close_cell ""; Dest.erase_row () ; Dest.new_row () ; Dest.open_cell default_format 1 0 false end ; skip_blanks_pop lexbuf ;; let def_no_fail name f = Latexmacros.def name zero_pat (CamlCode f) ;; let def_tabbing_commands () = def_no_fail "\\=" do_tabul ; def_no_fail "\\>" do_tabul ; def_no_fail "\\kill" tabbing_kill ;; (* Tabular and arrays *) let check_width = function | Length.Char x -> "width:" ^ string_of_int (Length.char_to_pixel x) ^ "px" | Length.Pixel x -> "width:" ^ string_of_int x ^ "px" | Length.Percent x -> "width:" ^ string_of_int x^"%" | _ -> "" ;; let get_table_attributes border len = let attrs = get_prim (if border then "\\@table@attributes@border" else "\\@table@attributes") in Lexattr.add_style (check_width len) attrs let open_tabbing _lexbuf = let lexbuf = Lexstate.previous_lexbuf in let lexfun _lb = Dest.open_table false "style=\"border:0;border-spacing:0\" class=\"cellpadding0\"" ; Dest.new_row (); Dest.open_cell default_format 1 0 false in push stack_table !in_table ; in_table := Tabbing ; new_env "tabbing" ; def_tabbing_commands () ; def "\\a" zero_pat (CamlCode (fun lexbuf -> let acc = subst_arg lexbuf in let arg = subst_arg lexbuf in scan_this main ("\\"^acc^arg))) ; lexfun lexbuf ;; def_code "\\tabbing" open_tabbing ;; let close_tabbing _ = Dest.do_close_cell (); Dest.close_row (); Dest.close_table (); in_table := pop stack_table ; close_env "tabbing" ; ;; def_code "\\endtabbing" close_tabbing ;; let open_array env lexbuf = save_array_state (); Tabular.border := false ; let len = match env with | "tabular*"|"Tabular*" -> let arg = save_arg lexbuf in begin match Get.get_length (get_prim_onarg arg) with | Length.No _ -> warning ("'tabular*' with length argument: "^ do_subst_this arg) ; Length.Default | width -> width end | _ -> Length.Default in let attributes = match env with | "Tabular*" | "Array" | "Tabular" -> get_prim_opt "" lexbuf | _ -> skip_opt lexbuf ; "" in skip_opt lexbuf ; let format = save_arg lexbuf in let format = Tabular.main format in cur_format := format ; push stack_in_math !in_math ; in_table := Table {math = (match env with "array"|"Array" -> true | _ -> false) ; border = !Tabular.border} ; if !display then Dest.force_item_display () ; in_math := false ; push stack_display !display ; display := false ; begin match attributes with | "" -> if !Tabular.border then Dest.open_table true (get_table_attributes true len) else Dest.open_table false (get_table_attributes false len) | _ -> Dest.open_table !Tabular.border (Lexattr.add_style (check_width len) attributes) end ; open_row() ; open_first_col main ; skip_blanks_pop lexbuf ; ;; def_code "\\@array" (open_array "array") ; def_code "\\@tabular" (open_array "tabular") ; def_code "\\@tabular*" (open_array "tabular*") ;; def_code "\\@Array" (open_array "Array") ; def_code "\\@Tabular" (open_array "Tabular") ; def_code "\\@Tabular*" (open_array "Tabular*") ;; let close_array _ = do_unskip () ; close_last_col main "" ; close_last_row () ; Dest.close_table () ; restore_array_state () ; in_math := pop stack_in_math ; display := pop stack_display; if !display then Dest.force_item_display () ; ;; def_code "\\end@array" close_array ; def_code "\\end@tabular" close_array ; def_code "\\end@tabular*" close_array ; def_code "\\end@Array" close_array ; def_code "\\end@Tabular" close_array ; def_code "\\end@Tabular*" close_array ; ;; let do_amper lexbuf = if effective !alltt || not (is_plain '&') then begin let lxm = lexeme lexbuf in translate_put_unicode_string lxm end else if is_table !in_table then begin close_col main " "; open_col main end ; if not (effective !alltt) && is_plain '&' then skip_blanks_pop lexbuf and do_bsbs lexbuf = do_unskip () ; skip_opt lexbuf ; if is_table !in_table then begin close_col main " " ; close_row () ; open_row () ; open_first_col main end else if is_tabbing !in_table then begin Dest.close_cell ""; Dest.close_row () ; Dest.new_row () ; Dest.open_cell default_format 1 0 false end else begin if !display then (*(Dest.put_nbsp ();Dest.put_nbsp ();Dest.put_nbsp ();Dest.put_nbsp ())*) warning "\\\\ in display mode, ignored" else Dest.skip_line () end ; skip_blanks_pop lexbuf ; let _ = Dest.forget_par () in () ;; OutUnicode.def_default OutUnicode.minus "\\@print{-}" ; OutUnicode.def_default OutUnicode.endash "\\@print{--}" ; OutUnicode.def_default OutUnicode.emdash "\\@print{---}" ; () ;; let get_tt_mode () = match get_style (fun _lex -> Dest.clearstyle () ; main _lex) (string_to_arg "\\tt") with | [m] -> m | m::_ -> warning "tt_mode is a complex style" ; m | [] -> warning "tt_mode is an empty style" ; raise Exit let tt_mode = ref (Style "tt") ;; (* Will be called once command \tt is defined *) def_code "\\@set@ttmode" (fun lexbuf -> begin try tt_mode := get_tt_mode () with Exit -> () end ; check_alltt_skip lexbuf) ;; let has_tt () = Dest.has_mod !tt_mode let do_minus lexbuf = if not (effective !alltt) && 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 gobble_one_char lexbuf ; put_unicode OutUnicode.emdash end else put_unicode OutUnicode.endash end else if !in_math && not !raw_chars then put_unicode OutUnicode.minus else Dest.put_char '-' else Dest.put_char '-' ;; 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 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 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 '\'' ;; def_code "\\@hevea@amper" do_amper ; def_code "\\\\" do_bsbs ; def_code "\\@HEVEA@amper" do_amper ; def_code "\\@HEVEA@bsbs" do_bsbs ; def_code "\\@hevea@minus" do_minus ; def_code "\\@hevea@backquote" do_backquote ; def_code "\\@hevea@quote" do_quote ; () ;; (* Other scanners *) def_code "\\latexonly" (fun lexbuf -> start_other_scan "latexonly" latexonly lexbuf) ;; def_code "\\toimage" (fun lexbuf -> start_image_scan "" image lexbuf) ;; (* Commands to control output to image file or target file *) def_code "\\@stopimage" (fun lexbuf -> Image.stop () ; check_alltt_skip lexbuf) ;; def_code "\\@restartimage" (fun lexbuf -> Image.restart () ; check_alltt_skip lexbuf) ;; def_code "\\@stopoutput" (fun lexbuf -> Dest.stop () ; check_alltt_skip lexbuf) ;; def_code "\\@restartoutput" (fun lexbuf -> Dest.restart () ; check_alltt_skip lexbuf) ;; def_code "\\@prim@toimage" (fun lexbuf -> let arg = get_prim_arg lexbuf in Image.put arg) ;; (* Info format specific *) def_code "\\@infomenu" (fun lexbuf -> let arg = get_prim_arg lexbuf in Dest.infomenu arg) ;; def_code "\\@infonode" (fun lexbuf -> let opt = get_prim_opt "" lexbuf in let num = get_prim_arg lexbuf in let nom = get_prim_arg lexbuf in Dest.infonode opt num nom) ;; def_code "\\@infoextranode" (fun lexbuf -> let num = get_prim_arg lexbuf in let nom = get_prim_arg lexbuf in let text = get_prim_arg lexbuf in Dest.infoextranode num nom text) ;; def_code "\\@infoname" (fun lexbuf -> let arg = get_prim_arg lexbuf in Dest.loc_name arg) ;; let safe_len = function | Length.No _ -> Length.Default | l -> l ;; let wrap_hr f = out_par (fun () -> top_open_group () ; Dest.nostyle () ; f () ; top_close_group ()) ;; def_code "\\@printHR" (fun lexbuf -> let arg = get_prim_arg lexbuf in let taille = safe_len (Get.get_length (get_prim_arg lexbuf)) in wrap_hr (fun () -> Dest.horizontal_line arg taille (Length.Pixel 2))) ;; def_code"\\@hr" (fun lexbuf -> let attr = get_prim_opt "" lexbuf in let width = safe_len (Get.get_length (get_prim_arg lexbuf)) in let height = safe_len (Get.get_length (get_prim_arg lexbuf)) in wrap_hr (fun () -> Dest.horizontal_line attr width height)) ;; Get.init get_prim_onarg get_fun_result new_env close_env get_csname main ;; def_code "\\@primitives" (fun lexbuf -> let pkg = get_prim_arg lexbuf in exec_init pkg) ;; (* try e1 with _ -> e2 *) def_code "\\@try" (fun lexbuf -> let saved = check_all () in let e1 = save_arg lexbuf in let e2 = save_arg lexbuf in try top_open_block "temp" "" ; scan_this_arg main e1 ; top_close_block "temp" with e -> begin hot_all saved ; Misc.print_verb 0 ("\\@try caught exception : "^Printexc.to_string e) ; scan_this_arg main e2 end) ;; def_code "\\@heveafail" (fun lexbuf -> let s = get_prim_arg lexbuf in raise (Misc.Purposly s)) ;; (* (* A la TeX ouput (more or less...) *) def_code "\\newwrite" (fun lexbuf -> let cmd = save_arg lexbuf in let file = ref stderr in def_code cmd (fun lexbuf -> let op = save_arg lexbuf in try match op with | "\\write" -> let what = subst_arg subst lexbuf in output_string !file what ; output_char !file '\n' | "\\closeout" -> close_out !file | "\\openout" -> let name = get_this_nostyle main (save_filename lexbuf) in file := open_out name | _ -> warning ("Unkown file operation: "^op) with Sys_error s -> warning ("TeX file error : "^s))) ;; let def_fileop me = def_code me (fun lexbuf -> let cmd = subst_arg lexbuf in scan_this_may_cont main lexbuf (cmd^me)) ;; def_fileop "\\write" ; def_fileop "\\openout" ; def_fileop "\\closeout" ;; *) def_code "\\@funregister" (fun lexbuf -> let later = subst_arg lexbuf in fun_register (fun () -> scan_this main later)) ;; end} hevea-2.09/tagout.mll0000644004317100512160000000264612017660721014605 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2012 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* Erase tags (for title in hacha) *) { exception Error let buff = Buff.create () } let blank = [' ''\t''\n''\r'] let tag = ['a'-'z''A'-'Z''0'-'9']+ let class_name = ['a'-'z''A'-'Z''0'-'9''-']+ let attr_name = ['a'-'z''A'-'Z''-''0'-'9']+ rule tagout = parse | ('<' | "' { () } | blank+ | attr_name ( blank* "=" blank* ('\'' ([^'\'']*) '\'' | '"' ([^'"']*) '"' | '#'?['a'-'z''A'-'Z''0'-'9''-''+''_'':''.']+))? (* '"' *) { skiptag lexbuf } | "" { raise Error } { let tagout s = tagout (MyLexing.from_string s) } hevea-2.09/figcut.hva0000644004317100512160000000464712017660721014560 0ustar marangetcristal%%% figcut package: figures (and tables) in their own HTML page %%%With contributions by Gilles Gregoire \newif\iffigcut@show\figcut@showtrue \DeclareOption{show}{\figcut@showtrue}%Repeat caption in main text, with link \DeclareOption{noshow}{\figcut@showfalse}%Do not \ProcessOptions* %% Some pointers to original figure env. \let\figcut@figure\figure \let\endfigcut@figure\endfigure \let\figcut@table\table \let\endfigcut@table\endtable %%Inside figure label names are recorded with a global \def \let\figcut@label\label \newcommand{\@def@figlabel}[1]{\global\def\csname #1@figlabel\endcsname{}} \newcommand{\figlabel}[1] {\@auxdowrite{\@print{\@def@figlabel}\{#1\}}% \global\def\current@figlabel{#1}% \figcut@label{#1}} %%So that we can format ref to figures differently. \let\figcut@ref\ref \let\figcut@locref\@locref \newcommand{\fig@locref}[2]{\@aelement{href="\@print{#}#1" target="_new"}{#2}} \newcommand{\figref}[1] {\let\@locref\fig@locref\figcut@ref{#1}\let\@locref\figcut@locref} \renewcommand{\ref}[1] {\@ifundefined{#1@figlabel}{\figcut@ref{#1}}{\figref{#1}}} %%My custom figure %change \hva@caption \let\figcut@caption\hva@caption \newsavebox{\figcut@caption@box} \renewcommand{\hva@caption}[2] {\global\def\figcut@caption@text{#2}% \gsbox{\figcut@caption@box} {\figcut@caption{#1}{#2}}\usebox{\figcut@caption@box}} \newcommand{\figcut@show}[1] {\@hr{.5\linewidth}{1pt}% \begin{center}% \renewcommand{\label}[1]{}\renewcommand{\aname}[2]{##2}% \fig@locref{\current@figlabel} {\csname#1name\endcsname~\csname the#1\endcsname}: \figcut@caption@text% \end{center}% \@hr{.5\linewidth}{1pt}} %change figure env \newsavebox{\figcut@figure@box} \newenvironment{figcut@myfig}[1][] {\begin{lrbox}{\figcut@figure@box}\let\label\figlabel\begin{figcut@figure}[]} {\end{figcut@figure}\end{lrbox}% \begin{cutflow}{\usebox{\figcut@caption@box}}\@out@par{\usebox{\figcut@figure@box}}\end{cutflow}% \iffigcut@show\figcut@show{figure}\fi} \let\figure\figcut@myfig \let\endfigure\endfigcut@myfig \let\figure*\figcut@myfig \let\endfigure*\endfigcut@myfig %change table env \newenvironment{figcut@mytab}[1][] {\begin{lrbox}{\figcut@figure@box}\let\label\figlabel\begin{figcut@table}[]} {\end{figcut@table}\end{lrbox}% \begin{cutflow}{\usebox{\figcut@caption@box}}\@out@par{\usebox{\figcut@figure@box}}\end{cutflow}% \iffigcut@show\figcut@show{table}\fi} \let\table\figcut@mytab \let\endtable\endfigcut@mytab \let\table*\figcut@mytab \let\endtable*\endfigcut@mytab hevea-2.09/CHANGES0000644004317100512160000007344412204704117013567 0ustar marangetcristalversion 2.09 * Corrected a very unfortunate bug in german babel: \@german@dquote has to consider the case when '"' is not active.. version 2.08 * Added \fcolorbox version 2.07 * bug in hacha -tocbis/-tocter when no cut induced by section. * Do not change (\cutname) the name of toplevel file. version 2.06 * Two bugs reported by Michael Ernst fixed * - Some spaces dissapeared in toc's FIX -> add braces around macro expansion in subst_expn - Spurious '_' outside of math mode warnings when \label{..._...} occurs in section titles FIX -> add \@getprint around \sec@id@attr in \@doaddtoc [latexcommon.hva] and \cuthere [html/hevea.hva]. version 2.05 - Promote to official release version 2.04+dev2 - Correct esponja bug for windows : in windows you cannot remove a file when it is still open ! version 2.04+dev1 - patch by C Deleuze for a few fixes in info mode. version 2.04 - added \addto command to augment macros - partial implementation of cleveref - implemented hyperef \autoref - added hidden labeltype package to specify label types in .haux files - implemented global options version 2.03+dev - Change in \label management: if \label{lbl} occurs in the argument of a sectionning command (a.k.a section title), then the tag lbl will be used as the id of the enclosing element in html output. A specific warning is introduced to flag multiple occurences of \label in section titles. version 2.03 - Correct \addcontentsline so as to avoid any style, in .haux and make \@addcontentsline armoured (useless?) version 2.02 - Correct ocaml minimal version number in README version 2.01 - In delimited argument parsing, skip several comments (only one was allowed before). - Added undersection package, for underlined section headers. version 2.00 - HTML 5.0 output. version 1.99 - Last released version that outputs html 4.0 - Simplified html.mli, text.mli and info.mli by including outManager signature - Corrected installer bug (lstlang?.sty not installed !!) - Buffers with underlying rope structure (use our own) version 1.10+17 - Testing svn based release script version 1.10+16 - bug in amsmath.hva (missing \fi, suggestion by Toomas Rosin) version 1.10+15 - corrected file handle leak (in @iffileexists get.mll) - Added optional argunment to \newindex (makeidx package) version 1.10+14 - Silly bug in natbib-common.hva : forgot one argument to \NAT@bibitem in the no-optional argument case. version 1.10+13 - added greek option to babel - changes of imagen 1. Adopt pngalpha device for ghostscript 2. Use convert in place of pbmplus version 1.10+11 - correct (?) handling of DESTDIR - hacha recognises 'style' parameters, so as not to be fooled by missing chapters in article mode. version 1.10+10 - ftp links -> htp links in documentation - tried awful ack to echo %HEVEA in image files, does not work revert. - added option -dAutoRotate=/None in gs invokation by imagen. (suggestion of Sebastien Flicker) - amsmaths.hva: corrected bug in split environemnt. - \refstepcounter in \bititem -> set \theref, allow a hack [\ref{...}] \sim \cite{...} (Some do that). version 1.10+9 - listings: invisible delimiters [and no invisible comments] - \stepcounter -> \refstepcounter, for slide counter in seminar.hva - suppressed -gloss and -bib options that performed nothing. - execute \textnormal starting math mode. version 1.10+8 - different url parsing for hyperref. Looks more compatible. version 1.10+7 version 1.10+6 - added hanging and booktabs package (all definitions are no-ops) version 1.10+5 - \newline definition as \\ is a bad idea in tables -> \@br version 1.10+4 - remove explicit vertical VALIGN=top for @{...} in arrays (html.ml). - esponja was 'optimizing' t1t2 into t1t2. Correction: treat SUP and SUB as A. (htmlparse.ml) version 1.10+3 - very unfortunate typo: d\e'cembre -> d\'ecembre (french-common.hva) version 1.10+2 - added import package (no starred variants yet) - listings: range{begin,env}{prefix,suffix} keys. Result may be non-compliant, moire testing needed. - \Let -> \@Let (plain.hva), [clash with user definition was likely]. version 1.10+1 - Allow \par in footnotetext (latexcommon.hva) version 1.10 - corrected hacha that generated non-compliant HTML lists ! version 1.09+12 - added cutflow* environment. - correct packages.hva Now package state is pushed/restored by RequirePackage [needed for proper saving of package options] version 1.09+11 - natbib being added nightmare. Should release soon. version 1.09+10 - restored extra argument to \text@accent, silly ? - added a bit of documentation on math accents version 1.09+8 - labels for indexes restricted to sectionning labels. (credit to Yevgeniy Makarov) 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 compatibility - Change \warning into \hva@warning - New \AtEndOfFile command, rediscovered Latexmacros.replace at the occasion! version 1.09+5 - Include documentation for Thai. - A few typos in doc. - A few correction in french.hva -> \@print@u + \og\fg. - '\r' '\n' is scanned while looking for \par - Add empty group after title in section (for \xspace ! -> no space) - Introduced \RequirePackage version 1.09+4 - thai support - add vertical magins to styles .part and .title - listings, added inputencoding key. - Corrected footnotes flushing (to follow documentation) and made documentation more precise. - listings, *keywords* keys with correct interface (already here for *emph*). version 1.09+3 - UTF-8 support, hard to test. - abstract type for unicode + many less files for input encodings - Added input encodings koi8-r et cp1251 (Russian) version 1.09+2 - Correct some bugs for output to dir (imagen on absolute path). - And above all document that. - Produce doc in subdirectory doc/doc. - Document -toc{is,ter} options for hacha. version 1.09+1 - Simplified error messages for accents, too many problems in displaying argument. - hevea/hacha/imagen accept dir/file as input or output with sensible (?) behavior version 1.09 - Release at last. version 1.08+23 - more things in winfonts + doc + some tuning by IE viewing. - primitives \push@styles,\pop@styles to save,restore styles accross blocks (mathpartir) version 1.08+22 - make byte-test in examples -> specific tests - footnote to extra file, change behavior document. - special footnote flusing for \maketitle - Bug, hacha (close_chapter, cut.mll) must not close chapter page when it equals toc page. - Factor out code for mathdisplay (latexscan.mll) + new internal commands \displaymath \enddisplaymath -> display math without latex env (useful for mathpartir.) - Esponja removes unreferenced style classes. - Backtracking info printed directly in do_expand_command (latescan.mll) version 1.08+21 - Corrected bars for math accents: WIDTH= -> STYLE="width:.. and added some tests in examples/sym.tex - Notice : horiz bars in table -> is the most simple and works for both moz and IE. - Suppress vertical-align in dcells ! Vertical alignment is controlled by TR. (used by \@open{DISPLAY}{VALIGN="top"} in html/mathpartir) - Big trouble with styled displays (IE) finally solved by width:auto; in styles dcell and display. version 1.08+20 - added winfonts.hva, to replace a few entities by ascii art - initial value of 'true' for extendedchars (listings) - adopt most recent mac encoding 0xDB -> euro sign - added three window codepages and applemac in inputenc, useful ? version 1.08+19 - added sym.tex in examples. - suppress -symbols option ! - Back to ALIGN attributes in display cells, corresponding CSS declaration (text-align) does not apply to TABLE alignement, which breaks proper alignement of displays eg in numerator/denominator of \frac. - New behavior for \title, \title after \begin{document} should work with documentation. - Suppress DIV CLASS="center" around displays, include margin-left:auto; margin-right-auto in display class There is one complication : top level displays now have to be kept (cf open_maths in htmlMaths.ml). Beside an enclosing group is needed (for limiting the scope of font changes in $$... $$). version 1.08+18 - Clarify and document footnote flushing. - \vdash and \dashv unicode entities were swapped (iso-symb.hva) version 1.08+17 - Styles defined by \newstyle can go into external file, by \externalcsstrue - Added \marginpar version 1.08+16 - Flush footnotes at end of 'minipage' environments - \@seename -> \seename in index.hva/makeidx.hva version 1.08+15 - eat space before scanning \verb, \lstlisting argument (Save.save_verbatim) - hacha: bug in toplevel toc for -tocter mode those where closed too often. Finally working ? - hacha/footnotes: added \@footnoteflush in \cutend -> footnotes text in the same file as marks most of the time - added stacks for redefining/restoring commands (\hva@newstack) - include imagen options as comment in image file -> force production of images when options change. Then, Misc also has a checkpointed state, so as to avoid double inclusion of options with -fix. version 1.08+14 - added xspace.hva version 1.08+13 - added bibhva executable, so as to call bibtex on .haux files yielding .hbbl files - managed for .haux files to be bibtex processable - \textsubscript does not exist! - \textsubscript forgotten. - Small bug in 'mid' counts in \process@delim@top - styled theorem-like envs - \setkeys => \@seytkeys in mathpartir (avoid echo in image file) - Be more tolerant with lists without \item (warning) + avoid producing such in multicolumn indexes. - added ifpdf package - Style all list environments (+ thefootnotes, the bibliography) - Corrected bug in table of Contents: Section whose level is < to tocdepth should go into toc, regardless of secnumdepth - Suppressed first line, if empty, in verbatim (and verbatim*). - New placement of hacha anchors (inside section headers, through command \@secanchor) - Suppressed some spurious newlines in html output (mostly in HEAD) - ? is no more special (equivalent to @) in indexes " becomes more general (quote everything) - option -dv - chngcntr package. - Use P elements for paragraphs, numerous changes, \n\n lines found while parsing arguments pending, useful ? version 1.08+12 - Big trouble : forgot mapings in distribution ! version 1.08+11 - Important change in managing inputencodings/charsets, so as they can be different. Documentation done. Basically: for all chars in input 1. Translate to unicode 2. From one unicode char a- Output as a char if possible in doc charset b- Otherwise, output numerical reference. - Changed \limits/\nolimits scanning, so as to find last ! - latin encoding support, through the inputenc package and checked numerical entities (\@print@u) Defaut charset is now US-ASCII. - Added eurosym package - Added textcomp package - compatibility deepcut/thebibliography, \sectionning command \@bbliosection must appear in outer scope. - deepcut: also cut footnotes. - chapterbib : sectionbib -> entry in toc. version 1.08+10 - deepcut patched - supertable completed. - longtable package, a nightmare - forget option argument in \caption, fixed - publicize the generic url hevea.inria.fr - a few changes in graphics/graphicx to allow loading both (and \@imagecommand in html/hevea.hva uses \def) - show/noshow option for package figcut. version 1.08+9 - figcut and deepcut packages. - \lstavoidpre command in listings -> allow copy/paste in listings. version 1.08+8 - \settoplinks command for changing hacha links aspect. - Basic chapterbib (works for included files only, no top level bibliography). version 1.08+7 - change caption (in figure, tables) formatting -> new command \hva@caption that can be redefined for customisation. - correct (once again) eol marker in listings (line skip was missing for firstline=n, n > 1) - new option -pdf for imagen. version 1.08+6 - ignore keys fraction and myfraction in mathpartir (warning) - trick to allow nested \underline\overline in displays. version 1.08+5 - Bug in new integerface, canniot use \unset to deactivate a stringizer.., use \lst@inactivate in place. Very inneficient. - new interfaces for commemts and strings, still need to activate various styles in strings, Note the new mecanism for strings,generalize to other delims ? (to implement delete) - new -t option for imagen (doc pending) -> dvips - Got rid of spurious line skip at start of lstlisting env. version 1.08+4 - added delim, moredelim, deletedelim, should now implement new interface for comments and strinsg, and normalize style command names... Semantics of 'delete' key is somehow radical... version 1.08+3 - esponja -> keep color inside A elts - made \today proper (lot of space were introduced). - -w Z warning -> quite a lot of corrections. - Huge bug (all ' -> - in text mode). - breaklines in listings -> warning - Previous fix introduced a bug in balanced/nested comments: replace scan of \endgroup by call to end_comment. - Listing bugs, style command can be arguments to commentstyle and stringstyle version 1.08+2 - <<-o - >> redirects html output to stdout. - added tabsize, showtabs and tab keys in listings, approximate rendering. - added default values for keywords - changed keywords management * keywords are installed while defining languages (and not in hook AfterSetLanguage) * all keywords are erased in PreSetlanguage - added classes in keywords - debugged showlines in listings, at end ? version 1.08+1 - key frame (and a few others, related to frames) in listings - \title, \author and \date now work after \begin{document} - Small bug listings, an additional line was appended at the end of listings when showlines=true version 1.08 - Serious german babel, with active '"' version 1.08 -Release : two major changes * Replace symbol font by entities * Introduction of style sheets. version 1.07+2 - added some entities for textquoteleft etc. + package ragged2e + bug in german.hva - bug in text generation (safe_make_string in Text.put_line) - output named html colors when appropriate. - added \ifwhitepre to identify space-white=pre, this flags alters Html.put_nbsp behavoir. Should also apply to \@br. - worked on manual (style sheets) - Added interpretation of - -- --- `` and '' in main latexscan.mll version 1.07+1 - Add lineranges in listings + cleaning showlines - Start using style-sheets - Integrate mathpartir - Small listings bugs (space forgotten in \lstinline"A A"). - Erase bussproof and proof, concentrate on Didier's mathparir - Change title/maketitle management -> typeset after document is opened in image file (allow \includegrahics in \title!) - Two listings bugs [backslash newline in strings & argument parsing for lstinline]. - Get rid of cpp in Makefile (use sed instead, hope this will work for everybody!) - added all *.hva in libs.defs - added html/style-sheets.hva in libs.def - caption/label keys in the listing package. - change '-o path' behavior for hacha, all generated files go into directory 'dirname path' - \@addimagenopt + looking for imagen in libdir (documentation pending) - supertabular package. - change rawhtml -> output in html mode only + new raw and rawtext envs - Additional entities for big delimiters. version 1.07 - Release, to follow ocaml evolution. version 1.06+1 - Added \lstnewenvironment in package listings - Pb pour les delims de hauteur 1 : -> rescanner le delimiteur ! Pas le tps. - Bug in text manager : incorrect behavior \centering-like declarations. Solution make the align flags systematically stacked - Add a command-line flag to hacha -nolinks -> suppress Previous/Up/Next links - Small hacha bug : replicate \htmlfoot argument in index.html file even when hevea generated footer is absent. - New \@charset command and xxcharset.exe script, to control output document character set. - firstnumber=auto|last|nnn in listings.hva - started adding an example for listings (exlst.tex) - proper (?) implementation of emph classes in listings (some debug print left) - key label in listings + ignore empty fst argument of env listing + patch on initial line numbers - An attempt to follow << listings >> pace of developement all '*label*' keys are now '*numbers*' keys, snif. - Added bgcolor definition in hevea.sty, not very good - Spaces are irrelevant everywhere in array/tabular format - A new warning for \right and \left in non-display mode. - Special parsing (\@verbimagearg) for ``\DeclareGraphicsRule'' last argument. - Allow multiples > and < in package array. - Better error message for undefined defaults in keyval. - Do not check comments before Save.arg_verbatim. - Added a new primitive \@styleattr - Almost complete multibib package. - Small bit of xypic (-> all \xymatrix are images). version 1.06 version 1.06-7 - \ifmagen indroduced, \imagentrue at beginning of .image.tex, \imagenfalse in hevea.sty, if \ifimagen undefined. - Bug -> stopimage in lstinline. - Throw away index when some key field is empty (i.e. mimic makeindex) - Introduced \htmprefix - Bug in ``\@displayint'' (introduced by the new ``\@getprint'') - compatibility with ocaml 3.03 (do not close a file twice) - Table of contents a` la LaTeX. - new ``-hrf'' option for hacha - PNG managment in hevea/imagen - Added a ``-quant'' option to imagen - Changed ``\@getprint'' to interpret characters Cleaned a few bad usages of ``\@getprint'' - Added ``\hyperref'' with optional argument. - Added underscore package - Bug htmlfoot, MUST appear last in hevea output - small stuff in listings (showlines and continued line numbering) version 1.06-6 - Added esponja - Better error diagnostic for bad usage of \begin{document}... \end{document} - Added a \tocnomber command to include section numbers in table of contents - Better amstmath package version 1.06-5 - \index allowed in section titles (@norefs extension) - Big dynamic scoping bug in packages.hva - Two easy misfeature disappear . trailing -exec prog brougth back one step . blanks allowed in array formats - Option -version - Bug in image.ml, finalize -> active := false, to make module restartable - Bug moreverb, protect get_line by save_lexstate/restore_lexstate. - Bug paragraphe (remettre Save.seen_par a` false dans make_stack). - Bug \iftest -> modifs locales (par fun_register) - Bug argument csname de \newcommand dans toimage -> save_arg - Licence du manuel. - Bug par, Dest.par None doit e^tre un nop (cf. appel dans expand_command, avec name = \par). - insertion d'un @verbarg pour les clefs de labels et de citations - Hot oubliait les notes de bas de page. - Simplification Misc.copy_hashtbl, ne marche plus pour les liaisans multiples. - small simplification fancyvrb - \sbox lrbox finally ok ? - New \@getprintnostyle primitive - Leading spaces in \usepackage{pkg1, pgk2} - New optimized mode for styles. - Plein de bugs corrige's (arguments a` , notamment), listings et fancyverb version 1.06-4 version 1.06-3 - Bug hacha, all output now goes into current directory - Paragraphs not ok, quick fix (in \\begin and \\end) - All document was typeset inside a Latexmacros group ! -> change \document \enddocument commands - Corrected a bugs in argument parsing/scanning (save_sup/sub and arg scanning with ``may_cont'' - alltt flags ignored when the alltt package is not loaded - A little more for fancyvrb version 1.06-2 - Started implementing the fancyvrb package version 1.06-1 - A la TeX \mathop - patched bugs in info genearation - alltt implementation revised. Efficency concern - listings package implementation - \def and \let now have TeX semantics *IMPORTANT* - \toplinks, for prev,up, next links on the root file. - Bug for paragraphs inside \@stopoutput.. \@restoreoutput. - Bug CamlCode in get.mll lexer. Correction is patchy. version 1.05 version 1.05-7 - More customability for arrays and paragraphs - PDF manual - ``Environments'' toimage and verbimage do not define scope in latex anymore. - Some patches in array formats. - New ``cutflow'' feature in hacha. - Bad interaction beeteen new indexenv code and multiple indexes : code for indexenv is now re-entrant. - Index on two columns by default. - Bug footnotes at document end in info mode version 1.05-6 - Bad index entries are better treated - nasty regression bug in \bibitem, example in suite.tex - \label and \ref allowed in section headers (by a new @norefs environment) - \@try{txt1}{txt2} as exception handler -> Generalized checkpoints and hot starts. - New primitive \@getprint : get_prim_arg + \@notags + Dest.put, for HTML attributes - Bug exception NoGood (entry.mll and index.tex) - Two bugs: \tabbing closed a group at startup and Sys.rename failure when target exists on windows. - keyval package. - Bug range references in indexes (``|('' .. ``|)'' now ignored) - xxdate.exe script and \today in latexcommon.hva. - -exec prog option for generating .hva files on the fly - New license (QPL). - color (I mean no color!) for text - documentation for new hyperlinks macros and url package - bug argument de \cite - \imageflush is now a hva macro that calls \imgsrc. (internal is \@imageflush) - Bug in htmlMath : # now is a complex character. - new index scheme a` la latex, with external files - aux files read by \document - added de \@stopoutput \@restartoutput - bug \@stopimage \@stopimage .. \@restartimage \@restartimage -> a new stack for active in Image. - hevea.sty based uppon ``comment.sty'' - Bug at the end of image scanner (top_close_block was done after stop_other_scan...) - new hevea.sty as a package. - half implemented ``hyperref'' package needs doc - implemented the ``url'' package needs documentation (-> compat.hva) - new management of pending mods in html.ml, cancellation is done on a per-color basis -> more or less efficient ? - Added many colors (hsv, named color models) - new panic mode, (old mode sometimes made hevea loop for ever) - new fancyarticle.hva style for the manual - introduced \@hr ->
    - started length management - all primitives should get their argument by get_prim_arg -> primitive argument are substituted/processed (except \@print of course) - new management of bindings, lexbuf is associated with a current environment. - new primitive \execafter -> graphics package implementation. version 1.05-5 - Beta version anounced on user mailing list. version 1.05-4 - Bug basein, file extension is stripped only if it is ``.tex'' - Bug verbatiminput (end of file now raises Misc.EndInput). version 1.05-3 - Allow a few catcode changes on active characters - l,c,r cells get top-aligned when there are other cells with vertical alignement specified (such as p). - new ``Stack'' module. - ``-tocbis'' option for hacha - Introduced \texlet \texdef and better documentation for TeX macros. - Computation of cross-referencing information using .haux files - Delimited arguments version 1.05-2 - synchro videoc version 1.05-1 - Small bug in optional arg parsing ('\n' before arg) - Warning for \def with delimiting characters - Small table of contents at file start (hacha modification). - Support for the \FRAME macro from Scientific Word. - For paragraph breaks -> empty lines may contain spaces. - Added a -entities switch -> math symbols as HTML 4.0 entities and unicode character references (yet uncomplete) - Refine the -pedantic option wrt to 4.0 transitional version 1.04 - Experimental mathml mode, for equations. - Choose html 4.0 transitional as default output language - html.ml split into html.ml, htmlCommon.ml and htmlMath.ml. - Better list-making environment and better documentation for them. - Suppressed ``Videoc'' when in text mode. - Added \csname ... \endcsname, environement names such as ``list1'' are supported - Symbols defined as .hva source files. - All internal macros can now be redefined. - Simplified internal macro values (-> 2 constructor only, and CamlCode arg is lexbuf -> unit) - Added an index in the manual (only extensions on LaTeX are indexed). - Added a secnumdepth counter and make high order defitions for sectional units. - Better paragraph managment across \label and \index. - info and text output, important changes in library organization. - mutind.hva compatibility file (added a \indexname internal command). - Better looking indexes, index tags get expanded. - New behavior for ``_'' and ``^'' outside math mode: they are echoed and a warning is issued - Simplified ``space after macro'' managment. - Mathematical accents added, rendering is far from perfect. - \\ in display mode does not emit
    anymore - Small ams compatibility mode : displayed equations (ams.hva) and \numberwithin (modified Counter.ml for that). - Silly bug : opened files where never closed. - Better error message for missing \makeindex. - Eat \\ optional argument after \hline. - Bug in book.hva : \section* down to \susubsection* should ``\cuthere'' version 1.03 - \htmlfoot and \htmlhead commands. - Independant lexers for getting booleans and integers (module Get) - Optimized the regexps for headers in hacha. - A new ``image'' file is generated only when its content changed w.r.t. hevea previous run - macros ``centering'', ``raggedleft'' and ``raggedright'' - integrate the ``snippet'' plugin (by Christian.Queinnec@lip6.fr) - change computation of values (integer and boolean) - optimization of size changes, in term of the generated HTML size - commands \ifthenelse and \equal from the ifthenelse package - compatibility with the ``array'' package - html.sty changed into hevea.sty - Better error messages by better exception handling (thanks to Pierre.Weis@inria.fr) - Hevea style files now have extension ``.hva'' - Make main scanner a functor (add outManager.mli). This is a first step toward having several output languages. - Added the -extra and -mag options to imagen - Started a FAQ - Cleaned up somehow the output of iso-latin1 special symbols by putting all their definitions in hevea.sty. - Added a -noiso switch to output HTML entities such as é in place of iso-latin1 characters such as ``''. - Better macro for \simeq (-> defined in hevea.sty) - Bug in displays : spurious were introduced by get_block and by "FORGET". - More precise error message in case of unbalanced environments : the opening line of the pending environment is shown. - Experimental seminar mode - Substitute \input argument - \longrightarrow et \leftrightarrow were forgotten. - Bugs in altt (%, &). version 1.02 - imagen is less nfs intensive (pipes, temporary files in /usr/tmp) and characters are anti-aliased. - Color in the ``color'' package style. - new verbimage and verblatex that implement the old behavior of latexonly and toimage. - new toimage and latexonlu environments that can appear inside others environments dynamically. - macros arguments are now substituted inside ``toimage'' environments - Small cosmetic changes in paragraph breaks inside nested lists. - Corrected bug in the interaction of \left... \right and \over - added \includonly - added \@bodyargs \@htmlargs macros to parametrize the and tags. - implemented \renewenvironment. - correctly implemented call-by-name. - the tabbing environment now works as specified. - small bug corrected: spaces after \begin{verbatim} were eaten. - _\cmd and ^\cmd are now recognized - \hspace and \vspace now interpret simple length arguments. (added a length.mll file) - Corrected a bug on the scope of definitions, when a definition fails. - Added support for verbatiminput, on an idea by Philippe Queinnec (Philippe.Queinnec@enseeiht.fr) - Changed module Aux into Auxx, to ease Philip A. Viton (pviton@magnus.acs.ohio-state.edu) Windows port. Version 1.01 Bug fixes. - Corrected a bug with \frac and \over: text before them appeared above fraction. - Corrected a HACHA bug: a spurious was introduced before footer. - Corrected a few bugs in documentation (htmlraw -> rawhtml). Version 1.0 Initial release. hevea-2.09/location.ml0000644004317100512160000000705312017660721014733 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) open MyStack type fileOption = No | Yes of in_channel ;; let stack = MyStack.create "location" ;; let curlexbuf = ref (MyLexing.from_string "") and curlexname = ref "" and curline = ref (0,1) and curfile = ref No ;; let save_state () = push stack (!curlexname,!curlexbuf,!curline,!curfile) and restore_state () = let name,lexbuf,line,file = pop stack in curlexname := name ; curlexbuf := lexbuf; curline := line; curfile := file type saved = (string * Lexing.lexbuf * (int * int) * fileOption) MyStack.saved let close_file = function | Yes f -> close_in f | No -> () let close_curfile () = close_file !curfile let check () = save_state () ; let r = MyStack.save stack in restore_state () ; r and hot saved = let to_finalize = stack in MyStack.restore stack saved ; let _,_,_,file_now = MyStack.top stack in MyStack.finalize to_finalize (fun (_,_,_,file) -> file == file_now) (fun (_,_,_,file) -> close_file file) ; restore_state () let get () = !curlexname ;; let set name lexbuf = save_state () ; curlexname := name ; curlexbuf := lexbuf; curfile := begin match name with "" -> No | _ -> try Yes (open_in name) with Sys_error _ -> No end ; curline := (0,1) ;; let restore () = close_curfile () ; restore_state () ;; let rec do_find_line file lp r c = function 0 -> lp,r,c | n -> let cur = input_char file in do_find_line file (match cur with '\n' -> lp+c+1 | _ -> lp) (match cur with '\n' -> r+1 | _ -> r) (match cur with '\n' -> 0 | _ -> c+1) (n-1) ;; let find_line file lp nline nchars = do_find_line file lp nline 0 nchars type t = string * int * int let do_get_pos () = match !curfile with No -> -1,-1 | Yes file -> try let char_pos = Lexing.lexeme_start !curlexbuf and last_pos,last_line = !curline in let last_pos,last_line = if char_pos < last_pos then 0,1 else last_pos,last_line in seek_in file last_pos ; (* prerr_endline ("char_pos="^string_of_int char_pos) ; *) let line_pos,nline,nchar = find_line file last_pos last_line (char_pos-last_pos) in curline := (line_pos,nline); nline,nchar with Sys_error _ -> -1,-1 ;; let get_pos () = let nline,nchars = do_get_pos () in !curlexname,nline,nchars ;; let do_print_pos full (s,nline,nchars) = if nline >= 0 then prerr_string (s^":"^string_of_int nline^ (if full then ":"^string_of_int (nchars+1)^": " else ": ")) else match s with | "" -> () | _ -> prerr_string (s^": ") let print_pos () = let nlines,nchars = do_get_pos () in do_print_pos false (!curlexname,nlines,nchars) and print_fullpos () = let nlines,nchars = do_get_pos () in do_print_pos true (!curlexname,nlines,nchars) and print_this_pos p = do_print_pos false p and print_this_fullpos p = do_print_pos true p hevea-2.09/lstlang2.hva0000644004317100512160000000004311524022160014776 0ustar marangetcristal\input{\@hevealibdir/lstlang2.sty} hevea-2.09/lstlang1.hva0000644004317100512160000000004311524022160014775 0ustar marangetcristal\input{\@hevealibdir/lstlang1.sty} hevea-2.09/table.mli0000644004317100512160000000175707415373521014375 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1999 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) exception Empty type 'a t val create : 'a -> 'a t val reset : 'a t -> unit val emit : 'a t -> 'a -> unit val apply : 'a t -> ('a -> unit) -> unit val trim : 'a t -> 'a array val to_array : 'a t -> 'a array val remove_last : 'a t -> unit val get_size : 'a t -> int hevea-2.09/check.sh0000644004317100512160000000064610662510525014203 0ustar marangetcristal#! /bin/sh -e . config.sh TMP1=/tmp/check.1.$$ TMP2=/tmp/check.2.$$ TMP3=/tmp/check.3.$$ check () { DIR=$1 shift ( cd $DIR ; ls *.hva > $TMP1 ) echo > $TMP2 for i in $* do echo $i >> $TMP2 done sort $TMP1 > $TMP3 && mv $TMP3 $TMP1 sort $TMP2 > $TMP3 && mv $TMP3 $TMP2 diff $TMP1 $TMP2 /bin/rm -f $TMP1 $TMP2 $TMP3 } check . $ALLLIB check html $HTMLLIB check text $TEXTLIB check info $INFOLIB hevea-2.09/natbib-common.hva0000644004317100512160000002703712017660721016022 0ustar marangetcristal\RequirePackage{keyval} %% Options \DeclareOption{numbers} {\NAT@numbers\NAT@square\NAT@comma\NAT@nobibstyle} \DeclareOption{super} {\NAT@super\def\NAT@open{}\def\NAT@close{}\NAT@nobibstyle} \DeclareOption{authoryear} {\NAT@authoryear\NAT@round\NAT@semicolon\NAT@bibstyle} \DeclareOption{round}{\NAT@round\NAT@nobibstyle} \DeclareOption{square}{\NAT@square\NAT@nobibstyle} \DeclareOption{angle}{\NAT@angle\NAT@nobibstyle} \DeclareOption{curly}{\NAT@curly\NAT@nobibstyle} \DeclareOption{comma}{\NAT@comma\NAT@nobibstyle} \DeclareOption{semicolon}{\NAT@semicolon\NAT@nobibstyle} \DeclareOption{colon}{\NAT@semicolon\NAT@nobibstyle} \DeclareOption{nobibstyle}{\NAT@nobibstyle} \DeclareOption{bibstyle}{\NAT@bibstyle} \DeclareOption{openbib}{}%undocumented, what does it do ? \DeclareOption{sectionbib}{}%useless, chapterbib does the job %%%Not implemented, ignore silently \DeclareOption{sort}{} \DeclareOption{compress}{} \DeclareOption{sort&compress}{} %% \@primitives{natbib} \newcommand{\NAT@warn}[1]{\hva@warn{natbib in hevea: #1}} \newif\ifNAT@super \newcommand{\NAT@bibstyle}{\let\bibstyle\@citestyle} \newcommand{\NAT@nobibstyle}{\let\bibstyle\@gobble} % Automatic bibstyle (excerpt from natbib.sty) % Define citation punctuation for some author-year styles % One may add and delete at this point % Or put additions into local configuration file natbib.cfg \newcommand\bibstyle@chicago{\bibpunct{(}{)}{;}{a}{,}{,}} \newcommand\bibstyle@named{\bibpunct{[}{]}{;}{a}{,}{,}} \newcommand\bibstyle@agu{\bibpunct{[}{]}{;}{a}{,}{,~}}%Amer. Geophys. Union \newcommand\bibstyle@copernicus{\bibpunct{(}{)}{;}{a}{,}{,}}%Copernicus Publications \let\bibstyle@egu=\bibstyle@copernicus \let\bibstyle@egs=\bibstyle@copernicus \newcommand\bibstyle@agsm{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}} \newcommand\bibstyle@kluwer{\bibpunct{(}{)}{,}{a}{}{,}\gdef\harvardand{\&}} \newcommand\bibstyle@dcu{\bibpunct{(}{)}{;}{a}{;}{,}\gdef\harvardand{and}} \newcommand\bibstyle@aa{\bibpunct{(}{)}{;}{a}{}{,}} %Astronomy & Astrophysics \newcommand\bibstyle@pass{\bibpunct{(}{)}{;}{a}{,}{,}}%Planet. & Space Sci \newcommand\bibstyle@anngeo{\bibpunct{(}{)}{;}{a}{,}{,}}%Annales Geophysicae \newcommand\bibstyle@nlinproc{\bibpunct{(}{)}{;}{a}{,}{,}}%Nonlin.Proc.Geophys. % Define citation punctuation for some numerical styles \newcommand\bibstyle@cospar{\bibpunct{/}{/}{,}{n}{}{}% \gdef\bibnumfmt##1{##1.}} \newcommand\bibstyle@esa{\bibpunct{(Ref.~}{)}{,}{n}{}{}% \gdef\bibnumfmt##1{##1.\hspace{1em}}} \newcommand\bibstyle@nature{\bibpunct{}{}{,}{s}{}{\textsuperscript{,}}% \gdef\bibnumfmt##1{##1.}} % The standard LaTeX styles \newcommand\bibstyle@plain{\bibpunct{[}{]}{,}{n}{}{,}} \let\bibstyle@alpha=\bibstyle@plain \let\bibstyle@abbrv=\bibstyle@plain \let\bibstyle@unsrt=\bibstyle@plain % The author-year modifications of the standard styles \newcommand\bibstyle@plainnat{\bibpunct{[}{]}{,}{a}{,}{,}} \let\bibstyle@abbrvnat=\bibstyle@plainnat \let\bibstyle@unsrtnat=\bibstyle@plainnat %%%Bibstyle definition \renewcommand\bibstyle[1]{\@ifundefined{bibstyle@#1}{\relax} {\csname bibstyle@#1\endcsname}} \AtBeginDocument{\global\let\bibstyle=\@gobble} \let\@citestyle\bibstyle \newcommand\citestyle[1]{\@citestyle{#1}\let\bibstyle\@gobble} %%%%%%%%%%%% Citation formating, two macros per style % #1 -> num, #2 author (short or long), #3 year. \newcommand{\NAT@extra}[1] {\def\@tmp{#1}\ifx\@tmp\@empty\relax\else\NAT@post{} #1\fi} \newcommand{\NAT@authoryear@p}[5]{#2\@aysep@cite{} #3\NAT@extra{#4}} \newcommand{\NAT@authoryear@t}[5]{#2 \NAT@open{}#3\NAT@extra{#4}\NAT@close} \newcommand{\NAT@numbers@p}[5]{#1\NAT@extra{#4}} \newcommand{\NAT@numbers@t}[5]{#2 \NAT@open{}#1\NAT@close\NAT@extra{#4}} \newcommand{\NAT@super@p}[5]{#1\NAT@extra{#4}} \newcommand{\NAT@super@t}[5] {#2\ensuremath{^{\mbox{\NAT@yopen{}#1\NAT@yclose}}}\NAT@extra{#4}} %%\citenum,\citeauthor.. \newcommand{\NAT@authoryear@n}[5]{#1} \newcommand{\NAT@numbers@n}[5]{#1} \newcommand{\NAT@super@n}[5]{#1} \newcommand{\NAT@authoryear@a}[5]{#2} \newcommand{\NAT@numbers@a}[5]{#2} \newcommand{\NAT@super@a}[5]{#2} \newcommand{\NAT@authoryear@y}[5]{#3} \newcommand{\NAT@numbers@y}[5]{#3} \newcommand{\NAT@super@y}[5]{#3} %%\citealias \newcommand{\NAT@authoryear@b}[5]{\NAT@getalias{#5}\NAT@extra{#4}} \newcommand{\NAT@numbers@b}[5]{\NAT@getalias{#5}\NAT@extra{#4}} \newcommand{\NAT@super@b}[5]{\NAT@getalias{#5}\NAT@extra{#4}} %%Citation formatting hook \newcommand{\@NAT@format@cite}{\csname NAT@\NAT@style{}@\NAT@pt\endcsname} \newcommand{\NAT@format@cite}[3] {\@callsubst\NAT@args#1% \@NAT@format@cite {\NAT@num} {\NAT@choose@author{\NAT@auth}{\NAT@long}} {\NAT@year}{#2}{#3}} \newcommand{\NAT@args}[4] {\def\NAT@num{#1}\def\NAT@year{#2}\def\NAT@auth{#3}% \ifthenelse{\equal{#4}{}}{\let\NAT@long\NAT@auth}{\def\NAT@long{#4}}} %%% \newcommand{\bibnumfmt}[1]{[#1]} \newcommand{\NAT@format@item}[4] {\ifx#3\@empty#2\else \NAT@item@hook{\NAT@authoryear@t{#2}{#3}{#4}{}}{\bibnumfmt{#2}}\fi} \def\NAT@check#1(#2)#3(@){#2#3}% \def\NAT@bibitem#1(#2)#3(@)#4(@)#5(@){% \NAT@write{{#4}}{#5}{#1}{#2}{#3}% \item[#4]} \newif\ifNAT@forced\NAT@forcedfalse \newcommand{\NAT@force@numbers} {\ifNAT@forced\else\NAT@forcedtrue\@auxdowrite{\string\NAT@numbers{} }\fi} \renewcommand{\bibitem}[2][!*!] {\stepcounter{heveabib}\ifthenelse{\equal{#1}{!*!}} {\@callsubst{\NAT@bibitem}{()(@)#2(@)\theheveabib(@)}} {\ifthenelse {\equal{\@callsubst{\NAT@check}{#1()(@)}}{}} {\NAT@force@numbers\@callsubst{\NAT@bibitem}{()(@)#2(@)#1(@)}} {\@callsubst{\NAT@bibitem}{#1(@)#2(@)\theheveabib(@)}}}} %%%% Default config used for tags in the bibliography itself \newcommand{\NAT@fst}[2]{#1} \newcommand{\NAT@snd}[2]{#2} \let\NAT@choose@author\NAT@fst \let\NAT@item@hook\NAT@fst %% Those can be configured \def\NAT@open{(} \def\NAT@close{)} \def\NAT@sep{,} \def\NAT@post{,} \def\NAT@aysep{,} %shorcuts \newcommand{\NAT@square}{\def\NAT@open{[}\def\NAT@close{]}} \newcommand{\NAT@round}{\def\NAT@open{(}\def\NAT@close{)}} \newcommand{\NAT@curly}{\def\NAT@open{\{}\def\NAT@close{\}}} \newcommand{\NAT@angle}{\def\NAT@open{<}\def\NAT@close{>}} \newcommand{\NAT@comma}{\def\NAT@sep{,}} \newcommand{\NAT@semicolon}{\def\NAT@sep{;}} %%% \let\@aysep@cite\relax \let\NAT@yopen\NAT@open \let\NAT@yclose\NAT@close \let\NAT@finalhook\relax \newcommand{\NAT@neutral} {\let\NAT@open@super\relax \let\NAT@close@super\relax\let\@cite@pre\NAT@addsp \NAT@superfalse} \newcommand{\NAT@addsp}[1]{#1~} \newcommand{\NAT@id}[1]{#1} \NAT@neutral \let\NAT@finalhook\relax %%%% Hack \cite in fact has two optional arguments %%%% and may hooks that are parametrize below \let\hva@cite\cite \newcommand{\NAT@IN}[5] {\ifNAT@super \def\@open@cite@one{}% \def\@open@cite@two{\NAT@open@super{}#1}% \else \def\@open@cite@one{#1}% \let\@open@cite@two\relax \fi \def\@close@cite{\NAT@OUT{#2}}% \let\@sep@cite\NAT@sep% \let\@post@cite\NAT@post% \let\@aysep@cite#3\let\NAT@yopen#4\let\NAT@yclose#5} \newcommand{\NAT@OUT}[1]{#1\NAT@close@super\endgroup{}\NAT@finalhook} \newcommand{\citep} {\begingroup\def\NAT@pt{p}% \NAT@IN{\NAT@open}{\NAT@close}{\NAT@aysep}{\relax}{\relax}\hva@cite} \newcommand{\citep*} {\begingroup% \let\NAT@choose@author\NAT@snd% \let\NAT@finalhook\endgroup% \citep} \newcommand{\citealp} {\begingroup\def\NAT@pt{p}% \NAT@IN{\relax}{\relax}{\NAT@aysep}{\relax}{\relax}\hva@cite} \newcommand{\citealp*} {\begingroup% \let\NAT@choose@author\NAT@snd% \let\NAT@finalhook\endgroup% \citealp} \newcommand{\citet} {\begingroup\def\NAT@pt{t}\NAT@neutral\def\@sep@cite@space{ }% \NAT@IN{\relax}{\relax}{\relax}{\NAT@open}{\NAT@close}% \hva@cite} \newcommand{\citet*} {\begingroup% \let\NAT@choose@author\NAT@snd% \let\NAT@finalhook\endgroup% \citet} \newcommand{\citealt} {\begingroup\def\NAT@pt{t}\NAT@neutral\def\@sep@cite@space{ }% \NAT@IN{\relax}{\relax}{\relax}{\relax}{\relax}% \hva@cite} \newcommand{\citealt*} {\begingroup% \let\NAT@choose@author\NAT@snd% \let\NAT@finalhook\endgroup% \citealt} \newcommand{\citenum} {\begingroup\def\NAT@pt{n}\NAT@neutral\def\@sep@cite@space{}% \NAT@IN{\relax}{\relax}{\relax}{\relax}{\relax}% \hva@cite} \newcommand{\citeauthor} {\begingroup\def\NAT@pt{a}\NAT@neutral\def\@sep@cite@space{ }% \NAT@IN{\relax}{\relax}{\relax}{\relax}{\relax}% \hva@cite} \newcommand{\citeauthor*} {\begingroup% \let\NAT@choose@author\NAT@snd% \let\NAT@finalhook\endgroup% \citeauthor} \let\citefullauthor\citeauthor* \newcommand{\citeyear} {\begingroup\def\NAT@pt{y}\NAT@neutral\def\@sep@cite@space{ }% \NAT@IN{\relax}{\relax}{\relax}{\relax}{\relax}% \hva@cite} \newcommand{\citeyearpar} {\begingroup\def\NAT@pt{y}\NAT@neutral\def\@sep@cite@space{ }% \NAT@IN{\NAT@open}{\NAT@close}{\relax}{\relax}{\relax}% \hva@cite} \newcommand{\citetext}[1]{\NAT@open{}#1\NAT@close} \renewcommand{\cite}{\NAT@ifay{\citet}{\citep}} %% Aliases, the explicit \bibtaghook is for chapterbib compatibility \newcommand{\defcitealias}[2] {\def\csname NAT@alias@\bibtaghook{#1}\endcsname{#2}} \newcommand{\NAT@getalias}[1] {\@ifundefined{NAT@alias@#1} {\NAT@warn{undefined alias '#1'}} {\csname NAT@alias@#1\endcsname}} \newcommand{\citetalias} {\begingroup% \def\NAT@pt{b}\NAT@neutral\def\@sep@cite@space{ }% \NAT@IN{\relax}{\relax}{\relax}{\relax}{\relax}% \hva@cite} \newcommand{\citepalias} {\begingroup% \def\NAT@pt{b}\NAT@neutral\def\@sep@cite@space{ }% \NAT@IN{\NAT@open}{\NAT@close}{\relax}{\relax}{\relax}% \hva@cite} %%%%%%%%%%%% %% Index %% %%%%%%%%%%%% \newif\ifciteindex\citeindexfalse \newcommand{\citeindextype}{default} \newcommand{\NAT@idxtxt} {\NAT@auth\NAT@aysep{} \NAT@open{}\NAT@year\NAT@close} \newcommand{\NATfmtindex}[1] {\NAT@bibread{#1}\NAT@format@item{#1}{\NAT@num}{\NAT@auth}{\NAT@year}} \newcommand{\NAT@idxkey}[1] {\NAT@bibread{#1}% \ifx\NAT@num\@empty#1\else\@pad{0}{3}{\NAT@num}CITE\fi} \newcommand{\NAT@index}[1] {\@@@indexwrite[\citeindextype]{\NAT@idxkey{#1}}{\NATfmtindex{#1}}{\@indexlabel}} %%%%%%%%%%%% %% Modes %% %%%%%%%%%%%% %%%Author / year, default style in some sense \newcommand{\NAT@authoryear} {\def\NAT@style{authoryear}\NAT@superfalse% \let\NAT@ifay\NAT@fst% \def\@sep@cite@space{ }\let\NAT@item@hook\NAT@fst\NAT@neutral} %%%Numbers \newcommand{\NAT@numbers} {\def\NAT@style{numbers}\NAT@superfalse\let\NAT@ifay\NAT@snd% \let\@sep@cite@space\@empty\let\NAT@item@hook\NAT@snd\NAT@neutral} %%%Super is harder \newif\ifNAT@closed \newcommand{\@NAT@os}{\@style{SUP}} \newcommand{\@NAT@cs}{} \newcommand{\NAT@super}{ \def\NAT@style{super}\NAT@supertrue\let\NAT@ifay\NAT@snd% \let\NAT@item@hook\NAT@snd% \let\@sep@cite@space\@empty% \let\NAT@open@super\@NAT@os\let\NAT@close@super\@NAT@cs\let\@cite@pre\NAT@id} %% \bibpunct command, arg #8 ignored \newcommand{\bibpunct}[7][, ] {\def\NAT@post{#1}% \def\NAT@open{#2}\def\NAT@close{#3}\def\NAT@sep{#4}% \ifthenelse{\equal{#5}{n}}{\NAT@numbers} {\ifthenelse{\equal{#5}{s}}{\NAT@super} {\NAT@authoryear}} \def\NAT@aysep{#6}% \let\bibstyle\@gobble} %% Keyval interface \newcommand{\setcitestyle}[1]{\@setkeys{NAT}{#1}\let\bibstyle\@gobble} %simple keys \define@key{NAT}{numbers}[]{\NAT@numbers} \define@key{NAT}{authoryear}[]{\NAT@authoryear} \define@key{NAT}{super}[]{\NAT@super} \define@key{NAT}{round}[]{\NAT@round} \define@key{NAT}{square}[]{\NAT@square} \define@key{NAT}{curly}[]{\NAT@curly} \define@key{NAT}{angle}[]{\NAT@angle} \define@key{NAT}{comma}[]{\NAT@comma} \define@key{NAT}{semicolon}[]{\NAT@semicolon} \define@key{NAT}{colon}[]{\NAT@semicolon} %keys with argument \define@key{NAT}{open}{\def\NAT@open{#1}} \define@key{NAT}{close}{\def\NAT@close{#1}} %%% Need that because natbib styles put strange things in .bbl files \providecommand{\penalty}[1]{} %%% \NAT@authoryear%default \ProcessOptions*% hevea-2.09/counter.ml0000644004317100512160000001061712017660721014602 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type t_counter = {mutable count : int ; mutable related : t_counter list} type t_checked = {cname : string ; cvalue : int ; crelated : int list} let cbidon = {cname = "" ; cvalue = (-1) ; crelated = []} let ctable = (Hashtbl.create 19 : (string,t_counter) Hashtbl.t);; type saved = t_checked array let prerr_cc check_ctable cc = prerr_endline ("counter: "^cc.cname) ; prerr_endline ("\tvalue = "^string_of_int cc.cvalue) ; prerr_string "\trelated =" ; List.iter (fun j -> prerr_string " " ; prerr_string (check_ctable).(j).cname) cc.crelated ; prerr_endline "" let checkpoint () = let module H = struct type t = t_counter let equal = (==) let hash = Hashtbl.hash end in let module RevHash = Hashtbl.Make (H) in let rev_table = RevHash.create 19 and count = ref 0 in Hashtbl.iter (fun key value -> RevHash.add rev_table value (key, !count) ; incr count) ctable ; let to_int c = try let _,j = RevHash.find rev_table c in j with | Not_found -> Misc.fatal "Counter.checkpoint" in let t = Array.create !count cbidon in RevHash.iter (fun {count = value ; related = related} (name, i) -> t.(i) <- {cname = name ; cvalue = value ; crelated = List.map to_int related}) rev_table ; t and hot_start check_ctable = Hashtbl.clear ctable ; let rec create_rec i = let cc = (check_ctable).(i) in try Hashtbl.find ctable cc.cname with | Not_found -> let c = {count = cc.cvalue ; related = []} in Hashtbl.add ctable cc.cname c; c.related <- List.map create_rec cc.crelated ; if !Misc.verbose > 1 then begin prerr_string "Restored " ; prerr_cc check_ctable cc end ; c in for i = 0 to Array.length check_ctable - 1 do let _ = create_rec i in () done ;; let unkown name where = Misc.warning ("Unknown counter: "^name^" in "^where) let find_counter name = Hashtbl.find ctable name let value_counter name = try let {count=c} = find_counter name in c with Not_found -> begin unkown name "\\value" ; 0 end ;; let def_counter name within = try let _ = Hashtbl.find ctable name in Misc.warning ("Counter "^name^" is already defined, not defining it") ; raise Latexmacros.Failed with | Not_found -> begin let within_c = try match within with "" -> None | _ -> Some (find_counter within) with Not_found -> begin unkown within ("\\newcounter{"^name^"}["^within^"]") ; None end in let c = {count=0 ; related = []} in Hashtbl.add ctable name c ; match within_c with | Some d -> d.related <- c :: d.related | _ -> () end let add_counter name i = try let c = find_counter name in c.count <- c.count + i with Not_found -> unkown name "\\addtocounter" let set_counter name x = try let c = find_counter name in c.count <- x with Not_found -> unkown name "\\setcounter" ;; let step_counter name = try let c = find_counter name in c.count <- c.count + 1; List.iter (fun c -> c.count <- 0) c.related with Not_found -> unkown name ("\\stepcounter") ;; let addtoreset name within = try let c = find_counter name in let d = find_counter within in d.related <- c :: d.related with Not_found -> unkown (name^" or "^within) "\\@addtoreset" and removefromreset name within = try let c = find_counter name in let d = find_counter within in d.related <- List.fold_right (fun e r -> if e == c then r else e::r) d.related [] with Not_found -> unkown (name^" or "^within) "\\@removefromreset" hevea-2.09/mathML.ml0000644004317100512160000003701512017660721014306 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) let header = "$Id: mathML.ml,v 1.29 2012-06-05 14:55:39 maranget Exp $" open Misc open Parse_opts open Element open HtmlCommon open MyStack (*----------*) (* DISPLAYS *) (*----------*) let begin_item_display f is_freeze = if !verbose > 2 then begin Printf.fprintf stderr "begin_item_display: ncols=%d empty=%s" flags.ncols (sbool flags.empty) ; prerr_newline () end ; open_block (OTHER "mrow") ""; open_block INTERN "" ; if is_freeze then(* push out_stack (Freeze f) ;*)freeze f; and end_item_display () = let f,is_freeze = pop_freeze () in let _ = close_flow_loc check_empty INTERN in if close_flow_loc check_empty (OTHER "mrow") then flags.ncols <- flags.ncols + 1; if !verbose > 2 then begin Printf.fprintf stderr "end_item_display: ncols=%d stck: " flags.ncols; pretty_stack out_stack end; flags.vsize,f,is_freeze and open_display () = if !verbose > 2 then begin Printf.fprintf stderr "open_display: " end ; try_open_display () ; open_block (OTHER "mrow") ""; do_put_char '\n'; open_block INTERN "" ; if !verbose > 2 then begin pretty_cur !cur_out ; prerr_endline "" end and close_display () = if !verbose > 2 then begin prerr_flags "=> close_display" end ; if not (flush_freeze ()) then begin close_flow INTERN ; let n = flags.ncols in if (n = 0 && not flags.blank) then begin if !verbose > 2 then begin prerr_string "No Display n=0" ; (Out.debug stderr !cur_out.out); prerr_endline "" end; let active = !cur_out.active and pending = !cur_out.pending in do_close_mods () ; let ps,_,ppout = pop_out out_stack in if ps <> (OTHER "mrow") then failclose "close_display" ps (OTHER "mrow") ; try_close_block (OTHER "mrow"); let old_out = !cur_out in cur_out := ppout ; do_close_mods () ; Out.copy old_out.out !cur_out.out ; flags.empty <- false ; flags.blank <- false ; !cur_out.pending <- to_pending pending active end else if (n=1 (*&& flags.blank*)) then begin if !verbose > 2 then begin prerr_string "No display n=1"; (Out.debug stderr !cur_out.out); prerr_endline "" ; end; let active = !cur_out.active and pending = !cur_out.pending in let ps,_,pout = pop_out out_stack in if ps<> (OTHER "mrow") then failclose "close_display" ps (OTHER "mrow"); try_close_block (OTHER "mrow") ; let old_out = !cur_out in cur_out := pout ; do_close_mods () ; if flags.blank then Out.copy_no_tag old_out.out !cur_out.out else Out.copy old_out.out !cur_out.out; flags.empty <- false ; flags.blank <- false ; !cur_out.pending <- to_pending pending active end else begin if !verbose > 2 then begin prerr_string ("One Display n="^string_of_int n) ; (Out.debug stderr !cur_out.out); prerr_endline "" end; flags.empty <- flags.blank ; close_flow (OTHER "mrow") ; do_put_char '\n'; end ; try_close_display () end ; if !verbose > 2 then prerr_flags ("<= close_display") ;; let open_display_varg _ = open_display () let do_item_display _force = if !verbose > 2 then begin prerr_endline ("Item Display in mathML ncols="^string_of_int flags.ncols^" table_inside="^sbool flags.table_inside) end ; let f,is_freeze = pop_freeze () in if ((*force && *)not flags.empty) || flags.table_inside then flags.ncols <- flags.ncols + 1 ; let active = !cur_out.active and pending = !cur_out.pending in close_flow INTERN ; open_block INTERN ""; !cur_out.pending <- to_pending pending active; !cur_out.active <- [] ; if is_freeze then freeze f; if !verbose > 2 then begin prerr_string ("out item_display -> ncols="^string_of_int flags.ncols^" ") ; pretty_stack out_stack end ; ;; let item_display () = do_item_display false and force_item_display () = do_item_display true ;; let erase_display () = erase_block INTERN ; erase_block (OTHER "mrow"); try_close_display () ;; let open_maths display = if !verbose > 1 then prerr_endline "=> open_maths"; push stacks.s_in_math flags.in_math; if display then do_put "
    \n"; if not flags.in_math then open_block (OTHER "math") "align=\"center\"" else erase_mods [Style "mtext"]; do_put_char '\n'; flags.in_math <- true; open_display (); open_display (); ;; let close_maths _display = if !verbose >1 then prerr_endline "=> close_maths"; close_display (); close_display (); flags.in_math <- pop stacks.s_in_math ; do_put_char '\n'; if not flags.in_math then begin close_block (OTHER "math") end else open_mod (Style "mtext"); ;; let insert_vdisplay open_fun = if !verbose > 2 then begin prerr_flags "=> insert_vdisplay" ; end ; try let mods = to_pending !cur_out.pending !cur_out.active in let bs,bargs,bout = pop_out out_stack in if bs <> INTERN then failclose "insert_vdisplay" bs INTERN ; let ps,pargs,pout = pop_out out_stack in if ps <> (OTHER "mrow") then failclose "insert_vdisplay" ps (OTHER "mrow"); let new_out = create_status_from_scratch false [] in push_out out_stack (ps,pargs,new_out) ; push_out out_stack (bs,bargs,bout) ; close_display () ; cur_out := pout ; open_fun () ; do_put (Out.to_string new_out.out) ; flags.empty <- false ; flags.blank <- false ; if !verbose > 2 then begin prerr_string "insert_vdisplay -> " ; pretty_mods stderr mods ; prerr_newline () end ; if !verbose > 2 then prerr_flags "<= insert_vdisplay" ; mods with PopFreeze -> raise (UserError "wrong parenthesization"); ;; (* delaying output .... *) (* let delay f = if !verbose > 2 then prerr_flags "=> delay" ; push vsize_stack flags.vsize ; flags.vsize <- 0; push delay_stack f ; open_block "DELAY" "" ; if !verbose > 2 then prerr_flags "<= delay" ;; let flush x = if !verbose > 2 then prerr_flags ("=> flush arg is ``"^string_of_int x^"''"); try_close_block "DELAY" ; let ps,_,pout = pop_out out_stack in if ps <> "DELAY" then raise (Misc.Fatal ("html: Flush attempt on: "^ps)) ; let mods = !cur_out.active @ !cur_out.pending in do_close_mods () ; let old_out = !cur_out in cur_out := pout ; let f = pop "delay" delay_stack in f x ; Out.copy old_out.out !cur_out.out ; flags.empty <- false ; flags.blank <- false ; free old_out ; !cur_out.pending <- mods ; flags.vsize <- max (pop "vsive" vsize_stack) flags.vsize ; if !verbose > 2 then prerr_flags "<= flush" ;; *) (* put functions *) let is_digit = function '1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'0'|'.'|',' -> true | _ -> false ;; let is_number s = let r = ref true in for i = 0 to String.length s -1 do r := !r && is_digit s.[i] done; !r ;; let is_op = function "+" | "-"|"/"|"*"|"%"|"<"|">"|"="|"("|")"|"{"|"}"|"["|"]"|","|";"|":"|"|"|"&"|"#"|"!"|"~"|"$" -> true | _ -> false ;; let is_letter = function | 'a'..'Z'|'A'..'Z' -> true | _ -> false let is_ident s = let r = ref true in for i = 0 to String.length s-1 do r := !r && is_letter s.[i] done ; !r let is_open_delim = function | "(" | "[" | "{" | "<" -> true | _ -> false and is_close_delim = function | ")" | "]" | "}" | ">" -> true | _ -> false ;; let open_delim () = open_display (); freeze ( fun () -> close_display (); close_display ();); and is_close () = let f, is_freeze = pop_freeze () in if is_freeze then begin freeze f; false end else true and close_delim () = let _, is_freeze = pop_freeze () in if is_freeze then begin close_display (); end else begin close_display (); open_display (); warning "Math expression improperly parenthesized"; end ;; let put s = if !verbose > 1 then Printf.eprintf "MATH PUT: %s\n" s ; let s_blank = let r = ref true in for i = 0 to String.length s - 1 do r := !r && is_blank (String.get s i) done ; !r in if not s_blank then begin let s_op = is_op s and s_number = is_number s in if is_open_delim s then open_delim (); let s_text = if is_close_delim s then is_close () else false in if (s_op || s_number) && !Lexstate.display then force_item_display (); do_pending () ; flags.empty <- false; flags.blank <- s_blank && flags.blank ; if s_number then begin do_put (" "^s^" \n") end else if is_ident s then begin do_put (" "^s^" \n") end else if s_text then begin do_put (""^s^"") end else if s_op then begin do_put (" "^s^" \n"); end else begin do_put s end; if is_close_delim s then close_delim () end ;; let put_char c = let c_blank = is_blank c in if c <> ' ' then begin let s = String.make 1 c in let c_op = is_op s in let c_digit = is_digit c in if is_open_delim s then open_delim (); let c_text = if is_close_delim s then is_close () else false in if (c_op || c_digit) && !Lexstate.display then force_item_display (); do_pending () ; flags.empty <- false; flags.blank <- c_blank && flags.blank ; if c_digit then begin do_put (" "^s^" \n") end else if c_text then begin do_put (""^s^"") end else if c_op then begin do_put (" "^s^" \n"); end else begin do_put_char c; end; if is_close_delim s then close_delim (); end ;; let put_in_math s = if flags.in_pre && !pedantic then put s else begin if !Lexstate.display then force_item_display (); do_pending () ; do_put " "; do_put s; do_put " \n"; flags.empty <- false; flags.blank <- false; end ;; (* Sup/Sub stuff *) let put_sup_sub display scanner (arg : string Lexstate.arg) = if display then open_display () else open_block INTERN "" ; scanner arg ; if display then close_display () else close_block INTERN ; ;; (* let insert_sub_sup tag s t = let f, is_freeze = pop_freeze () in let ps,pargs,pout = pop_out out_stack in if ps <> INTERN then failclose "sup_sub" ps INTERN ; let new_out = create_status_from_scratch false [] in push_out out_stack (ps,pargs,new_out); close_block INTERN; cur_out := pout; open_block tag ""; open_display (); let texte = Out.to_string new_out.out in do_put (if texte = "" then "" else texte); flags.empty <- false; flags.blank <- false; free new_out; close_display (); put_sub_sup s; if t<>"" then put_sub_sup t; close_block tag; open_block INTERN ""; if is_freeze then freeze f ;; *) let standard_sup_sub scanner what sup sub display = if !verbose > 1 then Printf.eprintf "STANDARD %s, %s display=%B\n" sup.Lexstate.arg sub.Lexstate.arg display ; let sup, _ = hidden_to_string (fun () -> put_sup_sub display scanner sup) in let sub,_ = hidden_to_string (fun () -> put_sup_sub display scanner sub) in if !verbose > 1 then Printf.eprintf "STANDARD FORMAT %s, %s\n" sup sub ; match sub,sup with | "","" -> what () | a,"" -> open_block (OTHER "msub") ""; if display then open_display (); what (); if flags.empty then do_put "" ; if display then close_display (); put a ; close_block (OTHER "msub") ; | "",b -> open_block (OTHER "msup") ""; if display then open_display (); what (); if flags.empty then do_put "" ; if display then close_display (); put b ; close_block (OTHER "msup") ; | a,b -> open_block (OTHER "msubsup") ""; if display then open_display (); what (); if flags.empty then do_put "" ; if display then close_display (); put a ; put "\n" ; put b ; close_block (OTHER "msubsup") ; ;; let limit_sup_sub scanner what sup sub display = if !verbose > 1 then Printf.eprintf "STANDARD %s, %s\n" sup.Lexstate.arg sub.Lexstate.arg ; let sup, _ = hidden_to_string (fun () -> put_sup_sub display scanner sup) in let sub, _ = hidden_to_string (fun () -> put_sup_sub display scanner sub) in match sub,sup with | "","" -> what () | a,"" -> open_block (OTHER "munder") ""; if display then open_display (); what (); if flags.empty then do_put "" ; if display then close_display (); do_put a ; close_block (OTHER "munder") ; | "",b -> open_block (OTHER "mover") ""; if display then open_display (); what (); if flags.empty then do_put "" ; if display then close_display (); do_put b ; close_block (OTHER "mover") ; | a,b -> open_block (OTHER "munderover") ""; if display then open_display (); what (); if flags.empty then do_put "" ; if display then close_display (); do_put a ; do_put "\n" ; do_put b ; close_block (OTHER "munderover") ; ;; let int_sup_sub _something _vsize scanner what sup sub display = standard_sup_sub scanner what sup sub display ;; let over _lexbuf = force_item_display (); let _mods = insert_vdisplay (fun () -> open_block (OTHER "mfrac") ""; open_display ()) in force_item_display (); flags.ncols <- flags.ncols +1; close_display () ; open_display () ; freeze (fun () -> force_item_display (); flags.ncols <- flags.ncols +1; close_display () ; close_block (OTHER "mfrac")) ;; let box_around_display _scanner _arg = ();; let over_align _align1 _align2 _display lexbuf = over lexbuf ;; let tr = function "<" -> "<" | ">" -> ">" | "\\{" -> "{" | "\\}" -> "}" | s -> s ;; let left delim _ k = force_item_display (); open_display (); if delim <>"." then put (" "^ tr delim^" "); k 0 ; force_item_display (); freeze ( fun () -> force_item_display (); close_display (); warning "Left delimitor not matched with a right one."; force_item_display (); close_display ();) ;; let right delim _ = if !Lexstate.display then force_item_display (); if delim <> "." then put (" "^tr delim^" "); if !Lexstate.display then force_item_display (); let f,is_freeze = pop_freeze () in if not is_freeze then begin warning "Right delimitor alone"; close_display (); open_display (); end else begin try let ps,parg,pout = pop_out out_stack in let pps,pparg,ppout = pop_out out_stack in if pblock() = (OTHER "mfrac") then begin warning "Right delimitor not matched with a left one."; push_out out_stack (pps,pparg,ppout); push_out out_stack (ps,parg,pout); freeze f; close_display (); open_display (); end else begin push_out out_stack (pps,pparg,ppout); push_out out_stack (ps,parg,pout); close_display (); end; with PopFreeze -> raise (UserError ("Bad placement of right delimitor")); end; 3 ;; hevea-2.09/supertabular.hva0000644004317100512160000000232010370645715016000 0ustar marangetcristal%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Supertabular, more or less complete implementation. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \let\st@tablefirsthead\@empty \newcommand{\tablefirsthead}[1]{\gdef\st@tablefirsthead{#1}} \newcommand{\tablehead}[1]{} \newcommand{\tabletail}[1]{} \let\st@tablelasttail\@empty \newcommand{\tablelasttail}[1]{\gdef\st@tablelasttail{#1}} \let\st@bottomcaption\@empty \newcommand{\bottomcaption}[1] {\def\st@bottomcaption{\caption{#1}}} \let\st@topcaption\@empty \newcommand{\topcaption}[1] {\def\st@topcaption{\caption{#1}}} \let\tablecaption\topcaption %%% \newenvironment{supertabular}[2][] {\begin{table}\st@topcaption\begin{tabular}[#1]{#2}\st@tablefirsthead} {\st@tablelasttail\end{tabular}\st@bottomcaption\end{table}} \newcommand{\st@kont@supertabular*}[2][] {\begin{tabular*}{\st@arg}[#1]{#2}\st@tablefirsthead} \newenvironment{supertabular*}[1] {\def\st@arg{#1}\begin{table}\st@topcaption\st@kont@supertabular*} {\st@tablelasttail\end{tabular*}\st@bottomcaption\end{table}} \let\mpsupertabular\supertabular \let\endmpsupertabular\endsupertabular \let\mpsupertabular*\supertabular* \let\endmpsupertabular*\endsupertabular* %% \newcommand{\shrinkheight}[1]{}hevea-2.09/latexsym.hva0000644004317100512160000000107310402121125015115 0ustar marangetcristal%% \DeclareSymbolHtml[\mbox{<|}]{\lhd}{X25C1} \DeclareSymbolHtml[\mbox{|>}]{\rhd}{X25B7} \DeclareSymbolHtml{\unlhd}{X22B4}\DeclareNot{\unlhd}{X22EC} \DeclareSymbolHtml{\unrhd}{X22B5}\DeclareNot{\unrhd}{X22ED} \DeclareSymbolHtml{\Box}{X25A1} \DeclareSymbolHtml{\Diamond}{X25C7} \DeclareSymbolHtml{\mho}{X2127} \DeclareSymbolHtml{\Join}{X2445} \DeclareSymbolHtml[\DisplayChoose{\@textdisplaysubset}{\mbox{sqsubset}}] {\sqsubset}{X228F} \DeclareSymbolHtml[\DisplayChoose{\@textdisplaysupset}{\mbox{sqsupset}}] {\sqsupset}{X2290} \DeclareSymbolHtml{\leadsto}{X219D} \endinputhevea-2.09/css.mli0000644004317100512160000000156712017660721014070 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: css.mli,v 1.1 2005-06-24 08:32:21 maranget Exp $ *) (***********************************************************************) type id = | Class of string * string option * string | Other of string hevea-2.09/next_motif.gif0000644004317100512160000000047506537544364015453 0ustar marangetcristalGIF89app!# Imported from XPM image: next.xpm!,@63333B! 0 A0 0 0  0 `0 `0 A @ `0 `00000000000000000000000000000000000000000000  000000 0000000000000000000000000000` ;hevea-2.09/german-common.hva0000644004317100512160000000455210334123204016017 0ustar marangetcristal%%%% Hevea support for babel option 'german'. %%%% Support for %%%% a) date %%%% b) usual shorthands (\' \` \^ etc.) %%%% c) names of various part descriptors (contentsname etc.) %%%% d) \dq %%%% e) Different quotations marks (\glqq etc.) \@primitives{german} \newcommand{\common@common@german@babel}{ \renewcommand\prefacename{Vorwort}% \renewcommand\refname{Literatur}% \renewcommand\abstractname{Zusammenfassung}% \renewcommand\bibname{Literaturverzeichnis}% \renewcommand\chaptername{Kapitel}% \renewcommand\appendixname{Anhang}% \renewcommand\contentsname{Inhaltsverzeichnis}% \renewcommand\listfigurename{Abbildungsverzeichnis}% \renewcommand\listtablename{Tabellenverzeichnis}% \renewcommand\indexname{Index}% \renewcommand\figurename{Abbildung}% \renewcommand\tablename{Tabelle}% \renewcommand\partname{Teil}% \renewcommand\enclname{Anlage(n)}% \renewcommand\ccname{Verteiler}% \renewcommand\headtoname{An}% \renewcommand\pagename{Seite}% \renewcommand\headpagename{Siete}% \renewcommand\seename{siehe}% \renewcommand\alsoseename{siehe auch}% \renewcommand\dq{\@print{"}}% \catcode`\"=13\let\@hevea@dquote\@german@dquote% } \newcommand{\common@german@babel}{% \common@common@german@babel% \def\german@month {\ifthenelse{\value{month}=1}{Januar} {\ifthenelse{\value{month}=2}{Februar} {\ifthenelse{\value{month}=3}{M\"arz} {\ifthenelse{\value{month}=4}{April} {\ifthenelse{\value{month}=5}{Mai} {\ifthenelse{\value{month}=6}{Juni} {\ifthenelse{\value{month}=7}{Juli} {\ifthenelse{\value{month}=8}{August} {\ifthenelse{\value{month}=9}{September} {\ifthenelse{\value{month}=10}{Oktober} {\ifthenelse{\value{month}=11}{November} {\ifthenelse{\value{month}=12}{Dezember}{} }}}}}}}}}}}}% \renewcommand\today{\theday.~\german@month~\theyear}} %%% \newcommand{\common@austrian@babel}{% \def\austrian@month {\ifthenelse{\value{month}=1 }{J\"anner} {\ifthenelse{\value{month}=2 }{Februar} {\ifthenelse{\value{month}=3 }{M\"arz} {\ifthenelse{\value{month}=4 }{April} {\ifthenelse{\value{month}=5 }{Mai} {\ifthenelse{\value{month}=6 }{Juni} {\ifthenelse{\value{month}=7 }{Juli} {\ifthenelse{\value{month}=8 }{August} {\ifthenelse{\value{month}=9 }{September} {\ifthenelse{\value{month}=10}{Oktober} {\ifthenelse{\value{month}=11}{November} {\ifthenelse{\value{month}=12}{Dezember}{} }}}}}}}}}}}}% \renewcommand\today{\theday.~\austrian@month~\theyear}} hevea-2.09/element.mli0000644004317100512160000000155407477123142014732 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) type text = | Style of string | Font of int | Color of string | StyleAttr of string * string val pretty_text : text -> string hevea-2.09/util.ml0000644004317100512160000000404611763416753014112 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet Moscova, INRIA Rocquencourt *) (* *) (* Copyright 2001 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (* $Id: util.ml,v 1.6 2012-06-05 14:55:39 maranget Exp $c *) (***********************************************************************) open Tree let rec do_cost ks ((k1,k2) as c) = function | Text _ | Blanks _ -> c | ONode (_,_,ts) -> let c1,c2 = c in do_costs ks (1+c1,c2) ts | Node (s,ts) -> let l1, l2 = ks s in do_costs ks (l1+k1, l2+k2) ts and do_costs ks k ts = List.fold_left (do_cost ks) k ts let cost ks t = do_cost ks (0,0) t and costs ks ts = do_costs ks (0,0) ts let cost_compare (tags1,fonts1) (tags2, fonts2) = if tags1 < tags2 then -1 else if tags1 > tags2 then 1 else if fonts1 < fonts2 then -1 else if fonts1 > fonts2 then 1 else 0 let there s l = List.exists (fun os -> Htmltext.same_style s os) l let inter s1 s2 = List.fold_left (fun r s -> if there s s2 then s::r else r) [] s1 let sub s1 s2 = List.fold_left (fun r s -> if there s s2 then r else s::r) [] s1 let union s1 s2 = List.fold_left (fun r s -> if there s r then r else s::r) s1 s2 let neutral s = List.partition Htmltext.blanksNeutral s let rec is_blank = function | Text _ -> false | Blanks _ -> true | Node (_,ts) | ONode (_,_,ts) -> is_blanks ts and is_blanks = function | [] -> true | t::ts -> is_blank t && is_blanks ts let nodes ss ts = match ss with | [] -> ts | _ -> [Node (ss,ts)] and node ss ts = Node (ss,ts) hevea-2.09/iso-html.hva0000644004317100512160000000102710507223111015006 0ustar marangetcristal%Declare unicode encoded symbol, with optional text equivalent \newcommand{\DeclareSymbol}[3][\@empty] {\newcommand{#2}{\@print@u{#3}}% \ifx#1\@empty\else\@def@u@default{#3}{#1}\fi} \let\DeclareSymbolHtml\DeclareSymbol \newcommand{\MakeBigSymbolHtml}[3][] {\newcommand{#2}{\mathop{\ifdisplay{\huge#3}\else#3\fi}#1}} \newcommand{\MakeBigSymbol}[5][] {\MakeBigSymbolHtml[#1]{#2}{#3}} \let\NewcommandHtml\newcommand% \let\NewcommandText\NoCommand% \let\RenewcommandHtml\renewcommand% \let\RenewcommandText\NoCommand% \input{iso-symb.hva} hevea-2.09/ragged2e.hva0000644004317100512160000000041310237656625014754 0ustar marangetcristal\let\RaggedRight\raggedright \let\RaggedLeft\raggedleft \let\Centering\centering \newenvironment{Center}{\begin{center}}{\end{center}} \newenvironment{FlushLeft}{\begin{flushleft}}{\end{flushleft}} \newenvironment{FlushLeftRight}{\begin{flushright}}{\end{flushright}}hevea-2.09/color.mli0000644004317100512160000000213310213340567014403 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) (* "$Id: color.mli,v 1.6 2005-03-08 15:15:03 maranget Exp $" *) type t = Name of string | Hex of string val compute : string -> string -> t val define : string -> string -> string -> unit val define_named : string -> string -> string -> unit val retrieve : string -> t val remove : string -> unit type saved val checkpoint : unit -> saved val hot_start : saved -> unit hevea-2.09/index.mli0000644004317100512160000000200607374465040014403 0ustar marangetcristal(***********************************************************************) (* *) (* HEVEA *) (* *) (* Luc Maranget, projet PARA, INRIA Rocquencourt *) (* *) (* Copyright 1998 Institut National de Recherche en Informatique et *) (* Automatique. Distributed only by permission. *) (* *) (***********************************************************************) val newindex : string -> string -> string -> string -> unit val changename : string -> string -> unit val treat: string -> string -> string -> string val treat_anchor : string -> string -> string -> string -> unit val print: (string -> unit) -> string -> unit val finalize : bool -> bool