anchor.diff:  (defvar *run-in-source* nil "run directly from source (no installation)")
   (defvar *output-directory* "pegexel-output/" "output directory to place generated files (relative to template file).")
   (defvar *output-filename* nil  "output filename (default generated from template filename).")
  +(defvar *force-rewrite* nil "Force overwrite existing output file.")
   (export '(*debug* *no-escape* *default-tex-environment*))
   
   ; show short long var string
  
positive.code:   (if path (namestring (make-pathname :directory (pathname-directory path))) 
        ""))
  
  (defun output-file (input where output)
    "Get output file."
    (let* ((output-file (base-name output))
  	 (input-directory (get-directory-from-path input))
  	 (output-directory (get-directory-from-path output))
  	 (outdir (ensure-directories-exist 
  		  (make-pathname :directory (pathname-directory (concatenate 'string input-directory "/" where "/" output-directory "/"))))))
      (cond (output (unless (equal *output-type* (pathname-type output-file )) 
  		    (concatenate 'string  output-file "." *output-type*))
  		  (pathname (concatenate 'string (namestring outdir) output-file)))
  	  (t (output-name-from-input-name outdir input)))))
  
  (defvar *basedir* (get-script-path *args*) "base directory installation")
  (defvar *libdir* (merge-pathnames (if *run-in-source* "lib/" "share/pegexel/lib/") *basedir*))
  
negative.code: ; generate before get output filename because extension can be changed in generation.
  (let* ((syms (generate-exo *exo-grammar*))
         (output-filename (output-file *filename*  *output-directory*  *output-filename*)))
    (when (probe-file output-filename)
      (cond  (*force-rewrite* (script-debug "Deleting existing file ~A~%" output-filename)
  			    (delete-file  output-filename))
  	   (t (format *error-output* "File ~A exists! Use -f to overwrite." output-filename)
  	      (quit))))
    (script-debug "Output filename ~A~%" (namestring output-filename))
    (with-open-file (stream output-filename :direction :output)
      (unless *quiet* (format t "Generating file ~A~%" output-filename))
  