title: sympy printed output: color a subexpression?
body: <p>I understanding that sympy can output maths suitable for rendering: <a href="http://docs.sympy.org/latest/modules/printing.html" rel="nofollow noreferrer">http://docs.sympy.org/latest/modules/printing.html</a></p>
  
  <p>I want to tweak this slightly: I want to change the color of a subexpression within a sympy expression, e.g. so certain symbols are red.</p>
  
  <p>For a concrete example:</p>
  
  <pre><code>red_parts = sympy.var('x') ** 2 + sympy.var('y')
  other_parts = sympy.var('x')
  mathml(make_red(red_parts) + other_parts)) 
  </code></pre>
  
  <p>Is this in any way achievable?</p>
  
  <p>I know that presentation mathml supports css... but sympy seems to output content-mathml which browsers don't seem to render at all well. Though I found some <a href="https://www.w3.org/Math/XSL/Overview-tech.html" rel="nofollow noreferrer">xsl stylesheets that do</a>. I don't know if the latex output has a concept of color.</p>
  
  <h1>A little context</h1>
  
  <p>I want to play games with previewing and highlight sections of sympy expressions as I type.</p>