summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/trac-tex.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/trac-tex.mkiv')
-rw-r--r--tex/context/base/mkiv/trac-tex.mkiv27
1 files changed, 27 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/trac-tex.mkiv b/tex/context/base/mkiv/trac-tex.mkiv
index d659f4bab..c69f3febb 100644
--- a/tex/context/base/mkiv/trac-tex.mkiv
+++ b/tex/context/base/mkiv/trac-tex.mkiv
@@ -39,4 +39,31 @@
\unexpanded\def\nomkivstatistics{\enabledirectives[system.nostatistics]}
+%D This is not really a tracker but for decades it lived in my \type {cont-loc}
+%D file. I moved it here because I wanted someone else to use it. This macro is not
+%D really useful for users. I kept the \LUA\ variant in \type {cont-loc.mkiv}.
+
+\installcorenamespace{profilemacrocount}
+\installcorenamespace{profilemacromacro}
+
+\newtoks\t_syst_profile
+
+\appendtoks
+ \the\t_syst_profile
+\to \everystoptext
+
+\unexpanded\def\profilemacro#1% an oldie, but modernized a bit
+ {\edef\p_name{\csstring#1}%
+ \ifcsname\??profilemacrocount\p_name\endcsname \else
+ \expandafter\newcount\csname\??profilemacrocount\p_name\endcsname
+ \expandafter\let\csname\??profilemacromacro\p_name\endcsname#1%
+ \xtoksapp\t_syst_profile
+ {\writestatus
+ {profile}%
+ {\string#1: \noexpand\the\csname\??profilemacrocount\p_name\endcsname}}%
+ \unexpanded\xdef#1%
+ {\global\advance\csname\??profilemacrocount\p_name\endcsname\plusone
+ \expandafter\noexpand\csname\??profilemacromacro\p_name\endcsname}%
+ \fi}
+
\protect \endinput