2

Some time, in my typesetting work, I need to resize some equations like in the example (it's just a for explanation purposes):

\documentclass[11pt]{article}
\pagestyle{empty}

\usepackage{blindtext}

\renewcommand{\baselinestretch}{1.1}

\begin{document}
\flushbottom
\section{Section}
\blindtext\footnote{Equation:
\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}\end{equation}}
\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
\blindtext
{\small\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}}\relax


\end{document}

enter image description here

I'd like to know if there is a solution that:

  1. Does non affect the resized equation's tag like in eq. (3) in the example. I need it in the default size.
  2. Does not affect the footnotes equations tag. (This does not happen in the example but in some solutions I tried.)
  3. Does not affect the baselinestretch of the last paragraph's line before the resized equation (like in the example)
  4. Does prevent a pagebreak in between the resized equation and the corresponding paragraph.
  5. Does work with multiline aligned ambients (align, alignat).

Edit. The solution I generally use is:

\documentclass[11pt]{article}
\pagestyle{empty}

\usepackage{blindtext}

\renewcommand{\baselinestretch}{1.1}

\usepackage{mathtools}
\newtagform{normal}[\normalsize]{\normalsize (}{)}
\newtagform{footnotesize}[\footnotesize]{\footnotesize (}{)}
\usetagform{normal}

\begin{document}
\flushbottom
\section{Section}
\blindtext\footnote{\usetagform{footnotesize}Equation:
\begin{equation}
\frac{2 x_{1} + 2 x_{2} +  2 x_{3} + 2 x_{4} +  2 x_{5} + 2 x_{6} +  2 x_{7} + 2 x_{8} +  2 x_{9} + 2 x_{10} +  2 x_{11} + 2 x_{12} + 2 x_{13} }{z}\end{equation}}
\begin{equation}
\frac{2 x_{1} + 2 x_{2} +  2 x_{3} + 2 x_{4} +  2 x_{5} + 2 x_{6} +  2 x_{7} + 2 x_{8} +  2 x_{9} + 2 x_{10} +  2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
\blindtext
\par\vskip -\baselineskip
{\small\begin{equation}
\frac{2 x_{1} + 2 x_{2} +  2 x_{3} + 2 x_{4} +  2 x_{5} + 2 x_{6} +  2 x_{7} + 2 x_{8} +  2 x_{9} + 2 x_{10} +  2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}}\relax    

\end{document}

enter image description here

But it does not prevent page-break between the equation and the corresponding paragraph. Also I was searching for something simpler and quicker.

Note1. I know that I can reduce the math operators space (e.g. \!+\! in the simpler way) but I really need a generic solution to "resize" the whole content of the math-environment except for the tag.

Note2. Feel free to correct my english and the technical terms if they are wrong or not easy to understand.

  • 2
    Personal comment, unrelated to the issue: Don't put numbered equations in footnotes (IMHO, of course). I see at least two reasons: 1) if an equation is important enough to have a number, it doesn't belong in a footnote, and 2) the consecutive numbering of equations in the text is disrupted. – campa Jul 3 '17 at 12:42
  • If you could change content: \frac{2 (x_1 + x_2 + ... + x_13)}{z} etc. (saves space) or even \frac{2\sum^{13}_{i=1} x_i}{z}. – TeXnician Jul 3 '17 at 12:42
  • 1
    That's why I wrote "IF" and "COULD". – TeXnician Jul 3 '17 at 12:46
  • 1
    Can this question (and answers therein) help? – campa Jul 3 '17 at 13:02
  • 1
    Only a partial solution (hence only a comment): you can hack into amsmath tag-making to force the tag number to be in normal size: \makeatletter \def\maketag@@@#1{\hbox{\m@th\normalfont\normalsize#1}} \makeatother. In this way font size changing command like \small won't effect the equation tag. – campa Jul 3 '17 at 14:05
2

if you're using amsmath, you can redefine \maketag@@@ to keep the "normal" size.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\def\newmaketag{%
  \def\maketag@@@##1{\hbox{\m@th\normalfont\normalsize##1}}%
  }
\makeatother

\begin{document}
Ordinary display:
\begin{equation}
a + b + c = d
\end{equation}

Small numbered display:
\begin{small}
\begin{equation}
a + b + c = d
\end{equation}
\end{small}

\newmaketag
Small numbered display with redefined tag:
\begin{small}
\begin{equation}
a + b + c = d
\end{equation}
\end{small}
\end{document}

output of example code

this will work with any of the amsmath multiline display environments, providing full-size equation numbers on every line.

if the text above the "smallified" display has more than one line, the baselines will be affected; this requires some additional care, but i haven't time to address that right now; i'll try to come back to it.

  • Thank you. I tested your solution and I found that you need to put the "\newmaketag command" inside the \small ambient else the footnotes equations tag will be affect. I would really appreciate if you could provide a fix to the baseline's issue. – Gabriele Nicolardi Jul 4 '17 at 5:23
  • @GabrieleNicolardi -- i do have a workaround for the baselines, but unfortunately the system on which the information resides crashed last friday (four days ago), and it's in the hands of the systems group. what with weekand and holiday, it won't be restored until at least tomorrow, possibly later. (this has shut down a publisher's entire production effort, and goodness knows how much it's costing.) thank you for the warning regarding the tag in the footnote; that hadn't been encountered here. – barbara beeton Jul 4 '17 at 14:10
  • I'm very sorry for the incident. I can wait. Thank you. – Gabriele Nicolardi Jul 4 '17 at 14:34
  • Hi. I hope you system has been restored. If so, could you post your workaround for the baselines? – Gabriele Nicolardi Jul 12 '17 at 14:22
3

The {\small\begin{equation}...} workaround is as wrong as it could be, sorry.

Here are some better solutions:

\documentclass[11pt]{article}
\usepackage{amsmath}% for text, recommended anyway
\usepackage{mathtools}% for \splitdfrac

\pagestyle{empty}
\renewcommand{\baselinestretch}{1.1}
\flushbottom

\begin{document}
\section{Section}
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text.\footnote{Equation:
\begin{equation}
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5}
      + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10}
      + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}}
\begin{equation}
\text{\footnotesize$\displaystyle
  \frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5}
        + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10}
        + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}$%
}
\end{equation}
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
\begin{equation}
\frac{
  \splitdfrac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7}}
             {+ 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13}}
  }{z}
\end{equation}
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
Some dummy text. Some dummy text. Some dummy text. Some dummy text.
\begin{equation}
\begin{split}
  \frac{1}{z}\bigl(
    & 2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7}\\
    & + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13}
  \bigr)
\end{split}
\end{equation}

\end{document}

You might want to do the first as

\begin{equation}
\text{\footnotesize\medmuskip=0mu}$\displaystyle
  \frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5}
        + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10}
        + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}$%
}
\end{equation}

and you'd get

enter image description here

An alternative is using nccmath and

\medmath{\frac{...}{...}}

enter image description here

  • Indeed I was searching for a better solution... but can you please explain me why the \small-solution is wrong? Your solutions are good but, form many reasons, I'm not allowed to use them. – Gabriele Nicolardi Jul 3 '17 at 14:40
2

As typeset er you have very tied hands ... Only two things besides use smaller fonts as you try in your MWE, what you can do, cross my mind: - enclose operators + into curly braces, i.e.: {+} (as exception for this equation) - spill-out equation to outer border

Both cases are shown in MWE below:

\documentclass[11pt]{article}
\usepackage[strict]{changepage}

\usepackage{blindtext}
\renewcommand{\baselinestretch}{1.1}

\begin{document}
\pagestyle{empty}
\flushbottom
\section{Section}
\blindtext\footnote{Equation:
\begin{equation}
\frac{2 x_{1}{+}2 x_{2}{+}2 x_{3}{+}2 x_{4}{+}2 x_{5}{+}2 x_{6}{+}2 x_{7}{+}2 x_{8}{+}2 x_{9}{+}2 x_{10}{+}2 x_{11}{+}2 x_{12}{+}2 x_{13} }{z}
\end{equation}}
    \begin{adjustwidth*}{}{-4em}
\begin{equation}
\frac{2 x_{1}{+}2 x_{2}{+}2 x_{3}{+}2 x_{4}{+}2 x_{5}{+}2 x_{6}{+}2 x_{7}{+}2 x_{8}{+}2 x_{9}{+}2 x_{10}{+}2 x_{11}{+}2 x_{12}{+}2 x_{13} }{z}
\end{equation}
    \end{adjustwidth*}
or with smaller font in equation
   {\small\begin{equation}
\frac{2 x_{1}{+}2 x_{2}{+}2 x_{3}{+}2 x_{4}{+}2 x_{5}{+}2 x_{6}{+}2 x_{7}{+}2 x_{8}{+}2 x_{9}{+}2 x_{10}{+}2 x_{11}{+}2 x_{12}{+}2 x_{13} }{z}
    \end{equation}}
or shortly (as pointed in comments below answer)%
    \footnote{Equation
\begin{equation}\medmuskip=0mu
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
        }:
    \begin{adjustwidth*}{}{-4em}
\begin{equation}\medmuskip=0mu
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
\end{equation}
    \end{adjustwidth*}
or with smaller font in equation
{\small\begin{equation}\medmuskip=0mu
\frac{2 x_{1} + 2 x_{2} + 2 x_{3} + 2 x_{4} + 2 x_{5} + 2 x_{6} + 2 x_{7} + 2 x_{8} + 2 x_{9} + 2 x_{10} + 2 x_{11} + 2 x_{12} + 2 x_{13} }{z}
    \end{equation}}

\end{document}

I can't say, what is more appropriate. Probably you should ask author(s), that (s)he rewrote this equation and shown him result of this test :)

Edit: to MWE is added part which consider @campa comment below. From picture below follows, that results are the same (it had to be ...) but use \muskip make equation writing far more concise :).

enter image description here

  • 1
    I think it would be easier to issue \medmuskip=0mu instead of wrapping every + in braces... Call me lazy ;-) – campa Jul 3 '17 at 13:38
  • 1
    I generally use, in such cases {\thinmuskip=2mu\medmuskip=1mu\thickmuskip=3mu \begin{equation} ... \end{equation}}. But often I deal with equations with not enough math-operators to do this trick. – Gabriele Nicolardi Jul 3 '17 at 13:50
  • I agree with both above comments :) I will consider them when editing my answer. – Zarko Jul 3 '17 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.