# Spaces behind \textgreater not working as expected

I have the following code:

 \textit{WMC \textgreater   average}


But the text looks like this:

WMC >average

It does not even change if I add even more spaces. So what am I doing wrong?

-

This is because commands gobble spaces. The simple work around is to type \textgreater{} to terminate the command, which will restore the space after the command. See the linked TeX FAQ entry for other possible solutions.

-
Or an explicitly space can be added: \textgreater\space. In the OP's example it doesn't make any difference, but e.g. inside an\edef context it would make one. – Martin Scharrer Mar 29 '11 at 22:38
Another option is to put a control space: \textgreater\ average. – Bruno Le Floch Jul 30 '11 at 2:00

Another option is to use the xspace package if you don't want to manually insert a space after each use, to intelligently insert a space as needed:

## Code:

\documentclass{article}
\usepackage{xspace}

\let\OldTextgreater\textgreater
\renewcommand{\textgreater}{\OldTextgreater\xspace}%

\begin{document}
WMC \textgreater  average.

Using \verb|\textgreater| yields \textgreater.
\end{document}

-