From fa2b09b314575a043424858c0af895516d5902bc Mon Sep 17 00:00:00 2001 From: pkra Date: Mon, 24 Sep 2012 10:59:35 -0700 Subject: [PATCH 01/19] fix github link to point to correct branch --- CSS-styles.rst | 24 +- HTML-snippets.rst | 2 +- _static/mathjax_mathml.user.js | 18 +- _static/mathjax_wikipedia.user.js | 27 +- _templates/sourcelink.html | 2 +- _themes/sphinx-bootstrap/layout.html | 2 + api/ajax.rst | 30 +- api/callback.rst | 97 +- api/elementjax.rst | 45 +- api/html.rst | 28 +- api/hub.rst | 165 +-- api/index.rst | 14 +- api/inputjax.rst | 68 +- api/jax.rst | 56 +- api/message.rst | 39 +- api/object.rst | 2 +- api/outputjax.rst | 140 +- api/queue.rst | 8 +- api/signal.rst | 14 +- api/variable.rst | 21 +- asciimath.rst | 127 -- callbacks.rst | 22 +- community.rst | 10 +- conf.py | 4 +- config-files.rst | 339 ----- configuration.rst | 684 +++++----- dynamic.rst | 137 +- glossary.rst | 36 +- index.rst | 31 +- installation.rst | 315 ++--- jsMath.rst | 32 +- mathjax.rst | 32 +- mathml.rst | 44 +- model.rst | 56 +- options/AsciiMath.rst | 41 - options/FontWarnings.rst | 129 +- options/HTML-CSS.rst | 112 +- options/MMLorHTML.rst | 34 +- options/MathEvents.rst | 37 - options/MathML.rst | 3 +- options/MathMenu.rst | 48 +- options/MathZoom.rst | 19 +- options/NativeMML.rst | 55 +- options/SVG.rst | 162 --- options/TeX.rst | 100 +- options/asciimath2jax.rst | 110 -- options/hub.rst | 144 +-- options/index.rst | 95 -- options/jsMath2jax.rst | 6 + options/mml2jax.rst | 5 + options/tex2jax.rst | 60 +- output.rst | 282 ++--- platforms/index.rst | 30 +- platforms/movable-type.rst | 19 +- platforms/wordpress.rst | 22 +- queues.rst | 16 +- signals.rst | 49 +- start.rst | 482 +++---- startup.rst | 68 +- synchronize.rst | 14 +- tex.rst | 1751 ++++++-------------------- typeset.rst | 91 +- upgrade.rst | 259 ---- whats-new-1.1.rst | 172 --- whats-new-2.0.rst | 718 ----------- 65 files changed, 1762 insertions(+), 6042 deletions(-) delete mode 100644 asciimath.rst delete mode 100644 config-files.rst delete mode 100644 options/AsciiMath.rst delete mode 100644 options/MathEvents.rst delete mode 100644 options/SVG.rst delete mode 100644 options/asciimath2jax.rst delete mode 100644 options/index.rst delete mode 100644 upgrade.rst delete mode 100644 whats-new-1.1.rst delete mode 100644 whats-new-2.0.rst diff --git a/CSS-styles.rst b/CSS-styles.rst index b7b8b0bb..32920c9b 100644 --- a/CSS-styles.rst +++ b/CSS-styles.rst @@ -5,8 +5,8 @@ CSS Style Objects ***************** Many MathJax components allow you to specify CSS styles that control -the look of the elements they create. These are described using `CSS -style objects`, which are JavaScript objects that represent standard +the look of the elements they create. These are described using CSS +style objects, which are JavaScript objects that represent standard CSS declarations. The main CSS style object is a collection of `name:value` pairs where the `name` is the CSS selector that is being defined, and the `value` is an object that gives the style for that @@ -18,7 +18,7 @@ rather than just ``ul li``. The value used to define the CSS style can either be a string containing the CSS definition, or a javascript object that is itself a collection of `name:value` pairs, where the `name` is the attribute -being defined and `value` is the value that attribute should be given. +being defined and `value` is the value that attibute should be given. Note that, since this is a JavaScript object, the pairs are separated by commas (not semi-colons) and the values are enclosed in quotation marks. If the name contains dashes, it should be enclosed in @@ -31,26 +31,24 @@ declaration: styles: { - ".MathJax_Display": { - "text-align": "center", - margin: "1em 0em" - }, - ".MathJax .merror": { "background-color": "#FFFF88", color: "#CC0000", border: "1px solid #CC0000", padding: "1px 3px", + "font-family": "serif", "font-style": "normal", "font-size": "90%" - } + }, + + ".MathJax_Preview": {color: "#888888"}, } -This defines two CSS styles, one for the selector -``.MathJax_Display``, which specifies its text alignment and margin -settings, and a second for ``.MathJax .merror``, which specifies a -background color, foreground color, border, and so on. +This defines two CSS styles, one for the selector ``.MathJax +.merror``, which specifies a background color, foreground color, +border, and so on, and a second for ``.MathJax_Preview`` that sets its +color. You can add as many such definitions to a ``styles`` object as you wish. Note, however, that since this is a JavaScript object, the diff --git a/HTML-snippets.rst b/HTML-snippets.rst index 5f8b9b07..21427aaa 100644 --- a/HTML-snippets.rst +++ b/HTML-snippets.rst @@ -6,7 +6,7 @@ Describing HTML snippets A number of MathJax configuration options allow you to specify an HTML snippet using a JavaScript object. This lets you include HTML in your -configuration files even though they are not HTML files themselves. +configutation files even though they are not HTML files themselves. The format is fairly simple, but flexible enough to let you represent complicated HTML trees. diff --git a/_static/mathjax_mathml.user.js b/_static/mathjax_mathml.user.js index 274db3f0..5a98950c 100644 --- a/_static/mathjax_mathml.user.js +++ b/_static/mathjax_mathml.user.js @@ -6,13 +6,17 @@ // ==/UserScript== if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { - if ((document.getElementsByTagName("math").length > 0) || - (document.getElementsByTagNameNS == null ? false : - (document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) { + if ((document.getElementsByTagName("math").length > 0) || + (document.getElementsByTagNameNS == null ? false : + (document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) { var script = document.createElement("script"); - script.type = "text/javascript"; - script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"; - var config = 'MathJax.Hub.Startup.onload()'; + script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here + var config = 'MathJax.Hub.Config({' + + 'extensions:["mml2jax.js"],' + + 'jax:["input/MathML","output/HTML-CSS"]' + + '});' + + 'MathJax.Hub.Startup.onload()'; + if (window.opera) {script.innerHTML = config} else {script.text = config} document.getElementsByTagName("head")[0].appendChild(script); - } + } } diff --git a/_static/mathjax_wikipedia.user.js b/_static/mathjax_wikipedia.user.js index e23c4ae4..3c0e7bc3 100644 --- a/_static/mathjax_wikipedia.user.js +++ b/_static/mathjax_wikipedia.user.js @@ -9,22 +9,27 @@ if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { // // Replace the images with MathJax scripts of type math/tex // - var images = document.getElementsByTagName('img'), count = 0; + var images = document.getElementsByTagName('img'); for (var i = images.length - 1; i >= 0; i--) { var img = images[i]; if (img.className === "tex") { var script = document.createElement("script"); script.type = "math/tex"; if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt} - img.parentNode.replaceChild(script,img); count++; + img.parentNode.replaceChild(script,img); } } - if (count) { - // - // Load MathJax and have it process the page - // - var script = document.createElement("script"); - script.type = "text/javascript"; - script.src = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"; - document.getElementsByTagName("head")[0].appendChild(script); - } + // + // Load MathJax and have it process the page + // + var script = document.createElement("script"); + script.src = "http://www.yoursite.edu/MathJax/MathJax.js"; // put your URL here + var config = 'MathJax.Hub.Config({' + + 'config: ["MMLorHTML.js"],' + + 'extensions:["TeX/noErrors.js","TeX/noUndefined.js",' + + '"TeX/AMSmath.js","TeX/AMSsymbols.js"],' + + 'jax:["input/TeX"]' + + '});' + + 'MathJax.Hub.Startup.onload()'; + if (window.opera) {script.innerHTML = config} else {script.text = config} + document.getElementsByTagName("head")[0].appendChild(script); } diff --git a/_templates/sourcelink.html b/_templates/sourcelink.html index 4f1ef064..53680fa6 100644 --- a/_templates/sourcelink.html +++ b/_templates/sourcelink.html @@ -3,7 +3,7 @@

{{ _('This Page') }}

{%- endif %} \ No newline at end of file diff --git a/_themes/sphinx-bootstrap/layout.html b/_themes/sphinx-bootstrap/layout.html index fc7e3849..f1891dfb 100644 --- a/_themes/sphinx-bootstrap/layout.html +++ b/_themes/sphinx-bootstrap/layout.html @@ -197,6 +197,8 @@