next up previous
Next: How to create RSL Up: A User Guide to Previous: Introduction


How to set up emacs for the tools in the Linux E-databar

To set up the tools for type checking and LATEX formatting RSL specifications in the E-databar

  1. create a directory ~/.elisp
  2. put the files rsltc.el, rsl-mode.el, rslconvert.el and tokenise.el (found under the link ``How to use the RAISE tools'' at the course home page http://www.imm.dtu.dk/courses/02262/) in this directory, and
  3. add the following to your .emacs file
    ;;; Facilities for RSL support

    ;; Loading files for RSL support:
    ;; put rsltc.el, rsl-mode.el, rslconvert.el and tokenise.el in ~/.elisp 
    ;; put that directory on the emacs load path:
    (add-to-list 'load-path "~/.elisp")
    ;; load the files (rslconvert loads tokenise)
    (load "rsltc.el")
    (load "rsl-mode.el")
    (load "rslconvert.el")

    ;; Function for converting RSL formulae in ascii syntax to latex
    ;; The formulae are placed between \RSLatex and \endRSLatex

    (defun rsl2latex () 
      "Do rslatex on buffer" 
      (interactive)
      (do-latex))

    ;; Function for undoing the above conversion

    (defun latex2rsl () 
      "Undo rslatex on buffer" 
      (interactive)
      (undo-latex))

    ;; Setting up function keys
    ;; Pressing f2 invokes 'do-latex' on the buffer
    ;; Pressing f3 invokes 'undo-latex' on the buffer

    (global-set-key [f2] 'rsl2latex)
    (global-set-key [f3] 'latex2rsl)
The tool rsltc can now be run from emacs, i.e. you can syntax and type check the current emacs buffer. Furthermore, you can include RSL specifications in LATEX documents.



Anne Haxthausen 2003-03-13