I know some HTML and PHP programming so I can debug a page with errors. But with Javascript I am way behind. So I need your help with the following issue please.
A few weeks ago I found how to replace MathJax script with Katex script on a blogger blog. This issue was solved here How can I replace Matjax script with Katex script on blogger?
Katex is very fast, but unfortunately it does not have support for "direct" greek characters (so it process \pi but don't tolerate π) I had a discussion here Greek fonts for Katex about this issue.
The advice that I got was to run a "preprocessing" script that replaces all greek characters on page with their latex equivalent (for example replace π with \pi). As I said, i do not know Javascript at all, and I tried to write this script on my own but did not succeed. therefore i need you help please.
A source of "inspiration" would be the following two links (https://github.com/Khan/KaTeX/pull/410/files and Replace text in a website ) but I do not know how to combine the two scripts into one that will run before the Katex math rendering script.
Thank you very much for your time and help.