Skip to content

\multline + fleqn result with a \halign wider than \displaysize #2025

@Udi-Fogiel

Description

@Udi-Fogiel

Brief outline of the bug

In the example below one can see that the page box is wider than \textsize=345pt.
In fact it is 370pt and so it is wider by 25pt, so it led me to believe there is an extra \tabskip
to the right. I think what happens is that \tabskip is set by \tabskip \if@fleqn \@mathmargin \else \z@skip \fi, but this skip is only needed on the left side.

A possible solution:

\documentclass[fleqn]{article}

\usepackage{amsmath,showframe,xpatch}
\makeatletter
\xpatchcmd{\multline@}{\crcr}{\if@fleqn\tabskip\z@skip\fi\crcr}{}{}

\begin{document}

\begin{multline}
a+b+c+d+e+f+g+h+i+j+k+\\
l+m+n+o+p+q+r+s+t+w+x+y+z
\end{multline}

\hrule

\end{document}

Minimal example showing the bug

Example by @jbezos

\RequirePackage{latexbug}       % <--should be always the first line (see CONTRIBUTING)!
\documentclass[fleqn]{article}

\usepackage{amsmath}

\begin{document}
\showoutput
\begin{multline}
a+b+c+d+e+f+g+h+i+j+k+\\
l+m+n+o+p+q+r+s+t+w+x+y+z
\end{multline}

\hrule

\end{document}

Log file (required) and possibly PDF file

test.log

test.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions