 #= require almond_wrapper
 #= require lib
 #= require jquery
+#= require widgets/mathml
 
-ttm.define 'widgets/ui_elements', ['lib/class_mixer'], (class_mixer)->
+ttm.define 'widgets/ui_elements', ['lib/class_mixer', 'widgets/mathml'], (class_mixer, mathml_renderer)->
   class Button
     initialize: (@opts={})->
     render: (opts={})->

      """

    update: (mathml)->
      mathml_in_tag = @wrappedMathTag(mathml)
      elem = MathJax.Hub.getAllJax(@figure[0])[0]
      if elem
        MathJax.Hub.Queue(["Text", elem, mathml_in_tag])

  class_mixer(MathMLDisplay)


      opts.element.append @figure
      @figure

    wrappedMathTag: (content)->
      """
      <math xmlns=\"http://www.w3.org/1998/Math/MathML\">
