# [TxMt] Latex Bundle grammar

Alain Matthes alain.matthes at mac.com
Wed Sep 12 05:20:21 UTC 2007

Le 12 sept. 07 à 01:11, Charilaos Skiadas a écrit :
>
>
> Well, I have that, does it offer an exhaustive list of all the
> commands in the package, and their syntax? Where would I look?
>
> The other question also is, what would you want the grammar to do,
> more than what happens now? In your example below, the functions
> are matched and colored (albeit they all get the same color). What
> else would you like to see?

In a first time, we can forget the packages like pstricks and pgf.
The problem actually is all the functions have the same colour.

But newcommand is pure latex,
\define at cmdkey \define at boolkey \presetkeys     \setkey are macros
xkeyval package only for packages authors

\edef \def are "pur" tex macros

\draw[shift ={(#2)},\cmdTKZ at Compass@style,
\cmdTKZ at Compass@color,line width  = \cmdTKZ at Compass@lw]%
(\tkz at GammaD-\cmdTKZ at Compass@delta:\tkztempLen pt)%
arc (\tkz at GammaD-\cmdTKZ at Compass@delta:%
\tkztempLen pt);

This a real pgf macro with the syntax :
\draw[  ] (..) ( : ) arc (  :  :  ); it's not obvious to match but I
have 3000 lines like this
Perhaps on CTAN in the next days.

For me , the need in a fist time it's to work on the keywords for tex
and latex like
\ifthenelse{}{} or \whiledo{} \def \edef

The syntax is \def\namemacro{} or  \edef\namemacro{} with latex it's
different
\newcommand{}{}

todo : latex first and after perhaps tex and latex for package authors

>>> at's it. I'm not even sure we need a different rule for each
>>> package really in most cases.
>>
>> Yes you are right but only two packages are very long (pstricks,
>> pgf/tikz) with a syntax very different and sometimes complicated.
>
> Perhaps we could have those two as separate grammars, and include
> them via the include mechanism.
>
>> look at this code of my next package and look at it with the actual
>>  syntax. It's not very fine...
>>
> ouch!
>
> In any case, I really think we need a dedicated grammar for package
> files, that would include the LaTeX grammar.
>
> At some point I need to sit down and have a look at all this
> wonderful work you've been doing with pgf/tikz.
>
>

:) wait some days to see the result

Regards  Alain