[Tex/LaTex] Putting a citation in equation array

citingequations

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.

Best Answer

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}

enter image description here

Related Question