LaTeX forum ⇒ GeneralHow to align the math formula to left

LaTeX specific issues not fitting into one of the other forums of this category.
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

How to align the math formula to left

Postby akira32 » Mon Jun 23, 2008 11:42 pm

How to align the math formula to left?
I want to let and Ttotal and Teach tile has the same x-coordinate.

There are my code about two math formula as below:

  1. \subsection{Cost Time}
  2.  
  3. The comparison of cost time of QVSM and Smart Shadow Maps Refinement is show in (Figure \ref{fig:7-costime}). If the red region is the effective shadow region and do not need split into 2x2 subtiles further.
  4.  
  5. QVSM:\\
  6.  
  7. $T_{total} = T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile}$\\
  8. $T_{each tile} = T_{sm} + T_{SRT}$\\
Attachments
alignment.jpg
Alignment Problem
alignment.jpg (26.53 KiB) Viewed 75601 times

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7801
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Tue Jun 24, 2008 12:15 am

Hi,

you could use amsmath and align, if you want to align to the relation symbol:
  1. QVSM:
  2. \begin{align*}
  3. T_{total} &= T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile }\\
  4. T_{each tile} &= T_{sm} + T_{SRT}
  5. \end{align*}

If you want it left aligned instead, tell us.

Stefan
Site admin

Link:
BBcode:
HTML:
Hide post links
Show post links

akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Postby akira32 » Tue Jun 24, 2008 1:06 am

Thank you,Stefan_K.
I want to align the formulas to left.

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Stefan Kottwitz
Site Admin
Posts: 7801
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Tue Jun 24, 2008 1:44 am

Like this?

  1. \usepackage[fleqn]{amsmath}
  2. ...
  3. QVSM:
  4. \begin{equation*}
  5. T_{total} = T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile }
  6. \end{equation*}
  7. \begin{equation*}
  8. T_{each tile} = T_{sm} + T_{SRT}
  9. \end{equation*}

Stefan
Site admin

Link:
BBcode:
HTML:
Hide post links
Show post links

akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Postby akira32 » Tue Jun 24, 2008 4:56 am

This is my preamble about the packages.
  1. \documentclass[12pt]{report}
  2. \usepackage{thesis}
  3. \usepackage{amsmath,amssymb}
  4. \usepackage{float,multicol,epsfig}
  5.  
  6. \usepackage[fleqn]{amsmath} % <====


When I add the last line, it appears an error message:
  1. ! LaTeX Error: Option clash for package amsmath.
  2. See the LaTeX manual or LaTeX Companion for explanation.
  3. Type H <return> for immediate help.

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Tue Jun 24, 2008 9:31 am

You are loading the amsmath package twice. Once with and once without the fleqn option.


Best regards
Thorsten¹
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

Link:
BBcode:
HTML:
Hide post links
Show post links

gatoatigrado
Posts: 6
Joined: Mon Dec 01, 2008 10:40 pm

Postby gatoatigrado » Sun Feb 14, 2010 1:08 pm

I have an align* that's behaving very badly -- there's a huge space after the second ampersand -- any help would be much appreciated.

  1. \begin{align*}
  2. \frac{\partial L}{\partial w(\hat c, \hat f)}(X, w) &= \sum_{c, x \in X}
  3. \frac{\partial}{\partial w(\hat c, \hat f)} &\left(
  4. \sum_{f \in \mathcal{F}} w(c, f) x(f) - \log \left( \sum_{c'} e^{\textstyle \sum_f w(c', f) x(f)} \right) \right)
  5. \end{align*}


This is what it renders like (using fullpage[cm])
2010-02-14_0.png
render error
2010-02-14_0.png (14.29 KiB) Viewed 68812 times

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Sun Feb 14, 2010 1:11 pm

Just delete the second ampersand. It's useless in this case.


Best regards
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

Link:
BBcode:
HTML:
Hide post links
Show post links

cohena100
Posts: 1
Joined: Fri Nov 11, 2011 11:59 am
Location: Israel

Postby cohena100 » Fri Nov 11, 2011 1:36 pm

By using flalign and one & at the start of the line and another & at its end.
  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \begin{document}
  4. \section*{}
  5. Some text.
  6. \begin{flalign*}
  7. &T_{total} = T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile}&\\
  8. &T_{each tile} = T_{sm} + T_{SRT}&
  9. \end{flalign*}
  10. Some other text.
  11. \end{document}

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests