Ask Your Question

Revision history [back]

Is there a function to render latex or html in a notebook from a string ?

Some user-interface method are:

  1. set the "typeset" flag at the top of the notebook.
  2. Use %html or %latex in the beginning of a cell.
  3. Use "shift+click" to open a new "tinymce" cell (for both: latex and html and more)

or code can be called like:

  1. view(...some sage expression...): to produce rendered latex
  2. print '...some html...no latex....': renders html without latex

I'm looking for a "render" command like

render('< html > < b > Header < /b > < p >Some $ x ^ 2 $ formula< /p >< /html >')

for mix html and latex formulas. Maybe calling tinymce functionality from my code, but how ?

Header

Some $ x ^ 2 $ formula.

click to hide/show revision 2
retagged

Is there a function to render latex or html in a notebook from a string ?

Some user-interface method are:

  1. set the "typeset" flag at the top of the notebook.
  2. Use %html or %latex in the beginning of a cell.
  3. Use "shift+click" to open a new "tinymce" cell (for both: latex and html and more)

or code can be called like:

  1. view(...some sage expression...): to produce rendered latex
  2. print '...some html...no latex....': renders html without latex

I'm looking for a "render" command like

render('< html > < b > Header < /b > < p >Some $ x ^ 2 $ formula< /p >< /html >')

for mix html and latex formulas. Maybe calling tinymce functionality from my code, but how ?

Header

Some $ x ^ 2 $ formula.