4

I use this code to generate subscript indexes for a matrix but stacked thanks to substack:

\documentclass{standalone}
\usepackage[utf8]{inputenc}

\usepackage{amsmath}

\begin{document}

$(v_j^h)_{\substack{1\le h\le p-1\\1\le j\le n}}$


\end{document}

enter image description here

I wonder how could I do a better formatting, what would be the best way. A really better way is trivially to left aligned instead of center the stacked subscripts but I have no idea how to do that. Do you know how to do it, or even better, do you know if there is a better way to represent those kind of subscripts and how to implant it?

7

Do you mean subarray? Note that \substack{...} is defined as \begin{subarray}{c} ... \end{subarray}.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$(v_j^h)_{\begin{subarray}{l} 1\le h\le p-1 \\ 1\le j\le n\end{subarray}}$

\end{document}

enter image description here

4

You could use the starred version of smallmatrix, which comes with mathtools.

\documentclass{standalone}
\usepackage[utf8]{inputenc}

\usepackage{mathtools}

\begin{document}

$(v_j^h)_{\begin{smallmatrix*}[l]1\le h\le p-1\\1\le j\le n\end{smallmatrix*}}$


\end{document}

enter image description here

2

tabstackengine offers additional alignment and size possibilities.

\documentclass{article}
\usepackage{amsmath,tabstackengine}
\TABstackMath
\setstacktabulargap{0pt}
\TABbinary
\begin{document}
$(v_j^h)_{\begin{subarray}{l} 1\le h\le p-1 \\ 1\le j\le n\end{subarray}}$
accepted answer

\TABstackMathstyle{\scriptstyle}
$\setstackgap{L}{7pt}
(v_j^h)_{\tabularLongstack{rcccl}{ 23&\le& h_i&\le& p-1 \\ 1&\le& j&\le& n}}$
TABstack scriptstyle

\TABstackMathstyle{\scriptscriptstyle}
$\setstackgap{L}{6pt}
(v_j^h)_{\tabularLongstack{rcccl}{ 23&\le& h_i&\le& p-1 \\ 1&\le& j&\le& n}}$
TABstack scriptscriptstyle
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.