I'm getting odd spacing/indentation behavior when the \textcolor command is combined with the \[ ... \] environment. I did find a fix by putting % in a couple places, as outlined below, but I'd like to know if anyone has a better solution. The picture below, followed by a MWE, explains the problem in more detail.
Output:

Code:
\documentclass[a4paper,11pt]{article} \usepackage{amsmath, amsfonts, amssymb, parskip, dsfont, amsthm, wasysym, mathrsfs} \usepackage{graphicx} \usepackage[usenames, dvipsnames]{xcolor} \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry} \usepackage{mathrsfs} \usepackage[normalem]{ulem} \usepackage[breaklinks=true]{hyperref} \usepackage{soul, color} % for highlighting \usepackage{pifont} % for cool symbols in text mode \begin{document} \textbf{No problems with spacing or indents when I don't use the \textbackslash[ ... \textbackslash] environment.} \textcolor{NavyBlue}{Insert problem description here.} Insert problem solution here. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \textbf{When I use the \textbackslash[ ... \textbackslash] environment, it puts a large space after the \textbackslash textcolor section.} Insert problem solution here. %% this line should have been removed \textcolor{NavyBlue}{Insert problem description here. Along with some math: \[ 1 \neq 0 \]} Insert problem solution here. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \textbf{I can sort of fix the problem by eliminating the space between the problem statement and the solution statement, but then there is an ugly little indent.} \textcolor{NavyBlue}{Insert problem description here. Along with some math: \[ 1 \neq 0 \]} Insert problem solution here. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \textbf{Finally, I realized that I could ``fix'' the problem by putting a comment character at the end of the line and between the lines.} \textcolor{NavyBlue}{Insert problem description here. Along with some math: \[ 1 \neq 0 \]}% % Insert problem solution here. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% \textbf{But this seems incredibly hacky, and I'm hoping someone can point me to a more elegant fix.} \end{document} EDIT: So after using your suggestions (Johannes), it no longer has the indent, but it that space is still there. Here's what I'm talking about:
Code:

Output:

EDIT #2: It's a very minor difference, but I'm seeing a larger gap between the math and the text than between the text and the text:

Here's the relevant code:
\textbf{4.} \hspace{5 pt} \begin{specialmathtwo} Blah blah blah blah blah blah blah blah blah blah Turing machine blah blah such that \[L \subseteq \{ M \mid \text{$M$ is a Turing machine that blah blah blah} \}.\] \end{specialmathtwo} Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah BLAH blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah. and
\newenvironment{specialmathtwo}{ \color{NavyBlue} }{% \par %Maybe you want to finish all of them off with a paragraph }