The $\LaTeX$ code for \(\var {X}\) is \var {X} .
\var {X}
When the argument is a single character, it is usual to omit the braces:
\var X
This command is specific to $\mathsf{Pr} \infty \mathsf{fWiki}$.