 
 # Install a debounce around typesetting function so that it will only run once
 # every 10ms even if called multiple calls times in that period
-TypesetDocument = _.debounce( TypesetDocument, 10)
+typesetDocument = _.debounce( typesetDocument, 10)
 
 
 typesetMath = (root) ->



# Typesets the entire document
TypesetDocument = ->

  nodes = document.querySelectorAll(MATH_SELECTOR)
  return if _.isEmpty(nodes)

  # render MathML with MathJax
  window.MathJax.Hub.Queue(['Typeset', MathJax.Hub, root]) if hasMath

  typesetDocument()



