# Putting a citation in equation array

I want to cite a reference to where I got an equation from in the middle of bunch of equations that I have inside an align*. Here is the code I've tried:

\begin{align*}  q(x_1,&\dots x_n) \\
&\Downarrow \\
\Delta q&=\sqrt{\sideset{}{_i}\sum_1^n\bigg(\frac{\partial q}{\partial x_i}\bigg)^2(\Delta
x_i)^2.}\\
\begin{flushright}\cite{Cowell:2012}\end{flushright}\\
\text{Giving}, \\
\Delta(T^2) &=  \sqrt{\bigg(\frac{\partial T^2}{\partial T}\bigg)^2(\Delta T)^2}\\
\end{align*}


If I remove the \begin{flushright} line it works so it's just when I try to add the citation in it wont work. If this makes sense I'd really appreciated help. I'm kinda new to this, this is the first proper thing I've written using LaTeX so I'm not really sure of what I'm doing yet, so if you spot anything else I'm doing wrong any help is appreciated.

-

## migrated from stackoverflow.comDec 7 '12 at 2:39

This question came from our site for professional and enthusiast programmers.

Your example does not compile. Do you have an example of what you want to achieve? –  azetina Dec 7 '12 at 2:53

Your example is not clear as it is and the example above does not compile. Is the following what you want to achieve? You can try to use the \intertext{} command and the \begin{flushright}<content>\end{flushright} environment to align the citation to the right. I cannot get the align environment from your example.

\documentclass[letterpaper]{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
q(x_1,&\dots x_n)&\\
&\Downarrow \\
\Delta q &=\sqrt{\sideset{}{_i}\sum_1^n\bigg(\frac{\partial q}{\partial x_i}\bigg)^2(\Delta
x_i)^2.}
\intertext{%
\begin{flushright}
\cite{Cowell:2012}
\end{flushright}
}
\intertext{Giving}
\Delta(T^2) &=  \sqrt{\bigg(\frac{\partial T^2}{\partial T}\bigg)^2(\Delta T)^2}
\end{align*}
\end{document}
`

-
Yeah, thanks. That is exactly what I wanted thanks a lot –  bigbadpiano Dec 7 '12 at 14:24
@bigbadpiano Please accept my answer by clicking on the check mark. You are welcome. –  azetina Dec 7 '12 at 14:28