			--------------------
			 Viewer minor modes
			--------------------


 Viewer minor modes
====================

This package contains minor modes for emacs(epoch/lucid) supporting
8bits characters display. They consist in key bindings, abbreviations,
and translators from and to TeX. Minor modes presently supported are:

Math-mode:   minor mode for typing math symbols
Latin-mode:  minor mode for typing Iso-latin-1 characters
Fmath-mode:  minor mode for typing math symbols and french characters
French-mode: minor mode for typing french characters

Don't expect them to provide a full (La)TeX previewer/editor. However,
together with an appropriate hilit color/font mode for TeX, you should
feel the need to compile (La)TeX files less often. Note that it
actually does no formatting at all. Roughly speaking, it mainly
converts some math TeX macros to symbols. It seems useful enough
though for people that write lot of maths. It is also very useful for
french people because accentuated words that look like "\c{c}\`a" now
look like "ca".




 Regret
========

This could be much more general, i.e. less emacs-8bits/TeX oriented:
it is a generic way to edit a file with atomic (symbolic) information
represented on more than one character (such as TeX macros). Maybe
someday...




 Warning
=========

Note that is is provided "as is", rough and rash, without express or
implied warranty. Let me remind you also an excerpt from the GNU credo:

  GNU Emacs is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY.  No author or distributor
  accepts responsibility to anyone for the consequences of using it
  or for whether it serves any particular purpose or works at all,
  unless he says so in writing.  Refer to the GNU Emacs General Public
  License for full details.

  Everyone is granted permission to copy, modify and redistribute
  GNU Emacs, but only under the conditions described in the
  GNU Emacs General Public License.   A copy of this license is
  supposed to have been given to you along with GNU Emacs so you
  can know your rights and responsibilities.  It should be in a
  file named COPYING.  Among other things, the copyright notice
  and this notice must be preserved on all copies.




 Using it
==========

You can use those modes just like any other (minor) mode. A typical
.emacs contains something like:

(autoload 'math-mode   "math-mode"   "Minor mode for typing maths" t)
(autoload 'fmath-mode  "fmath-mode"  "Minor mode for typing french and maths"t)
(autoload 'latin-mode  "latin-mode"  "Minor mode for typing ISO latin chars" t)
(autoload 'french-mode "french-mode" "Minor mode for typing french" t)

You may also bind a mode to keys:

(global-set-key "\M-`"  'fmath-mode)
(global-set-key "\M-\"" 'french-mode)

In fact, if you want to use the mode in minibuffer interaction, you
must bind the mode to keys to switch it on dynamically. Standard
autoload definitions and key bindings are defined in "viewer/autoload".

Do not be afraid. It takes a few seconds to load a mode (in order to
precompute some tables). Afterward, toggling mode is fast. Be sure
also that the emacs-lisp files are compiled. It does run much faster.
You don't need to compile the <mode>.el files because they contain
only data.




 Getting help
==============

When the mode is loaded, on-line help and documentation becomes
available. Running command <mode>-help (math-mode-help for example)
pops an information buffer. In order to get a TeXable form of the mode
documentation, run (<mode>-help 'LaTeX). Loading "viewer/autoload"
makes those functions autoloadable.




 Emacs ? Epoch ? Lucid Emacs ?
===============================

You really need to have either an emacs able to display characters
with ascii code over 127 (full 8bits characters set). This is not
possible with the current version of emacs, but many patches do exist
around to solve this problem. The lastest versions of Epoch (4.x) and
Lucid Emacs (19.x) incorporates such a patch.

Toggling 8bits mode display may be different according to the patch.
If you're not using one of those, see function "viewer::8bits-display"
in file viewer.el to have it work (toggle automatically) for yours.

In fact, viewer uses an embryonic Epoch/Lucid-portable package. See
its README file to have more information.





 Fonts
=======

Unfortunately, its wasn't possible to use the full font display capa-
bilities. Minor display modes are doomed to use a single font. It is
all right for latin-mode and french-mode. But it requires building a
new font containing symbol characters if you want to use math-mode and
fmath-mode.

Use of font may also be emacs(Epoch/Lucid) dependent. If you run Epoch
or Lucid emacs, the package automatically uses the math font when
needed.  Otherwise, you need to run emacs with the right font from the
start.

Fortunately -- this time --, the copyright on the fonts presently used
enables some manipulations. Math/Fmath fonts are thus available with
this package in bdf format. You only need to compile them for your
favorite X window server. Try bdftosnf for Sun, or bdftopcf for Dec.
You only need then to add it to your font-path. A typical scenario:

$ mkdir [FONTDIR]
$ xset +fp [FONTDIR]
$
$ bdftopcf [FONTFILE].bdf > [FONTDIR]/[FONTFILE].pcf
$ (cd [FONTDIR]; mkfontdir)
$ xset fp rehash

You may also want to use makesnf or makepcf, available with the fonts.

Math/Fmath fonts were generated using "mixfont.ll". This program is
written in a lisp dialect called LeLisp. It is undocumented, but I
nonetheless included it in the package, just in case you feel a *VERY*
strong need to build new fonts, or simply to adjust the math/fmath
fonts.




 Decoration with colors and fonts
==================================

There no problem using any hiliting package. Actually, you are
strongly encouraged to use one. Some preset are automatically defined
for decor and hilit according to the value of the variables
LaTeX::decor-preset and LaTeX::hilit-preset. See viewer/LaTeX for
details.




 TeX
=====

A TeX file comes together with each mode (french-mode does not need it
as long as you are using Computer Modern fonts). It contains TeX macro
definitions that you have to include in your document if you don't
want to translate it back to TeX before compiling it (invoking the
command <mode>-to-TeX). For example, if you are using math-mode, just
put at the beginning of your document:

\input{math}




 Getting it
============

It is available via anonymous ftp to babar.inria.fr (138.96.24.21)
in pub/emacs:

	README: this information file
	viewer.tar.Z: contains the following directories
	  - doc          : help for standard modes (without TeX extension)
	  - fonts/bdf    : font files for (f)math-mode
	  - fonts/src    : (f)math font maker
	  - lisp/viewer  : viewer modes emacs lisp files
	  - lisp/portable: Epoch/Lucid portable package
	  - lisp/etc     : some decor/hilit files
	  - tex          : some macros to include in your TeX files

Remember to be in binary mode before getting viewer.tar.Z.

I would be glad if users could drop me a mail when they ftp this
package. Though I cannot assure you to solve a possible problem,
unless *YOU* write my PhD thesis, you can reach me (Renaud Marlet) by
email (bob@sophia.inria.fr).




 Installing it
===============

Besides the font installation described above, the only thing you need
to do is to copy (or link...) the directories lisp/viewer and
lisp/portable in your local emacs-lisp directory. Then, just load or
require (for example) "viewer/math-mode". You may also copy one of the
files in lisp/etc and do (require 'decor) or (require 'hilit) or
(require 'lhilit) to have some colors and fonts. (My guess is that
you're gonna love decor)




 Last words
============

Share and enjoy. I mean if you dare.
