@@ -3094,6 +3094,27 @@ describe("An aligned environment", function() {
30943094 const ae = getParsed`\begin { aligned } & E_1 & ( 1 ) \\& E_2 & ( 2 ) \\& E_3 & ( 3 ) \end { aligned } `[0];
30953095 expect(ae.body).toHaveLength(3);
30963096 });
3097+
3098+ it("should not add \\jot below a single row ", function() {
3099+ const aligned = getBuilt `\begin { aligned } ( M ) \end { aligned } `[0];
3100+ const alignedExtra = getBuilt`\begin { aligned } ( M ) \\\end { aligned } `[0];
3101+ const matrix = getBuilt`\begin { matrix * } [ r ] \displaystyle ( M ) \end { matrix * } `[0];
3102+
3103+ expect(aligned.height).toBeCloseTo(matrix.height, 5);
3104+ expect(aligned.depth).toBeCloseTo(matrix.depth, 5);
3105+ expect(alignedExtra.height).toBeCloseTo(matrix.height, 5);
3106+ expect(alignedExtra.depth).toBeCloseTo(matrix.depth, 5);
3107+ });
3108+
3109+ it("should not add \\jot below the final row ", function() {
3110+ const aligned = getBuilt `\begin { aligned } a &= b \\c & = d \end { aligned } `[0];
3111+ const matrix = getBuilt`\begin { matrix * } [ r ] \displaystyle a & \displaystyle = b \\[ 3 pt ] \displaystyle c & \displaystyle = d \end { matrix * } `[0];
3112+ // [3pt] equals \jot , and for simple content depth = = arstrutDepth ,
3113+ // so the two gap computations coincide.
3114+
3115+ expect ( aligned . height ) . toBeCloseTo ( matrix . height , 5 ) ;
3116+ expect ( aligned . depth ) . toBeCloseTo ( matrix . depth , 5 ) ;
3117+ } ) ;
30973118} ) ;
30983119
30993120describe ( "AMS environments" , function ( ) {
0 commit comments