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

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?

share|improve this question
up vote 12 down vote accepted

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.

share|improve this answer
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:

enter image description here





WMC \textgreater  average.

Using \verb|\textgreater| yields \textgreater.
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.