61

I'd like to set $1024 \times 768$ without any space between the three items. Is this possible? If so, how?

E.g., what I get is:

1024 x 768

and what I want is:

1024x768

1
  • 1
    @Marc, I want it because it looks better that way IMO. Not sure why anyone would want the letter x... that looks pretty sloppy. Commented Apr 21, 2013 at 3:49

4 Answers 4

85

Math binary operators and relations automatically add appropriate spaces between the symbol and their operands. If you want to remove this space, you can turn the operator into a regular symbol by enclosing it in braces. For example

$1024 {\times} 768$ 

If you will be using this often you can also define a new command and say something like

\newcommand{\stimes}{{\times}} $1024 \stimes 768$ 

where \stimes is a symbol version of the \times operator.

3
  • 11
    Good answer, I'd only add 'however, you really shouldn't be doing this!' Commented Aug 3, 2010 at 7:19
  • 2
    That's what I tried to say with "appropriate spaces" in the first sentence, but I probably was't explicit enough. :P Commented Aug 3, 2010 at 7:28
  • 8
    @Joseph, you don't have to use it in your documents. I write documents that look the best I can make them, not ones that follow "the rules". I deliberately left out extraneous explanations and context, but it's a deliberate choice and it looks way better in my context. Commented Apr 21, 2013 at 3:51
30

These answers seem overly complicated to me. I personally just use \! between symbols as in:

$W \! \rightarrow \! \mu$ 

This brings the symbols closer together. You can also use multiple in a row

$W \! \! \! \rightarrow \! \mu$ 
1
  • Maybe not the most elegant solution, but I don't want the most elegant solution for math mode on SE Commented Aug 13, 2019 at 8:02
13

Perhaps defining it as an ordinary math symbol might be better than just enclose it in braces and expect that would do it now and in the future. So, I would use \mathord:

$1024\mathord{\times}768$ 
2
  • 3
    As Knuth points out in the TeXbook, \mathord is strictly unnecessary in TeX, since braces do the same thing. Unless you're planning on not using TeX in the future, I don't see why you would not expect it to work in the future. Commented Sep 19, 2010 at 11:28
  • 15
    Generally, I prefer a clear command like \mathord over that effect of braces which a reader perhaps might not recognize. Though you're right, this effect should not be changed in the future since subformulas should remain ordinary symbols. I just don't rely on side effects. Commented Sep 19, 2010 at 20:54
6

It seems to me that what you really want is a multiplication sign that works in text mode. You can get this by writing $\times$ or, to answer your whole question 1024$\times$768.

By the way, nice question. This is a good example of where it makes sense not to use normal math typography.

1
  • 1
    This is easily the best answer. Screwing around with spacing in math mode is totally unnecessary if all you need is a symbol in your text. Commented Oct 30, 2016 at 3:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.