auctex-devel
[Top][All Lists]

## Re: [AUCTeX-devel] New tex-symb.el

 From: Masayuki Ataka Subject: Re: [AUCTeX-devel] New tex-symb.el Date: Tue, 06 Feb 2007 15:34:19 +0900 (JST)

From: Ralf Angeli <address@hidden>
Subject: Re: [AUCTeX-devel] New tex-symb.el
Date: Sun, 04 Feb 2007 09:27:30 +0100

> * Masayuki Ataka (2007-02-04) writes:
>
> > I brushed up my tex-symb.el, that is posted here two years ago.
> > I attached new tex-symb.el at the end of this mail.
> >
> > tex-symb provieds two abbrev expand commands.
> >
> > 1. Greek expansion (TeX-symb-greek-expand)
> >   a C-.  ->  \alpha
> >
> > 2. Symbol expansion (TeX-symb-symbol-expand)
> >   oo C-,  ->  \infty
>
> What is the reason for having two different postfix key bindings?

X-Symbol and YaTeX have two different prefix/postfix key
bindings for expanding greek letters and math symbols.
I followed their key bindings (especially X-Symbol).

I think it's reasonable to change prefix/postfix keies for
expanding greek letters and math symbols.
ex.
u C-, -> \cup
u C-. -> \upsilon

d C-, -> \partial
d C-. -> \delta

> BTW, these key bindings should be reserved for minor modes.
>
You are right.  Maybe, tex-symb should be worked as minor mode,
because TeX-math-mode and TeX-fold-mode are also implemented in
minor mode.  I will fix.

> > I prepared abbrev rules for almost LaTeX math symbols
>
> I find it a bit unfortunate that additional lists are used which
> contain strings already present in LaTeX-math-default'.  Wouldn't it
> be possible to integrate LaTeX Math mode and tex-symb and operate on a
> single data source for math macros?
>
Do you suggest to put this rule

(defconst TeX-symb-math-alist
'(...
(">>"  . "\\gg")

into LaTeX-math-default like this?

(defconst LaTeX-math-default
'(...
(nil "gg" "Relational" 8811 "<<") ;; #X226B

In other words, do you say that LaTeX-math-default' sholud
have the fifth element for expanding?

> One could have one minor mode where one could switch between the
> different kind of key bindings (prefix, postfix) or this could be
> implemented as two kinds of input methods.
>
> Also, regarding the macros, at one day I'd like to have a single
> database of macros with all related information which can be used by
> various parts of AUCTeX.  For example with information on arguments to
> be used in connection with C-c RET'.  Similarly with information on
> syntax to be used in connection with font locking.  With information
> to be displayed as documentation of the macro for the user.  And so
> on.  Perhaps that could be kept in mind.
>
> > (including
> > amssymb!).
>
> Could this be moved to the respective style file?
>
That's good idea.  I'll do that if tex-symb is part of AUCTeX.

> > I would like to add tex-symb.el into AUCTeX distribution for
> > the third Math symbol aid tool (The first and second tools are
> > Menu and LaTeX-math-mode).  Developers, how do you think?
>
> I think we should have one mechanism for doing this kind of stuff.  Of
> course this could provide different interfaces for the user.
>
The merit of prefix (LaTeX-math-mode) is an ease of type.
For example typing a' for \alpha is easier than typing a C-.'.

The merit of postfix (tex-symb) is an abundance of commands to
support, because postfix can expand TeX commands chainly:
ex. x C-, -> \times C-, -> \leftthreetimes C-, -> \rightthreetimes

Prefix and postfix method both have merit and demerit.
And I have no idea to provide prefix/postfix in one mechanism.
Do you have an idea?

---