[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
An X-Symbol input method is a way, provided by package X-Symbol, to insert a X-Symbol character (not in the sense of Mule's "input methods"). For a short overview with screenshots, see the web pages of X-Symbol.
Input methods Token and Electric change the normal way to insert characters a bit. Therefore, they require X-Symbol mode to be turned on and can be turned off explicitly. The other input methods are provided with additional commands and key prefixes, they can also be used in buffers where X-Symbol mode is turned off.
With AucTeX, Version 9.8a or higher, its math mode commands also inserts X-Symbol characters (see section `Mathematics' in AUCTeX).
4.1 Common Behavior of All Input Methods | Common behavior of all input methods. | |
4.2 Input Method Token: Replace Token by Character | Replace token by character. | |
4.3 Input Method Read Token: Minibuffer Completion | Minibuffer input with completion. | |
4.4 Input Method Menu: Select a Menu Item | Select a menu item. | |
4.5 Input Method Grid: Choose Highlighted Character | Choose highlighted character. | |
4.6 Input Method Keyboard: Compose Key Sequence | Compose a key sequence. | |
4.7 Input Method Context: Replace Char Sequence | Replace character sequence. | |
4.8 Input Method Electric: Automatic Context | Automatically replace character sequence. | |
4.9 Input Method Quail: a Mule Input Method | A Mule input method "x-symbol". | |
4.10 Customizing Input Methods | How to customize the input methods. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Input methods normally just inserts valid characters which are those characters which have a useful representation in the file:
x-symbol-valid-charsym-function
x-symbol-default-coding
.
When X-Symbol is turned on, a character is valid if the characters could
be encoded to a token in language x-symbol-language
(see section 3.1 Token Language).
x-symbol-compose-key
(unless (featurep 'mule) (setq x-symbol-compose-key '(multi-key))) |
x-symbol-auto-key-autoload
nil
, if you do not want that pressing C-=
automatically initializes the input methods.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If X-Symbol mode is on, input method Token automatically replaces the token by the corresponding character when inserting the next character following the token (in some token languages you need the next character to decide whether the token is completed) if it is valid.
The token will be replaced only if the next character has been inserted without prefix argument or with prefix argument 0 (C-u 0), the latter will therefore just induce the replacement.
Please note that the token is really replaced by the characters, it is
not just font-lock
which highlights the token to look like a
character.
You might want to press C-/ or C-x u to undo the replacement. Input method Token requires X-Symbol mode to be enabled, it can be disabled (and re-enabled) by setting the following variable:
x-symbol-token-input
tex
(see section 6.2 Token Language "TeX macro" (tex
)).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can insert a character by reading the corresponding token in the minibuffer. You are offered completion over the known tokens (see section `Completion' in XEmacs User's Manual).
Input method Read Token also works if X-Symbol mode is not enabled. It uses the common interpretation of prefix arguments for X-Symbol insert commands, see 4.1 Common Behavior of All Input Methods.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If X-Symbol mode is turned on, a Menu X-Symbol
appears in
the menubar (see section 3.3 Minor Mode). It also appears over non-highlighted
parts in the Grid and the Key Completions buffer (see section 4.5 Input Method Grid: Choose Highlighted Character). The menu allows to change buffer-local and global variables
(some directly, some via package custom
). It has a submenu with
the most interesting commands of package X-Symbol.
The menu has submenus with commands to insert X-Symbol characters. The submenu headers are the same as the headers in the Grid, see 3.6 Character Group and Token Classes. The appearance of the menu can be customized:
x-symbol-local-menu
x-symbol-menu-max-items
Input method Menu also works if X-Symbol mode is not enabled. It uses the common interpretation of prefix arguments for X-Symbol insert commands, see 4.1 Common Behavior of All Input Methods.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Probably the easiest way to insert a character is by using a Grid of characters:
In the Grid buffer and the buffer with the possible completions for an X-Symbol key sequence (see section 4.6 Input Method Keyboard: Compose Key Sequence), the following commands are used if the mouse pointer is over an highlighted character.
point
if point
is not in the same
buffer as the highlighted character. Otherwise, insert the character
into the reference buffer, i.e., the buffer where you have invoked the
grid or the key completions from. (The reference to the buffer is
erased when an X-Symbol character is inserted into any buffer.)
Over all non-highlighted parts, the following commands are used:
When using the keyboard to select a character, the following command could be useful:
You can control the grid by the following variables:
x-symbol-local-grid
x-symbol-temp-grid
x-symbol-grid-reuse
x-symbol-grid
, if this is
reasonably to do. If x-symbol-grid
is called with a prefix
argument, always create new Grid.
x-symbol-grid-ignore-charsyms
nobreakspace
.
x-symbol-grid-tab-width
x-symbol-heading-face
which is also used as the default font in
the Grid buffer.
x-symbol-heading-strut-glyph
The headers in the Grid are the same as the submenu headers, see 3.6 Character Group and Token Classes. Similar looking characters for one headers are grouped together. See section 4.7 Input Method Context: Replace Char Sequence.
Input method Grid also works if X-Symbol mode is not enabled. It uses the common interpretation of prefix arguments for X-Symbol insert commands, see 4.1 Common Behavior of All Input Methods.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Key sequences starting with C-= (see section 4.1 Common Behavior of All Input Methods) are used to insert X-Symbol characters, e.g., C-= ~ >
inserts leadsto
. The Ascii sequence of the keys after C-=
look similar to the character which you are going to insert. It is the
same as the sequence which is replaced by input method Context, see
4.7 Input Method Context: Replace Char Sequence.
If many characters are represented by the same Ascii sequence, the binding is extended by `1', `2' and so on. If you do not know how to continue your key sequence, the following commands might be useful:
scroll-other-window-down
,
scroll-other-window
, beginning-of-buffer-other-window
or
end-of-buffer-other-window
, respectively. You do not have to
type the key sequence again, i.e., C-= zero-or-more-keys is
also used for the next input.
x-symbol-temp-help
x-symbol-map-default-keys-alist
Input method Keyboard also works if X-Symbol mode is not enabled. It uses the common interpretation of prefix arguments for X-Symbol insert commands, see 4.1 Common Behavior of All Input Methods.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The idea of the input method Context is to replace a sequence of characters by a character which looks similar to the whole sequence. If the sequence consists only of Ascii characters, it is also used for the key bindings, see 4.6 Input Method Keyboard: Compose Key Sequence.
There will be some info in the echo area that the character sequence before point can be replace via input method Context. The following commands are provided:
Both commands can also be used to resolve a character alias before point, see 3.2.7 Character Aliases. If the region is active, restrict replacement to use that region since the input method Context only considers the longest sequence of characters with a replacement.
Input method Context can be customized by changing the following variables:
x-symbol-rotate-prefix-alist
x-symbol-rotate-key
,
you can specify the direction you want to have: it is according to
numerical keypads, e.g., with prefix argument `7' you specify the
direction "north-west".
x-symbol-rotate-suffix-char
x-symbol-rotate-key
is also used to "Greekify" the
previous character: typing a C-. is shorter than a # C-,.
x-symbol-context-ignore
x-symbol-context-init-ignore
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The idea of input method Electric is to have the input method Context (see section 4.7 Input Method Context: Replace Char Sequence) do its replacement automatically. X-Symbol automatically replaces some character sequences of input method Context by the X-Symbol character as soon as the last character in the sequence of the sequence has been pressed.
Input method Electric has nothing to do with the display of super-/subscripts (see section 5.1 Super- and Subscripts).
You might want to press C-/ or C-x u to undo the replacement. Input method Electric requires X-Symbol mode to be enabled, it can be disabled (and re-enabled) by setting the following variable:
x-symbol-electric-input
arrowright
, "- left
right > simply inserts `->'.
oacute
' because `"o' is the context for
ohungarumlaut
(which cannot be inserted by input method
Electric).
x-symbol-electric-ignore
(setq x-symbol-electric-ignore "[ \t]\\|[A-Za-z][~`]\\|[:'][A-Za-z]") |
x-symbol-lang-electric-ignore
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Another way to insert a characters is by using the Emacs/Mule multilingual text input method "x-symbol" (see section `Input Methods' in XEmacs User's Manual)..
Again, the Ascii sequence used there is the same as the sequence which is replaced by input method Context, see 4.7 Input Method Context: Replace Char Sequence. A one-letter key sequence is extended by ;.
If input method Quail is selected for a buffer, input method Electric (see section 4.8 Input Method Electric: Automatic Context) is disabled in that buffer.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You may safely define key bindings not using the x-symbol-map
(i.e., starting with C-=). E.g., for alpha
on A-a ,
use
(global-set-key [(alt a)] 'x-symbol-INSERT-alpha) |
Please note that the command x-symbol-INSERT-alpha
is not defined
before the main file (`x-symbol') in the package has been loaded
(if you really need it, function autoload
is your friend).
Other possibilities to customize the input methods are by setting the following variables:
x-symbol-header-groups-alist
x-symbol-group-input-alist
x-symbol-user-table
For example, if you prefer charsym epsilon1
over epsilon
you might want to use:
(setq x-symbol-user-table '((epsilon1 t (greek1 "e" nil "epsilon") nil -3000))) |
x-symbol-list-mode-hook
x-symbol-after-init-input-hook
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |