Skip to content

Instantly share code, notes, and snippets.

@shreevatsa
Created May 19, 2017 18:01
Show Gist options
  • Save shreevatsa/ce1c5bb104b8089a282856cd51d1af91 to your computer and use it in GitHub Desktop.
Save shreevatsa/ce1c5bb104b8089a282856cd51d1af91 to your computer and use it in GitHub Desktop.
Dumping what's going on as TeX reads
diff --git a/web2c/tex.web b/web2c/tex.web
index 92b0cc5..372874c 100644
--- a/web2c/tex.web
+++ b/web2c/tex.web
@@ -7240,7 +7240,12 @@ if state<>token_list then
else @<Input from token list, |goto restart| if end of list or
if a parameter needs to be expanded@>;
@<If an alignment entry has just ended, take appropriate action@>;
-exit:end;
+exit:
+if tracing_stats>0 then
+ begin
+ print_nl("<context>"); show_context; print_nl("</context>");
+ end;
+end;
@ An alignment entry ends when a tab or \.{\\cr} occurs, provided that the
current level of braces is the same as the level that was present at the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment