cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <h1>Loading the latest release from cdnjs (and others)</h1>

<p>The MathJax CDN provides a "latest" URL which gets updated with each release. While it's not good practice to do so, many community members have grown accustomed to it.
</p>
<p>CDNJS does not provide such a URL. However, it provides an API to check which is the latest version that's hosted on CDNJS. So you can easily build a script to load the latest version from cdnjs. </p>

<p>Some math:  $$f:X \to Y $$ 
</p>

<p>Similarly, you could combine <code>https://api.github.com/repos/mathjax/mathjax/releases/latest</code> with <a href="https://rawgit.com">cdn.rawgit.com</a> or <code>https://api.jsdelivr.com/v1/jsdelivr/libraries?name=mathjax&lastversion=*</code> with <a href="https://jsdelivr.com">jsdelivr.com</a></p>
            
          
!
            
              // helper: insert MathJax script tage using CDNJS and 
var insertMathJax = function(version) {
  var script = document.createElement('script');
  script.type = 'text/javascript';
  script.async = true;
  script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/' + version + '/MathJax.js?config=TeX-AMS_CHTML-full';
  document.getElementsByTagName('head')[0].appendChild(script);
}

// Look up latest version on CDNJS and insertMathJax
// NOTE you probably want to store the result as a cookie or via localStorage
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
  if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
    insertMathJax(JSON.parse(xmlHttp.responseText).version);
}
xmlHttp.open('GET', 'https://api.cdnjs.com/libraries/mathjax?fields=version', true); 
xmlHttp.send(null);


            
          
!
999px
Loading ..................

Console