[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Ralf Angeli
Subject: Re: [AUCTeX-devel] New tex-symb.el
Date: Wed, 07 Feb 2007 19:59:24 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

* Masayuki Ataka (2007-02-06) writes:

> From: Ralf Angeli <address@hidden>
>> * Masayuki Ataka (2007-02-04) writes:
>> > 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.


>> > 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?

No, I was more thinking of using hash tables.  `LaTeX-math-default'
would be the master hash table with information about math-related
macros relevant for the AUCTeX "core".  Then something like
tex-symb.el would use the keys of that hash table to reference the
macros.  Of course, if the keys of the hash tables were macro names,
the implementation would not differ much from what we have now.  It
would make it clearer, however, that there is a "leading" variable to
be regarded as master data source.

And let me mention again the idea of a central "database" of TeX
macros containg all sorts of information, like syntax or
documentation.  Part of that database could and should be math-related
macros as well.  I'm not sure yet how to do this in Emacs Lisp because
I'd like to have named fields, i.e. something like
("title" :syntax "{}" :descr "Specify the document title.")
in order to avoid having to write many nil values for empty fields.

>> > 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?

My original idea was to have one "math mode" and define for that one
which input method (prefix or postfix) to use.  Perhaps it could also
be useful to be able to use both methods at the same time.  I haven't
seriously been writing math in LaTeX, so I cannot really comment on
that.  But we should clarify among ourselves and with people using
AUCTeX and LaTeX for writing lots of math how the user interface
should ideally look like.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]