Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I was wanting to know how is it possible to create a math symbol in color to position correctly. I have used the following but the top limit does not center properly. Sorry for the verbage as I don't know how to word the question precise and clearly. Here is a mwe of the problem:

\documentclass[11pt]{article}
\usepackage{color}

\begin{document}

\[ \sum_{\color{red} m=0}^{\color{red}{\infty}}  \]

\end{document}

Which produces the following below:

enter image description here

share|improve this question
add comment

1 Answer 1

up vote 9 down vote accepted

Use \textcolor instead, such as

\[ \sum_{\textcolor{red}{m=0}}^{\textcolor{red}{\infty}}  \]

color in math example

\color is a switch / declaration, it requires grouping to limit its effect such as by additional curly braces. \textcolor affects just its argument and works for math as well.

share|improve this answer
    
Thanks. Seems like I did that but not for both. I thought since color worked for the lower limit I could leave that alone and alter the top limit by doing this. \[ \sum_{\color{red}{m=0}^{\textcolor{red}{\infty}} \]. But I see now that does not work :) Thanks for the quick response. –  night owl Aug 10 '11 at 10:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.