In the main document you somewhere re-defined i. If you include i in the list of variables to clear, everything is fine.
BTW, You seem to have put a lot of work into the SMath-representation of the handbook.
Have you had a look on the Interactive Handbook? A set of interlinked documents might be easier to manage than a huge document (given the lack of templates and outline features in SMath).
![2024-05-03 11_57_51-SMath Solver - [SMath Studio Handbook_4 Mathematics.sm_].png](/en-US/file/yYSNaB/2024-05-03-11_57_51-SMath-Solver---_SMath-Studio-Handbook_4-Mathematics_sm___png)
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx