Change scheme label in chemmacros

I need to change the labelling for my floats (Page numbers/sections/figures/tables/schemes) into Figure S1, Table S1, Scheme S1, ... (for Supporting Infortmation of a journal).

For Figures and Tables, I found this code, which works perfectly fine:

\renewcommand{\thepage}{S\arabic{page}}
\renewcommand{\thesection}{S\arabic{section}}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\thefigure}{S\arabic{figure}}


However, if I try to do the analogy with the scheme environment from the chemmacros package

\renewcommand{\thescheme}{S\arabic{scheme}}


I get the following error in the log-file:

Command \thescheme undefined.


I'm not that an expert in code reading, so I did not manage to get the right label description for the scheme environment out of the chemmacros package code. Any suggestions to get this renaming to work is highly appreciated!

OK, after searching few more hours, I found this post, stating that some changes of redefining chemmacros definitions are only affective after \begin{document}.
\AtBeginDocument{\renewcommand\thescheme{S\arabic{scheme}}}

• The reason is that there are five or six different methods for defining floats (even depending on the document class). chemmacros does not decide which method to use but tries to detect which methods are available (through the class the users chose or the packages they use). This information is only available at the end of the preamble. One could change this but then chemmacros would have to be loaded as last package. There is no perfect solution… Oct 2, 2019 at 22:00