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 using the following format for all

\begin{math}
newP = p + vt + 0.5a(t square)
\end{math}

How do I

  • from left justified to centrally justified
  • leave one blank line before and after the formula
  • leave a single space between symbols and
  • do this for all formulas at the same time
share|improve this question
1  
math is the 'inline' environment, equivalent to \( ... \) (or $ ... $). You are probably looking for the equation* environment, or the shorter \[ ... \] version. –  Joseph Wright Feb 11 '13 at 8:50
add comment

2 Answers

up vote 5 down vote accepted

A trivial example from which you can learn faster.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
The position of a moving particle along the $x$-axis is given by,
\[
x_t = x_0 + vt + \tfrac{1}{2}at^2
\]
where $x_0$ represents the initial position, \ldots.

The speed can be obtained by derivating the position with respect to $t$ as follows,
\begin{equation}
\frac{\textrm{d}x_t}{\textrm{d}t} = v + at
\end{equation}
\end{document}

Remarks:

  • Use \[...\] or \begin{equation*}...\end{equation*} to display an unnumbered equation.
  • Use \begin{equation}...\end{equation} to display a numbered equation.
  • Use \begin{align*}...\end{align*} or \[\begin{aligned}...\end{aligned}\] to display multiple rows of unnumbered horizontally-aligned equations.
  • Use \begin{align}...\end{align} to display multiple rows of numbered horizontally-aligned equations or \begin{equation}\begin{aligned}...\end{aligned}\end{equation} to display multiple rows of horizontally-aligned equations but only with one equation number.
share|improve this answer
add comment

You need the amsmath package for align*, so make sure you have the line \usepackage{amsmath} in your preamble (before \begin{document}).

\begin{align*}
newP = p + vt + 1/2at^2
\end{align*}
share|improve this answer
6  
Don't use align* for a single line equation; prefer \[...\] (or equation* if amsmath has been loaded). –  egreg Feb 11 '13 at 10:20
add comment

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.