           </script>
           <script type=\"text/javascript\" async src=\"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML\"></script>
           "
+      else if mathRenderingOption == 'KaTeX'
+        if offline
+          mathStyle = "<link rel=\"stylesheet\"
+                href=\"file:///#{path.resolve(__dirname, '../node_modules/katex/dist/katex.min.css')}\">"
+        else
+          mathStyle = "<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css\">"
       else
         mathStyle = ''
 

    html += "<script data-js-code>#{jsCode}</script>" if jsCode
    return html

  ##
  # {Function} callback (htmlContent)
  getHTMLContent: ({isForPrint, offline, useRelativeImagePath, phantomjsType, isForPrince, embedLocalImages}, callback)->


      # replace code chunks inside htmlContent
      htmlContent = @insertCodeChunksResult htmlContent
      htmlContent = @fixPandocMathExpression htmlContent

      if mathRenderingOption == 'MathJax' or @usePandocParser
        inline = atom.config.get('markdown-preview-enhanced.indicatorForMathRenderingInline')
        block = atom.config.get('markdown-preview-enhanced.indicatorForMathRenderingBlock')
        mathJaxProcessEnvironments = atom.config.get('markdown-preview-enhanced.mathJaxProcessEnvironments')
