config.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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-2015 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.5.0",
  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. useFontCache: true, // use <use> elements to re-use font paths rather than repeat paths every time
  41. useGlobalCache: true, // store fonts in a global <defs> for use in all equations, or one in each equation
  42. EqnChunk: (MathJax.Hub.Browser.isMobile ? 10: 50),
  43. // number of equations to process before showing them
  44. EqnChunkFactor: 1.5, // chunk size is multiplied by this after each chunk
  45. EqnChunkDelay: 100, // milliseconds to delay between chunks (to let browser
  46. // respond to other events)
  47. linebreaks: {
  48. automatic: false, // when false, only process linebreak="newline",
  49. // when true, insert line breaks automatically in long expressions.
  50. width: "container" // maximum width of a line for automatic line breaks (e.g. "30em").
  51. // use "container" to compute size from containing element,
  52. // use "nn% container" for a portion of the container,
  53. // use "nn%" for a portion of the window size
  54. },
  55. merrorStyle: {
  56. fontSize:"90%", color:"#C00", background:"#FF8",
  57. border: "1px solid #C00", padding:"3px"
  58. },
  59. styles: {
  60. ".MathJax_SVG_Display": {
  61. "text-align": "center",
  62. margin: "1em 0em"
  63. },
  64. //
  65. // For mtextFontInherit version of \texttt{}
  66. //
  67. ".MathJax_SVG .MJX-monospace": {
  68. "font-family": "monospace"
  69. },
  70. //
  71. // For mtextFontInherit version of \textsf{}
  72. //
  73. ".MathJax_SVG .MJX-sans-serif": {
  74. "font-family": "sans-serif"
  75. },
  76. //
  77. // For tooltips
  78. //
  79. "#MathJax_SVG_Tooltip": {
  80. "background-color": "InfoBackground", color: "InfoText",
  81. border: "1px solid black",
  82. "box-shadow": "2px 2px 5px #AAAAAA", // Opera 10.5
  83. "-webkit-box-shadow": "2px 2px 5px #AAAAAA", // Safari 3 and Chrome
  84. "-moz-box-shadow": "2px 2px 5px #AAAAAA", // Forefox 3.5
  85. "-khtml-box-shadow": "2px 2px 5px #AAAAAA", // Konqueror
  86. padding: "3px 4px",
  87. "z-index": 401
  88. }
  89. }
  90. }
  91. });
  92. if (!MathJax.Hub.config.delayJaxRegistration) {MathJax.OutputJax.SVG.Register("jax/mml")}
  93. MathJax.OutputJax.SVG.loadComplete("config.js");