|
|
| ||||||
17 LaTeX support |
If you use LaTeX you should get and install auctex http://www.gnu.org/software/auctex which provides very useful support for LaTeX in emacs. A good guide to getting and installing emacs, auctex, Miktex (a LaTeX for Windows) plus previewers is NTTeXing.html by Willem Minton (supplied with rsltc).
Then include in your .emacs file
(require 'latex) (load "rslconvert") (define-key LaTeX-mode-map "\C-cs" 'latex-symbol) (define-key LaTeX-mode-map "\C-c\C-t" 'do-rsl) (define-key LaTeX-mode-map "\C-c\C-u" 'undo-rsl)
Now you can do several useful things:
->
", and then
immediately pressing Ctrl-c followed by s changes it to
"{\RIGHTARROW}
".
\RSLatex
and
\endRSLatex
. These look like LaTeX commands but are in
fact not. For example, you type
\RSLatex if a > b then c else d end \endRSLatex
where \RSLatex
and \endRSLatex
must be in lines of their
own and with no spaces in front of them. Ctrl-c Ctrl-t with the point
anywhere
after the \RSLatex
changes this to
%\RSLatex %if a > b then c % else d %end %\endRSLatex \bp \kw{if} a {\GT} b \kw{then} c\\ \>\kw{else} d\\ \kw{end} \ep
which will print with key words bold, the LaTeX versions of symbols, and with the original layout (it is best to use two spaces for each indentation). Ctrl-c Ctrl-u will revert to the original form for editing.
\RAISEIN{X}
will cause a LaTeX version of X.rsl to
be included, provided you first use the emacs command M-x
mkdoc on the LaTeX file that includes one or more such
\RAISEIN
commands. mkdoc generates a file
X.tex for each such file, unless there is already such a file
dated later than the corresponding X.rsl file. So it is easy
to keep documents up to date with the latest versions of your RSL
files.
The file name in the \RAISEIN
can include a path if
X.rsl is in a different directory, but should not include .rsl.
\RAISEINBOX
is an alternative to \RAISEIN
that also puts
a frame around the RSL.
The definitions of the RSL symbols are in rslenv.sty, and so your LaTeX document needs to include in the preamble the line
\usepackage{rslenv}
(If you still use \documentstyle
, i.e. you are not using
LaTeX2e, then you include rslenv as an option to \documentstyle
.)
17 LaTeX support | ||||||||
|
|
|