# non-kludgey left subscripts

I was taught to make a left subscript as a right subscript to {}. For example, I would use

f: {}_RA \rightarrow {}_RB


to typeset this:

f: _RA \rightarrow _RB


the left subscripts end up in the wrong place (because LaTeX thinks they are right subscripts of the object before):

However, this trick doesn't work well with operators like /otimes. The code

A {}_\varphi\otimes_\psi B


puts too much spaace between the tensor product symbol and the subscript:

One solution I've found is to use spaces (including a negative thin space) to adjust the spacing. The code

A \; {}_\varphi \! \otimes_\psi B


produces this:

However, this is a kludge and doesn't communicate to LaTeX that \varphi should be attached to the \otimes. Also, the left subscript is still just a tad too far to the left. Does anyone know a more elegant solution to this?

• There's the \sideset command for large operator symbols (like \sum), but it is specifically described as "unreliable" for ordinary symbols like \otimes. Jul 28 '10 at 17:05
• Not directly relevant, but how do you get the underscores into the TeX snippets? The MO workaround of backquoting the snippet doesn't seem to work. Jul 28 '10 at 21:59
• @András Salamon: In "code mode" — not backquotes, but on a separate line starting with at least 4 spaces (or hit the "1001" button in the toolbar) — everything is printed exactly as you type. Jul 29 '10 at 4:29

Try the tensor package. You can just issue

$A \tensor[_\varphi]{\otimes}{_\psi} B$


to get what you specified as an example. Note that if you have mixed upper and lower indices, the standard \tensor command will leave "phantom" spaces. To make all indices flush against the central symbol, use \tensor*.

• (Oops; that comment was meant to be left on your comment to my variant on this question!) Jul 27 '10 at 21:03

The problem here is the special treatment of \otimes as a relational symbol, which adds space on either side of the symbol. Put it in braces to suppress this behaviour:

A {}_\varphi{\otimes}_\psi B

The accepted answer, using tensor, does this implicitly.

For best spacing one should declare the decorated operation as a new mathematical symbol. Instead of \mathop (suggested by François G. Dorais) which is used for large operators like \prod and \sum, \mathbin as used for \otimes, + and \cap might be suitable:

A \mathbin{{}_\varphi{\otimes}_\psi} B

• Wrapping it all with \mathop produces the right spacing before and after the subscripts. Jul 28 '10 at 22:34

I think there are a few packages that support this, such as leftidx and mathtools.

• The second link doesn't work =(
– Dima
Jul 27 '10 at 14:25
• leftidx works by putting a vphantom of the main glyph before the left super/subscript. So it won't get the horizontal spacing right (note: I'm saying that without actually testing it). Jul 27 '10 at 14:31
• leftidx doesn't look like it addresses the spacing issue. Jul 27 '10 at 14:39