0

I am having the exact same problem as describe in this question. Unfortunately, however, the solutions listed there do not seem to work for the multlined environment as well.

A MWE is the following.

\documentclass{article}

\usepackage{mathtools}

\makeatletter                       % This code works as
\newcommand{\AlignFootnote}[1]{%    % a fix for multline
  \ifmeasuring@                     % environments, but
  \else                             % not for multlined
    \iffirstchoice@                 % environments
      \footnote{#1}%
    \fi
  \fi}
\makeatother

\begin{document}
\begin{minipage}{.5\linewidth}
\begin{equation}
\begin{multlined}
x=\AlignFootnote{This is a footnote.}0.
\end{multlined}
\end{equation}
\begin{multline}
x=\AlignFootnote{This is a footnote.}0.
\end{multline}
\end{minipage}
\end{document}

This outputs the following. Output

It seems as if this fix was only made to work for environments coming from amsmath, but not mathtools. Unfortunately, my TeXnichal skills are nowhere near good enough for me to be able to extrapolate this to a solution that also works for mathtools. Perhaps someone else more competent can see how to modify the fix (or just create a new one)?

4
  • The reason is that multlined uses a very different model from the other alignment environments. For instance it also conflicts with substack, so it's not really a surprise it fails with other specific amsmath constructs.
    – egreg
    Nov 7, 2015 at 22:09
  • I think we can solve this by making sure that the multlined measuring is actually setting \measuring@true
    – daleif
    Nov 12, 2015 at 11:10
  • BTW: what is wrong with multiline used inside a minipage
    – daleif
    Nov 12, 2015 at 11:15
  • @daleif -- the peculiar formatting of the multline expression is because multline should never be used with only one line. this wasn't intended, and probably never tested. Mar 6, 2016 at 1:43

1 Answer 1

2

The bad behavior has been fixed in the current version of mathtools (2015/11/12 v1.18).

\documentclass{article}

\usepackage{mathtools}

\makeatletter                       % This code works as
\newcommand{\AlignFootnote}[1]{%    % a fix for multline
  \ifmeasuring@                     % environments, but
  \else                             % not for multlined
    \iffirstchoice@                 % environments
      \footnote{#1}%
    \fi
  \fi}
\makeatother

\begin{document}
\begin{minipage}{.5\linewidth}
\begin{equation}
\begin{multlined}
x=\AlignFootnote{This is a footnote.}0.
\end{multlined}
\end{equation}
\begin{multline}
x=\AlignFootnote{This is a footnote.}0.
\end{multline}
\end{minipage}

\begin{minipage}{.5\linewidth}
\begin{equation}
\begin{multlined}
x=0.
\end{multlined}
\end{equation}
\begin{multline}
x=0.
\end{multline}
\end{minipage}
\end{document}

The second minipage has been added for checking the output without footnotes.

enter image description here

0

You must log in to answer this question.

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