Index: docs/sphinx-docs/build_sphinx.py
===================================================================
--- docs/sphinx-docs/build_sphinx.py	(revision 31943715d145c5ad0cc2df2ac75442591490886e)
+++ docs/sphinx-docs/build_sphinx.py	(revision f477159602807c5dfc0a1ec9bd2b3f438185ddc3)
@@ -324,4 +324,80 @@
         print("!!!!NO MODEL DOCS WILL BE BUILT!!!!")
 
+def retrieve_bumps_docs():
+    """
+    Copies select files from the bumps documentation into fitting perspective
+    """
+    if os.path.exists(BUMPS_DOCS):
+        print("=== Retrieve BUMPS Docs ===")
+        filenames = [os.path.join(BUMPS_DOCS, "optimizer.rst")]
+        filenames += glob(os.path.join(BUMPS_DOCS, "dream-*.png"))
+        filenames += glob(os.path.join(BUMPS_DOCS, "fit-*.png"))
+        for f in filenames:
+            print("Copying file", f)
+            shutil.copy(f, BUMPS_TARGET)
+    else:
+        print("""
+======= Error =======
+missing directory %s
+The documentation will not include the optimizer selection section.
+Checkout the bumps source tree and rebuild the docs.
+""" % BUMPS_DOCS)
+
+def apidoc():
+    """
+    Runs sphinx-apidoc to generate .rst files from the docstrings in .py files
+    in the SasView build directory.
+    """
+    print("=== Generate API Rest Files ===")
+
+    # Clean directory before generating a new version.
+    _remove_dir(SPHINX_SOURCE_API)
+
+    subprocess.call(["sphinx-apidoc",
+                     "-o", SPHINX_SOURCE_API, # Output dir.
+                     "-d", "8", # Max depth of TOC.
+                     SASVIEW_BUILD])
+
+def build_pdf():
+    """
+    Runs sphinx-build for pdf.  Reads in all .rst files and spits out the final html.
+    """
+    print("=== Build PDF Docs from ReST Files ===")
+    subprocess.call(["sphinx-build",
+                     "-b", "latex", # Builder name. TODO: accept as arg to setup.py.
+                     "-d", os.path.join(SPHINX_BUILD, "doctrees"),
+                     SPHINX_SOURCE,
+                     os.path.join(SPHINX_BUILD, "latex")])
+
+    LATEXDIR = os.path.join(SPHINX_BUILD, "latex")
+    def pdflatex():
+        subprocess.call(["pdflatex", "Sasview.tex"], cwd=LATEXDIR)
+    pdflatex()
+    pdflatex()
+    pdflatex()
+    subprocess.call(["makeindex", "-s", "python.ist", "Sasview.idx"], cwd=LATEXDIR)
+    pdflatex()
+    pdflatex()
+
+    print("=== Copy PDF to HTML Directory ===")
+    source = os.path.join(LATEXDIR, "Sasview.pdf")
+    target = os.path.join(SASVIEW_DOCS, "Sasview.pdf")
+    shutil.copyfile(source, target)
+
+def build():
+    """
+    Runs sphinx-build.  Reads in all .rst files and spits out the final html.
+    """
+    print("=== Build HTML Docs from ReST Files ===")
+    subprocess.call(["sphinx-build",
+                     "-b", "html", # Builder name. TODO: accept as arg to setup.py.
+                     "-d", os.path.join(SPHINX_BUILD, "doctrees"),
+                     SPHINX_SOURCE,
+                     os.path.join(SPHINX_BUILD, "html")])
+
+    print("=== Copy HTML Docs to Build Directory ===")
+    html = os.path.join(SPHINX_BUILD, "html")
+    copy_tree(html, SASVIEW_DOCS)
+
 def fetch_katex(version, destination="_static"):
     from zipfile import ZipFile
@@ -339,83 +415,15 @@
         zip.extractall(destination)
 
-def retrieve_bumps_docs():
-    """
-    Copies select files from the bumps documentation into fitting perspective
-    """
-    if os.path.exists(BUMPS_DOCS):
-        print("=== Retrieve BUMPS Docs ===")
-        filenames = [os.path.join(BUMPS_DOCS, "optimizer.rst")]
-        filenames += glob(os.path.join(BUMPS_DOCS, "dream-*.png"))
-        filenames += glob(os.path.join(BUMPS_DOCS, "fit-*.png"))
-        for f in filenames:
-            print("Copying file", f)
-            shutil.copy(f, BUMPS_TARGET)
-    else:
-        print("""
-======= Error =======
-missing directory %s
-The documentation will not include the optimizer selection section.
-Checkout the bumps source tree and rebuild the docs.
-""" % BUMPS_DOCS)
-
-def apidoc():
-    """
-    Runs sphinx-apidoc to generate .rst files from the docstrings in .py files
-    in the SasView build directory.
-    """
-    print("=== Generate API Rest Files ===")
-
-    # Clean directory before generating a new version.
-    _remove_dir(SPHINX_SOURCE_API)
-
-    subprocess.call(["sphinx-apidoc",
-                     "-o", SPHINX_SOURCE_API, # Output dir.
-                     "-d", "8", # Max depth of TOC.
-                     SASVIEW_BUILD])
-
-def build_pdf():
-    """
-    Runs sphinx-build for pdf.  Reads in all .rst files and spits out the final html.
-    """
-    print("=== Build PDF Docs from ReST Files ===")
-    subprocess.call(["sphinx-build",
-                     "-b", "latex", # Builder name. TODO: accept as arg to setup.py.
-                     "-d", os.path.join(SPHINX_BUILD, "doctrees"),
-                     SPHINX_SOURCE,
-                     os.path.join(SPHINX_BUILD, "latex")])
-
-    LATEXDIR = os.path.join(SPHINX_BUILD, "latex")
-    def pdflatex():
-        subprocess.call(["pdflatex", "Sasview.tex"], cwd=LATEXDIR)
-    pdflatex()
-    pdflatex()
-    pdflatex()
-    subprocess.call(["makeindex", "-s", "python.ist", "Sasview.idx"], cwd=LATEXDIR)
-    pdflatex()
-    pdflatex()
-
-    print("=== Copy PDF to HTML Directory ===")
-    source = os.path.join(LATEXDIR, "Sasview.pdf")
-    target = os.path.join(SASVIEW_DOCS, "Sasview.pdf")
-    shutil.copyfile(source, target)
-
-def build():
-    """
-    Runs sphinx-build.  Reads in all .rst files and spits out the final html.
-    """
-    print("=== Build HTML Docs from ReST Files ===")
-    subprocess.call(["sphinx-build",
-                     "-b", "html", # Builder name. TODO: accept as arg to setup.py.
-                     "-d", os.path.join(SPHINX_BUILD, "doctrees"),
-                     SPHINX_SOURCE,
-                     os.path.join(SPHINX_BUILD, "html")])
-
-    print("=== Copy HTML Docs to Build Directory ===")
-    html = os.path.join(SPHINX_BUILD, "html")
-    copy_tree(html, SASVIEW_DOCS)
-
 def convert_katex():
     print("=== Preprocess HTML, converting latex to html ===")
     subprocess.call(["node", "convertKaTex.js", SASVIEW_DOCS])
+
+def convert_mathjax():
+    print("=== Preprocess HTML, converting latex to html ===")
+    subprocess.call(["node", "convertMathJax.js", SASVIEW_DOCS])
+
+def fetch_mathjax():
+    subprocess.call(["npm", "install", "mathjax-node-page"])
+    # TODO: copy fonts from node_modules/mathjax/fonts/HTML-CSS/Tex into static
 
 def rebuild():
@@ -424,9 +432,11 @@
     retrieve_user_docs()
     retrieve_bumps_docs()
-    fetch_katex(version=KATEX_VERSION, destination=KATEX_PARENT)
+    #fetch_katex(version=KATEX_VERSION, destination=KATEX_PARENT)
+    #fetch_mathjax()
     apidoc()
     build()
     #build_pdf()
     #convert_katex()
+    #convert_mathjax()
 
     print("=== Done ===")
Index: docs/sphinx-docs/source/_extensions/mathjax.py
===================================================================
--- docs/sphinx-docs/source/_extensions/mathjax.py	(revision afca48850c5f8018d72eb8d0b9c040637c7eb3bf)
+++ docs/sphinx-docs/source/_extensions/mathjax.py	(revision f477159602807c5dfc0a1ec9bd2b3f438185ddc3)
@@ -105,6 +105,8 @@
     # http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn
     app.add_config_value('mathjax_path',
-                         'https://cdn.mathjax.org/mathjax/latest/MathJax.js?'
-                         'config=TeX-AMS-MML_HTMLorMML', False)
+                         'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?'
+                         'config=TeX-MML-AM_CHTML',
+                         #'config=TeX-AMS-MML_HTMLorMML',
+                         False)
     app.add_config_value('mathjax_css', None, 'html')
     app.add_config_value('mathjax_use_katex', False, 'html')
Index: docs/sphinx-docs/source/conf.py
===================================================================
--- docs/sphinx-docs/source/conf.py	(revision 28c4a3d988315381236573e496a71f02d1fd6a84)
+++ docs/sphinx-docs/source/conf.py	(revision f477159602807c5dfc0a1ec9bd2b3f438185ddc3)
@@ -35,8 +35,15 @@
               'sphinx.ext.todo',
               'sphinx.ext.coverage',
-              'mathjax',
+              'sphinx.ext.mathjax',
+              #'mathjax',  # replacement mathjax that allows a list of paths
               'dollarmath',
               'sphinx.ext.viewcode']
 
+mathjax_path = (
+    'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?'
+    'config=TeX-MML-AM_CHTML')
+
+# For katex uncomment the following
+"""
 #STATIC_PATH = '../../_static/'
 STATIC_PATH = ''
@@ -47,4 +54,5 @@
 ]
 mathjax_css = STATIC_PATH + 'katex/katex.min.css'
+"""
 
 
@@ -211,14 +219,15 @@
 # -- Options for LaTeX output --------------------------------------------------
 
+# TODO: seems like angstroms is defined twice.
 LATEX_PREAMBLE=r"""
+\usepackage[utf8]{inputenc}      % Allow unicode symbols in text
+\usepackage{underscore}          % Allow underscore outside math mode
+\usepackage[T1]{fontenc}         % Use underscore character from font
+\newcommand{\lt}{<}              % HTML needs \lt rather than <
+\newcommand{\gt}{>}              % HTML needs \gt rather than >
 \renewcommand{\AA}{\text{\r{A}}} % Allow \AA in math mode
-\usepackage[utf8]{inputenc}      % Allow unicode symbols in text
-\usepackage[T1]{fontenc}      % Taking care of underscores
-\catcode`\_=12                % Moving underscore to category 12
-\newcommand{\lt}{<}           %lower than symbol handling
-\newcommand{\gt}{>}           %greater than symbol handling
+\DeclareUnicodeCharacter {212B} {\AA}                  % Angstrom
 \DeclareUnicodeCharacter {00B7} {\ensuremath{\cdot}}   % cdot
 \DeclareUnicodeCharacter {00B0} {\ensuremath{^\circ}}  % degrees
-\DeclareUnicodeCharacter {212B} {\AA}                  % Angstrom
 """
 latex_elements = {
