If I want to include LaTeX in a markdown literal string, I have to use ${...} to enter in javascript mode, then tex`` to generate the LaTeX formatted letter, eg:
md`The variable ${tex`t`} is the time and ${tex`x`} is the position.`
It’s a bit tedious if you have a lot of variables.
One solution is not to use LaTeX, and write them in normal font
md`The variable t is the time and x is the position.`
My preference is to use ${tex`t`} within Markdown or HTML literals. But if you find that tedious, you could use a wrapper like the following that uses $t$ for something like math mode.
Thanks also for mentioning your preference. I imagine it’s due to the overhead of importing `texmd` and also adding a dependency that might break or diverge from `md` and `tex` implementations.
Now that GitHub markdown, GitLab markdown, and default VS Code markdown preview render math using the $ and $$ markdown syntax, I think Observable should adopt this approach by default.