@@ -62,6 +62,10 @@ public void Numbers(string number, string output) =>
62
62
@"\times \Pi \times \psi \times \Psi \times \rho \times \sigma \times \Sigma \times \tau " +
63
63
@"\times \theta \times \Theta \times \upsilon \times \Upsilon \times \varepsilon \times \varkappa " +
64
64
@"\times \varphi \times \varpi \times \varrho \times \varsigma \times \xi \times \Xi \times \zeta " ) ]
65
+ [ InlineData ( @"a_2" , @"a_2" , @"a_2" ) ]
66
+ [ InlineData ( @"a_2+a_2" , @"a_2+a_2" , @"2\times a_2" ) ]
67
+ [ InlineData ( @"a_{23}" , @"a_{23}" , @"a_{23}" ) ]
68
+ [ InlineData ( @"\pi_a" , @"\pi _a" , @"\pi _a" ) ]
65
69
public void Variables ( string input , string converted , string result ) => Test ( input , converted , result ) ;
66
70
[ Theory ]
67
71
[ InlineData ( "a + b" , @"a+b" , "a+b" ) ]
@@ -265,7 +269,7 @@ public void Numbers(string number, string output) =>
265
269
[ InlineData ( @"\sin^{--1} x" , @"\sin \left( x\right) ^{--1}" , @"\sin \left( x\right) " ) ]
266
270
[ InlineData ( @"\sin^{-1^2} x" , @"\sin \left( x\right) ^{-1^2}" , @"\sin \left( x\right) ^{-1}" ) ]
267
271
[ InlineData ( @"\sin^{-1+3} xy+\cos^{-1+3} yx" , @"\sin \left( x\times y\right) ^{-1+3}+\cos \left( y\times x\right) ^{-1+3}" , @"1" ) ]
268
- [ InlineData ( @"\log^{-1_2 } x" , @"\log \left( x\right) ^{-1 }" , @"\log \left( x\right) ^{-1 }" ) ]
272
+ [ InlineData ( @"\log^{-a_2 } x" , @"\log \left( x\right) ^{-a_2 }" , @"\log \left( x\right) ^{-a_2 }" ) ]
269
273
[ InlineData ( @"\ln^{3-1} x" , @"\ln \left( x\right) ^{3-1}" , @"\ln \left( x\right) ^2" ) ]
270
274
public void FunctionInverses ( string latex , string converted , string result ) => Test ( latex , converted , result ) ;
271
275
[ Theory ]
@@ -359,6 +363,8 @@ public void Parentheses(string latex, string converted, string result) {
359
363
[ InlineData ( @"1,2,3" , @"1,2,3" ) ]
360
364
[ InlineData ( @"a,b,c,d" , @"a,b,c,d" ) ]
361
365
[ InlineData ( @"\sqrt2,\sqrt[3]2,\frac34" , @"\sqrt{2},2^{\frac{1}{3}},\frac{3}{4}" ) ]
366
+ [ InlineData ( @"\sin a,\cos b^2,\tan c_3,\cot de,\sec 12f,\csc g+h" ,
367
+ @"\sin \left( a\right) ,\cos \left( b^2\right) ,\tan \left( c_3\right) ,\cot \left( d\times e\right) ,\frac{1}{\cos \left( 12\times f\right) },\frac{1}{\sin \left( g\right) }+h" ) ]
362
368
public void Comma ( string latex , string converted ) =>
363
369
Test ( latex , converted , null ) ;
364
370
[ Theory ( Skip = "https://github.com/asc-community/AngouriMath/pull/94" ) ]
@@ -410,18 +416,39 @@ public void Intervals(string latex, string converted) {
410
416
[ InlineData ( @"x\times" , "Missing right operand for ×" ) ]
411
417
[ InlineData ( @"x\div" , "Missing right operand for ÷" ) ]
412
418
[ InlineData ( @"x\dagger" , "Unsupported Binary Operator †" ) ]
419
+ [ InlineData ( @"1+_21" , "Subscripts are unsupported for Binary Operator +" ) ]
420
+ [ InlineData ( @"-_31" , "Subscripts are unsupported for Unary Operator −" ) ]
421
+ [ InlineData ( @"1\times_41" , "Subscripts are unsupported for Binary Operator ×" ) ]
422
+ [ InlineData ( @"\div_51" , "Unsupported Unary Operator ÷" ) ]
423
+ [ InlineData ( @"1\%_6" , "Subscripts are unsupported for Ordinary %" ) ]
424
+ [ InlineData ( @"1\degree_7" , "Subscripts are unsupported for Ordinary °" ) ]
425
+ [ InlineData ( @"\dagger_8" , "Unsupported Unary Operator †" ) ]
413
426
[ InlineData ( @"." , "Invalid number: ." ) ]
427
+ [ InlineData ( @"1._2" , "Subscripts are unsupported for Number 1." ) ]
414
428
[ InlineData ( @".." , "Invalid number: .." ) ]
415
429
[ InlineData ( @"1.." , "Invalid number: 1.." ) ]
416
430
[ InlineData ( @"..1" , "Invalid number: ..1" ) ]
431
+ [ InlineData ( @"a_+" , "Unsupported Unary Operator + in subscript" ) ]
432
+ [ InlineData ( @"a_|" , "Unsupported Ordinary | in subscript" ) ]
433
+ [ InlineData ( @"a_{1+1}" , "Unsupported Binary Operator + in subscript" ) ]
434
+ [ InlineData ( @"a_{2^3}" , "Unsupported exponentiation in subscript" ) ]
435
+ [ InlineData ( @"a_{a2^3}" , "Unsupported exponentiation in subscript" ) ]
436
+ [ InlineData ( @"a_{a^32}" , "Unsupported exponentiation in subscript" ) ]
437
+ [ InlineData ( @"a_{2_3}" , "Unsupported subscript in subscript" ) ]
438
+ [ InlineData ( @"a_{a2_3}" , "Unsupported subscript in subscript" ) ]
439
+ [ InlineData ( @"a_{a_32}" , "Unsupported subscript in subscript" ) ]
417
440
[ InlineData ( @"\square" , "Placeholders should be filled" ) ]
418
441
[ InlineData ( @"x^\square" , "Placeholders should be filled" ) ]
419
442
[ InlineData ( @"\square^x" , "Placeholders should be filled" ) ]
443
+ [ InlineData ( @"a_\square" , "Placeholders should be filled" ) ]
444
+ [ InlineData ( @"\square_a" , "Placeholders should be filled" ) ]
420
445
[ InlineData ( @"(" , "Missing )" ) ]
446
+ [ InlineData ( @"(_21)" , "Subscripts are unsupported for Open (" ) ]
421
447
[ InlineData ( @"(x" , "Missing )" ) ]
422
448
[ InlineData ( @"((x)" , "Missing )" ) ]
423
449
[ InlineData ( @"(+" , "Missing right operand for +" ) ]
424
450
[ InlineData ( @")" , "Missing (" ) ]
451
+ [ InlineData ( @"(1)_2" , "Subscripts are unsupported for Close )" ) ]
425
452
[ InlineData ( @"x)" , "Missing (" ) ]
426
453
[ InlineData ( @"(x))" , "Missing (" ) ]
427
454
[ InlineData ( @"+)" , "Missing right operand for +" ) ]
@@ -430,6 +457,7 @@ public void Intervals(string latex, string converted) {
430
457
[ InlineData ( @"\left(2,3\right)^\square" , "Placeholders should be filled" ) ]
431
458
[ InlineData ( @"(2,3)^\square" , "Placeholders should be filled" ) ]
432
459
[ InlineData ( @"[" , "Missing ]" ) ]
460
+ [ InlineData ( @"[_21)" , "Unrecognized bracket pair [ )" ) ]
433
461
[ InlineData ( @"[x" , "Missing ]" ) ]
434
462
[ InlineData ( @"[x)" , "Unrecognized bracket pair [ )" ) ]
435
463
[ InlineData ( @"[[x)" , "Unrecognized bracket pair [ )" ) ]
@@ -442,6 +470,7 @@ public void Intervals(string latex, string converted) {
442
470
[ InlineData ( @"((x]" , "Unrecognized bracket pair ( ]" ) ]
443
471
[ InlineData ( @"(x]" , "Unrecognized bracket pair ( ]" ) ]
444
472
[ InlineData ( @"]" , "Missing [" ) ]
473
+ [ InlineData ( @"]_2" , "Subscripts are unsupported for Close ]" ) ]
445
474
[ InlineData ( @"x]" , "Missing [" ) ]
446
475
[ InlineData ( @"(x]]" , "Unrecognized bracket pair ( ]" ) ]
447
476
[ InlineData ( @"+]" , "Missing right operand for +" ) ]
@@ -458,10 +487,12 @@ public void Intervals(string latex, string converted) {
458
487
[ InlineData ( @"\left[2,3\right]^\square" , "Placeholders should be filled" ) ]
459
488
[ InlineData ( @"[2,3]^\square" , "Placeholders should be filled" ) ]
460
489
[ InlineData ( @"\{" , "Missing }" ) ]
490
+ [ InlineData ( @"\{_2\}" , "Subscripts are unsupported for Open {" ) ]
461
491
[ InlineData ( @"\{x" , "Missing }" ) ]
462
492
[ InlineData ( @"\{\{x\}" , "Missing }" ) ]
463
493
[ InlineData ( @"\{+" , "Missing right operand for +" ) ]
464
494
[ InlineData ( @"\}" , "Missing {" ) ]
495
+ [ InlineData ( @"\}_2" , "Subscripts are unsupported for Close }" ) ]
465
496
[ InlineData ( @"x\}" , "Missing {" ) ]
466
497
[ InlineData ( @"\{x\}\}" , "Missing {" ) ]
467
498
[ InlineData ( @"+\}" , "Missing right operand for +" ) ]
@@ -476,8 +507,10 @@ public void Intervals(string latex, string converted) {
476
507
[ InlineData ( @"\tan\times" , "Unsupported Unary Operator ×" ) ]
477
508
[ InlineData ( @"\cot^(-1)" , "Missing )" ) ]
478
509
[ InlineData ( @"\sec\csc" , "Missing argument for csc" ) ]
510
+ [ InlineData ( @"\arcsin_2x" , "Subscripts are unsupported for Large Operator arcsin" ) ]
479
511
[ InlineData ( @"\operatorname{dab}" , "Unsupported Large Operator dab" ) ]
480
512
[ InlineData ( @"," , "Missing left operand for comma" ) ]
513
+ [ InlineData ( @"1,_22" , "Subscripts are unsupported for Punctuation ," ) ]
481
514
[ InlineData ( @"1," , "Missing right operand for comma" ) ]
482
515
[ InlineData ( @",1" , "Missing left operand for comma" ) ]
483
516
[ InlineData ( @",1,2" , "Missing left operand for comma" ) ]
0 commit comments