From ba0d0272174297d0cb877b6ec8029f86711220eb Mon Sep 17 00:00:00 2001 From: Bruce Miller Date: Sun, 29 Sep 2024 17:06:07 -0400 Subject: [PATCH] Slightly better choice of space chars, updating tests --- lib/LaTeXML/Engine/TeX_Glue.pool.ltxml | 10 ++++-- t/alignment/tabular.xml | 4 +-- t/complex/figure_mixed_content.xml | 48 +++++++++++++------------- t/fonts/sizes.xml | 6 ++-- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/lib/LaTeXML/Engine/TeX_Glue.pool.ltxml b/lib/LaTeXML/Engine/TeX_Glue.pool.ltxml index 1e971c04d..002e2940a 100644 --- a/lib/LaTeXML/Engine/TeX_Glue.pool.ltxml +++ b/lib/LaTeXML/Engine/TeX_Glue.pool.ltxml @@ -27,8 +27,14 @@ use LaTeXML::Package; # \unskip c removes a glue item from the current list. our @spaces = ( # Spaces to fake spacing, with width in ems - [0.167, "\x{2006}"], [0.222, "\x{2005}"], [0.278, "\x{2004}"], - [0.333, UTF(0xA0)], [0.5, "\x{2002}"], [1.0, "\x{2003}"]); + [0.100, "\x{200A}"], # Hair space (thinner than thin space) + [0.167, "\x{2006}"], # six-per-em + [0.200, "\x{2009}"], # five-per-em, thin space + [0.250, "\x{2005}"], # four-per-em, mid space + [0.333, "\x{2004}"], # three-per-em, thick space + [0.500, "\x{2002}"], # en-quad, "nut" + [1.000, "\x{2003}"], # em-quad, "mutton" +); # String of spacing chars with width roughly equivalent to $dimen sub DimensionToSpaces { diff --git a/t/alignment/tabular.xml b/t/alignment/tabular.xml index a6ba4c8d7..b7cd9df21 100644 --- a/t/alignment/tabular.xml +++ b/t/alignment/tabular.xml @@ -77,7 +77,7 @@ - 1  + 1  

a

2 @@ -88,7 +88,7 @@ 4 - 1  + 1  

a a a a a a a a a a

2 diff --git a/t/complex/figure_mixed_content.xml b/t/complex/figure_mixed_content.xml index 23c121be3..0b94777c0 100644 --- a/t/complex/figure_mixed_content.xml +++ b/t/complex/figure_mixed_content.xml @@ -557,22 +557,22 @@ 16: 16 -       line +        line 17: 17 -       line +        line 18: 18 -       line +        line 19: 19 -       line +        line 20: @@ -582,42 +582,42 @@ 21: 21 -       line +        line 22: 22 -       line +        line 23: 23 -       line +        line 24: 24 -       line +        line 25: 25 -          line +            line 26: 26 -          line +            line 27: 27 -       line +        line 28: 28 -       line +        line 29: @@ -745,7 +745,7 @@ 10: 10 -       line +        line 11: @@ -799,7 +799,7 @@ 4: 4 -     line +     line 5: @@ -831,32 +831,32 @@ 10: 10 -     line +     line 11: 11 -     line +     line 12: 12 -     line +     line 13: 13 -     line +     line 14: 14 -     line +     line 15: 15 -     line +     line 16: @@ -866,22 +866,22 @@ 17: 17 -     line +     line 18: 18 -     line +     line 19: 19 -      line +      line 20: 20 -     line +     line 21: diff --git a/t/fonts/sizes.xml b/t/fonts/sizes.xml index 1be497e92..f6ee79157 100644 --- a/t/fonts/sizes.xml +++ b/t/fonts/sizes.xml @@ -225,10 +225,10 @@

Math: ‘’ is -1.66663pt x 0.0pt + 0.0pt.

-

Math: ‘ ’ is 2.22217pt x 0.0pt + 0.0pt.

+

Math: ‘ ’ is 2.22217pt x 0.0pt + 0.0pt.

-

Math: ‘ ’ is 2.77771pt x 0.0pt + 0.0pt.

+

Math: ‘ ’ is 2.77771pt x 0.0pt + 0.0pt.

Math: ‘ @@ -366,7 +366,7 @@ ’ is 18.62154pt x 7.5pt + 2.5pt.

-

Math: ‘   ’ is 18.62154pt x 7.5pt + 2.5pt.

+

Math: ‘   ’ is 18.62154pt x 7.5pt + 2.5pt.