# How can I use two modes in emacs (markdown and auctex)?

view story

http://unix.stackexchange.com – When I edit markdown in emacs I use markdown-mode. However I often have to type some math formulas in the markdown file (processed by mathjax). However for those math parts markdown mode is not very comfortable. Is there a way to make emacs automatically switch to latex (auctex) mode (locally) when the point is between two $signs for example ($\mathbb{R}$) or between two double$ signs for example \begin{align} a = b \end{align} ? (HowTos)