7

I am trying to typeset the hypergeometric function 2F3 with subscript 2 and 3. Specifically, I want the correct alignment of the pre-subscript 2, like in this example:

\documentclass{article}
\usepackage{mathtools}
\usepackage{tensor}

\begin{document}
  \[
    3{}_2F_3(\cdot)
  \]
  \[
    3\prescript{}{2}{F}_3(\cdot)
  \]
  \[
    3\tensor*[_2]{F}{_3}(\cdot)
  \]
\end{document}

enter image description here

The trick {}_2F_3 gives the correct spacing, but I would like to use a better method.

Using \prescript from mathtools gives the wrong vertical alignment, as already noticed in The \prescript command from the mathtools package gives incorrect alignment

The \tensor and \tensor* commands from tensor should provide the correct alignment. Unfortunately, using them the 2 prescript is slightly moved to the left, too close to the number 3 and too distant from F. Is this a bug?

Is there a better way to typeset 2F3 correctly? Thanks!

1
  • 1
    I'd use {}_2F_3 personally Sep 10, 2018 at 17:48

2 Answers 2

2

No package needed (here I load amsmath because any document with mathematics should).

\documentclass{article}
\usepackage{amsmath}

\newcommand{\hypgeo}[2]{%
  {\vphantom{F}}_{#1}\kern-\scriptspace F_{#2}%
}

\begin{document}

$\hypgeo{2}{3}$

$3\,\hypgeo{2}{3}$

\end{document}

Note the removal of \scriptspace to move the prescript next to the F. A thin space should be inserted between a factor and the hypergeometric function symbol.

This insertion can be made automatic by making the symbol into an operator (and here amsmath has a role):

\documentclass{article}
\usepackage{amsmath}

\newcommand{\hypgeo}[2]{%
  \operatorname{%
    {\vphantom{\mathnormal{F}}}_{#1}%
    \kern-\scriptspace
    \mathnormal{F}_{#2}%
  }%
}

\begin{document}

$\hypgeo{2}{3}$

$3\hypgeo{2}{3}$

\end{document}

enter image description here

0

A better way is to create a command called \hypergeo for typing, well, hypergeometric functions. My solution utilizes the actuarialsymbol package, which was released last year.

For a description of the “alignment of sub/superscripts problem” arose in actuarial notations, please take a look at Page 3 of the actuarialsymbol package documentation. Although this package deals with actuarial notations, but I think it is useful for typing hypergeometric functions as well.

The syntax of \hypergeo is

\hypergeo[<left-subscript>][<left-superscript>]{<right-subscript>}[<right-superscript>]

The <right-subscript> argument is mandatory (can be empty {}) while the other three are optional. If you declare, instead, the following

\DeclareRobustCommand{\hypergeo}{\@actinssc F}

Then a starred version \hypergeo* is created in addition to \hypergeo, in which the F will be automatically replaced by \bar{F}. This may be useful if you want something like {}_2\bar{F}_3.

MWE

\documentclass{article}
%\usepackage{mathtools}
%\usepackage{tensor}
\usepackage{actuarialsymbol}
\newcommand*\hypergeo{}% make sure this has not been defined yet
\makeatletter
\DeclareRobustCommand{\hypergeo}{\@actothersc F}
\makeatother

\begin{document}
  $
    3{}_2F_3(\cdot)
  $\par
%  \[
%    3\prescript{}{2}{F}_3(\cdot)
%  \]
%  \[
%    3\tensor*[_2]{F}{_3}(\cdot)
%  \]
  $
    3\hypergeo[2]{3}(\cdot) \quad 3\hypergeo[2]{3}[(n)](\cdot)
  $
\end{document}

hypergeometric function

In the second formula of the second line, notice how the left-subscript 2 and right-subscript 3 are both lowered when a superscript (n) is present (although I don’t think this is a common notation).

You must log in to answer this question.

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