add_level_info Ast.let_in_prec Ast.let_in_assoc
           (hvbox false true [
             hvbox false true [
-              keyword "let";
+              keyword "let"; space;
               hvbox false true [
-                aux_var var; builtin_symbol "\\def"; break; top_pos (k s) ];
+                aux_var var; space; builtin_symbol "\\def"; break; top_pos (k s) ];
               break; keyword "in" ];
             break;
             k t ])
 
  | BYC_letsuchthat of string * CicNotationPt.term * string * CicNotationPt.term
  | BYC_wehaveand of string * CicNotationPt.term * string * CicNotationPt.term
 
-let out = ref ignore
-
-let set_callback f = out := f
-
 EXTEND
   GLOBAL: term statement;
   constructor: [ [ name = IDENT; SYMBOL ":"; typ = term -> (name, typ) ] ];
             (loc,GrafiteAst.Include (iloc,buri))))
     | scom = lexicon_command ; SYMBOL "." ->
        fun ~include_paths status ->
-        !out scom;
        let status = LexiconEngine.eval_command status scom in
          status,LNone loc
     | EOI -> raise End_of_file
 
   LexiconEngine.status ->
     LexiconEngine.status * ast_statement localized_option
 
-(* this callback is called on every lexicon command *)
-val set_callback: (LexiconAst.command -> unit) -> unit 
-
 val parse_statement: Ulexing.lexbuf -> statement  (** @raise End_of_file *)
 
 val statement: statement Grammar.Entry.e
 
 let pp_command = function
   | Include (_,_,mode,path) -> (* not precise, since path is absolute *)
       if mode = WithPreferences then
-        "include " ^ path
+        "include \"" ^ path ^ "\".\n"
       else
-        "include' " ^ path
+        "include' \"" ^ path ^ "\".\n"
   | Alias (_,s) -> pp_alias s
   | Interpretation (_, dsc, (symbol, arg_patterns), cic_appl_pattern) ->
       pp_interpretation dsc symbol arg_patterns cic_appl_pattern
 
 
 (* $Id$ *)
 
+let out = ref ignore
+
+let set_callback f = out := f
+
 (* lexicon file name * ma file name *)
 exception IncludedFileNotCompiled of string * string 
 exception MetadataNotFound of string        (* file name *)
 
 
 let rec eval_command ?(mode=LexiconAst.WithPreferences) status cmd =
+ !out cmd;
  let notation_ids' = CicNotation.process_notation cmd in
  let status =
    { status with notation_ids = notation_ids' @ status.notation_ids } in
 
   (DisambiguateTypes.Environment.key * DisambiguateTypes.codomain_item) list ->
   status
 
+(* this callback is called on every lexicon command *)
+val set_callback: (LexiconAst.command -> unit) -> unit 
 
 (* $Id$ *)
 
 module G = GrafiteAst
+module L = LexiconAst
 
 (* from transcript *)
 
    let path = Filename.concat rt_base_dir "matita.ma.templ" in
    let lines = 14 in
    out_preamble och (path, lines);
-   let grafite_parser_cb ast =
-      output_string och (LexiconAstPp.pp_command ast)
+   let lexicon_engine_cb = function
+     | L.Include _ as ast -> output_string och (LexiconAstPp.pp_command ast)
+     | _                  -> ()
    in
    let matita_engine_cb = function
-      | G.Executable (_, G.Macro (_, G.Inline _)) -> ()
+      | G.Executable (_, G.Macro (_, G.Inline _)) 
+      | G.Executable (_, G.Command (_, G.Include _)) -> ()
       | ast                                                 ->
          output_string och (pp_ast_statement ast)
    in
    let matitac_lib_cb = output_string och in
-(*   GrafiteParser.set_callback grafite_parser_cb; *)
+   LexiconEngine.set_callback lexicon_engine_cb;
    MatitaEngine.set_callback matita_engine_cb;
    MatitacLib.set_callback matitac_lib_cb;
    at_exit atexit