Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

2 Answers 2

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.