Le 11 sept. 07 à 23:57, Charilaos Skiadas a écrit :
There is a difference between "something being preferable" and "something being invalid". If using TeX macros in LaTeX is *valid*, then our grammar should (try to) support them, regardless of whether it is recommended to do so or not. We are not trying to force users to use good code, we are merely trying to color their code as best as possible. That's why we are including the TeX grammar.
Yes I understand this point of view
The first answer is the syntax, the second, some macros TeX are different with the same name in tex and latex.
For example tex : newcount latex : \newcounter{} tex : newdimen latex \newlength{}
Ok, we need to include it then, it shouldn't be hard to do. Where would I find its documentation?
Latex Companion version II
Just send them as an attached file, any format you choose will be fine, ideally make it clear what package each command is in,
Ok i will make this for the next week
Regarding a different grammar for each package: Most packages will really add a very small number of lines, i.e. they would have a list of commands and that'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.
look at this code of my next package and look at it with the actual syntax. It's not very fine...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \define@cmdkey [TKZ] {Compass} {style}{} \define@cmdkey [TKZ] {Compass} {lw}{} \define@cmdkey [TKZ] {Compass} {color}{} \define@cmdkey [TKZ] {Compass} {delta}{} \define@boolkey[TKZ] {Compass} {clock}[true]{} \presetkeys [TKZ] {Compass} {% style = solid,% lw = .4pt,% color = black,% delta = 10,% clock = false}{}
\newcommand*{\tkzCompass}[1][]{\tkz@Compass[#1]}% \def\tkz@Compass[#1](#2,#3){% \setkeys[TKZ]{Compass}{#1}% \pgfpointdiff{\pgfpointanchor{#2}{center}} {\pgfpointanchor{#3}{center}} \tkz@ax=\pgf@x% \tkz@ay=\pgf@y% \pgfmathveclen{\pgf@x}{\pgf@y} \edef\tkztempLen{\pgfmathresult}% \pgfpointnormalised{\tkz@ax,\tkz@ay} \pgfmathparse{atan(\pgf@y/\pgf@x)} \edef\tkz@GammaD{\pgfmathresult}% \ifTKZ@Compass@clock% \pgfmathparse{\tkz@GammaD+180}\edef\tkz@GammaD{\pgfmathresult} \fi \draw[shift ={(#2)},% \cmdTKZ@Compass@style,% \cmdTKZ@Compass@color,% line width = \cmdTKZ@Compass@lw]% (\tkz@GammaD-\cmdTKZ@Compass@delta:\tkztempLen pt)% arc (\tkz@GammaD-\cmdTKZ@Compass@delta:% \tkz@GammaD+\cmdTKZ@Compass@delta:% \tkztempLen pt); } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Regards Alain