You have a few options to achieve this, from within emacs you can can simply use org-toggle-latex-fragment
which is the simplest solution, putting the following into your ~/emacs.d/init.el
file will fix the binding to C-c C-x C-l
just like it is in org-mode:
(add-hook 'mardkown-mode-hook
(lambda ()
(local-set-key (kbd "C-c C-x C-l") 'org-toggle-latex-fragment)
(local-set-key (kbd "C-c C-x C-u") 'markdown-toggle-url-hiding)
))
My current solution is to basically manage all my notes in VNote and org-mode and then build them with mkdocs to read them on a server / gitpage on my phone. So I'll edit them in emacs, manage them in Vnote and then if I want to include some math I usually use vim with a plugin.
Another option is to use one of the markdown preview packages that are available, the doom starter kit (which I'm using atm) includes one but I don't use it.
An easier option is to use this chrome extension in conjuction with a local server (e.g. python3 -m http.server
) and view the files in the browser, this also means links will work. It would also be possible to build the markdown with pandoc, tie that to a keybinding and then view the HTML in the browser seperately.
I usually write my markdown and LaTeX in vim because the snippets are better and I'll use this function to open vim from emacs, if that's something you're interested in then I'd recommend this plugin.
If you don't like any of that you could use the live preview offered by Marktext, Zettlr, VSCode or Typora and simply edit the source in markdown.
I would really recommend looking at VNote though, It's become indispensable to me.