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
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- 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}
.