config.js 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/jax/output/SVG/config.js
  6. *
  7. * Initializes the SVG OutputJax (the main definition is in
  8. * MathJax/jax/input/SVG/jax.js, which is loaded when needed).
  9. *
  10. * ---------------------------------------------------------------------
  11. *
  12. * Copyright (c) 2011-2013 The MathJax Consortium
  13. *
  14. * Licensed under the Apache License, Version 2.0 (the "License");
  15. * you may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at
  17. *
  18. * http://www.apache.org/licenses/LICENSE-2.0
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. */
  26. MathJax.OutputJax.SVG = MathJax.OutputJax({
  27. id: "SVG",
  28. version: "2.2",
  29. directory: MathJax.OutputJax.directory + "/SVG",
  30. extensionDir: MathJax.OutputJax.extensionDir + "/SVG",
  31. autoloadDir: MathJax.OutputJax.directory + "/SVG/autoload",
  32. fontDir: MathJax.OutputJax.directory + "/SVG/fonts", // font name added later
  33. config: {
  34. scale: 100, minScaleAdjust: 50, // global math scaling factor, and minimum adjusted scale factor
  35. font: "TeX", // currently the only font available
  36. blacker: 10, // stroke-width to make fonts blacker
  37. mtextFontInherit: false, // to make <mtext> be in page font rather than MathJax font
  38. undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", // fonts to use for missing characters
  39. addMMLclasses: false, // keep MathML structure and use CSS classes to mark elements
  40. EqnChunk: (MathJax.Hub.Browser.isMobile ? 10: 50),
  41. // number of equations to process before showing them
  42. EqnChunkFactor: 1.5, // chunk size is multiplied by this after each chunk
  43. EqnChunkDelay: 100, // milliseconds to delay between chunks (to let browser
  44. // respond to other events)
  45. linebreaks: {
  46. automatic: false, // when false, only process linebreak="newline",
  47. // when true, insert line breaks automatically in long expressions.
  48. width: "container" // maximum width of a line for automatic line breaks (e.g. "30em").
  49. // use "container" to compute size from containing element,
  50. // use "nn% container" for a portion of the container,
  51. // use "nn%" for a portion of the window size
  52. },
  53. styles: {
  54. ".MathJax_SVG_Display": {
  55. "text-align": "center",
  56. margin: "1em 0em"
  57. },
  58. "#MathJax_SVG_Tooltip": {
  59. "background-color": "InfoBackground", color: "InfoText",
  60. border: "1px solid black",
  61. "box-shadow": "2px 2px 5px #AAAAAA", // Opera 10.5
  62. "-webkit-box-shadow": "2px 2px 5px #AAAAAA", // Safari 3 and Chrome
  63. "-moz-box-shadow": "2px 2px 5px #AAAAAA", // Forefox 3.5
  64. "-khtml-box-shadow": "2px 2px 5px #AAAAAA", // Konqueror
  65. padding: "3px 4px",
  66. "z-index": 401
  67. }
  68. }
  69. }
  70. });
  71. if (!MathJax.Hub.config.delayJaxRegistration) {MathJax.OutputJax.SVG.Register("jax/mml")}
  72. MathJax.OutputJax.SVG.loadComplete("config.js");