2

Does anyone know why in the equation produced by the following code, the plus signs at the end of the first and second lines have less space on their left sides compared to the other plus signs? and how I can fix that without manually entering additional space there?

\documentclass[11pt,onecolumn]{article}
\usepackage{mathtools}

\begin{document}
\begin{equation}
\begin{split}
\Phi_i=&K_{i_1}\,_{ }^{C_j}\textrm{X}^2 + K_{i_2}\,_{ }^{C_j}\textrm{Y}^2 + K_{i_3}\,_{ }^{C_j}\textrm{Z}^2 + \\
           &K_{i_4}\,_{ }^{C_j}\textrm{X}\,_{ }^{C_j}\textrm{Y} + K_{i_5}\,_{ }^{C_j}\textrm{X}\,_{ }^{C_j}\textrm{Z} + K_{i_6}\,_{ }^{C_j}\textrm{Y}\,_{ }^{C_j}\textrm{Z} + \\
           &K_{i_7}\,_{ }^{C_j}\textrm{X} + K_{i_8}\,_{ }^{C_j}\textrm{Y} + K_{i_9}\,_{ }^{C_j}\textrm{Z}+K_{i_{10}}=0
\end{split}  \hspace{.6cm} i=1,2 \quad j=
\begin{cases} 1 &\mbox{if } i=2 \\
2 & \mbox{if } i=1. \end{cases}
\end{equation}
\end{document} 

enter image description here

NESHOM
  • 697

1 Answers1

3

a + not in infix position reverts to \mathord so does not get the \mathbin space, use {}:

\documentclass[11pt,onecolumn]{article}
\usepackage{mathtools}

\begin{document}
\begin{equation}
\begin{split}
\Phi_i=&K_{i_1}\,_{ }^{C_j}\textrm{X}^2 + K_{i_2}\,_{ }^{C_j}\textrm{Y}^2 + K_{i_3}\,_{ }^{C_j}\textrm{Z}^2 + {}\\
           &K_{i_4}\,_{ }^{C_j}\textrm{X}\,_{ }^{C_j}\textrm{Y} + K_{i_5}\,_{ }^{C_j}\textrm{X}\,_{ }^{C_j}\textrm{Z} + K_{i_6}\,_{ }^{C_j}\textrm{Y}\,_{ }^{C_j}\textrm{Z} + {}\\
           &K_{i_7}\,_{ }^{C_j}\textrm{X} + K_{i_8}\,_{ }^{C_j}\textrm{Y} + K_{i_9}\,_{ }^{C_j}\textrm{Z}+K_{i_{10}}=0
\end{split}  \hspace{.6cm} i=1,2 \quad j=
\begin{cases} 1 &\mbox{if } i=2 \\
2 & \mbox{if } i=1. \end{cases}
\end{equation}
\end{document} 
David Carlisle
  • 757,742
  • thank you very much for your answer. could you please briefly explain \mathord and \mathbin? – NESHOM Jan 29 '15 at 20:58
  • 1
    @NESHOM tex assigns a class to every character so they get appropriate space, normal letters are "ordinary" (\mathord) so get no extra space, things like = are classed as relations (mathrel) and things like + are classed as binary operators \mathbin tex then has a table that specifies what space is inserted between atoms of each class. But mathbin and mathrel only get extra space if they are between things so that for example $1-2$ gets wide infix space but $-2$ the - is no longer infix and is closer to the 2 – David Carlisle Jan 29 '15 at 21:03
  • 1