Skip to content

Commit

Permalink
Fixing latex rendering bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisonbg committed Aug 15, 2011
1 parent bee9c06 commit feaba3c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions IPython/frontend/html/notebook/static/js/codecell.js
Expand Up @@ -223,6 +223,10 @@ var IPython = (function (IPython) {

CodeCell.prototype.append_display_data = function (json) {
this.append_mime_type(json).addClass('output_area');
// If we just output latex, typeset it.
if (json.latex !== undefined) {
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
};
};


Expand All @@ -232,12 +236,6 @@ var IPython = (function (IPython) {
this.append_html(json.html, element);
} else if (json.latex !== undefined) {
this.append_latex(json.latex, element);
// If it is undefined, then we just appended to div.output, which
// makes the latex visible and we can typeset it. The typesetting
// has to be done after the latex is on the page.
if (element === undefined) {
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
};
} else if (json.svg !== undefined) {
this.append_svg(json.svg, element);
} else if (json.png !== undefined) {
Expand Down

0 comments on commit feaba3c

Please sign in to comment.