Math & Science ⇒ Equation mode
Equation mode
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
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
- 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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Equation mode
Instead of \[ ... \] you may also use $$ ... $$ (EDIT: but, as noted by Stefan and localghost, it's better to avoid their use).
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Equation mode
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
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- 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
- 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 $$ ... $$
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10