Michel Goossens wrote:
> > I'm so lazy that I hate to type \begin{equation} / \end{equation} to get
> > numbered equations. Instead, I redefine \[ and \]:
>
> > \renewcommand {\[} {\begin{equation}}
> > \renewcommand {\]} {\end{equation}}
> I don't think that redefining such a very basic LaTeX command
> as \[ is a good idea. \BE would certainly be a better choice.
> Remember $$ is nowhere mentioned in the latex book, and although it
> works (e.g., if you want to define locally an unnumbered equation,
> it is not a requisite, meaining that latex3 could veryb well make
> $$ illegal, and then having \[ to mean both a display math expression and
> a numbered quation is perhaps not a good thing
That's not true since you still have the displaymath and equation
environments to make that distinction.
> (in any case redefining
> commands in the Lamport book is not recommended, since other packages
> might rely on the original definition)
You're certainly right that it's not recommended, BUT (the big but):
I have a 101 page thesis report with loads of equations, all marked with
\[
...
\]
and:
1) it works perfectly well in LaTeX,
2) I couldn't be bothered to replace all these commands in all the many
source files.
> > I also redefine \* to the multiplicative dot, and I'm not sure if this
> > doesn't confuse the regexps either:
>
> > \newcommand {\mathornot} [1] {\ifmmode #1 \else $#1$ \fi}
> > \renewcommand {\*} {\mathornot{\cdot}}
>
> Again \* is used deep down in TeX's math typesetting for representing
> a discretionary multiplication sign. Not a good idea to redefine such
> basic commands as \*, \[, \_, \^, \(, \{, \*, \", \>, \, \. or expect
> some wierd things to happen, also in latex2html, which has code for the
> original meaning.
>
> Also, in standard latex what you define as \mathornot exists as
> \ensuremath, so that you could write
> \renewcommand {\*} {\ensuremath{\cdot}}
Thanks for the tip!
> These days there exist good editors to expand user abbreviations
> to whathever string you desire. So, rather to make latex2html ever more
> complex for making it deal with more and more exotic user requirements, a
> stricter adherence to the LaTeX language but using local extensions on the
> level of the editor would be a better investment of everybody's time.
I disagree. A redefinition that works perfectly in LaTeX shouldn't be
considered an "exotic user requirement".
What's more, as far as I can see, all it takes to make it work is to
quote the '[', ']' (--> '\\[', '\\]') in the perl-regexp.
...Diemo