Using LaTeX to Render Hypergeometric Function Notation in Math Mode

math-mode

I decided to look if the solution Caramdir gave in this question would work as well for my attempts to use a new notation for hypergeometric functions. However, trying

{}_3 F_2\left(\begin{matrix}a& &b& &c\\&d& &e&\end{matrix}\middle;z\right)

resulted in the arguments before the semicolon being too widely spaced. I could of course just give up on the "staggered array notation" and align by columns what can be aligned by columns, or just use a two row, one column matrix and then use commas as delimiters, but I kind of like to see how to do a staggered array in LaTeX, and reserve matrix for the case of the number of parameters in both rows being equal.

So, how does one do a tighter looking (but still nicely spaced) staggered array?

Best Answer

\setlength\arraycolsep{1pt}
{}_3 F_2\left(\begin{matrix}a& &b& &c\\&d&
&e&\end{matrix};z\right)

That tightens up the spacing quite a bit. I made a hypergeometric macro previously, but it doesn't support the ;z, unfortunately.

\newcommand*\pFq[2]{{}_{#1}F_{#2}\genfrac[]{0pt}{}}

Then you use \pFq{3}{2}{a,b,c}{d,e}. (Or replace the commas with any other sort of spacing you want.) I was fairly happy with that.

Edit: Actually, how about something like this?

\newcommand*\pFqskip{8mu}
\catcode`,\active
\newcommand*\pFq{\begingroup
        \catcode`\,\active
        \def ,{\mskip\pFqskip\relax}%
        \dopFq
}
\catcode`\,12
\def\dopFq#1#2#3#4#5{%
        {}_{#1}F_{#2}\biggl[\genfrac..{0pt}{}{#3}{#4};#5\biggr]%
        \endgroup
}

Change \pFqskip to whatever spacing you want between the elements. You use it like

\pFq{3}{2}{a,b,c}{d,e}{z}
Related Question