On 16/01/2017 10:23, Andrew Parsloe wrote:
> I'm not qualified to argue about the use of \mode_if_inner:TF beyond
> saying that it has correctly worked to date.

Any apparent correspondence between inner and outer math and
displaystyle and textstyle is more or less accidental.

Consider

\documentclass{article}

\usepackage{amsmath}

\newcommand\test[1]{%
\relax\ifinner\typeout{#1 inner}\else\typeout{#1 outer}\fi
\sum_0^n
}
\begin{document}

$\test{$}$\test{[} \left(\test{[2}\right)$ \begin{eqnarray} \test{eqnarray} &=&0 \end{eqnarray} \begin{align} \test{align}&=1 \end{align} \end{document} all but the first sum is set in display math mode but all but the second have ifinner true. inner
[ outer
[2 inner
eqnarray inner
align inner
align inner

David

________________________________

The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is:

Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Microsoft Office 365.

________________________________