> function writemime(stream, ::MIME"text/latex", x::Revealable)
> if x.show
> display(x.content)
> else
> display("")
> end
> end
>
>
This is wrong. writemime should not call display. It should just write
the LaTeX form of x to the (text) stream using print or write. (You have
it backwards: display calls writemime.)
With regards to your other equation; for mixing equations and formatted
text, the latest IJulia master [Pkg.checkout("IJulia")] can display
text/markdown directly, including equations, e.g.:
display("text/markdown", "This is an *awesome* equation: \$e^u
\\frac{du}{dx} e^x dx\$.")
So, in an @manipulate loop, you just need to return an object that knows
how to display itself as text/markdown (i.e. that has a writemime method to
output text/markdown text to an I/O stream).