Skip to main content
4 of 5
added 245 characters in body
Johannes_B
  • 24.8k
  • 10
  • 100
  • 255

Better not to use \textcolor along with maths over multiple line. You can use \color{<colorname>} instead, and limit the scope by grouping. To be honest, \textcolor does grouping as well, but starts \leavevmode to get to horizontal mode, which makes a little mess for your example.

You can also define a new environment for the colors. That keeps the advantage of having everything in more semantic way. Meaning: What is shown, not how it is shown.

The extra amount of white space is caused by parskip. Parskips are ugly anyways.
The little indentation you noticed is caused by a space, that came from the \textcolor-grouping. \endgroup is hiding that space. Thanks @DavidCarlisle.

\documentclass[a4 paper,11pt]{article} \usepackage{ parskip } \usepackage{ blindtext } \usepackage[usenames, dvipsnames]{xcolor} \usepackage{showframe} \newenvironment{specialmath}{ \color{NavyBlue} }{% \par %Maybe you want to finish all of them off with a paragraph } \begin{document} \blindtext \begingroup \color{NavyBlue} Insert problem description here. Along with some math: Insert problem description here. Along with some math: Insert problem description here. Along with some math: \[ 1 \neq 0 \] \endgroup \blindtext \begin{specialmath} \[ \sum \int \sin 0 = a \] A little descriptive text \end{specialmath} \blindtext \end{document} 

That is giving me this output:

Output of the example

Johannes_B
  • 24.8k
  • 10
  • 100
  • 255