Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am running into trouble for nicely centering a group of equations in a Mathematics paper written in LaTeX. Say, I want to get the following group of equations 1) written one below another, 2) in the middle of the page to make things look better, 3) with the equality signs one right below the other. For example , say I want to type x^2 - 4 = 0, ( x+2) ( x-2) = 0, x = 2, -2 satisfying the properties 1),2), 3).

a) What packages, and document class should I use ?

b) I need to define any environment before \begin{document}?

c) What are the exact commands that would do the job nicely ?

d) Should I use $$ or just $ ?

e) Also, for the above, can I nicely insert the implication symbol => ?

I tried \\[...]\\, it didn't work for some reason, also tried to include amsmath as a package, and then tried \\begin{align*}....\\end{align*}, didn't work. Also I think I tried $$...$$ and that centered the equation, but not keeping the equality symbols one right below the other, and also changed the output for the equations to a smaller font compared to the rest of the paper.

What exactly should I use that would do the job nicely ? Thanks a lot in advance !

share|improve this question

1 Answer 1

a) The amsmath package offers you a wide range of environments and commands to typeset equations; read its documentation and also the mathmode document.

b) No.

c) See code below.

d) See, for example, Are \( and \) preferable to $?, Which command should I use for displayed equations?, and Why is \[ ... \] preferable to $$?.

e) Where exactly do you want to insert the symbol?

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
x^2 - 4 &= 0 \\
( x + 2) ( x - 2 ) &= 0 \\
 x &\in \{ 2, -2 \}.
\end{align*}

\end{document}

enter image description here

share|improve this answer
    
Gonzalo, first off, thanks ! One quick question : should I use $ sign in every line before a paragraph ends and begins, or should I just use $ sign in the beginning of the equation, keep inserting \\\ symbols to go to a different paragraphs, and then use $ sign right at then end again ? Thanks again ! –  Mathmath May 15 '12 at 2:04
    
@Mathmath: the $ symbol is reserved and it is used to enter/exit in-line math mode. So you should use $...$ to write in-line (i.e., not displayed) math: for example: a function is even if $f(-x)=f(x)$, for all $x$ (although the proper LaTeX way would be a function is even if \(f(-x)=f(x)\), for all \(x\)). Never use \\ to increase space between paragraphs (See tex.stackexchange.com/q/51722/3954). To end a paragraph, leave a blank line in the code. –  Gonzalo Medina May 15 '12 at 2:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.