From caee9d5ac3c65f78671a9786318358cd647247eb Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 18 May 2019 11:17:14 +0200 Subject: 2019-05-18 10:50:00 --- tex/context/base/mkiv/trac-tex.mkiv | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tex/context/base/mkiv/trac-tex.mkiv') 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 -- cgit v1.2.3