GeneralHow to align the math formula to left

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

How to align the math formula to left

Post by akira32 »

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:

Code: Select all

\subsection{Cost Time}

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.

QVSM:\\

$T_{total} = T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile}$\\
$T_{each tile} = T_{sm} + T_{SRT}$\\
Attachments
Alignment Problem
Alignment Problem
alignment.jpg (26.53 KiB) Viewed 85436 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

How to align the math formula to left

Post by Stefan Kottwitz »

Hi,

you could use amsmath and align, if you want to align to the relation symbol:

Code: Select all

QVSM:
\begin{align*}
T_{total} &= T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile }\\
T_{each tile} &= T_{sm} + T_{SRT}
\end{align*}
If you want it left aligned instead, tell us.

Stefan
LaTeX.org admin
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

Re: How to align the math formula to left

Post by akira32 »

Thank you,Stefan_K.
I want to align the formulas to left.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

How to align the math formula to left

Post by Stefan Kottwitz »

Like this?

Code: Select all

\usepackage[fleqn]{amsmath}
...
QVSM:
\begin{equation*}
T_{total} = T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile }
\end{equation*}
\begin{equation*}
T_{each tile} = T_{sm} + T_{SRT}
\end{equation*}
Stefan
LaTeX.org admin
akira32
Posts: 45
Joined: Tue Nov 13, 2007 10:32 am

How to align the math formula to left

Post by akira32 »

This is my preamble about the packages.

Code: Select all

\documentclass[12pt]{report}
\usepackage{thesis}
\usepackage{amsmath,amssymb}
\usepackage{float,multicol,epsfig}

\usepackage[fleqn]{amsmath}  % <====
When I add the last line, it appears an error message:

Code: Select all

! LaTeX Error: Option clash for package amsmath.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to align the math formula to left

Post by localghost »

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


Best regards
Thorsten¹
gatoatigrado
Posts: 6
Joined: Mon Dec 01, 2008 10:40 pm

How to align the math formula to left

Post by gatoatigrado »

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

Code: Select all

\begin{align*}
    \frac{\partial L}{\partial w(\hat c, \hat f)}(X, w) &= \sum_{c, x \in X}
        \frac{\partial}{\partial w(\hat c, \hat f)} &\left(
            \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)
\end{align*}
This is what it renders like (using fullpage[cm])
render error
render error
2010-02-14_0.png (14.29 KiB) Viewed 78647 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: How to align the math formula to left

Post by localghost »

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


Best regards
Thorsten
cohena100
Posts: 1
Joined: Fri Nov 11, 2011 11:59 am

How to align the math formula to left

Post by cohena100 »

By using flalign and one & at the start of the line and another & at its end.

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\section*{}
Some text.
\begin{flalign*}
&T_{total} = T_{eye} + T_{sm} + T_{SRT} + 4 \times T_{each tile}+ 4 \times 4 \times T_{each tile}&\\
&T_{each tile} = T_{sm} + T_{SRT}&
\end{flalign*}
Some other text.
\end{document}
​
Post Reply