In particular, the component and chapter commands are only out there inside the report and ebook document classes. $$ is TeX primitive syntax, which, as Other people have commented is hard to redefine (in vintage TeX there is not any command title which triggers getting into or leaving Show math). https://blog.ulifestyle.com.hk/latexdress/