www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

default.js (43481B)


      1 /* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
      2 /* vim: set ts=2 et sw=2 tw=80: */
      3 
      4 /*************************************************************
      5  *
      6  *  MathJax/config/default.js
      7  *
      8  *  This configuration file is loaded when you load MathJax
      9  *  via <script src="MathJax.js?config=default"></script>
     10  *
     11  *  Use it to customize the MathJax settings.  See comments below.
     12  *
     13  *  ---------------------------------------------------------------------
     14  *  
     15  *  Copyright (c) 2009-2017 The MathJax Consortium
     16  * 
     17  *  Licensed under the Apache License, Version 2.0 (the "License");
     18  *  you may not use this file except in compliance with the License.
     19  *  You may obtain a copy of the License at
     20  * 
     21  *      http://www.apache.org/licenses/LICENSE-2.0
     22  * 
     23  *  Unless required by applicable law or agreed to in writing, software
     24  *  distributed under the License is distributed on an "AS IS" BASIS,
     25  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     26  *  See the License for the specific language governing permissions and
     27  *  limitations under the License.
     28  */
     29 
     30 
     31 /*
     32  *  This file lists most, but not all, of the options that can be set for
     33  *  MathJax and its various components.  Some additional options are
     34  *  available, however, and are listed in the various links at:
     35  *  
     36  *  http://www.mathjax.org/resources/docs/?configuration.html#configuration-options-by-component
     37  *
     38  *  You can add these to the configuration object below if you 
     39  *  want to change them from their default values.
     40  */
     41 
     42 MathJax.Hub.Config({
     43 
     44   //
     45   //  A comma-separated list of configuration files to load
     46   //  when MathJax starts up.  E.g., to define local macros, etc.
     47   //  The default directory is the MathJax/config directory.
     48   //  
     49   //  Example:    config: ["local/local.js"],
     50   //  Example:    config: ["local/local.js","MMLtoHTML.js"],
     51   //
     52   config: [],
     53   
     54   //
     55   //  A comma-separated list of CSS stylesheet files to be loaded
     56   //  when MathJax starts up.  The default directory is the
     57   //  MathJax/config directory.
     58   // 
     59   //  Example:    styleSheets: ["MathJax.css"],
     60   //
     61   styleSheets: [],
     62   
     63   //
     64   //  Styles to be defined dynamically at startup time.
     65   //  
     66   //  Example:
     67   //      styles: {
     68   //        ".MathJax_Preview": {
     69   //          color: "#888"
     70   //        }
     71   //      },
     72   //
     73   styles: {},
     74   
     75   //
     76   //  A comma-separated list of input and output jax to initialize at startup.
     77   //  Their main code is loaded only when they are actually used, so it is not
     78   //  inefficient to include jax that may not actually be used on the page.  These
     79   //  are found in the MathJax/jax directory.  The choices include
     80   //  
     81   //      input/TeX
     82   //      input/MathML
     83   //      input/AsciiMath
     84   //      
     85   //      output/HTML-CSS
     86   //      output/NativeMML
     87   //      output/SVG
     88   // 
     89   //   If you change the input jax, you may need to include the appropriate
     90   //   preprocessor in the extensions array below.
     91   //  
     92   jax: ["input/TeX", "output/HTML-CSS"],
     93   
     94   //
     95   //  A comma-separated list of extensions to load at startup.  The default
     96   //  directory is MathJax/extensions.
     97   //  
     98   //  Example:    extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
     99   //  
    100   //  You may wish to include "mml2jax.js" if you are using "input/MathML" in the
    101   //  jax array above, and "asciimath2jax.js" if you using "input/AsciiMath".
    102   //  Include "jsmath2jax.js" if you are converting from using jsMath to MathJax.
    103   //
    104   extensions: ["jsMath2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
    105   
    106   //
    107   //  Patterns to remove from before and after math script tags.  If you are not
    108   //  using one of the preprocessors (e.g., tex2jax), you need to insert something
    109   //  extra into your HTML file in order to avoid a bug in Internet Explorer.  IE
    110   //  removes spaces from the DOM that it thinks are redundent, and since a SCRIPT
    111   //  tag usually doesn't add content to the page, if there is a space before and after
    112   //  a MathJax SCRIPT tag, IE will remove the first space.  When MathJax inserts
    113   //  the typeset mathematics, this means there will be no space before it and the
    114   //  preceeding text.  In order to avoid this, you should include some "guard characters"
    115   //  before or after the math SCRIPT tag; define the patterns you want to use below.
    116   //  Note that these are used as regular expressions, so you will need to quote
    117   //  special characters.  Furthermore, since they are javascript strings, you must
    118   //  quote javascript special characters as well.  So to obtain a backslash, you must
    119   //  use \\ (doubled for javascript).  For example, "\\[" is the pattern \[ in the
    120   //  regular expression.  That means that if you want an actual backslash in your
    121   //  guard characters, you need to use "\\\\" in order to get \\ in the regular
    122   //  expression, and \ in the actual text.  If both preJax and postJax are defined,
    123   //  both must be present in order to be  removed.
    124   //
    125   //  See also the preRemoveClass comments below.
    126   //  
    127   //  Example:
    128   //      preJax: "\\\\\\\\",  // makes a double backslash the preJax text
    129   //    or
    130   //      preJax:  "\\[\\[", // jax scripts must be enclosed in double brackets
    131   //      postJax: "\\]\\]",
    132   //
    133   preJax: null,
    134   postJax: null,
    135   
    136   //
    137   //  The CSS class for a math preview to be removed preceeding a MathJax
    138   //  SCRIPT tag.  If the tag just before the MathJax SCRIPT tag is of this
    139   //  class, its contents are removed when MathJax processes the SCRIPT
    140   //  tag.  This allows you to include a math preview in a form that will
    141   //  be displayed prior to MathJax performing its typesetting.  It also
    142   //  avoids the Internet Explorer space-removal bug, and can be used in
    143   //  place of preJax and postJax if that is more convenient.
    144   //  
    145   //  For example
    146   //  
    147   //      <span class="MathJax_Preview">[math]</span><script type="math/tex">...</script>
    148   //
    149   //  would display "[math]" in place of the math until MathJax is able to typeset it.
    150   //
    151   preRemoveClass: "MathJax_Preview",
    152   
    153   //
    154   //  This value controls whether the "Processing Math: nn%" message are displayed
    155   //  in the lower left-hand corner.  Set to "false" to prevent those messages (though
    156   //  file loading and other messages will still be shown).
    157   //
    158   showProcessingMessages: true,
    159   
    160   //
    161   //  This value controls the verbosity of the messages in the lower left-hand corner.
    162   //  Set it to "none" to eliminate all messages, or set it to "simple" to show
    163   //  "Loading..." and "Processing..." rather than showing the full file name and the
    164   //  percentage of the mathematics processed.
    165   //
    166   messageStyle: "normal",
    167   
    168   //
    169   //  These two parameters control the alignment and shifting of displayed equations.
    170   //  The first can be "left", "center", or "right", and determines the alignment of
    171   //  displayed equations.  When the alignment is not "center", the second determines
    172   //  an indentation from the left or right side for the displayed equations.  When
    173   //  the alignment is "center", the indent allows you to shift the center to the right
    174   //  or left (negative is left).
    175   //  
    176   displayAlign: "center",
    177   displayIndent: "0",
    178   
    179   //
    180   //  Normally MathJax will perform its starup commands (loading of
    181   //  configuration, styles, jax, and so on) as soon as it can.  If you
    182   //  expect to be doing additional configuration on the page, however, you
    183   //  may want to have it wait until the page's onload hander is called.  If so,
    184   //  set this to "onload".
    185   //
    186   delayStartupUntil: "none",
    187 
    188   //
    189   //  Normally MathJax will typeset the mathematics on the page as soon as
    190   //  the page is loaded.  If you want to delay that process, in which case
    191   //  you will need to call MathJax.Hub.Typeset() yourself by hand, set
    192   //  this value to true.
    193   //
    194   skipStartupTypeset: false,
    195   
    196   //
    197   //  A list of element ID's that are the ones to process for mathematics
    198   //  when any of the Hub typesetting calls (Typeset, Process, Update, etc)
    199   //  are called with no element specified.  This lets you restrict the
    200   //  processing to particular containers rather than scanning the entire
    201   //  document for mathematics.  If none are supplied, the entire document
    202   //  is processed.
    203   //
    204   elements: [],
    205 
    206   //
    207   //  Since typesetting usually changes the vertical dimensions of the
    208   //  page, if the URL contains an anchor position you may no longer be
    209   //  positioned at the correct position on the page, so MathJax can
    210   //  reposition to that location after it completes its initial
    211   //  typesetting of the page.  This value controls whether MathJax will
    212   //  reposition the browser to the #hash location from the page URL after
    213   //  typesetting for the page.
    214   //  
    215   positionToHash: true,
    216   
    217   //
    218   //  These control whether to attach the MathJax contextual menu to the
    219   //  expressions typeset by MathJax.  Since the code for handling
    220   //  MathPlayer in Internet Explorer is somewhat delicate, it is
    221   //  controlled separately via (showMathMenuMSIE).  The latter is now
    222   //  deprecated in favor of the MathJax contextual menu settings for
    223   //  MathPlayer.
    224   //  
    225   //  These values used to be listed in the separate output jax, but
    226   //  have been moved to this more central location since they are shared
    227   //  by all output jax.
    228   //
    229   showMathMenu: true,
    230   showMathMenuMSIE: true,
    231 
    232 
    233   //
    234   //  The default settings for the MathJax contextual menu (overridden by
    235   //  the MathJax cookie when users change the menu settings).
    236   //  
    237   menuSettings: {
    238     zoom: "None",        //  when to do MathZoom
    239     CTRL: false,         //    require CTRL for MathZoom?
    240     ALT: false,          //    require Alt or Option?
    241     CMD: false,          //    require CMD?
    242     Shift: false,        //    require Shift?
    243     discoverable: false, //  make math menu discoverable on hover?
    244     zscale: "200%",      //  the scaling factor for MathZoom
    245     renderer: null,      //  set when Jax are loaded
    246     font: "Auto",        //  what font HTML-CSS should use
    247     context: "MathJax",  //  or "Browser" for pass-through to browser menu
    248     locale: null,        //  the language to use for messages
    249     mpContext: false,    //  true means pass menu events to MathPlayer in IE
    250     mpMouse: false,      //  true means pass mouse events to MathPlayer in IE
    251     texHints: true,      //  include class names for TeXAtom elements
    252     FastPreview: null,   //  use PreviewHTML output as preview?
    253     assistiveMML: null,  //  include hidden MathML for screen readers?
    254     inTabOrder: true,    //  set to true if math elements should be included in the tabindex
    255     semantics: false     //  add semantics tag with original form in MathML output
    256   },
    257   
    258   //
    259   //  The message and style for when there is a processing error handling 
    260   //  the mathematics (something has gone wrong with the input or output
    261   //  jax that prevents it from operating properly).
    262   //
    263   errorSettings: {
    264     message: ["[",["MathProcessingError","Math Processing Error"],"]"],
    265     style: {color: "#CC0000", "font-style":"italic"}  // style for message
    266   },
    267 
    268   
    269   //============================================================================
    270   //
    271   //  These parameters control the tex2jax preprocessor (when you have included
    272   //  "tex2jax.js" in the extensions list above).
    273   //
    274   tex2jax: {
    275 
    276     //
    277     //  The delimiters that surround in-line math expressions.  The first in each
    278     //  pair is the initial delimiter and the second is the terminal delimiter.
    279     //  Comment out any that you don't want, but be sure there is no extra
    280     //  comma at the end of the last item in the list -- some browsers won't
    281     //  be able to handle that.
    282     //
    283     inlineMath: [
    284       ['$','$'],      // uncomment this for standard TeX math delimiters
    285       ['\\(','\\)']
    286     ],
    287 
    288     //
    289     //  The delimiters that surround displayed math expressions.  The first in each
    290     //  pair is the initial delimiter and the second is the terminal delimiter.
    291     //  Comment out any that you don't want, but be sure there is no extra
    292     //  comma at the end of the last item in the list -- some browsers won't
    293     //  be able to handle that.
    294     //
    295     displayMath: [
    296       ['$$','$$'],
    297       ['\\[','\\]']
    298     ],
    299 
    300     //
    301     //  This value determines whether tex2jax requires braces to be
    302     //  balanced within math delimiters (which allows for nested dollar
    303     //  signs).  Set to false to get pre-v2.0 compatibility.  When true,
    304     //  
    305     //      $y = x^2 \hbox{ when $x > 2$}$.
    306     //  
    307     //  will be properly handled as a single expression.  When false, it
    308     //  would be interpreted as two searpate expressions, each with 
    309     //  improperly balanced braces.
    310     // 
    311     balanceBraces: true,
    312     
    313     //
    314     //  This array lists the names of the tags whose contents should not be
    315     //  processed by tex2jax (other than to look for ignore/process classes
    316     //  as listed below).  You can add to (or remove from) this list to prevent
    317     //  MathJax from processing mathematics in specific contexts.
    318     //
    319     skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],
    320 
    321     //
    322     //  This is the class name used to mark elements whose contents should
    323     //  not be processed by tex2jax (other than to look for the
    324     //  processClass pattern below).  Note that this is a regular
    325     //  expression, and so you need to be sure to quote any regexp special
    326     //  characters.  The pattern is automatically preceeded by '(^| )(' and
    327     //  followed by ')( |$)', so your pattern will have to match full words
    328     //  in the class name.  Assigning an element this class name will
    329     //  prevent `tex2jax` from processing its contents.
    330     //
    331     ignoreClass: ".*", //"tex2jax_ignore",
    332 
    333     //
    334     //  This is the class name used to mark elements whose contents SHOULD
    335     //  be processed by tex2jax.  This is used to turn on processing within
    336     //  tags that have been marked as ignored or skipped above.  Note that
    337     //  this is a regular expression, and so you need to be sure to quote
    338     //  any regexp special characters.  The pattern is automatically
    339     //  preceeded by '(^| )(' and followed by ')( |$)', so your pattern
    340     //  will have to match full words in the class name.  Use this to
    341     //  restart processing within an element that has been marked as
    342     //  ignored above.
    343     //
    344     processClass: "texMath", //"tex2jax_process",
    345     
    346     //
    347     //  Set to "true" to allow \$ to produce a dollar without starting in-line
    348     //  math mode.  If you uncomment the ['$','$'] line above, you should change
    349     //  this to true so that you can insert plain dollar signs into your documents
    350     //
    351     processEscapes: false,
    352 
    353     //
    354     //  Controls whether tex2jax processes LaTeX environments outside of math
    355     //  mode.  Set to "false" to prevent processing of environments except within
    356     //  math mode.
    357     //
    358     processEnvironments: true,
    359 
    360     //
    361     //  Controls whether tex2jax processes \ref{...} commands outside
    362     //  of math mode.  Set to "false" to prevent processing of \ref
    363     //  except within math mode.
    364     //  
    365     processRefs: true,
    366 
    367     //
    368     //  Controls whether tex2jax inserts MathJax_Preview spans to make a
    369     //  preview available, and what preview to use, when it locates in-line
    370     //  and display mathetics on the page.  The default is "TeX", which
    371     //  means use the TeX code as the preview (until it is processed by
    372     //  MathJax).  Set to "none" to prevent the previews from being
    373     //  inserted (the math will simply disappear until it is typeset).  Set
    374     //  to an array containing the description of an HTML snippet in order
    375     //  to use the same preview for all equations on the page (e.g., you
    376     //  could have it say "[math]" or load an image).
    377     //  
    378     //  E.g.,     preview: ["[math]"],
    379     //  or        preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
    380     //  
    381     preview: "TeX"
    382     
    383   },
    384   
    385   //============================================================================
    386   //
    387   //  These parameters control the asciimath2jax preprocessor (when you have included
    388   //  "asciimath2jax.js" in the extensions list above).
    389   //
    390   asciimath2jax: {
    391 
    392     //
    393     //  The delimiters that surround asciimath expressions.  The first in each
    394     //  pair is the initial delimiter and the second is the terminal delimiter.
    395     //
    396     delimiters: [
    397       ['`','`']
    398     ],
    399 
    400     //
    401     //  This array lists the names of the tags whose contents should not be
    402     //  processed by asciimath2jax (other than to look for ignore/process classes
    403     //  as listed below).  You can add to (or remove from) this list to prevent
    404     //  MathJax from processing mathematics in specific contexts.
    405     //
    406     skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],
    407 
    408     //
    409     //  This is the class name used to mark elements whose contents should
    410     //  not be processed by asciimath2jax (other than to look for the
    411     //  processClass pattern below).  Note that this is a regular
    412     //  expression, and so you need to be sure to quote any regexp special
    413     //  characters.  The pattern is automatically preceeded by '(^| )(' and
    414     //  followed by ')( |$)', so your pattern will have to match full words
    415     //  in the class name.  Assigning an element this class name will
    416     //  prevent `asciimath2jax` from processing its contents.
    417     //
    418     ignoreClass: "asciimath2jax_ignore",
    419 
    420     //
    421     //  This is the class name used to mark elements whose contents SHOULD
    422     //  be processed by asciimath2jax.  This is used to turn on processing
    423     //  within tags that have been marked as ignored or skipped above.
    424     //  Note that this is a regular expression, and so you need to be sure
    425     //  to quote any regexp special characters.  The pattern is
    426     //  automatically preceeded by '(^| )(' and followed by ')( |$)', so
    427     //  your pattern will have to match full words in the class name.  Use
    428     //  this to restart processing within an element that has been marked
    429     //  as ignored above.
    430     //
    431     processClass: "asciimath2jax_process",
    432     
    433     //  Controls whether asciimath2jax inserts MathJax_Preview spans to make a
    434     //  preview available, and what preview to use, when it locates in-line
    435     //  and display mathetics on the page.  The default is "AsciiMath", which
    436     //  means use the AsciiMath code as the preview (until it is processed by
    437     //  MathJax).  Set to "none" to prevent the previews from being
    438     //  inserted (the math will simply disappear until it is typeset).  Set
    439     //  to an array containing the description of an HTML snippet in order
    440     //  to use the same preview for all equations on the page (e.g., you
    441     //  could have it say "[math]" or load an image).
    442     //  
    443     //  E.g.,     preview: ["[math]"],
    444     //  or        preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
    445     //  
    446     preview: "AsciiMath"
    447     
    448   },
    449   
    450   //============================================================================
    451   //
    452   //  These parameters control the mml2jax preprocessor (when you have included
    453   //  "mml2jax.js" in the extensions list above).
    454   //
    455   mml2jax: {
    456     
    457     //
    458     //  Controls whether mml2jax inserts MathJax_Preview spans to make a
    459     //  preview available, and what preview to use, when it locates
    460     //  mathematics on the page.  The default is "mathml" which means use
    461     //  the <math> tag as the preview (until it is processed by MathJax).
    462     //  Set to "alttext", to use the  <math> tag's alttext attribute as the
    463     //  preview, if the tag has one.  Set to "none" to
    464     //  prevent the previews from being inserted (the math will simply
    465     //  disappear until it is typeset). Set to "altimg" to use an image
    466     //  described by the altimg* attributes of the <math> element.
    467     //  Set to an array containing the
    468     //  description of an HTML snippet in order to use the same preview for
    469     //  all equations on the page (e.g., you could have it say "[math]" or
    470     //  load an image).
    471     //  
    472     //  E.g.,     preview: ["[math]"],
    473     //  or        preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
    474     //  
    475     preview: "mathml"
    476     
    477   },
    478   
    479   //============================================================================
    480   //
    481   //  These parameters control the jsMath2jax preprocessor (when you have included
    482   //  "jsMath2jax.js" in the extensions list above).
    483   //
    484   jsMath2jax: {
    485     
    486     //
    487     //  Controls whether jsMath2jax inserts MathJax_Preview spans to make a
    488     //  preview available, and what preview to use, when it locates
    489     //  mathematics on the page.  The default is "TeX", which means use the
    490     //  TeX code as the preview (until it is processed by MathJax).  Set to
    491     //  "none" to prevent the previews from being inserted (the math will
    492     //  simply disappear until it is typeset).  Set to an array containing
    493     //  the description of an HTML snippet in order to use the same preview
    494     //  for all equations on the page (e.g., you could have it say "[math]"
    495     //  or load an image).
    496     //  
    497     //  E.g.,     preview: ["[math]"],
    498     //  or        preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
    499     //  
    500     preview: "TeX"
    501     
    502   },
    503 
    504   //============================================================================
    505   //
    506   //  These parameters control the TeX input jax.
    507   //
    508   TeX: {
    509 
    510     //
    511     //  This specifies the side on which \tag{} macros will place the tags.
    512     //  Set to "left" to place on the left-hand side.
    513     //
    514     TagSide: "right",
    515     
    516     //
    517     //  This is the amound of indentation (from right or left) for the tags.
    518     //
    519     TagIndent: "0.8em",
    520     
    521     //
    522     //  This is the width to use for the multline environment
    523     //
    524     MultLineWidth: "85%",
    525     
    526     //
    527     //  List of macros to define.  These are of the form
    528     //      name: value
    529     //  where 'value' is the replacement text for the macro \name.
    530     //  The 'value' can also be [value,n] where 'value' is the replacement
    531     //  text and 'n' is the number of parameters for the macro.
    532     //  Note that backslashes must be doubled in the replacement string.
    533     //  
    534     //  E.g.,
    535     //  
    536     //      Macros: {
    537     //        RR: '{\\bf R}',
    538     //        bold: ['{\\bf #1}', 1]
    539     //      }
    540     //
    541     Macros: {},
    542     
    543     //
    544     //  Equation numbering parameters.
    545     //  
    546     equationNumbers: {
    547       autoNumber: "none",  // "AMS" for standard AMS environment numbering,
    548                            //  or "all" to number all displayed equations
    549 //    formatNumber: function (n) {return n},                // format for equation number n
    550 //    formatTag:    function (n) {return '('+n+')'},        // format for \tag and \eqref
    551 //    formatID:     function (n) {return 'mjx-eqn-'+String(n).replace(/[:'"<>&]/g,"")},
    552 //                                                          // element ID to use for reference
    553 //    formatURL:    function (id,base) {return base+'#'+escape(id)},
    554 //                                                          // URL to use for references
    555       useLabelIds: true    // make element ID's use \label name rather than equation number
    556     },
    557 
    558     //
    559     //  Controls the TeX/noErrors extension
    560     //
    561     noErrors: {
    562       disabled: false,               // set to true to return to original error messages
    563       multiLine: true,               // false to not include original line breaks
    564       inlineDelimiters: ["",""],     // or use ["$","$"] or ["\\(","\\)"] to put back delimiters
    565       style: {
    566         "font-size":   "90%",
    567         "text-align":  "left",
    568         "color":       "black",
    569         "padding":     "1px 3px",
    570         "border":      "1px solid"
    571       }
    572     },
    573 
    574     //
    575     //  Controls the TeX/noUndefined extension
    576     //
    577     noUndefined: {
    578       disabled: false,      // set to true to return to original error messages
    579       attributes: {         // attributes to set for the undefined control sequence
    580         mathcolor: "red"
    581       }
    582     },
    583   
    584     //
    585     //  Controls the TeX/unicode extension
    586     unicode: {
    587       fonts: "STIXGeneral,'Arial Unicode MS'"  // the default font list for unknown characters
    588     }
    589     
    590   },
    591 
    592   //============================================================================
    593   //
    594   //  These parameters control the AsciiMath input jax.
    595   //
    596   AsciiMath: {
    597     //
    598     //  Determines whether the unicode positions for phi and varphi are
    599     //  to be swapped or not.  (Unicode originally had these reversed, and
    600     //  many fonts have them reversed as well.)  When set to true, phi
    601     //  and varphi will correspond to the LaTeX macros of the same name.
    602     //
    603     fixphi: true,
    604     
    605     //
    606     //  Determines whether the MathML should be marked so that the HTML-CSS
    607     //  and SVG output jax will use MathML spacing rules rather than TeX
    608     //  spacing rules.  Since AsciiMath was designed for MathML output, the
    609     //  MathML rules are used by default.
    610     //
    611     useMathMLspacing: true,
    612     
    613     //
    614     //  Determines whether limits are placed above and below operators,
    615     //  or next to them.  (AsciiMath doesn't have separate in-line and
    616     //  display modes like TeX and MathML do, so this is the only control
    617     //  you have over its output)
    618     //
    619     displaystyle: true,
    620     
    621     //
    622     //  The character to use for decimal places when scanning for a number.
    623     //  If you change it to ",", beware of things like "(1,2)" which would need
    624     //  to be changed to "(1, 2)" to be parsed correctly.
    625     // 
    626     decimal: "."
    627   },
    628   
    629   //============================================================================
    630   //
    631   //  These parameters control the MathML input jax.
    632   //
    633   MathML: {
    634     //
    635     //  This specifies whether to use TeX spacing or MathML spacing when the
    636     //  HTML-CSS output jax is used.
    637     //
    638     useMathMLspacing: false
    639   },
    640   
    641   //============================================================================
    642   //
    643   //  These parameters control the HTML-CSS output jax.
    644   //
    645   "HTML-CSS": {
    646     
    647     //
    648     //  This controls the global scaling of mathematics as compared to the 
    649     //  surrounding text.  Values between 100 and 133 are usually good choices.
    650     //
    651     scale: 100,
    652     
    653     //
    654     //  Don't allow the matching of math text to surrounding text to use a scaling
    655     //  factor smaller than this.
    656     //
    657     minScaleAdjust: 50,
    658     
    659     //
    660     //  This is a list of the fonts to look for on a user's computer in
    661     //  preference to using MathJax's web-based fonts.  These must
    662     //  correspond to directories available in the  jax/output/HTML-CSS/fonts
    663     //  directory, where MathJax stores data about the characters available
    664     //  in the fonts.  Set this to ["TeX"], for example, to prevent the
    665     //  use of the STIX fonts, or set it to an empty list, [], if
    666     //  you want to force MathJax to use web-based or image fonts.
    667     //
    668     availableFonts: ["STIX-Web","TeX"],
    669     
    670     //
    671     //  This is the preferred font to use when more than one of those
    672     //  listed above is available.
    673     //
    674     preferredFont: "TeX",
    675     
    676     //
    677     //  This is the web-based font to use when none of the fonts listed
    678     //  above are available on the user's computer.  Note that currently
    679     //  only the TeX font is available in a web-based form.  Set this to
    680     //  
    681     //      webFont: null,
    682     //
    683     //  if you want to prevent the use of web-based fonts.
    684     //
    685     webFont: "TeX",
    686     
    687     //
    688     //  This is the font to use for image fallback mode (when none of the
    689     //  fonts listed above are available and the browser doesn't support
    690     //  web-fonts via the @font-face CSS directive).  Note that currently
    691     //  only the TeX font is available as an image font.  Set this to
    692     //
    693     //      imageFont: null,
    694     //  
    695     //  if you want to prevent the use of image fonts (e.g., you have not
    696     //  installed the image fonts on your server).  In this case, only
    697     //  browsers that support web-based fonts will be able to view your pages
    698     //  without having the fonts installed on the client computer.  The browsers
    699     //  that support web-based fonts include: IE6 and later, Chrome, Safari3.1
    700     //  and above, Firefox3.5 and later, and Opera10 and later.  Note that
    701     //  Firefox3.0 is NOT on this list, so without image fonts, FF3.0 users
    702     //  will be required to to download and install either the STIX fonts or the
    703     //  MathJax TeX fonts.
    704     //
    705     imageFont: "TeX",
    706     
    707     //
    708     //  This is the font-family CSS value used for characters that are not
    709     //  in the selected font (e.g., for web-based fonts, this is where to
    710     //  look for characters not included in the MathJax_* fonts).  IE will
    711     //  stop looking after the first font that exists on the system (even
    712     //  if it doesn't contain the needed character), so order these carefully.
    713     //  
    714     undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
    715 
    716     //
    717     //  This setting controls whether <mtext> elements will be typeset
    718     //  using the math fonts or the font of the surrounding text.  When
    719     //  false, the mathvariant="normal" font will be used; when true, 
    720     //  the font will be inherited from the surrounding paragraph.
    721     //  
    722     mtextFontInherit: false,
    723 
    724     //
    725     //  These values control how "chunky" the display of mathematical
    726     //  expressions will be.
    727     //  
    728     //  EqnChunk is the number of equations that will be typeset before
    729     //  they appear on screen.  Larger values make for less visual flicker
    730     //  as the equations are drawn, but also mean longer delays before the
    731     //  reader sees anything.
    732     //  
    733     //  EqChunkFactor is the factor by which the EqnChunk will grow after each
    734     //  chunk is displayed.
    735     //  
    736     //  EqChunkDelay is the time (in milliseconds) to delay between chunks
    737     //  (to allow the browser to respond to other user interaction).
    738     //  
    739     //  Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get
    740     //  the behavior from MathJax v1.1 and below.
    741     //
    742     EqnChunk: 50,
    743     EqnChunkFactor: 1.5,
    744     EqnChunkDelay: 100,
    745 
    746     //
    747     //  This option indicates whether MathJax should try to correct the
    748     //  x-height of equations to match the size of the surrounding text.
    749     //
    750     matchFontHeight: true,
    751 
    752     //
    753     //  When true, MathJax will not measure the widths or heights of the
    754     //  subexpressions as it creates its output, but instead will rely on
    755     //  its internal calculautions based on teh bounding boxes of the
    756     //  characters it uses, and will only take measurements when it
    757     //  absolutely has to.  Since measurements cause display reflows, they
    758     //  slows down MathJax considerably, so without them MathJax runs
    759     //  faster, but can produce slightly less accurate character placements,
    760     //  especially in width fractions or roots.
    761     //
    762     noReflows: false,
    763 
    764     
    765     //
    766     //  These settings control automatic line breaking.  It is off by
    767     //  default, so only explicit line breaks are performed (via
    768     //  linebreak="newline" attributes on <mo> and <mspace> elements).  To
    769     //  perform automatic line breaking on line expressions, set
    770     //  'automatic' to 'true' below.  The line breaks will be applied via a
    771     //  penalty-based heuristic, which does well, but isn't perfect.  You
    772     //  might need to use linebreak="goodbreak" or linebreak="badbreak" by
    773     //  hand in order to get better effects.  It is also possible to modify
    774     //  the penalty values; contact the MathJax user's forum for details.
    775     //  
    776     linebreaks: {
    777       
    778       //
    779       //  This controls the automatic breaking of expressions:
    780       //    when false, only process linebreak="newline",
    781       //    when true, line breaks are inserted automatically in long expressions.
    782       //
    783       automatic: false,
    784 
    785       //
    786       //  This controls how wide the lines of mathematics can be
    787       //  
    788       //  Use an explicit width like "30em" for a fixed width.
    789       //  Use "container" to compute the size from the containing element.
    790       //  Use "nn% container" for a portion of the container.
    791       //  Use "nn%" for a portion of the window size.
    792       //  
    793       //  The container-based widths may be slower, and may not produce the
    794       //  expected results if the layout width changes due to the removal
    795       //  of previews or inclusion of mathematics during typesetting.
    796       //  
    797       width: "container"
    798     },
    799 
    800     //
    801     //  This allows you to define or modify the styles used to display
    802     //  various math elements created by MathJax.
    803     //  
    804     //  Example:
    805     //      styles: {
    806     //        ".MathJax .merror": {
    807     //          color:   "#CC0000",
    808     //          border:  "1px solid #CC0000"
    809     //        }
    810     //      }
    811     //
    812     styles: {},
    813     
    814     //
    815     //  Configuration for <maction> tooltips
    816     //    (see also the #MathJax_Tooltip CSS in MathJax/jax/output/HTML-CSS/config.js,
    817     //     which can be overriden using the styles values above).
    818     //
    819     tooltip: {
    820       delayPost: 600,          // milliseconds delay before tooltip is posted after mouseover
    821       delayClear: 600,         // milliseconds delay before tooltip is cleared after mouseout
    822       offsetX: 10, offsetY: 5  // pixels to offset tooltip from mouse position
    823     }
    824   },
    825   
    826   //============================================================================
    827   //
    828   //  These parameters control the NativeMML output jax.
    829   //
    830   NativeMML: {
    831 
    832     //
    833     //  This controls the global scaling of mathematics as compared to the 
    834     //  surrounding text.  Values between 100 and 133 are usually good choices.
    835     //
    836     scale: 100,
    837 
    838     //
    839     //  Don't allow the matching of math text to surrounding text to use a scaling
    840     //  factor smaller than this.
    841     //
    842     minScaleAdjust: 50,
    843     
    844     //  This option indicates whether MathJax should try to correct the
    845     //  x-height of equations to match the size of the surrounding text.
    846     matchFontHeight: true,
    847 
    848     //
    849     //  This allows you to define or modify the styles used to display
    850     //  various math elements created by MathJax.
    851     //  
    852     //  Example:
    853     //      styles: {
    854     //        ".MathJax_MathML": {
    855     //          color: "red"         //    MathML is in red
    856     //        }
    857     //      }
    858     //
    859     styles: {}
    860   },
    861   
    862   //============================================================================
    863   //
    864   //  These parameters control the SVG output jax.
    865   //
    866   "SVG": {
    867     
    868     //
    869     //  This controls the global scaling of mathematics as compared to the 
    870     //  surrounding text.  Values between 100 and 133 are usually good choices.
    871     //
    872     scale: 100,
    873     
    874     //
    875     //  Don't allow the matching of math text to surrounding text to use a scaling
    876     //  factor smaller than this.
    877     //
    878     minScaleAdjust: 50,
    879     
    880     //
    881     //  This specifies the font to use for SVG output (currently the only
    882     //  one available)
    883     //
    884     font: "TeX",
    885     
    886     //
    887     //  This is the stroke width to use for all character paths (1em = 1000
    888     //  units).  This is a cheap way of getting slightly lighter or darker
    889     //  characters
    890     //
    891     blacker: 10,
    892     
    893     //
    894     //  This is the font-family CSS value used for characters that are not
    895     //  in the selected font.  IE will stop looking after the first font
    896     //  that exists on the system (even if it doesn't contain the needed
    897     //  character), so order these carefully.
    898     //  
    899     undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
    900 
    901     //
    902     //  This setting controls whether <mtext> elements will be typeset
    903     //  using the math fonts or the font of the surrounding text.  When
    904     //  false, the mathvariant="normal" font will be used; when true, 
    905     //  the font will be inherited from the surrounding paragraph.
    906     //  
    907     mtextFontInherit: false,
    908 
    909     //
    910     //  This controls whether the MathML structure is retained and CSS
    911     //  classes are added to mark the original MathML elements (as in the
    912     //  HTML-CSS output).  By default, the SVG output jax removes unneeded
    913     //  nesting in order to produce a more efficient markup, but if you
    914     //  want to use CSS to style the elements as if they were MathML, you
    915     //  might need to set this to true.
    916     //  
    917     addMMLclasses: false,
    918 
    919     //
    920     //  These values control how "chunky" the display of mathematical
    921     //  expressions will be.
    922     //  
    923     //  EqnChunk is the number of equations that will be typeset before
    924     //  they appear on screen.  Larger values make for less visual flicker
    925     //  as the equations are drawn, but also mean longer delays before the
    926     //  reader sees anything.
    927     //  
    928     //  EqChunkFactor is the factor by which the EqnChunk will grow after each
    929     //  chunk is displayed.
    930     //  
    931     //  EqChunkDelay is the time (in milliseconds) to delay between chunks
    932     //  (to allow the browser to respond to other user interaction).
    933     //  
    934     //  Set EqnChunk to 1, EqnChunkFactor to 1, and EwnChunkDelay to 10 to get
    935     //  the behavior from MathJax v1.1 and below.
    936     //
    937     EqnChunk: 50,
    938     EqnChunkFactor: 1.5,
    939     EqnChunkDelay: 100,
    940 
    941     //  This option indicates whether MathJax should try to correct the
    942     //  x-height of equations to match the size of the surrounding text.
    943     matchFontHeight: true,
    944 
    945     //
    946     //  These settings control automatic line breaking.  It is off by
    947     //  default, so only explicit line breaks are performed (via
    948     //  linebreak="newline" attributes on <mo> and <mspace> elements).  To
    949     //  perform automatic line breaking on line expressions, set
    950     //  'automatic' to 'true' below.  The line breaks will be applied via a
    951     //  penalty-based heuristic, which does well, but isn't perfect.  You
    952     //  might need to use linebreak="goodbreak" or linebreak="badbreak" by
    953     //  hand in order to get better effects.  It is also possible to modify
    954     //  the penalty values; contact the MathJax user's forum for details.
    955     //  
    956     linebreaks: {
    957       
    958       //
    959       //  This controls the automatic breaking of expressions:
    960       //    when false, only process linebreak="newline",
    961       //    when true, line breaks are inserted automatically in long expressions.
    962       //
    963       automatic: false,
    964 
    965       //
    966       //  This controls how wide the lines of mathematics can be
    967       //  
    968       //  Use an explicit width like "30em" for a fixed width.
    969       //  Use "container" to compute the size from the containing element.
    970       //  Use "nn% container" for a portion of the container.
    971       //  Use "nn%" for a portion of the window size.
    972       //  
    973       //  The container-based widths may be slower, and may not produce the
    974       //  expected results if the layout width changes due to the removal
    975       //  of previews or inclusion of mathematics during typesetting.
    976       //  
    977       width: "container"
    978     },
    979 
    980     //
    981     //  These are the styles used for merror elements in SVG output.  Note
    982     //  that only a limited number of style attributes are supported by
    983     //  SVG, but you can at least change the colors and borders.
    984     //  
    985     //
    986     merrorStyle: {
    987       fontSize:"90%", color:"#C00", background:"#FF8",
    988       border: "1px solid #C00", padding:"3px"
    989     },
    990 
    991     //
    992     //  This allows you to define or modify the styles used to display
    993     //  various math elements created by MathJax.
    994     //  
    995     //  Example:
    996     //      styles: {
    997     //        ".MathJax .merror": {
    998     //          color:   "#CC0000",
    999     //          border:  "1px solid #CC0000"
   1000     //        }
   1001     //      }
   1002     //
   1003     styles: {},
   1004     
   1005     //
   1006     //  Configuration for <maction> tooltips
   1007     //    (see also the #MathJax_Tooltip CSS in MathJax/jax/output/SVG/config.js,
   1008     //     which can be overriden using the styles values above).
   1009     //
   1010     tooltip: {
   1011       delayPost: 600,          // milliseconds delay before tooltip is posted after mouseover
   1012       delayClear: 600,         // milliseconds delay before tooltip is cleared after mouseout
   1013       offsetX: 10, offsetY: 5  // pixels to offset tooltip from mouse position
   1014     }
   1015   },
   1016   
   1017   //============================================================================
   1018   //
   1019   //  These parameters control the contextual menus that are available on the 
   1020   //  mathematics within the page (provided the showMathMenu value is true above).
   1021   //
   1022   MathMenu: {
   1023     //
   1024     //  This is the hover delay for the display of submenus in the
   1025     //  contextual menu.  When the mouse is still over a submenu label for
   1026     //  this long, the menu will appear.  (The menu also will appear if you
   1027     //  click on the label.)  It is in milliseconds.
   1028     //  
   1029     delay: 150,
   1030     
   1031     //
   1032     //  This is the URL for the MathJax Help menu item.
   1033     //
   1034     helpURL: "http://www.mathjax.org/help-v2/user/",
   1035 
   1036     //
   1037     //  These control whether the "Math Renderer", "MathPlayer", "Font
   1038     //  Preferences", "Contextual Menu", and "Discoverable" menu items will
   1039     //  be displayed or not.
   1040     //
   1041     showRenderer: true,
   1042     showMathPlayer: true,
   1043     showFontMenu: false,
   1044     showContext:  false,
   1045     showDiscoverable: false,
   1046     
   1047     //
   1048     // These are the settings for the Annotation menu. If the <math> root has
   1049     // a <semantics> child that contains one of the following annotation
   1050     // formats, the source will be available via the "Show Math As" menu.
   1051     // Each format has a list of possible encodings.
   1052     //
   1053     semanticsAnnotations: {
   1054       "TeX": ["TeX", "LaTeX", "application/x-tex"],
   1055       "StarMath": ["StarMath 5.0"],
   1056       "Maple": ["Maple"],
   1057       "ContentMathML": ["MathML-Content", "application/mathml-content+xml"],
   1058       "OpenMath": ["OpenMath"]
   1059     },
   1060 
   1061     //
   1062     //  These are the settings for the Show Source window.  The initial
   1063     //  width and height will be reset after the source is shown in an
   1064     //  attempt to make the window fit the output better.
   1065     //
   1066     windowSettings: {
   1067       status: "no", toolbar: "no", locationbar: "no", menubar: "no",
   1068       directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes",
   1069       width: 100, height: 50
   1070     },
   1071     
   1072     //
   1073     //  This allows you to change the CSS that controls the menu
   1074     //  appearance.  See the extensions/MathMenu.js file for details
   1075     //  of the default settings.
   1076     //
   1077     styles: {}
   1078     
   1079   },
   1080   
   1081   //============================================================================
   1082   //
   1083   //  These parameters control the contextual menus that are available on the 
   1084   //  mathematics within the page (provided the showMathMenu value is true above).
   1085   //
   1086   MathEvents: {
   1087     //
   1088     //  This is the time required for the mouse to be held still over a
   1089     //  typeset equation in order for it to count as a hover (used when the
   1090     //  zoom trigger is "Hover").  It is in milliseconds.
   1091     //  
   1092     hover: 500
   1093   },
   1094 
   1095   //============================================================================
   1096   //
   1097   //  These parameters control the MMLorHTML configuration file.
   1098   //  NOTE:  if you add MMLorHTML.js to the config array above,
   1099   //  you must REMOVE the output jax from the jax array.
   1100   //
   1101   MMLorHTML: {
   1102     //
   1103     //  The output jax that is to be preferred when both are possible
   1104     //  (set to "MML" for native MathML, "HTML" for MathJax's HTML-CSS output jax).
   1105     //
   1106     prefer: {
   1107       MSIE:    "MML",
   1108       Firefox: "HTML",
   1109       Opera:   "HTML",
   1110       Safari:  "HTML",
   1111       Chrome:  "HTML",
   1112       other:   "HTML"
   1113     }
   1114   }
   1115 });
   1116 
   1117 MathJax.Ajax.loadComplete("[MathJax]/config/default.js");