Math & ScienceFlush-right Math Equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Flush-right Math Equation

Post by ghostanime2001 »

How do you flush right a math equation?
Last edited by ghostanime2001 on Thu Jun 23, 2011 2:40 am, edited 1 time in total.

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Flush-right Math Equation

Post by Stefan Kottwitz »

You could use a flalign environment, described in the amsmath documentation. Use it like align, begin a line with two ampersand symbols &.

Stefan
LaTeX.org admin
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Flush-right Math Equation

Post by ghostanime2001 »

What do you mean by ...
Use it like align, begin a line with two ampersand symbols &.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Flush-right Math Equation

Post by Stefan Kottwitz »

ghostanime2001 wrote:What do you mean by ...
Use it like align, begin a line with two ampersand symbols &.
Use it like align: it has the same syntax like the align environment.

begin a line with two ampersand symbols &&: such a line line in the flalign environment can look like

Code: Select all

&& x+y=z \\
Stefan
LaTeX.org admin
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Flush-right Math Equation

Post by ghostanime2001 »

isn't there an alternate environment?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Flush-right Math Equation

Post by Stefan Kottwitz »

Why do you want another environment? Did you try flalign? What's the reason not to use it here?

Stefan
LaTeX.org admin
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Flush-right Math Equation

Post by ghostanime2001 »

It's not aligning with the diagram rather but the minipage width. Also the big equation at the bottom that starts with F_{ext} gets pushed down too much I want this page having one minipage (or something else) consisting of the first diagram to the left..m1...m2..Fext and the big Fext equation at the bottom to be one big minipage and the second minipage consisting of the second diagram and T=m2a and the lower 3 lines of equations to be aligned to the right margin of the second diagram NOT the minipage that I've created.

here is the code I'm using:

Code: Select all

\documentclass[fleqn]{article}
\usepackage{fullpage}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{xfrac}
\usepackage[makeroom]{cancel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\pagestyle{empty}
\sisetup{%
  output-decimal-marker={.},
  load-configurations=abbreviations,
  group-separator={,},
  per-mode=fraction,
  fraction-function=\sfrac}
\usepackage{fix-cm}
\setlength{\mathindent}{0pt}
\begin{document}
\begin{enumerate}
\item
\raisebox{1.85ex}{\parbox[t]{2in}{\null\includegraphics[width=\linewidth]{Diagram9}}}
\begin{minipage}[t]{3in}
$\begin{aligned}[t]
m_{1}&=\text{0.52 kg} \\
m_{2}&=\text{2.14 kg} \\
F_{ext}&=\text{9.26 N}
\end{aligned}$
\begin{align*}
F_{ext}-T-m_{1}g\cos\theta=m_{1}a
\end{align*}
\raisebox{1.85ex}{\parbox[t]{1.3in}{\null\includegraphics[width=\linewidth]{Diagram10}}}
$\begin{aligned}[t]
T&=m_{2}a
\end{aligned}$
\begin{align*}
T&=m_{2}a \\
T&=(2.14)(2.46) \\
T&=\text{5.28 N} 
\end{align*}
\end{minipage}
\begin{align*}
F_{ext}-m_{2}a-m_{1}g\cos\theta&=m_{1}a \\
F_{ext}-m_{1}g\cos\theta&=m_{1}a+m_{2}a \\
F_{ext}-m_{1}g\cos\theta&=a(m_{1}+m_{2}) \\
\dfrac{F_{ext}-m_{1}g\cos\theta}{m_{1}+m_{2}}&=a \\
\dfrac{9.26-(0.52)(9.8)\cos\SI{58}{\degree}}{0.52+2.14}&=a \\
\text{2.46 m/s}^{2}&=a
\end{align*}
\end{enumerate}
\end{document}
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Flush-right Math Equation

Post by ghostanime2001 »

...........Anyone?
Post Reply