Math & Science ⇒ Equation mode
Equation mode
Hi,
I often notice that many authors use "\[" and "\]" instead of "\begin{equation}" and "\end{equation}" respectively. Any particular reasons for this?
Also, does anyone know of any potential advantages or disadvantages of the "gather" environment?
Thanks
I often notice that many authors use "\[" and "\]" instead of "\begin{equation}" and "\end{equation}" respectively. Any particular reasons for this?
Also, does anyone know of any potential advantages or disadvantages of the "gather" environment?
Thanks
Last edited by jhapk on Thu Jul 15, 2010 7:25 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Equation mode
Why don't you just test it and compare the results? Or do some basic reading.jhapk wrote:[...] I often notice that many authors use "\[" and "\]" instead of "\begin{equation}" and "\end{equation}" respectively. Any particular reasons for this? [...]
Read the amsmath manual and the »Math mode« document to find out.jhapk wrote:[...] Also, does anyone know of any potential advantages or disadvantages of the "gather" environment? [...]
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Equation mode
Those two aren't interchangeable. \[ ... \] are shortcuts to \begin{displaymath} ... \end{displaymath}, not \begin{equation} ... \end{equation}. The difference: displaymath environment just do as the name says: put a mathematical expression in a separate line, text centered (i.e. display style), while equation do the same with the addition of a sequential equation number.
Instead of \[ ... \] you may also use $$ ... $$ (EDIT: but, as noted by Stefan and localghost, it's better to avoid their use).
Instead of \[ ... \] you may also use $$ ... $$ (EDIT: but, as noted by Stefan and localghost, it's better to avoid their use).
Last edited by meho_r on Thu Jul 15, 2010 8:38 pm, edited 2 times in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Equation mode
Hi,
Perhaps you mean the displaymath environment. Indeed that's nearly the same, latex.ltx defines:
Stefan
The equation environment would be numbered, but formulas written with \[ ... \] won't be numbered. It's not the same.jhapk wrote:I often notice that many authors use "\[" and "\]" instead of "\begin{equation}" and "\end{equation}" respectively. Any particular reasons for this?
Perhaps you mean the displaymath environment. Indeed that's nearly the same, latex.ltx defines:
Code: Select all
\def\displaymath{\[}
\def\enddisplaymath{\]\@ignoretrue}
The gather environment may be used for a group of equations, each one will be centered. It's easier to use gather instead of several consecutive equation environments.jhapk wrote:Also, does anyone know of any potential advantages or disadvantages of the "gather" environment?
Stefan
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Equation mode
I would'nt recommend $$...$$ because inconsistent vertical spacing might occur, further $$ doesn't respect the fleqn class option. Formulas done by $$ would be centered even when fleqn has been set, but \[ .. \] acts accordingly and puts the formulas to the left side.meho_r wrote: Instead of \[ ... \] you may also use $$ ... $$
Stefan
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Equation mode
Very bad idea. See l2tabu.meho_r wrote:[...] Instead of \[ ... \] you may also use $$ ... $$
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10