ch/graph-coloring/app.js
//check if colored properly and displays latex
check if colored properly and displays latex
check if colored properly and displays latex
function showGraphLatex () {
  var l = "";
  if(nodes.length==0)
    l = "\\[\\text{Desenhe algo.}\\]";
  else if(checkColoring())
    l = "\\[\\text{O grafo está devidamente colorido.}\\]";
  else
    l = "\\[\\text{Não está devidamente colorido. Cuidado com as arestas vermelhas!}\\]";
  document.getElementById("svg-output").textContent = l;
  MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
}
function showGraphLatex ( ) { var l = "" ; if ( nodes . length == 0 ) l = "\\[\\text{Desenhe algo.}\\]" ; else if ( checkColoring ( ) ) l = "\\[\\text{O grafo está devidamente colorido.}\\]"; else l = "\\[\\text{Não está devidamente colorido. Cuidado com as arestas vermelhas!}\\]"; document . getElementById ( "svg-output" ) . textContent = l ; MathJax . Hub . Queue ( [ "Typeset" , MathJax . Hub ] ) ; }
check if colored properly and displays latex
check if colored properly and displays latex
//recall mathjax