Is there an environment that imitates align but displays textstyle math?

I'm currently typing a mathematical document which counts many sum symbols. I frequently use the align environment to render equations, although the default behaviour of this environment is to render the equations in displaystyle, which in my opinion wastes vertical space. I therefore have added \textstyle at the beginning of each line of math in this environment, but I'm looking for a more convenient solution.

So is there an environment that is similar to align with the exception it displays textstyle math by default ? Thank you.

• My tabstackengine package may help in some cases; however, it does not give each line of the equation stack a separate number. – Steven B. Segletes Oct 22 '15 at 19:15
• @StevenB.Segletes Damn I forgot to mention I never use equation numbering inside math environments. So this package could prove useful, I'll check it out. Thank you ! – oowekyala Oct 22 '15 at 19:23
• Sometimes it suffices to \smash the big sum signs, instead of using \textstyle which also will make fractions and therelike small. (Consider using \dfrac in this case.) – Wauzl Oct 22 '15 at 19:28
• Then here is one of my answers that gives an overview: tex.stackexchange.com/questions/35174/…. – Steven B. Segletes Oct 22 '15 at 19:30

Not sure what the usage for this is, but here's a possible way to go; it is based on the fact that in each cell of align a \displaystyle declaration is issued; of course this has severe limitations, because \dfrac will not work, for example.

\documentclass{article}
\usepackage{amsmath}

\newenvironment{talign}
{\let\displaystyle\textstyle\align}
{\endalign}
\newenvironment{talign*}
{\let\displaystyle\textstyle\csname align*\endcsname}
{\endalign}

\begin{document}

This is a normal \texttt{align} environment
\begin{align}
\log(1+x) &= \sum_{n\ge 1}(-1)^{n+1}\frac{x^n}{n} \\
\arctan x &= \sum_{n\ge 0}(-1)^{n}\frac{x^{2n+1}}{2n+1}
\end{align}
and this is a \texttt{talign} environment
\begin{talign}
\log(1+x) &= \sum_{n\ge 1}(-1)^{n+1}\frac{x^n}{n} \\
\arctan x &= \sum_{n\ge 0}(-1)^{n}\frac{x^{2n+1}}{2n+1}
\end{talign}
followed by an unnumbered one
\begin{talign*}
\log(1+x) &= \sum_{n\ge 1}(-1)^{n+1}\frac{x^n}{n} \\
\arctan x &= \sum_{n\ge 0}(-1)^{n}\frac{x^{2n+1}}{2n+1}
\end{talign*}

\end{document}


If you want to be able to use \displaystyle in the subformulas, then a more complicated approach is needed: the command \displaystyle is locally defined to issue \textstyle and to redefine itself to be the primitive \displaystyle.

\documentclass{article}
\usepackage{amsmath}

\let\texdisplaystyle\displaystyle
\def\displaytotextstyle{\textstyle\let\displaystyle\texdisplaystyle}

\newenvironment{talign}
{\let\displaystyle\displaytotextstyle\align}
{\endalign}
\newenvironment{talign*}
{\let\displaystyle\displaytotextstyle\csname align*\endcsname}
{\endalign}

\begin{document}

This is a normal \texttt{align} environment
\begin{align}
\log(1+x) &= \sum_{n\ge 1}(-1)^{n+1}\frac{x^n}{n} \\
\arctan x &= \sum_{n\ge 0}(-1)^{n}\frac{x^{2n+1}}{2n+1}
\end{align}
and this is a \texttt{talign} environment
\begin{talign}
\log(1+x) &= \sum_{n\ge 1}(-1)^{n+1}\dfrac{x^n}{n} \\
\arctan x &= \sum_{n\ge 0}(-1)^{n}\dfrac{x^{2n+1}}{2n+1}
\end{talign}
followed by an unnumbered one
\begin{talign*}
\log(1+x) &= \sum_{n\ge 1}(-1)^{n+1}\frac{x^n}{n} \\
\arctan x &= \sum_{n\ge 0}(-1)^{n}\frac{x^{2n+1}}{2n+1}
\end{talign*}

\end{document}

• Having textstyle mode math is very relevant for the aligned environment, which outputs inline. – marsupilam Feb 28 '17 at 14:42