I'm using Emacs with cdlatex to write latex-files and I frequently have to draw commutative diagrams using tikzcd. The interior of a tikzcd-environment is automatically parsed as being in mathmode, however, cdlatex doesn't recognize it being in mathmode, so that, if I want to insert a math modifier, it tells me that this modifier doesn't exist outside mathmode, and if I want to insert a math symbol, it automatically puts it between dollar signs. So how do I get cdlatex to recognize that mathmode automatically holds inside a tikzcd-environment?

1 Answer 1


Cdlatex seems to use texmathp to find out whether text is in math mode. This answer explains how to get texmathp to recognize environments as being in math mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.