1

Inside an algorithm environment, I am getting an extra space before and after = sign. Is there any solution to reduce it?

\STATE e\_dist \hspace{-0.52cm}=\hspace{-0.5cm} 
 euclidean\_distance(($QT$[ni][nj],$QT$[ni+$k_{3}$][nj+$k_{4}$]),
($CT$[mi][mj], $CT$[mi+$k_{3}$][mj+$k_{4}$]))

enter image description here

closed as off-topic by user36296, Stefan Pinnow, egreg, CarLaTeX, Martin Schröder Feb 22 '17 at 12:28

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    The line is too long and it is split; the only place with flexible space is around the equals sign. So no negative space will do. Just add \\ after the comma. – egreg Jan 28 '17 at 11:51