4

I would like to code in latex, please guide me

enter image description here

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

Sangama
  • 43
  • 1
    Welcome to TeX.SE. Please tell us what you've tried so far. And, is it important to employ a Times Roman math font? – Mico Dec 26 '22 at 11:04
  • 2
    Is this in connection with hypergeometric functions? – egreg Dec 26 '22 at 11:07
  • @egreg Yes this related to hypergeometric functions, specially q series with quotient of q products with more than one parameter – Sangama Dec 26 '22 at 13:03
  • @Mico I tried this code, $$\left(\begin{array}{c} q^2, q^8 \ q^3, q^{7} ; q^{10} \end{array}\right)_{\infty}$$ but this is giving me the base q^{10} in the second row. I want it to be in the middle of those two rows as shown in the figure – Sangama Dec 26 '22 at 13:04

3 Answers3

3

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.

enter image description here

\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}
Mico
  • 506,678
3

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.

enter image description here

egreg
  • 1,121,712
1

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}
mala97
  • 312
  • 1
    Does this solution insert commas and semicolons (which are displayed in original query)? – Mico Dec 26 '22 at 15:16