%%
%% This is file `tikzlibraryscriptfix.code.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% chronos-code.dtx  (with options: `lib-scriptfix')
%% -------------------------------------------------
%% Copyright (C) 2023-2026 Clea F. Rees.
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008-05-04 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is Clea F. Rees.
%% 
%% This file may only be distributed together with a copy of the package
%% chronos. You may however distribute the package chronos without
%% such generated files.
%% 
%% This work consists of all files listed in manifest.txt.
%% -------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{svn-prov}
\ProvidesFileSVN[tikzlibraryscriptfix.code.tex]{$Id: chronos-code.dtx 11948 2026-06-03 16:02:03Z cfrees $}[v0.9.5 \revinfo]
\RequirePackage{tikz}
\newcommand\safe@textsuperscript{}
\newcommand\safe@textsubscript{}
\newcommand\@safe@textsuperscript{}
\newcommand\@safe@textsubscript{}
\DeclareRobustCommand*\safe@textsuperscript[1]{%
  \@safe@textsuperscript{\selectfont#1}%
}
\DeclareRobustCommand*\safe@textsubscript[1]{%
  \@safe@textsubscript{\selectfont#1}%
}
\def\@safe@textsuperscript#1{%
  {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\sf@size#1}}}}%
}
\def\@safe@textsubscript#1{%
  {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\sf@size#1}}}}%
}
\ExplSyntaxOn
\cs_if_free:NF \IfFormatAtLeastT {
  \IfFormatAtLeastT{2026-06-01}{
    \bool_new:N \l__chronos_scriptfix_bool
    \hook_gput_code:nnn {env/tikzpicture/before} {.} {
      \bool_set_false:N \l__chronos_scriptfix_bool
      \tag_if_active:F {
        \bool_set_true:N \l__chronos_scriptfix_bool
      }
      \hook_gput_next_code:nn {env/tikzpicture/begin} {
        \bool_if:NF \l__chronos_scriptfix_bool {
          \socket_get_plug:nN {tagsupport/tikz/picture/begin} \l_tmpa_tl
          \str_if_eq:eeF {\l_tmpa_tl} {text} {
            \bool_set_true:N \l__chronos_scriptfix_bool
          }
        }
        \bool_if:NT \l__chronos_scriptfix_bool {
          \cs_set_eq:NN \textsuperscript \safe@textsuperscript
          \cs_set_eq:NN \textsubscript \safe@textsubscript
        }
      }
    }
  }
}
\ExplSyntaxOff
\endinput
%%
%% End of file `tikzlibraryscriptfix.code.tex'.
