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

4
  • 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
    Commented Dec 26, 2022 at 11:04
  • 2
    Is this in connection with hypergeometric functions?
    – egreg
    Commented Dec 26, 2022 at 11:07
  • @egreg Yes this related to hypergeometric functions, specially q series with quotient of q products with more than one parameter
    – Sangama
    Commented Dec 26, 2022 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
    Commented Dec 26, 2022 at 13:04

3 Answers 3

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .