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 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.

share|improve this question

migrated from stackoverflow.com Dec 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
add comment

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
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
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.