I would like to code in latex, please guide me
I tried this code, $$\left(\begin{array}{c} q^2, q^8 \ q^3, q^{7} ; q^{10} \end{array}\right)_{\infty}$$ but I want the base q^{10} to be in the middle not in the second row
I would like to code in latex, please guide me
I tried this code, $$\left(\begin{array}{c} q^2, q^8 \ q^3, q^{7} ; q^{10} \end{array}\right)_{\infty}$$ but I want the base q^{10} to be in the middle not in the second row
Here's a solution that nests a matrix environment inside a pmatrix environment. (The code for both environments is provided by the amsmath package.) The expression on the left contains "raw" code, without spacing tweaks. The expression on the right applies some spacing-related fine-tuning adjustments.
\documentclass{article}
\usepackage{amsmath} % for 'matrix' and 'pmatrix' environments
\begin{document}
\[
\begin{pmatrix}
\begin{matrix}
q^2,q^8 \\ q^3,q^7
\end{matrix}
; q^{10}
\end{pmatrix}_{\infty}
\qquad
\begin{pmatrix}
\begin{matrix}
q^2,q^8 \\ q^3,q^7
\end{matrix}
\,; q^{10}\!
\end{pmatrix}_{\!\infty}
\]
\end{document}
A modification of https://tex.stackexchange.com/a/125531/4427
\documentclass{article}
\usepackage{amsmath}
\newmuskip\pFqmuskip
\NewDocumentCommand{\qseriesinner}{mmmmm}{%
\begingroup % only local assignments
\pFqmuskip=#5mu\relax
\mathchardef\normalcomma=\mathcode, % make the comma math active \mathcode,=\string"8000
% and define it to be \pFqcomma
\begingroup\lccode\~=,
\lowercase{\endgroup\let~}\pFqcomma
% typeset the formula
{\left(\genfrac..{0pt}{}{#1}{#2};#3\right)\IfValueT{#4}{{!#4}}}%
\endgroup
}
\NewDocumentCommand{\pFq}{mmmmme{}O{8}}{%
{}{\kern-\scriptspace#1}F{#2\kern-\scriptspace}
\qseriesinner{#3}{#4}{#5}{#6}{#7}
}
\NewDocumentCommand{\qseries}{mmme{_}O{8}}{%
\qseriesinner{#1}{#2}{#3}{#4}{#5}%
}
\newcommand{\pFqcomma}{{\normalcomma}\mskip\pFqmuskip}
\begin{document}
[
\qseries{q^2,q^8}{q^3,q^7}{q^{10}}{\infty}
\qquad
\qseries{q^2,q^8}{q^3,q^7}{q^{10}}{\infty}[3]
]
[
\pFq{3}{2}{a,b,c}{d,e}{z}_{\infty}
\qquad
\pFq{3}{2}{a,b,c}{d,e}{z}[4]
\qquad
\textstyle\pFq{3}{2}{a,b,c}{d,e}{z}
]
\end{document}
The arguments should be self-explaining: the trailing optional argument sets the space after commas.
Horizontal centering is achieved via \multicolumn{2}{c}, while vertical centering is obtained via \raisebox{.5\normalbaselineskip}
Solution is base on: Combining rows and columns in array by Werner
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$
\left(\begin{array}{cccc}
q^2 & q^8 & & \\
q^3 & q^7 & \multicolumn{2}{c}{\smash{\raisebox{.5\normalbaselineskip}{$q^{10}$}}}
\end{array}\right)_\infty
$$
\end{document}