Philipp Gesang  committed a1d4245

bad idea: reverted to rev18

  • Participants
  • Parent commits cbf610a
  • Branches default

Comments (0)

Files changed (1)

File tex/context/third/letterspace/t-letterspace.mkiv

-  % Hans’ macro \doifnextcharelse works a lot better than my
-  % previously defined kludge …
-  \doifnextcharelse{\ }{%
+  \doifnextspace{%
     {\letterspace_setstuff\ }%
-  }{}%
+  }%
+%D This is a partial ripoff of a couple of macros from
+%D \type{syst-aux.mkiv}.
+%D \useURL [flet] [] [] [\type{futurelet}]
+%D Very helpful for further understanding of what’s exactly going
+%D on: Stephan von Bechtolsheim’s tutorial on \from[flet].
+%D In short: the trick is checking whether the token following
+%D the command is a space, that is: whether it expands to
+%D \type{\blankspace}. If the test succeeds, a space will be
+%D added that has the correct parameters and all space tokens
+%D following the command will be gobbled. Otherwise -- the next
+%D token being anything else -- \type{\letterspace} will proceed
+%D without changing anything.
+  \def\!!string{#1}%
+  \futurelet\nexttoken\inspectnexttoken%
+  \ifx\nexttoken\blankspace
+    \@EA\!!string
+  \fi%
 %D \macros