blefloch / latex-unravel

Watching TeX digest tokens
24 stars 1 forks source link

\the\ignorespaces different in TeX and in pdfTeX #20

Closed blefloch closed 3 years ago

blefloch commented 8 years ago

In pdfTeX, \showthe\ignorespaces will show 0 with no error. In TeX it will cause an error then show 0.

Test behaviour in various engines and make unravel do the same.

blefloch commented 8 years ago

Similarly, \showthe\letterspacefont and \showthe\pdfcopyfont seem to do the same as \showthe\font.

Done (in a soon-to-be-pushed commit).

blefloch commented 8 years ago

The \ignorespaces business is due to \pdfprimitive sharing its command code with \ignorespaces.

blefloch commented 8 years ago

Todo: check where exactly \@@_scan_something_internal:n can be called without checking that the command is between min_internal and max_internal, as those are places where \ignorespaces will behave like a number.

Done: the last test in @<Complain that \.{\\the} can't do this; give zero result@> seems to be useless then because level is always equal to tok_val when reaching this point.

blefloch commented 3 years ago

In all five main engines (pdfTeX, XeTeX, LuaTeX, epTeX, eupTeX) \the\ignorespaces is wrongly allowed, and I think it expands to the last result of scan_something_internal (used for various assignments). This is very weird behaviour, definitely an engine bug, and I think it's ok that unravel produces an error for that case. Not worth fixing.