Imath mode in Emacs
This picture shows the use of Emacs with Imath mode. Some of the formulas are written in Maxima commands. In particular, the solution of the equation is written using the Maxima command solve(). The following text is used to embed the Maxima command for solving the equation:
{maxima solve(x^2=x+n, x) maxima}.
The command is sent to Maxima and processed, then the solutions are obtained as a list of two answers. The command second() is used to select the correct answer. The following text is used to choose the latter answer: {maxima second(solve(x^2=x+n, x)) maxima}.
Other formulas are written using LaTeX commands.
{latex \sqrt{\, n + \sqrt{n + \sqrt{n + \cdots}}} latex} and {latex n \in N latex} are used in the question sentence, for examples.
Imath Examples
Formula with Japanese text
The following picture shows you the embedding of math formula into Japanese text. The text is a proof of the equality of gamma function with factorial when n is over the natural numbers.

.