diff --git a/src/formatting.typ b/src/formatting.typ index 3f16b28..db2e34b 100644 --- a/src/formatting.typ +++ b/src/formatting.typ @@ -162,7 +162,7 @@ frac: it.frac, group: it.group, digits: it.digits, - decimal-separator: it.decimal-separator, + decimal-separator: [#it.decimal-separator], )) return sequence(( diff --git a/tests/num/decimal-separator/.gitignore b/tests/num/decimal-separator/.gitignore new file mode 100644 index 0000000..2e4c5d8 --- /dev/null +++ b/tests/num/decimal-separator/.gitignore @@ -0,0 +1,5 @@ +# generated by tytanic, do not edit + +/diff/ +/out/ +/ref/ diff --git a/tests/num/decimal-separator/ref.typ b/tests/num/decimal-separator/ref.typ new file mode 100644 index 0000000..cb453f3 --- /dev/null +++ b/tests/num/decimal-separator/ref.typ @@ -0,0 +1,10 @@ +#set page(width: auto, height: auto, margin: 2pt) + +$1.2 plus.minus 0.1$ \ +$2×10^(1.2)$ + +$1,#h(0pt)2 plus.minus 0,#h(0pt)1$ \ +$2×10^(1","2)$ \ + +$1,#h(0pt)234$ \ +$1"_"234$ \ diff --git a/tests/num/decimal-separator/test.typ b/tests/num/decimal-separator/test.typ new file mode 100644 index 0000000..d020b5a --- /dev/null +++ b/tests/num/decimal-separator/test.typ @@ -0,0 +1,16 @@ +#import "/src/zero.typ": * +#set page(width: auto, height: auto, margin: 2pt) + + + +#num("1.2+-,1") \ +#num("2e1.2") + +#set-num(decimal-separator: ",") +#num("1.2+-,1") \ +#num("2e1.2") + +#set-num(decimal-separator: ".") + +#num("1.234", decimal-separator: ",") \ +#num("1.234", decimal-separator: "_") \ diff --git a/tests/num/self/ref/5.png b/tests/num/self/ref/5.png index b3d47d7..776f862 100644 Binary files a/tests/num/self/ref/5.png and b/tests/num/self/ref/5.png differ