From e83ac9248f3c2b358f11e7ecb7b4224797239966 Mon Sep 17 00:00:00 2001 From: Omikhleia Date: Tue, 19 Nov 2024 23:52:26 +0100 Subject: [PATCH] test(math): Add a test case for primes and asterisks --- tests/math-primes-asterisk.expected | 142 ++++++++++++++++++++++++++++ tests/math-primes-asterisk.sil | 14 +++ 2 files changed, 156 insertions(+) create mode 100644 tests/math-primes-asterisk.expected create mode 100644 tests/math-primes-asterisk.sil diff --git a/tests/math-primes-asterisk.expected b/tests/math-primes-asterisk.expected new file mode 100644 index 000000000..cab6a02b4 --- /dev/null +++ b/tests/math-primes-asterisk.expected @@ -0,0 +1,142 @@ +Set paper size 419.5275636 595.275597 +Begin page +Mx 158.0943 +My 37.2338 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 164.8566 +T 2093 w=4.9500 (nil) +Mx 172.0288 +T 2747 w=4.3400 (nil) +Mx 186.3688 +T 2746 w=4.5400 (nil) +Mx 193.1310 +T 2093 w=4.9500 (nil) +Mx 200.3032 +T 2747 w=4.3400 (nil) +Mx 214.6432 +T 2746 w=4.5400 (nil) +Mx 219.1832 +My 33.4838 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 2093 w=3.9600 (nil) +Mx 233.5732 +My 37.2338 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 238.1132 +My 33.4838 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 2093 w=3.9600 (nil) +Mx 252.5032 +My 37.2338 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 256.7832 +My 39.3838 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 17 w=3.7200 (nil) +Mx 257.0432 +My 33.4838 +T 2093 w=3.9600 (nil) +Mx 153.7638 +My 67.3978 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 158.3038 +My 63.6478 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 3791 w=3.0560 (nil) +Mx 171.7898 +My 67.3978 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 176.3298 +My 63.6478 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 3792 w=5.2960 (nil) +Mx 192.0558 +My 67.3978 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 196.5958 +My 63.6478 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 3793 w=7.5360 (nil) +Mx 214.5618 +My 67.3978 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 218.8418 +My 69.7718 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 17 w=3.7200 (nil) +Mx 219.1018 +My 63.6478 +T 3791 w=3.0560 (nil) +Mx 232.9918 +My 67.3978 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 237.2718 +My 69.7718 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 17 w=3.7200 (nil) +Mx 237.5318 +My 63.6478 +T 3792 w=5.2960 (nil) +Mx 253.2578 +My 67.3978 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 257.5378 +My 69.7718 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 17 w=3.7200 (nil) +Mx 257.7978 +My 63.6478 +T 3793 w=7.5360 (nil) +Mx 176.2698 +My 97.5619 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 180.8098 +My 93.8119 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 3791 w=3.0560 (nil) +Mx 194.2958 +My 97.5619 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 198.8358 +My 93.8119 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 3792 w=5.2960 (nil) +Mx 214.5618 +My 97.5619 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 218.8418 +My 99.9359 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 17 w=3.7200 (nil) +Mx 219.1018 +My 93.8119 +T 3791 w=3.0560 (nil) +Mx 232.9918 +My 97.5619 +Set font Libertinus Math;10;400;Regular;normal;+ssty;;LTR +T 2746 w=4.5400 (nil) +Mx 237.2718 +My 99.9359 +Set font Libertinus Math;8;400;Regular;normal;+ssty;;LTR +T 17 w=3.7200 (nil) +Mx 237.5318 +My 93.8119 +T 3792 w=5.2960 (nil) +Mx 207.4176 +My 553.7327 +Set font Gentium Plus;10;400;;normal;;;LTR +T 20 w=4.6924 (1) +End page +Finish diff --git a/tests/math-primes-asterisk.sil b/tests/math-primes-asterisk.sil new file mode 100644 index 000000000..b16476d74 --- /dev/null +++ b/tests/math-primes-asterisk.sil @@ -0,0 +1,14 @@ + +\begin[papersize=a5]{document} +\use[module=packages.math] + +% TeX * = \ast +\math[mode=display]{a * b \quad a \ast b \quad a^* \quad a^\ast \quad a^\ast_0} + +% TeX ' and '' and ''' expand to superscripted \prime +\math[mode=display]{a' \quad a'' \quad a''' \quad a'_0 \quad a''_0 \quad a'''_0} + +% TeX-like prime commands used in superscript lead to the same result +\math[mode=display]{a^\prime \quad a^\dprime \quad a^\prime_0 \quad a^\dprime_0} + +\end{document}