Skip to content

Commit

Permalink
Extra test for optional space after fil...l (see #38)
Browse files Browse the repository at this point in the history
Note that TeX searches for more "l" by repeatedly calling scan_keyword
so "fil \space\space l" is valid and TeX continues deleting spaces
after the last "l" it found (searching for more "l").  To avoid this
and really test for the <optional space> we do "fill\noexpand\space":
then when looking for more "l", TeX finds a \notexpanded:\space, and
when looking for the <optional space> TeX expands and deletes \space.
  • Loading branch information
Bruno Le Floch committed Nov 14, 2019
1 parent 55940ec commit 9461aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testfiles/unravel009.lvt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
\tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl { \TRUE } { \ERROR }
\unravel_get:nnN { mute } { \afterassignment \token_to_str:N \l_tmpa_dim = 1 pz \c_space_tl } \l_tmpb_tl
\str_if_eq:eeTF { \l_tmpb_tl } { pz ~ } { \TRUE } { \ERROR }
\unravel_get:nnN { mute } { \afterassignment \token_to_str:N \l_tmpa_skip = 1pt minus 3filll \exp_not:N \c_space_tl \BOOM } \l_tmpb_tl
\tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl { \TRUE } { \ERROR }
%
\unravel_get:nnN { mute } { \exp_last_unbraced:Nx \show {\if_dim:w 3pt>2pt\else:\fi:} } \l_tmpa_tl
\tl_if_empty:NTF \l_tmpa_tl { \TRUE } { \ERROR }
Expand Down
1 change: 1 addition & 0 deletions testfiles/unravel009.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ TeX's advice is:
Chapter 27 of The TeXbook.)
Defining \g__unravel_input_15_gtl on line ...
TRUE
TRUE
> \relax=\relax.
<argument> \relax
l. ... }
Expand Down

0 comments on commit 9461aa1

Please sign in to comment.