User:Nageh/mathJax.js

In this article, we will explore everything related to User:Nageh/mathJax.js, from its origin to its influence on today's society. User:Nageh/mathJax.js has been a recurring theme throughout history, its impacts have been widely studied and debated in various areas. From its origins to the present, User:Nageh/mathJax.js has generated conflicting opinions and has raised countless questions about its relevance and role in our society. Throughout this article, we will delve into a deep analysis of User:Nageh/mathJax.js and its influence on different aspects of daily life, highlighting its importance today and its projection into the future.
if ( typeof(mathJax) === "undefined" ) mathJax = {};

mathJax.version = "0.2.3";

mathJax.loaded = false;

mathJax.Config = function() {
  MathJax.Hub.Config({
    root: "//en.wikipedia.org/w/index.php?action=raw&maxage=86400&ctype=text/javascript&title=User:Nageh/mathJax",
    config: "TeX-AMS-texvc_HTML.js",
    "v1.0-compatible": false,
    displayAlign: "left",
    menuSettings: { zoom: "Click" },
    "HTML-CSS": { imageFont: null, preferredFont: , mtextFontInherit: true, styles: { ".MathJax_Display": { margin: "0.8em 0em" } } },
    NativeMML: { styles: { "DIV.MathJax_MathML": { margin: "0.3em 0em" } } },
    styles: { "mtext": { "font-family": "sans-serif ! important", "font-size": "80%" } }
  });
  if ( typeof(mathJax.fontDir) !== "undefined" ) MathJax.OutputJax.fontDir = mathJax.fontDir; else MathJax.Hub.Config({ NativeMML: {webFont: null} });
  MathJax.OutputJax.imageDir = typeof(mathJax.imageDir) !== "undefined" ? mathJax.imageDir : mathJax.fontDir.substr(0, mathJax.fontDir.length-5) + "images";
  if ( typeof(mathJax.fontVariant) !== "undefined" ) MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready", function() {
    var VARIANT = MathJax.OutputJax.FONTDATA.VARIANT;
    VARIANT.fonts.unshift(mathJax.fontVariant);
    VARIANT.fonts.unshift(mathJax.fontVariant+"-bold");
    VARIANT.fonts.unshift(mathJax.fontVariant+"-italic");
    VARIANT.fonts.unshift(mathJax.fontVariant+"-italic");
  });
  MathJax.Hub.Register.LoadHook("/jax/output/HTML-CSS/fonts/STIX/fontdata.js", function() {
    var DELIMITERS = MathJax.OutputJax.FONTDATA.DELIMITERS;
    DELIMITERS.stretch.ext = .081;
    DELIMITERS.stretch.ext = .081;
    DELIMITERS.stretch.ext = .081;
  });
  MathJax.Message.styles.right = MathJax.Message.styles.left;
  delete MathJax.Message.styles.left;
  if ( typeof(mathJax.userConfig) !== "undefined" ) MathJax.Hub.Config( mathJax.userConfig );
  MathJax.Hub.Startup.onload();
}

mathJax.Load = function(element) {
  if (this.loaded)
    return true;

  var span = element.getElementsByTagName("span"), i;
  for (i = span.length-1; i >= 0; i--) {
    if ((' ' + span.className + ' ').indexOf(" tex ") >= 0) {
//      this.span = span;
//      this.spanIndex = i;

      // create configuration element
      var config = 'mathJax.Config();';
      var script = document.createElement( 'script' );
      script.setAttribute( 'type', 'text/x-mathjax-config' );
      if ( window.opera ) script.innerHTML = config; else script.text = config;
      document.getElementsByTagName('head').appendChild( script );

      // create startup element
      script = document.createElement( 'script' );
      script.setAttribute( 'src', '//en.wikipedia.org/w/index.php?action=raw&maxage=86400&ctype=text/javascript&title=User:Nageh/mathJax/MathJax.js' );
      script.setAttribute( 'type', 'text/javascript' );
      document.getElementsByTagName('head').appendChild( script );

      this.loaded = true;
      break;
    }
  }
  return false;
}

mathJax.Init = function() {
  this.Load( document.getElementById("bodyContent") || document.body );

  // compatibility with wikEd
  if ( typeof(wikEd) == "undefined" ) { wikEd = {}; }
  if ( typeof(wikEd.config) == "undefined" ) { wikEd.config = {}; }
  if ( typeof(wikEd.config.previewHook) == "undefined" ) { wikEd.config.previewHook = ; }
  wikEd.config.previewHook.push( function(){ if (window.mathJax.Load(document.getElementById("wikEdPreviewBox") || document.body)) MathJax.Hub.Queue() } );

  // compatibility with ajaxPreview
  this.oldAjaxPreviewExec = window.ajaxPreviewExec;
  window.ajaxPreviewExec = function(previewArea) {
    if ( typeof(mathJax.oldAjaxPreviewExec) !== "undefined" ) mathJax.oldAjaxPreviewExec(previewArea);
    if ( mathJax.Load(previewArea) ) MathJax.Hub.Queue(  );
  }
}

mathJax.Init();