var AnnotationView = require('../annotation').View;

var InlineFormulaView = function(node, viewFactory) {
  AnnotationView.call(this, node, viewFactory);
};

InlineFormulaView.Prototype = function() {

  this.createElement = function() {
    return document.createElement('span');
  };

  this.render = function() {
    var formula = this.node.document.get(this.node.target);
    var formulaView = this.viewFactory.createView(formula);
    this.el.innerHTML = formulaView.render().el.innerHTML;
    return this;
  };

};
InlineFormulaView.Prototype.prototype = AnnotationView.prototype;
InlineFormulaView.prototype = new InlineFormulaView.Prototype();

module.exports = InlineFormulaView;

var AnnotationView = require('../annotation').View;
var FormulaView = require('../formula').View;

var InlineFormulaView = function(node, viewFactory) {
  AnnotationView.call(this, node, viewFactory);
};

InlineFormulaView.Prototype = function() {

  this.createElement = function() {
    return document.createElement('span');
  };

  this.render = function() {
    var formula = this.node.document.get(this.node.target);
    var formulaView = new FormulaView(formula, this.viewFactory);
    this.el.innerHTML = formulaView.render().el.innerHTML;
    return this;
  };

};
InlineFormulaView.Prototype.prototype = AnnotationView.prototype;
InlineFormulaView.prototype = new InlineFormulaView.Prototype();

module.exports = InlineFormulaView;

--- 
+++ 
@@ -1,5 +1,4 @@
 var AnnotationView = require('../annotation').View;
-var FormulaView = require('../formula').View;
 
 var InlineFormulaView = function(node, viewFactory) {
   AnnotationView.call(this, node, viewFactory);
@@ -13,7 +12,7 @@
 
   this.render = function() {
     var formula = this.node.document.get(this.node.target);
-    var formulaView = new FormulaView(formula, this.viewFactory);
+    var formulaView = this.viewFactory.createView(formula);
     this.el.innerHTML = formulaView.render().el.innerHTML;
     return this;
   };
Use view factory to spawn formula view.
