8

I want to write something like

Q_{a\in A,b\in B}

but with $b\in B$ being below $a \in A$. What is the way to do so?

Marion
  • 495

3 Answers3

21

Use \substack:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[ Q_{\substack{a\in A\\b\in B}} \]%

 \end{document} 

enter image description here

Bernard
  • 271,350
5

Use the \genfrac command from the amsmath package.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
Q_{\genfrac{}{}{0pt}{}{a\in A}{b\in B}} 
\end{equation*}
\end{document}

enter image description here

Ian Thompson
  • 43,767
0

Using align enviroment:

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

\begin{document} $Q_{\begin{aligned} \scriptscriptstyle a & \scriptscriptstyle\in A\[-1em] \scriptscriptstyle b & \scriptscriptstyle\in B \end{aligned}}$ \end{document}

enter image description here

Sebastiano
  • 54,118