5

I have a question similiar to the post: How to change default for spacing around binary relations?. In particular, I would like to make subscripts look less cramped. According to another post (Increase the space between operator in subscript/superscript), there doesn't appear to be a good way to do this. Currently, I do the following (more or less what the author in the second referenced post suggests).

\documentclass{article}
    \newcommand{\ts}[1]{\, #1 \,}

\begin{document}

\[
    \sum_{i \ts{=} 1}^{n} a_{i}
\]

\end{document}

However, the \ts command makes the LaTeX harder to read. Does anyone have any ideas about how to get the desired spacing while keeping the LaTeX simple? Ideally, I would just write the following:

\[
    \sum_{i=1}^{n} a_{i}
\]

but get some extra space around the equals sign in the subscript of the summation.

Stirling
  • 1,419
  • 1
    By design TeX doesn't add space around binary operation or relation symbols in subscripts and superscripts. Which is desirable, in my opinion, contrary to yours. – egreg Jul 03 '13 at 15:56
  • 2
    Well, perhaps my eyes will get used to the cramped style. I would probably consider this a design flaw, though: I think it would be better to have a variable to adjust the space around binary operations and relation symbols in subscripts and superscripts, even if the default value of the space is zero. – Stirling Jul 03 '13 at 16:00
  • Unfortunately this is how TeX was designed, so without a markup it's impossible (or at least quite difficult) to get the spacing you want. – egreg Jul 03 '13 at 16:02
  • Idea 1: Make the important symbols active and define them via \mathchoice to have additional space.

    Idea 2: Where is \scriptstyle defined, which is probably the root of the missing spacing.

    – Toscho Jul 03 '13 at 16:29
  • I think this is duplicated: http://tex.stackexchange.com/questions/108706/how-to-automatically-add-in-subscripts/108709#108709 – Marco Daniel Jul 03 '13 at 18:32
  • @MarcoDaniel It's not obvious (at least to me), how to use that answer to solve my problem. I want to add some space around all binary operations and relation symbols in subscripts and superscripts. Perhaps you could make an answer out of your technique... – Stirling Jul 04 '13 at 01:56

1 Answers1

6

I'm not convinced this is a good idea but you could do something like

enter image description here

\documentclass{article}
\usepackage{amsmath}
\renewcommand\sb[1]{_\text{$#1$}}

\begin{document}

\[
    \sum_{i = 1}^{n} a_{i}
\]
\[
    \sum\sb{i = 1}^{n} a_{i}
\]

\end{document}

Here I've redefined the standard command \sb which by default does the same as _, you could go further and redefine _ but history shows that if you do that usually you end up breaking something.

David Carlisle
  • 757,742