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 have a table of formulas, some have a description next to them, I want the equations to appear left flush and the text between parentheses right flush. I was writing it in the following way.

\documentclass[letterpaper,10 pt,twocolumn,fleqn]{article}
\setlength{\columnsep}{2.5cm}
\usepackage[inner=2.5cm,outer=2.5cm,bottom=2.5cm,top=2.5cm,landscape]{geometry}
\usepackage{nopageno,array,graphicx,amsbsy,amsfonts} 
\usepackage{amsmath} 
\begin{document}       
\[{\bf P} = \int_{t_i}^{t_f}{\bf F}\,dt = \Delta{\bf p}\mbox{\hspace{7mm} (Impulse) }\]
\[\frac{dA}{dt} = \frac{l}{2\mu}=cte \mbox{\hspace{7mm} (Kepler's Second Law) }\]
\end{document}

but the alignment is different for each equation.

share|improve this question
1  
Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem. –  Jubobs Sep 2 '13 at 18:45
    
You need to include your preamble. As it stands, your code does not produce flush left equations. I need to know how you are doing this in order to work out what the problem with \tag* is. –  Ian Thompson Sep 2 '13 at 19:04

4 Answers 4

up vote 2 down vote accepted

You can use \tag* from the amsmath package.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\mathbf{P} = \int_{t_i}^{t_f}\mathbf{F}\,dt = \Delta \mathbf{p}\tag*{(Impulse) }
\]
\[
\frac{dA}{dt} = \frac{l}{2\mu}=cte \tag*{(Kepler's Second Law) }
\]
\end{document}

Note that \mathbf is preferable to \bf; see this question for more details.

share|improve this answer
    
I tried this way but now the equations are not left flush. –  Monica G Sep 2 '13 at 18:51
1  
@MonicaG --- you didn't say anything about flush left equations! Perhaps you could edit your question to explain exactly what you want. –  Ian Thompson Sep 2 '13 at 18:53
    
The complete document is \documentclass[letterpaper,10 pt,two column,fleqn]{article} \setlength{\columnsep}{2.5cm} \usepackage[inner=2.5cm,outer=2.5cm,bottom=2.5cm,top=2.5cm,landscape]{geometry} \usepackage{nopageno,array,graphicx,amsbsy,amsfonts} \usepackage{amsmath} \begin{document} [\frac{dA}{dt} = \frac{l}{2\mu}=cte \tag*{(Kepler's Second Law)}] .... \end{document} Now it display the equations left flush and tags right flush. –  Monica G Sep 2 '13 at 19:30

Here's another approach, currently set up to use the full \textwidth.

\documentclass{article}
\newcommand\lreqn[2]{\noindent\makebox[\textwidth]{$\displaystyle#1$\hfill(#2)}\vspace{2ex}}
\begin{document}
\lreqn{\textbf{P} = \int_{t_i}^{t_f}\textbf{F}\,dt = \Delta\textbf{p}}{Impulse}
\lreqn{\frac{dA}{dt} = \frac{l}{2\mu}=cte }{Kepler's Second Law}

This is the paragraph that follow the list
\end{document}

enter image description here

share|improve this answer
    
@Mico I copied/pasted from the OP. But you are right, I will fix. –  Steven B. Segletes Sep 2 '13 at 19:55

You could put it in a tabular environment

\documentclass{article}
\usepackage{array}
\def\extrarowheight{1.5em}
\let\ds\displaystyle
\begin{document}
\begin{tabular}{lr}
\( \textbf{P} = \ds\int_{t_i}^{t_f}\textbf{F}\,dt = \Delta\textbf{p}\) & (Impulse) \\
\( \ds\frac{dA}{dt} = \ds\frac{l}{2\mu}=cte \) & (Kepler's Second Law) \\
\end{tabular}
\end{document}

enter image description here

share|improve this answer

You can use the align environment.

Here is an example.

Edit: I have compiled this into a minimal working example, as per request. This will compile using XeLaTeX. I compiled this on a Mac running the latest MacTex distribution, but I think this should compile on most systems with XeLaTeX.

Edit^2: A bunch of includes are redundant, for instance, the enumerate include. I have copied the preamble from LaTeX-it.


\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{mathspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont{Helvetica}
\setmathsfont(Digits,Latin,Greek){Helvetica}
\usepackage[margin=2in]{geometry}
\usepackage{enumerate}

\begin{document}
\begin{align}
\mathbf{P} = \int_{t_i}^{t_f}\mathbf{F}\,dt = \Delta \mathbf{p}\tag*{(Impulse) }
\end{align}

\end{document}

The align environment also gives you more fine grained control over the display of equations.

sample equation using align

share|improve this answer

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.