auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] changing parameters


From: ivo welch
Subject: [AUCTeX-devel] changing parameters
Date: Wed, 13 Aug 2008 08:40:51 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11


dear auctex-wizards:

I am planning to write a preprocessor for latex, which does a couple of
things, most importantly:

   #    replaces % as the comment character
   \1,\2..    replaces #1, #2,.. as macro arguments
   \ns    replaces \#
   \nl    replaces \\
   \lcp    replaces \{
   \rcp    replaces \}
   \math{}    replaces $...$
   \be    replaces \[
    \ee    replaces \]
   $,%    become ordinary characters

and I also plan to extend the namespace of macros to include [0-9.:] by
mangling it into spelled out versions.  Maybe I want to allow ';' as a
terminating character that forces interpretation as '{\macro}'.

It is trivial to write a perl preprocessor to handle these changes.
the big advantage is that with these changes, writing a tex->anything
transcoder becomes a lot simpler.  (transcoder, not parser, of course.)

...except that I really would like to maintain basic auctex visibility while
editing. would it be very difficult to define, say, '.pltx' which is like latex
mode, but knows about these changes?  the most important would be
to the change of comment character and recognize that $ sign is now
ordinary.

I looked at the manual, but unfortunately these kind of deeper changes
were not described.  I also could not figure out how I could change
this---whether in my user file or whether it needs source changes (and
if so where).

I also have a comment regarding the mechanism to add functions.
Why not allow the user to define a specific macro, say:
   \newcommand{\setauctexnumberofparameters}[2]{}
and auctex knows that when it sees this function:
   \setauctexnumberofparameters{\weirdfunction}{4}
that this is intended to signal to auctex?  ok, I know this can be done by
defining elisp after '%' comments in latex itself, too, but then one is in
a more complex world again which most latex users do not know.

regards,

/iaw





reply via email to

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