[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The short version of the installation instructions for package X-Symbol
on XEmacs is: uncompress & extract the binary distribution in
directory `~/.xemacs/xemacs-packages/', add
(x-symbol-initialize)
to your `~/.emacs' and install
ImageMagick for the image support (unless you want to get a warning).
Please check the web page additionally to the sections here for the installation instructions for package X-Symbol on Emacs.
The rest of this chapter contains the long version. I recommend that you read this chapter completely after a short test of X-Symbol, especially if you have customized your Emacs more or less heavily or if you get some problems.
2.1 Requirements | Which programs you need for X-Symbol. | |
2.2 Put the Files into your Home Directory | Basics 1: Put the files into your home dir. | |
2.3 System-wide Installation: Put the Files into the XEmacs Directory | Alternative: Put the files into the XEmacs dir. | |
2.4 Make XEmacs Initialize X-Symbol During Startup | Basics 2: Initialize X-Symbol during startup. | |
2.5 Installing the Image Converter from ImageMagick | Recommended: How to install convert . | |
2.6 Package Integration | How X-Symbol interacts with other packages. | |
2.7 Installing Additional Fonts | Optional: What to do when using other fonts. | |
2.8 Installing Fonts for Exceed (X-server on Windows) | If appropriate: What to do when using Exceed. | |
2.9 Lisp Coding when Using Other Fonts | If appropriate: Lisp coding for other fonts. | |
2.10 Installing Info, Postscript and HTML Files | Optional: How to create the manual. | |
2.11 Checking the Correct Installation of Package X-Symbol | Is package X-Symbol completely installed? |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This development version of package X-Symbol works with Emacs-21.1 or higher, and XEmacs 20.4 or higher (XEmacs-21.1.9 is strongly recommended, 8.4.1 XEmacs Crashes when using Input Method Token), with or without Mule support.
X-Symbol should work with all window systems Emacs is running under (Mac is not testet and might not work). Under X, no restrictions apply. Under Windows with Emacs, images will not be displayed (they are not yet supported by Emacs under Windows). Under Windows with XEmacs, X-Symbol just supports a limited number of characters (Latin-1, Latin-5, and half the math symbols) and no super- and subscripts, due to missing MS-Windows fonts (see section 9.2.2 Wishlist: Generated Fonts). Under a character terminal, X-Symbol just supports Latin-1 characters only, no super- and subscripts and no images.
This package require package font-lock
(distributed with Emacs
and XEmacs), the use of package lazy-shot
is recommended, see
2.6.2 Syntax Highlighting Packages (font-lock
and add-ons).
If you want to see the images at the end of image insertion commands,
install convert
from
ImageMagick,
see 2.5 Installing the Image Converter from ImageMagick. They show a scaled-down version
of the included image files.
If you want to produce the Info files yourself (they are included in the
binary distribution), you need makeinfo
, Version 1.68 or higher.
If you want to produce a PS file from the manual, you need
texi2dvi
. If you want to produce an HTML version of this manual,
you need texi2html
, Version 1.62 or higher. See section 2.10 Installing Info, Postscript and HTML Files.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you use Emacs, please check the web pages of X-Symbol.
In this section, we assume that you want to install the binary distribution (also called the binary tarball) of package X-Symbol in your home directory. To install it somewhere below the XEmacs root (it might be already there), see 2.3 System-wide Installation: Put the Files into the XEmacs Directory. If you use the source distribution, you should know what do to instead.
In directory `~/.xemacs/xemacs-packages/', run
zcat x-symbol-pkg.tar.gz | tar xvf - |
Remember that tar
does not overwrite write-protected files.
X-Symbol's `pcf' files and font directory must be world-readable since you do not own the X11 font server process. You are on the safe side, if you run
chmod -R a+rx ~/.xemacs/xemacs-packages |
If package X-Symbol has been installed system-wide and you install a newer version in your `~/.xemacs/xemacs-packages/', you get a warning during XEmacs' startup (autoload error: already loaded). You can safely ignore this warning, but there is unfortunately no good way to get rid of it. Yes, XEmacs' packaging system is excellent, but there is still a place for improvements....
Before XEmacs-21.0: the user package directory was `~/.xemacs/' instead of `~/.xemacs/packages/'; also: delete and recompile the `.elc' files.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can skip this section if your have installed X-Symbol in your home directory according to the previous section.
If you install package X-Symbol system-wide, use `default.el' and `xemacs/site-packages/' whenever `~/.emacs' and `~/.xemacs/xemacs-packages/' are mentioned in the previous or following subsections. `xemacs/site-packages/' is the directory of independent packages for XEmacs.
Under XEmacs-21, you can uncompress and extract the tarball by
M-x package-admin-add-binary-package RET dir/x-symbol-pkg.tar.gz |
Then, `xemacs/' is the default directory of buffer
`*Package Output*' (use C-x C-f in that buffer to see it).
It might be `/usr/local/lib/xemacs/xemacs-packages/' (the first
element in variable late-packages
).
Under XEmacs-20, `xemacs/' might be `/usr/local/lib/xemacs-version/'. Here, you have to uncompress and extract the tarball as described in 2.2 Put the Files into your Home Directory. You also have to load the autoload file explicitly by putting the following line into file `site-start.el':
(load "xemacs/lisp/x-symbol/auto-autoloads") |
I would appreciate if you would set the following variables:
x-symbol-installer-address
nil
.
x-symbol-package-url
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Put the following into your `~/.emacs' (or `~/.xemacs/init.el'):
(x-symbol-initialize) |
Basically, that's it! If your XEmacs runs on a different machine, check 2.7 Installing Additional Fonts.
If you get a warning about X-Symbol not being able to deduce a default encoding (or about limited support with XEmacs under Windows or a character terminal, 2.1 Requirements), set the default coding (see section 3.2.1 Normal File and Default Encoding) by putting the following in front of the line above:
(setq x-symbol-default-coding 'iso-8859-1) |
When running Emacs under a character terminal, you might need to use the following (with or without X-Symbol):
(unless window-system (standard-display-european 1)) |
If your character terminal does not support Latin characters, there is no reason to use package X-Symbol. In this case, use the following instead:
(when window-system (x-symbol-initialize)) |
The initialization can be controlled by the following variable:
x-symbol-initialize
isearch
, highlight
,
primary-selection
, secondary-selection
,
paren-match
, paren-mismatch
, paren-blink-off
,
underline
. I.e., for each face, use:
(remove-specifier (get (get-face 'face) 'font)) |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Program convert
from ImageMagick is used to display images at the
end of image insertion commands. The images show a scaled-down version
of the included image files.
While the installation of convert
is optional, you get a warning
if convert
is not found on your system or if there is no image
format supported by both convert
and Emacs. Set variable
x-symbol-image-converter
to nil
if you don't want to get
the warning.
On Unix, convert
must be in your $PATH
. On Windows, it is
assumed to be found at `C:\ImageMagick\convert'. If this is not
the case, you have to customize the variable
x-symbol-image-convert-program
.
Check http://www.imagemagick.org/ for the installation instructions. Run `convert -h' and `convert -list Format' (in newer versions of ImageMagick) in your shell to check whether the installation of ImageMagick was successful. If you have problems, check the ImageMagick web page for FAQs and mailing lists.
If you do not have a truecolor device (i.e., just 256 colors), package
X-Symbol uses convert
with a colormap by default (see section 5.2.2 Image Conversion). You might create and use your own colormap instead. It
should be tuned to include the colors you use in Emacs anyway, i.e., the
face colors.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You might skip this section when trying package X-Symbol the first time. Nevertheless, I strongly recommend to read this section if you have customized your Emacs more or less heavily or if you get some problems.
Some features of X-Symbol work by hooking itself into existing functions of Emacs or related packages via predefined hooks. A potential problem arises if your customization or other packages use the same hooks, or if other packages assume these hooks not to be used, e.g., some packages assume the buffer contents to contain the same characters as the corresponding file.
This section lists some special adaptation for other packages (everything is fine if you do not use these packages). It also lists potential problems in combination with other packages. If you discover some problems in combination with other packages, please let me know.
2.6.1 LaTeX Packages | Packages used in LaTeX buffers. | |
2.6.2 Syntax Highlighting Packages (font-lock and add-ons) | Package font-lock and support modes. | |
2.6.3 File I/O Packages | Compression, encryption, remote files, etc. | |
2.6.4 Miscellaneous Packages | Other packages. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Objectives: relate positions in buffer to positions in file, do conversion in master/slave buffers, preserve highlighting, improve input methods and other things.
auctex
texmathp
. There is
some special X-Symbol adaptation for AucTeX:
TeX-master
when searching for the file encoding
(see section 3.2.2 File Coding of 8bit Characters) and when converting image files with relative
names (see section 5.2.1 Display of Images).
TeX-region-hook
. Requires
AucTeX, v9.8a or higher.
tex
uses package texmathp
.
LaTeX-math-insert-function
. Requires
AucTeX, v9.8a or higher.
TeX-translate-location-hook
.
bib-cite
bib-cite
s highlighting of \cite
and friends.
preview-latex
preview-latex
,
which was clever enough to reuse the above mentioned hook of AucTeX.
Unfortunately, that hook is ... and does not allow a fast translation of
error positions, so preview-latex
allows to provide better
variants of functions in that hook. X-Symbol's variant is
x-symbol-tex-preview-locations
.
reftex
reftex-translate-to-ascii-function
.
whizzytex
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
font-lock
and add-ons) Objectives: start highlighting after conversion. Highlighting is needed for super- and subscripts and when using XEmacs without Mule support.
fast-lock
lazy-shot
instead. By default, the
initialization of package X-Symbol sets fast-lock-save-faces
to
nil
to make package fast-lock
work with X-Symbol.
font-latex
font-lock-maximum-decoration
to value t
,
2 or higher if you do not want to use super- and subscripts in arguments
of \label
and friends. See section 8.4.5 I See Super- and Subscripts where I Don't Want Them..
font-lock
font-lock
). I strongly
recommend not to turn on font-lock in any mode hook, set
font-lock-auto-fontify
to t
instead (this is the default,
anyway). See also lazy-shot
.
If you turn on font-lock in a mode-hook, visiting a file would become slower, since X-Symbol mode is usually turned on after the functions in the mode hook have been run, i.e., the fontification is getting useless if the tokens are automatically decoded.
lazy-lock
lazy-shot
.
lazy-shot
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Issue: compression, encryption and so on can be seen as some kind of conversion. When doing multiple conversion, the sequence matters.
ange-ftp
efs
and jka-compr
.
comint
comint
s in-/output use X-Symbol's
conversion function. If you set variable comint-input-sender
,
set it before initializing package X-Symbol.
crypt
crypt++
jka-compr
instead. See section 8.2 Spurious Encodings. See section 8.3 The Encoding Does Not Work. If you use crypt
or crypt++
and the
character alpha
looks like `\233a' after save-buffer
,
set this variable to slowest
. See section 9.3 Open Questions.
efs
ange-ftp
. See also jka-compr
.
iso-cvt
iso-sgml
psgml-html
.
jka-compr
crypt
. The
following is absolutely necessary (with or without using package
X-Symbol, at least in older Emacsen): load jka-compr
after
efs
/ange-ftp
!
latin-unity
ucs-tables
unify-8859-on-decoding-mode
and
unify-8859-on-encoding-mode
can be used with package X-Symbol.
vc
crypt
, vc-next-action
and friends
encode characters to tokens. See section 8.2 Spurious Encodings.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
abbrev
words-include-escapes
to t
. See section 8.1 Problems under XEmacs/no-Mule.
completion
desktop
session
below.
flyspell
ispell
.
func-menu
ispell
ispell
assumes the buffer contents to be the same as
the file contents and does not provide any hook to fix this. This
should be fixed in ispell
, see 9.2.3 Wishlist: Changes in Emacs/XEmacs. See section 8.4.11 Problems with Spell-checking.
ProofGeneral
psgml-html
psgml-html
: Do not set html-auto-sgml-entity-conversion
to
non-nil
. See section 2.6.3 File I/O Packages, package iso-sgml
.
session
(x-symbol-init-input)
into your
`~/.emacs'; otherwise strings containing X-Symbol's private
characters read from the `~/.session' file might look funny. See
also package desktop
above.
x-compose
x-compose
are also supported by package
X-Symbol. Thus, I recommend to use multi-key instead
C-= when running under XEmacs without Mule support.
See section 4.1 Common Behavior of All Input Methods.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You don't have to install X-Symbol fonts in usual circumstances (with the binary distribution, Emacs runs on the same machine, you are happy with the default fonts).
If your Emacs runs on a different machine, please follow the steps 5 and 6 below or read the next section.
If you want to install additional fonts (since the binary distribution contains only a limited selection of fonts and font sizes), please follow the following sequence which worked for me (on SunOS 5.4-5.6/Solaris). If you have to do s.th. (completely) different on your system, please let me know--I will include your hints.
If you are lost with the following instructions, use the standard fonts from the binary distribution. (Sorry, I do not have to time to answer general Unix font questions. Or to be more exact, I'm not an expert in this area.... Nevertheless, if you have a clearer explanation for the installation sequence below, please send me a patch to `man/x-symbol/x-symbol.texi'.)
xfontsel
or xfd
. The bad news is that there is no
general way to say which character belongs to which font. My only goal
was to use standard fonts whenever possible; the rest belong the the
xsymb1 font (which I have designed). If you want to use a font as an
alternative to another font, it must have the same charset
registry-encoding.
There are two categories of `.bdf' files. The first category contains files for fonts which are already installed; the files are needed to create and install the super- and subscript versions. Copy these files to `~/.xemacs/xemacs-packages/etc/x-symbol/origfonts/'. The second category contains files for fonts which are not installed. Copy these files to `~/.xemacs/xemacs-packages/etc/x-symbol/fonts/'.
ORIGBDFS
for the first category and BDFS
for the second category accordingly.
make mkdirs
, and make pcfs
. You need GNUs
make
and perl
, Version 5 (or higher). You might need to
check the permissions of the created files (see section 2.2 Put the Files into your Home Directory).
xset +fp ~/.xemacs/xemacs-packages/etc/x-symbol/pcf/ |
For a system-wide installation, you might want to add this directory to the system-wide font path instead.
If your system doesn't have xset
, you should copy all `.pcf'
files (compiled fonts) from `~/.xemacs/xemacs-packages/etc/x-symbol/pcf/' into
directory `/usr/lib/X11/fonts/75dpi/' (Slackware distribution) and
run `mkfontdir 75dpi' in that directory.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If your X-server on Windows is Exceed and if you have configured Exceed to use the "native window manager" for your Unix screens, you must install the X-Symbol fonts on Windows. The following works with Exceed 6.0 & NT 4.0 and Exceed 7.0 & Windows 2000:
%supoffs = ('08',3, 10,3, 12,3, 14,3, 16,3, 18,3, 24,3); |
make mkdirs
, and make gens
in
`~/.xemacs/xemacs-packages/etc/x-symbol/fonts/'. If you have problems, please read
the previous section.
xsymb
as the
`File Name (*.fdb)'. Click on OK.
Note: Windows NT 4.0 will crash (bluescreen) if you use fonts compiled by Exceed from the `pcf' files or if you missed step 1, i.e., limiting the superscript shift! With Exceed 7.0 & Windows 2000, there is no crash, but these fonts cannot be displayed.
If you use XEmacs with Exceed as your X-server on Windows, X-Symbol cannot warn you about undefined fonts, because XEmacs in general cannot recognizes in that case, whether a font exists.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Package X-Symbol needs to know which fonts to use for the X-Symbol
characters and super- and subscripts. It also must interact with
package font-lock
to display them (see section 3.5 The Role of font-lock
).
If you have installed additional fonts (see section 2.7 Installing Additional Fonts) for use with package X-Symbol, you might have to change the following variables:
x-symbol-latin1-fonts
x-symbol-latin2-fonts
x-symbol-latin3-fonts
x-symbol-latin5-fonts
x-symbol-latin9-fonts
x-symbol-xsymb0-fonts
x-symbol-xsymb1-fonts
If you change the values of one of these variables, do only specify the same charset registry-encoding (e.g., `adobe-fontspecific') as specified by the fonts in the default value of this variable.
x-symbol-font-sizes
E.g., if you prefer larger fonts, you might want to insert the following into your `~/.emacs':
(setq x-symbol-font-sizes '(18 ("_su[bp]-" . 14) ("\\`-etl-" . 16))) (setq x-symbol-xsymb0-fonts '(("-adobe-symbol-medium-r-normal-*-*-%d0-*-*-*-*-adobe-fontspecific" "-xsymb-xsymb0-medium-r-normal--%d-%d0-75-75-p-85-adobe-fontspecific") ("-adobe-symbol_sub-medium-r-normal-*-*-%d0-*-*-*-*-adobe-fontspecific" "-xsymb-xsymb0_sub-medium-r-normal--%d-%d0-75-75-p-74-adobe-fontspecific") ("-adobe-symbol_sup-medium-r-normal-*-*-%d0-*-*-*-*-adobe-fontspecific" "-xsymb-xsymb0_sup-medium-r-normal--%d-%d0-75-75-p-74-adobe-fontspecific"))) |
The first assignment changes the font sizes, the second makes X-Symbol using the original Adobe symbol font instead of my minor modification (appearance) of it. The xsymb1 font will be scaled, which might not look nice (see section 8.4.6 The Characters are Too Small or Too Big).
You might want to change the following variables:
x-symbol-latin-force-use
x-symbol-mule-change-default-face
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To create the info files, execute make info
in directory
`~/.xemacs/xemacs-packages/man/x-symbol/' of the distribution. It requires
makeinfo
, Version 1.68 or higher. This should not be necessary
if you use the binary distribution of package X-Symbol.
If no entry for X-Symbol is automatically added to the info directory listing, add the following line to `~/.xemacs/xemacs-packages/info/dir':
* X-Symbol:: Semi WYSIWYG for LaTeX, HTML and other "token languages" |
Optionally, you might want to create a printed document from the TeXinfo
file. Execute make ps
in directory `~/.xemacs/xemacs-packages/man/x-symbol/'
of the distribution. It requires texi2dvi
.
Optionally, you can create an online manual for a web browser by
executing make html
in directory `~/.xemacs/xemacs-packages/man/x-symbol/' of
the distribution. It requires texi2html
.
All formats of the manual are created by executing make all
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
After having completed the installation, exit and restart Emacs.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |