Go to the first, previous, next, last section, table of contents.

Supporting Other Format Packages

You can add support for new TeX format packages. These are treated specially, in that they are loaded immediately after you enter VirTeX-mode, and they actually define the major mode.

Here is the file defining slitex-mode.

;;;  SLITEX.el - Special code for SliTeX mode.

(require 'tex-init)
(require 'ltx-misc)

(TeX-add-style-hook "SLITEX"
 (function
  (lambda ()
    (setq mode-name "SliTeX")
    (setq major-mode 'SliTeX-mode)  
    (setq TeX-command-default TeX-command-SliTeX)
    (LaTeX-mode-initialization)
    (run-hooks 'SliTeX-mode-hook)
    (TeX-run-style-hooks "latex" "slitex"))))

The file should be placed in the directory TeX-format-directory.

User Option: TeX-format-directory

Directory containing information about TeX format packages. Must end with a slash.

You must also add an entry to TeX-format-list in order to make in known to the rest of the system.

User Option: TeX-format-list

List of format packages to consider when choosing a TeX mode.

A list with a entry for each format package available at the site.

Each entry is a list with three elements.

  1. The name of the format package.
  2. The name of the major mode.
  3. A regexp typically matched in the beginning of the file.

When entering tex-mode, each regexp is tried in turn in order to find when major mode to enter.


Go to the first, previous, next, last section, table of contents.