4

How I can change the font size inside the subequations environment? See below:

\begin{equation}
    \textstyle
    \xi_{1} = A + B + C;
\end{equation}

The command \textstyle works fine inside the equation environment, but inside the subequations environment (see below, again) does not works.

\begin{subequations}
    \textstyle
    \begin{eqnarray}
      \xi_{1} = A + B + C \\
      \xi_{2} = E + F + G \\
      \xi_{3} = H + I + J
    \end{eqnarray}
\end{subequations}

I give errors:

"Missing $ inserted.", "Missing \endgroup inserted.", "You can't use \halign in math mode", etc.

If I put \textstyle inside eqnarray it works, but then I need put in all equations.

Please, how I can change the math font size inside the subequations environment?

Peter Grill
  • 223,288

1 Answers1

4

Define an alignts environment that's the same as align, but uses \textstyle throughout.

The problem with long alignments is solved by issuing \allowdisplaybreaks. I tested with 216 equations without any problem. Don't use eqnarray under any circumstances.

\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}

\makeatletter
\let\alignts@preamble\align@preamble
\patchcmd{\alignts@preamble}{\displaystyle}{\textstyle}{}{}
\patchcmd{\alignts@preamble}{\displaystyle}{\textstyle}{}{}

\def\alignts{\let\align@preamble\alignts@preamble\start@align\@ne\st@rredfalse\m@ne}
\let\endalignts\endalign
\makeatother

\allowdisplaybreaks

\begin{document}
\begin{alignts}
\xi_{1} &= \sum_{i=1}^n a_i \\
\xi_{2} &= \int_a^b f(x)\,dx \\
\xi_{3} &= \bigvee_i v_i
\end{alignts}
\end{document}

enter image description here

Embed this in a subequations environment, the result will be the same as subequations only changes the equation counter and has no influence on the typesetting of the equations.

If you insist in using eqnarray, it's just the same:

\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}

\makeatletter
\let\eqnarrayts\eqnarray
\patchcmd{\eqnarrayts}{\displaystyle}{\textstyle}{}{}
\patchcmd{\eqnarrayts}{\displaystyle}{\textstyle}{}{}
\let\endeqnarrayts\endeqnarray
\makeatother

\allowdisplaybreaks

\begin{document}

\begin{eqnarrayts}
\xi_{1} = \sum_{i=1}^n a_i \\
\xi_{2} = \int_a^b f(x)\,dx \\
\xi_{3} = \bigvee_i v_i
\end{eqnarrayts}

\end{document}
egreg
  • 1,121,712
  • Hi @egreg, thanks by your attention. This seems a good approach and it works to more equations as I need. But when I try use it in my big text using memoir class nothing happens. Why?! :( – user901366 Nov 05 '14 at 01:26
  • @user901366 I see no difference if I change article into memoir, so I guess there's more that this. Try making a minimal example and to be more specific about “nothing happens”, but in a new question. – egreg Nov 05 '14 at 10:45
  • Ok, in your MWE works, then is a useful answer, thanks! I will investigate better the problem with memoir. – user901366 Nov 05 '14 at 12:48