4

Code:

\documentclass[border=1mm]{standalone}
\usepackage[alignedleftspaceno]{amsmath}

\begin{document}
$\begin{aligned}\binom{1}{2}\end{aligned}$
$\binom{1}{2}$
\end{document}

Output (red line is where leftmost edges of closing parenthesis should be):

  • 1
    Are you using lualatex? This is a bug which has just been discussed yesterday in the chat. It will be fixed in the future. Here a link to the fix: chat.stackexchange.com/transcript/41?m=39784868#39784868 – Ulrike Fischer Sep 3 '17 at 18:18
  • with pgflatex i can't reproduce your image of binom. – Zarko Sep 3 '17 at 18:20
  • 2
    xelatex is affected by the same bug, but the fix doesn't address it already. You need to expand it to the xelatex case. – Ulrike Fischer Sep 3 '17 at 18:25
  • 1
    In the sources of amsmath the code has already been corrected for both engines by @DavidCarlisle, so with the next amsmath update the problem should be gone. – Ulrike Fischer Sep 3 '17 at 19:15
  • 1
    I have no idea, ask David. – Ulrike Fischer Sep 3 '17 at 20:47
4

Update

This has been fixed (using the code below) in release 2.17a of amsmath (August 2017).


A fix for this was checked in just yesterday (coincidence?) meanwhile you can use the following that fixes it in both xetex and luatex cases:

\documentclass[border=1mm]{standalone}
\usepackage[alignedleftspaceno]{amsmath}

\makeatletter
\ifx\XeTeXcharclass\@undefined
\ifx\directlua\@undefined\else
\def\genfrac@choice#1#2{%
\ifx @#2@\else
%    \end{macrocode}
% \changes{v2.17a}{2017/09/02}{move \cs{nulldelimiterspace} correction}
%    \begin{macrocode}
\ifx c#1\kern-\nulldelimiterspace\fi
{\delimitershortfall\z@\delimiterfactor\@m
 \mathsurround\z@\nulldelimiterspace\z@
\mathchoice
{\genfrac@rule{#2}\displaystyle{2.39}}%
{\genfrac@rule{#2}\textstyle{1}}%
{\genfrac@rule{#2}\scriptstyle{1.45}}%
{\genfrac@rule{#2}\scriptscriptstyle{1.35}}%
}%
\ifx o#1\kern-\nulldelimiterspace\fi
\fi
}
\fi
\else
%    \begin{macrocode}
\def\genfrac@choice#1#2{%
\ifx @#2@\else
%    \end{macrocode}
% \changes{v2.17a}{2017/09/02}{move \cs{nulldelimiterspace} correction}
%    \begin{macrocode}
\ifx c#1\kern-\nulldelimiterspace\fi
{\delimitershortfall\z@\delimiterfactor\@m
 \mathsurround\z@\nulldelimiterspace\z@
\mathchoice
{\genfrac@rule{#2}{20}\textfont{2.39}}%
{\genfrac@rule{#2}{21}\textfont{1}}%
{\genfrac@rule{#2}{21}\scriptfont{1.45}}%
{\genfrac@rule{#2}{21}\scriptscriptfont{1.35}}%
}%
\ifx o#1\kern-\nulldelimiterspace\fi
\fi
}
\fi
\begin{document}
$\begin{aligned}\binom{1}{2}\end{aligned}$
$\binom{1}{2}$
\end{document}
  • Why are there two \ifx at the begin? – Ulrike Fischer Sep 3 '17 at 19:26
  • 2
    @UlrikeFischer interesting question:-) – David Carlisle Sep 3 '17 at 19:27
  • 1
    polite question ;-). – Ulrike Fischer Sep 3 '17 at 19:29
  • 1
    @bp2017 when i get a minute. this weekend perhaps. – David Carlisle Sep 7 '17 at 17:57
  • 1
    @bp2017 gone to ctan, it'll take a day or two to reach distribution updates. – David Carlisle Sep 7 '17 at 21:21

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.