TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One can define a new mathversion using \DeclareMathVersion{sans}.

I wonder if I can test the existence of such a font definition, for example with

  {math font is defined}
  {math font is not defined}
share|improve this question
up vote 4 down vote accepted

Are you just looking for this?

  \expandafter\@ifundefined\csname mv@#1\endcsname{#3}{#2}%

The above is motivated by the fact that \DeclareMathVersion{#1} defines \mv@#1.

share|improve this answer
Exactly. I failed to find the code where this is defined. – Matthias Pospiech Jan 12 '12 at 20:39


\ifcsname mv@blub\endcsname
 math version blub exist
 math version blub  doesnt exist

\ifcsname mv@bla\endcsname
 math version bla exist
 math version bla doesnt exist

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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