Math & ScienceHow do I left align all my equations?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
caelestis
Posts: 2
Joined: Wed Nov 25, 2009 7:59 am

How do I left align all my equations?

Post by caelestis »

I have a few physics equations that I want to just start out at the left in math display mode but I can't figure out how. I also would like to know how to have multiple equations, do I have to use \[ \] for each one of the equations? Here is the code:

Code: Select all

\begin{gather*}
\textbf{Impulse }I = F\Delta t = \int_{t_1}^{t_2} F dt = m\Delta v = \Delta p\\
\textbf{moment of inertia } I=\int r^2 dm = \int (x^2+y^2) dm = \sum_i {r_i}^2 m_i\\
\end{gather*}
As you can see, I tried to make it left aligned, but it still has a lot of space on the left. When I produce a pdf, I also get a page number on the bottom which I do not like.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

How do I left align all my equations?

Post by localghost »

Obviously you are using amsmath. So, read its manual and use its environments.

Code: Select all

\begin{align*}
  \textbf{Impulse } I &= F\,\Delta t = \int_{t_1}^{t_2} F\,dt = m\,\Delta v = \Delta p \\
  \textbf{moment of inertia } I &= \int r^2\,dm = \int (x^2+y^2)\,dm = \sum_i {r_i}^2 m_i \\
\end{align*}
For general alignment of equations to the left use the fleqn option for the document class. If necessary, set the length \mathindent to zero.


Best regards and welcome to the board
Thorsten¹
caelestis
Posts: 2
Joined: Wed Nov 25, 2009 7:59 am

How do I left align all my equations?

Post by caelestis »

Yes, but fleqn doesn't work, it just has all the things align to the right.

Code: Select all

\documentclass[fleqn]{amsart}
\usepackage[lmargin=1cm, rmargin=1cm, tmargin=1cm, bmargin=1cm]{geometry}
\title{Equations}
\setlength{\mathindent}{0pt}
\begin{document}
\begin{align*}
v_f=v_0+at\\
\Delta x= v_0 t+\frac{1}{2}at^2\\
{v_f}^2={v_0}^2+2a\Delta x\\
x_{cm}=\frac{\sum_{i} x_i m_i}{M} = \int x dm \\
\tau = rF\sin\phi\\
\textbf{Drag} = \frac{1}{4} Av^2\\
KE=\frac{1}{2} mv^2\\
PE=mgy\\
{PE}_s = \frac{1}{2}kx^2\\
F_s=-kx\\
W=F_{||}d=Fd\cos \theta = \int F dx\\
\textbf{Impulse }I = F\Delta t = \int_{t_1}^{t_2} F dt = m\Delta v = \Delta p\\
\textbf{moment of inertia } I=\int r^2 dm = \int (x^2+y^2) dm = \sum_i {r_i}^2 m_i\\
\omega =\frac{\Delta \theta}{\Delta t}=\frac{d\theta}{dt}\\
v_t=\omega r\\
a_t=\alpha r\\
a_r=\frac{v^2}{r}\\
\mbox{Range}=\frac{{v_0}^2}{g}\sin 2\theta\\
F_G = G \frac{m_1 m_2}{r^2}\mbox{, } G=6.67\times 10^{-11} N\cdot m^2/{kg}^2
\end{align*}
\end{document}
See attatched .ps for the output, I do not understand.
Attachments
math.ps
(170.26 KiB) Downloaded 445 times
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How do I left align all my equations?

Post by gmedina »

Hi,

since you don't need any special alignment for your equations, you can use a gather environment:

Code: Select all

\documentclass[fleqn]{amsart}
\usepackage[lmargin=1cm, rmargin=1cm, tmargin=1cm, bmargin=1cm]{geometry}
\title{Equations}

\setlength{\mathindent}{0pt}

\begin{document}

\begin{gather*}
  v_f=v_0+at\\
  \Delta x= v_0 t+\frac{1}{2}at^2\\
  {v_f}^2={v_0}^2+2a\Delta x\\
  x_{cm}=\frac{\sum_{i} x_i m_i}{M} = \int x dm \\ 
  \tau = rF\sin\phi\\
  \text{\bfseries Drag} = \frac{1}{4} Av^2\\
  KE=\frac{1}{2} mv^2\\
  PE=mgy\\
  {PE}_s = \frac{1}{2}kx^2\\
  F_s=-kx\\
  W=F_{||}d=Fd\cos \theta = \int F dx\\
  \text{\bfseries Impulse }I = F\Delta t = \int_{t_1}^{t_2} F dt = m\Delta v = \Delta p\\
  \text{\bfseries Moment of inertia } I=\int r^2 dm = \int (x^2+y^2) dm = \sum_i {r_i}^2
    m_i\\
  \omega =\frac{\Delta \theta}{\Delta t}=\frac{d\theta}{dt}\\
  v_t=\omega r\\
  a_t=\alpha r\\
  a_r=\frac{v^2}{r}\\
  \mbox{Range}=\frac{{v_0}^2}{g}\sin 2\theta\\
  F_G = G \frac{m_1 m_2}{r^2}\mbox{, } G=6.67\times 10^{-11} N\cdot m^2/{kg}^2
\end{gather*}

\end{document}
I strongly suggest you (as localghost did) to read some basic documentation on typesetting mathematical expresions.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply