default.js 38 KB

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