# Multiline text under/over arrows [duplicate]

I want to write some multi-line text under a long arrow. Normally I use \xrightarrow[text below]{text over}, but if I try to add a \\ in one of them (say, I want "text below" to have two lines), I get a compilation error.

What to do? I'm sure it's solvable.

Thanks, John.

-
Welcome to TeX Stack Exchange! It would be helpful if you provided a full MWE (minimum working example) showing what you're trying to achieve. In the present case, information on the information you're trying to set below the \xrightarrow would be very useful, as would be details on the "compilation error" you report getting. –  Mico Nov 27 '11 at 23:12
Have a look at this post, and the links within. –  cmhughes Nov 27 '11 at 23:13
cmhughes: Thanks! This syntax worked for me: '\xrightarrow[\begin{subarray}{l} a \\ b \end{subarray}]{}' (displaying a above b). Mico: Thanks for the answer and the welcoming! As you can see I got it solved. :-) –  John Nov 27 '11 at 23:31
Sorry, I didn't notice there was a problem - how do I make both line appear in the centre of the line? I have a short and a long line, and they don't align... –  John Nov 27 '11 at 23:36
@John: change l (left) to c (center) in the argument of subarray: \begin{subarray}{c} a \\ b \end{subarray}. –  Gonzalo Medina Nov 27 '11 at 23:41
show 1 more comment