# Are there any reasons for converting subscriptbox to Tex with space?

*)


Of course, I can remove the space in via the option "BoxRules", and $\alpha _1$ can also rendered well in SE.

But many people would edit my $\alpha _1$ into $\alpha_1$, do you know whether there are any reasons for the default space generated by ExportString?

The same to other boxes.

The spaces in LaTeX export are harmless, but I think there is a valid reason to insert them after any control sequence such as \alpha: it is the easiest way to avoid creating undefined control sequences in situations where \alpha is followed by a variables name like b that is not itself a control sequence. Without spaces, this would be translated to \alphab which is obviously undefined.
This problem only arises at the end of control sequences, it's no problem when there are just a couple of variable names like a b. For them, it's permissible to leave out the space entirely and LaTeX will nevertheless treat each single letter as a separate variable. Therefore, ExportString[Subscript[a b, 1], "TeX"] doesn't insert any extra spaces after b. It only does it after symbols that translate to control sequences such as \alpha.
I'm by no means saying that Mathematica's space insertion trick is the prettiest way to export LaTeX, but it's an easy (or you might say lazy) solution.
• But is there a way to override this space insertion, say, when exporting text infoprmation into pdf? For example, I have a string $a_{min,obs}$, which renders as $a_{min~,obs}$, which doesn't look good. – Alexey Bobrick Jan 30 '15 at 19:25
• @AlexeyBobrick The correct way to enter textual subscripts would be to enclose them in quotation marks in the Mathematica expression. I.e., "min" etc. It gets translated to \text{min}, which is the right way to present multi-letter symbols in LaTeX (you should never simply write multi-letter names as plain characters in LaTeX because they're typeset as separate variables). – Jens Jan 30 '15 at 19:32
• I should have been a bit more specific here, but I actually intend to export directly from Mathematica into pdf, not into latex however. The problem, though, is very similar to the one above. If I write Subscript["a", "min,obs"] and export it into pdf as part of a table, I get a string, which has an extra space after $min$. – Alexey Bobrick Jan 30 '15 at 19:40