Document Classes ⇒ Redefining \[ to \begin{align*}
Redefining \[ to \begin{align*}
This may not be proper style, but I would find it very convenient to
\renewcommand{\[}{\begin{align*}}
\renewcommand{\]}{\end{align*}}
While this works,
\[5\]
produces the error "Paragraph ended before \align* was complete".
Does anyone have any ideas for making this work? I'm using MiKTeX and TeXnicCenter.
Thanks in advance,
-Anton
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
Redefining \[ to \begin{align*}
welcome to the board!
This approach should work:
Code: Select all
\def\[#1\]{\begin{align*}#1\end{align*}}Re: Redefining \[ to \begin{align*}
-Anton
Redefining \[ to \begin{align*}
Not, of course, even, IMHO, bad style, since you are changing completely the function of one basic LaTeX environment. I figure out that you pretend to always use your new \[...\] environment both for single and for multiline formulas. In such a case, please note that, for single formulas, the align* environment (implicitly used) is not equivalent to the default \[...\]. I conjecture that you will get many formulas with bad vertical space around, if not any other problems.alukyane wrote: This may not be proper style,...
Redefining \[ to \begin{align*}
On the other hand, the previous solution gave me an idea:
Code: Select all
\def\bal#1\eal{\begin{align*}#1\end{align*}}\bal \eal instead of \begin{align} \end{align}.