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 centred equation and I'd like to place a (1) on the same line as the equation, but aligned to the right, so that I can refer back to the equation in future. What I have at the moment is:

\center  $ \begin{pmatrix} e & \frac{f}{2} \\ \frac{f}{5} & g \end{pmatrix} = L^T %
  \begin{pmatrix} a & b \\ c & d \end{pmatrix} L $ \flushright' (1)
share|improve this question
2  
I recommend reading chapter 3 of The Not So Short Introduction to LaTeX. –  Ian Thompson Jan 6 '12 at 17:23
add comment

2 Answers

up vote 3 down vote accepted
\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align} \label{foo}
\begin{pmatrix} e & \frac{f}{2} \\ \frac{f}{5} & g \end{pmatrix} 
  &= L^T   \begin{pmatrix} a & b \\ c & d \end{pmatrix} L 
\end{align}

See Eqn~\ref{foo}
\end{document}
share|improve this answer
    
Why align instead of equation? –  egreg Jan 6 '12 at 21:20
    
why not? and it is not a good idea when you change my code in a way that it did not work! –  Herbert Jan 6 '12 at 21:30
    
align gives different spacing than equation and the latter is surely preferable for single line equations. Of course the & before the = serves no purpose in a single line equation. I believe that simplicity is better. –  egreg Jan 6 '12 at 21:36
    
sure, if I want the spacing of equation then I'd used it ... –  Herbert Jan 6 '12 at 21:39
add comment

What is wrong with

\begin{equation}
\label{eq:1}
\begin{pmatrix} e & \frac{f}{2} 
 \\ 
 \frac{f}{5} & g 
\end{pmatrix} 
= L^T 
\begin{pmatrix} 
 a & b 
\\ 
 c & d 
\end{pmatrix} 
L 
\end{equation}  

then use \eqref{eq:1} (assuming amsmath)

share|improve this answer
add comment

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.