@@ -1280,6 +1280,65 @@ class ContentExample {
1280
1280
]),
1281
1281
]);
1282
1282
1283
+ static const mathBlockKatexNegativeMarginsOnVlistRow = ContentExample (
1284
+ 'math block, KaTeX negative margins on a vlist row' ,
1285
+ '```math\n X_n\n ```' ,
1286
+ '<p>'
1287
+ '<span class="katex-display"><span class="katex">'
1288
+ '<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msub><mi>X</mi><mi>n</mi></msub></mrow><annotation encoding="application/x-tex">X_n</annotation></semantics></math></span>'
1289
+ '<span class="katex-html" aria-hidden="true">'
1290
+ '<span class="base">'
1291
+ '<span class="strut" style="height:0.8333em;vertical-align:-0.15em;"></span>'
1292
+ '<span class="mord">'
1293
+ '<span class="mord mathnormal" style="margin-right:0.07847em;">X</span>'
1294
+ '<span class="msupsub">'
1295
+ '<span class="vlist-t vlist-t2">'
1296
+ '<span class="vlist-r">'
1297
+ '<span class="vlist" style="height:0.1514em;">'
1298
+ '<span style="top:-2.55em;margin-left:-0.0785em;margin-right:0.05em;">'
1299
+ '<span class="pstrut" style="height:2.7em;"></span>'
1300
+ '<span class="sizing reset-size6 size3 mtight">'
1301
+ '<span class="mord mathnormal mtight">n</span></span></span></span>'
1302
+ '<span class="vlist-s"></span></span>'
1303
+ '<span class="vlist-r">'
1304
+ '<span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span></span></p>' , [
1305
+ MathBlockNode (texSource: 'X_n' , nodes: [
1306
+ KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
1307
+ KatexStrutNode (heightEm: 0.8333 , verticalAlignEm: - 0.15 ),
1308
+ KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
1309
+ KatexSpanNode (
1310
+ styles: KatexSpanStyles (
1311
+ marginRightEm: 0.07847 ,
1312
+ fontFamily: 'KaTeX_Math' , fontStyle: KatexSpanFontStyle .italic),
1313
+ text: 'X' , nodes: null ),
1314
+ KatexSpanNode (
1315
+ styles: KatexSpanStyles (textAlign: KatexSpanTextAlign .left),
1316
+ text: null , nodes: [
1317
+ KatexVlistNode (rows: [
1318
+ KatexVlistRowNode (
1319
+ verticalOffsetEm: - 2.55 + 2.7 ,
1320
+ node: KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
1321
+ KatexNegativeMarginNode (leftOffsetEm: - 0.0785 , nodes: [
1322
+ KatexSpanNode (
1323
+ styles: KatexSpanStyles (marginRightEm: 0.05 ),
1324
+ text: null , nodes: [
1325
+ KatexSpanNode (
1326
+ styles: KatexSpanStyles (fontSizeEm: 0.7 ), // .reset-size6.size3
1327
+ text: null , nodes: [
1328
+ KatexSpanNode (
1329
+ styles: KatexSpanStyles (fontFamily: 'KaTeX_Math' , fontStyle: KatexSpanFontStyle .italic),
1330
+ text: 'n' , nodes: null ),
1331
+ ]),
1332
+ ]),
1333
+ ]),
1334
+ ])),
1335
+ ]),
1336
+ ]),
1337
+ ]),
1338
+ ]),
1339
+ ]),
1340
+ ]);
1341
+
1283
1342
static const imageSingle = ContentExample (
1284
1343
'single image' ,
1285
1344
// https://chat.zulip.org/#narrow/stream/7-test-here/topic/Thumbnails/near/1900103
@@ -2376,6 +2435,7 @@ void main() async {
2376
2435
testParseExample (ContentExample .mathBlockKatexRaisebox);
2377
2436
testParseExample (ContentExample .mathBlockKatexNegativeMargin);
2378
2437
testParseExample (ContentExample .mathBlockKatexLogo);
2438
+ testParseExample (ContentExample .mathBlockKatexNegativeMarginsOnVlistRow);
2379
2439
2380
2440
testParseExample (ContentExample .imageSingle);
2381
2441
testParseExample (ContentExample .imageSingleNoDimensions);
0 commit comments