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.
\documentclass[fleqn,12pt,a4paper]{article}
\usepackage{amstext, amsmath}

\begin{document}
\[
  \alpha \xrightarrow[\stackrel{Alpha}{\shortstack[c]{\text{is Reactant}\\ \text{converting  to}}}]
                     {\stackrel{Beta}{\shortstack[c]{\text{is a product }\\ \text{of reaction}}}}
  \beta
\]
\end{document}

I have no clue why the first line in \stackrel is showing in scriptsize. How to get all the three lines to same fontsizes? I am doing this to get three lines over the arrow. Is there a different and easy way to produce 3 lines over and below the arrow?

alt text Thanks for your help.

share|improve this question
    
Great, thanks for your help, I used text so that later I can use this with unicode fonts as well. –  Aku Jan 11 '11 at 15:59
add comment

2 Answers

up vote 2 down vote accepted

There's no need to use \stackrel; you can just put 3 lines into your \shortstack. Moreover, you don't need the c option in \shortstack as this is the default, and you don't need the \text command. So this works:

\documentclass[fleqn,12pt,a4paper]{article}
\usepackage{amstext, amsmath}

\begin{document}
\[
  \alpha \xrightarrow[\shortstack{Alpha\\ is Reactant\\ converting  to}]
                     {\shortstack{Beta\\ is a product\\ of reaction}}
  \beta
\]
\end{document}

However, I don't know how you want your "Alpha" and "Beta" formatted. In my solution, they just appear as normal text.

share|improve this answer
add comment

that is the default behaviour of \stackrel. use a tabular instead, if you have more than two lines.

\documentclass[fleqn,12pt,a4paper]{article}
\usepackage{amstext, amsmath}

\begin{document}
\[
  \alpha \xrightarrow[\tabular{c}Alpha\\is Reactant\\ converting  to\endtabular]
                     {\tabular{c}Beta\\is a product\\ of reaction\endtabular}
  \beta
\]
\end{document}
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.