On Sun, Jul 25, 2004 at 10:31:24PM -0700, Brooks Moses wrote:[things I need to translate from LaTeX to ConTeXt]
> \renewcommand{\vec}[1]{{\boldsymbol{#1}}} > \renewcommand{\hatn}{\hat{\vec{n}}} > \newcommand{\filter}[1]{\overline{#1}}
You can use the tex primitve \def\vec#1{{\boldsymbol{#1}} or the context way \define[1]\vec{{\boldsymbol{#1}}
But afaik there is no checking if a command is already defined?
I started poking through the ConTeXt source to see what I could find, and came across the following in the syst-ext.tex file:
\def\define#1% {\ifx#1\undefined \expandafter\def \else \message{[\noexpand#1is already defined]}% \expandafter\def\expandafter\gobbleddefinition \fi#1}
\def\redefine#1% {\ifx#1\undefined\else \message{[\noexpand#1is redefined]}% \fi \def#1}
This appears to be doing the checks for commands being previously defined or not, as desired. However, I'm completely lost as to how we get from here to the \define[1] syntax. What am I missing?
- Brooks
_______________________________________________ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context