gollum 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gollum might be problematic. Click here for more details.

Files changed (463) hide show
  1. data/HISTORY.md +3 -0
  2. data/LICENSE +21 -0
  3. data/README.md +435 -0
  4. data/Rakefile +146 -0
  5. data/bin/gollum +41 -0
  6. data/docs/sanitization.md +32 -0
  7. data/gollum.gemspec +506 -0
  8. data/lib/gollum.rb +58 -0
  9. data/lib/gollum/albino.rb +17 -0
  10. data/lib/gollum/file.rb +60 -0
  11. data/lib/gollum/frontend/app.rb +154 -0
  12. data/lib/gollum/frontend/public/css/editbar.css +194 -0
  13. data/lib/gollum/frontend/public/css/gollum.css +55 -0
  14. data/lib/gollum/frontend/public/css/screen.css +726 -0
  15. data/lib/gollum/frontend/public/css/syntax.css +61 -0
  16. data/lib/gollum/frontend/public/images/buttons.png +0 -0
  17. data/lib/gollum/frontend/public/images/editbar-buttons.png +0 -0
  18. data/lib/gollum/frontend/public/images/example.png +0 -0
  19. data/lib/gollum/frontend/public/images/twiddle-down.png +0 -0
  20. data/lib/gollum/frontend/public/images/twiddle-right.png +0 -0
  21. data/lib/gollum/frontend/public/images/txt.png +0 -0
  22. data/lib/gollum/frontend/public/javascript/MathJax/COPYING.txt +202 -0
  23. data/lib/gollum/frontend/public/javascript/MathJax/MathJax.js +1704 -0
  24. data/lib/gollum/frontend/public/javascript/MathJax/README.txt +480 -0
  25. data/lib/gollum/frontend/public/javascript/MathJax/config/MMLorHTML.js +63 -0
  26. data/lib/gollum/frontend/public/javascript/MathJax/config/MathJax.js +351 -0
  27. data/lib/gollum/frontend/public/javascript/MathJax/config/local/local.js +37 -0
  28. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/AMSmath.js +376 -0
  29. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/AMSsymbols.js +385 -0
  30. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/autobold.js +43 -0
  31. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/boldsymbol.js +109 -0
  32. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/mathchoice.js +65 -0
  33. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/newcommand.js +185 -0
  34. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/noErrors.js +169 -0
  35. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/unicode.js +131 -0
  36. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/verb.js +53 -0
  37. data/lib/gollum/frontend/public/javascript/MathJax/extensions/jsMath2jax.js +77 -0
  38. data/lib/gollum/frontend/public/javascript/MathJax/extensions/mml2jax.js +101 -0
  39. data/lib/gollum/frontend/public/javascript/MathJax/extensions/tex2jax.js +242 -0
  40. data/lib/gollum/frontend/public/javascript/MathJax/extensions/toMathML.js +140 -0
  41. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/jax.js +1474 -0
  42. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/Arrows.js +122 -0
  43. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/BasicLatin.js +58 -0
  44. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/CombDiacritMarks.js +35 -0
  45. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/CombDiactForSymbols.js +35 -0
  46. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/Dingbats.js +35 -0
  47. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/GeneralPunctuation.js +40 -0
  48. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/GeometricShapes.js +66 -0
  49. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/GreekAndCoptic.js +35 -0
  50. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/Latin1Supplement.js +37 -0
  51. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/LetterlikeSymbols.js +39 -0
  52. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MathOperators.js +228 -0
  53. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MiscMathSymbolsA.js +38 -0
  54. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MiscMathSymbolsB.js +167 -0
  55. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MiscTechnical.js +38 -0
  56. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/SpacingModLetters.js +36 -0
  57. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/SuppMathOperators.js +289 -0
  58. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/SupplementalArrowsB.js +162 -0
  59. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/config.js +39 -0
  60. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/a.js +87 -0
  61. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/b.js +114 -0
  62. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/c.js +111 -0
  63. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/d.js +112 -0
  64. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/e.js +88 -0
  65. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/f.js +58 -0
  66. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/fr.js +79 -0
  67. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/g.js +82 -0
  68. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/h.js +52 -0
  69. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/i.js +85 -0
  70. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/j.js +36 -0
  71. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/k.js +36 -0
  72. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/l.js +175 -0
  73. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/m.js +61 -0
  74. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/n.js +219 -0
  75. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/o.js +88 -0
  76. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/opf.js +79 -0
  77. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/p.js +84 -0
  78. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/q.js +34 -0
  79. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/r.js +134 -0
  80. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/s.js +168 -0
  81. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/scr.js +79 -0
  82. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/t.js +82 -0
  83. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/u.js +91 -0
  84. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/v.js +73 -0
  85. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/w.js +35 -0
  86. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/x.js +47 -0
  87. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/y.js +41 -0
  88. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/z.js +39 -0
  89. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/jax.js +590 -0
  90. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/TeX/config.js +40 -0
  91. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/TeX/jax.js +1652 -0
  92. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/menclose.js +61 -0
  93. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/mglyph.js +98 -0
  94. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/ms.js +49 -0
  95. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/blank.gif +0 -0
  96. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/config.js +127 -0
  97. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/AlphaPresentForms.js +32 -0
  98. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Arrows.js +109 -0
  99. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/BoldFraktur.js +79 -0
  100. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/BoxDrawing.js +67 -0
  101. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/CombDiacritMarks.js +98 -0
  102. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/CombDiactForSymbols.js +49 -0
  103. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/ControlPictures.js +28 -0
  104. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/CurrencySymbols.js +31 -0
  105. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Cyrillic.js +129 -0
  106. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/EnclosedAlphanum.js +89 -0
  107. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GeneralPunctuation.js +67 -0
  108. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GeometricShapes.js +33 -0
  109. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GreekAndCoptic.js +109 -0
  110. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GreekBold.js +85 -0
  111. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GreekSSBold.js +85 -0
  112. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/IPAExtensions.js +116 -0
  113. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Latin1Supplement.js +123 -0
  114. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LatinExtendedA.js +155 -0
  115. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LatinExtendedAdditional.js +35 -0
  116. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LatinExtendedB.js +59 -0
  117. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LetterlikeSymbols.js +69 -0
  118. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Main.js +172 -0
  119. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MathBold.js +89 -0
  120. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MathOperators.js +260 -0
  121. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MathSSBold.js +89 -0
  122. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscMathSymbolsA.js +31 -0
  123. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscMathSymbolsB.js +37 -0
  124. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscSymbols.js +30 -0
  125. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscTechnical.js +42 -0
  126. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/NumberForms.js +39 -0
  127. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/PhoneticExtensions.js +30 -0
  128. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/SpacingModLetters.js +87 -0
  129. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/SuperAndSubscripts.js +28 -0
  130. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/SuppMathOperators.js +84 -0
  131. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/AlphaPresentForms.js +32 -0
  132. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/BasicLatin.js +122 -0
  133. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/BoxDrawing.js +67 -0
  134. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/CombDiactForSymbols.js +28 -0
  135. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/ControlPictures.js +28 -0
  136. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/CurrencySymbols.js +31 -0
  137. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/Cyrillic.js +129 -0
  138. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/EnclosedAlphanum.js +89 -0
  139. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GeneralPunctuation.js +50 -0
  140. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GreekAndCoptic.js +119 -0
  141. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GreekBoldItalic.js +85 -0
  142. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GreekSSBoldItalic.js +85 -0
  143. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/IPAExtensions.js +116 -0
  144. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/Latin1Supplement.js +123 -0
  145. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LatinExtendedA.js +155 -0
  146. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LatinExtendedAdditional.js +35 -0
  147. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LatinExtendedB.js +59 -0
  148. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LetterlikeSymbols.js +56 -0
  149. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/Main.js +56 -0
  150. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathBoldItalic.js +79 -0
  151. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathBoldScript.js +79 -0
  152. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathOperators.js +29 -0
  153. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathSSItalicBold.js +79 -0
  154. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/SpacingModLetters.js +54 -0
  155. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/AlphaPresentForms.js +32 -0
  156. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/BoxDrawing.js +67 -0
  157. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/CombDiactForSymbols.js +47 -0
  158. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/ControlPictures.js +28 -0
  159. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/CurrencySymbols.js +31 -0
  160. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Cyrillic.js +129 -0
  161. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/EnclosedAlphanum.js +89 -0
  162. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GeneralPunctuation.js +50 -0
  163. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GreekAndCoptic.js +78 -0
  164. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GreekItalic.js +85 -0
  165. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/IPAExtensions.js +116 -0
  166. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Latin1Supplement.js +123 -0
  167. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedA.js +154 -0
  168. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedAdditional.js +35 -0
  169. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedB.js +58 -0
  170. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LetterlikeSymbols.js +56 -0
  171. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Main.js +192 -0
  172. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathItalic.js +78 -0
  173. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathOperators.js +29 -0
  174. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathSSItalic.js +79 -0
  175. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathScript.js +68 -0
  176. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/SpacingModLetters.js +54 -0
  177. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/ij.js +29 -0
  178. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/AlphaPresentForms.js +32 -0
  179. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Arrows.js +106 -0
  180. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BBBold.js +82 -0
  181. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BlockElements.js +35 -0
  182. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BoldFraktur.js +79 -0
  183. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BoxDrawing.js +72 -0
  184. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CJK.js +29 -0
  185. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CombDiacritMarks.js +86 -0
  186. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CombDiactForSymbols.js +50 -0
  187. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/ControlPictures.js +28 -0
  188. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CurrencySymbols.js +31 -0
  189. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Cyrillic.js +129 -0
  190. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Dingbats.js +57 -0
  191. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/EnclosedAlphanum.js +89 -0
  192. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Fraktur.js +74 -0
  193. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GeneralPunctuation.js +68 -0
  194. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GeometricShapes.js +118 -0
  195. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekAndCoptic.js +109 -0
  196. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekBold.js +85 -0
  197. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekBoldItalic.js +85 -0
  198. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekItalic.js +85 -0
  199. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekSSBold.js +85 -0
  200. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekSSBoldItalic.js +85 -0
  201. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Hiragana.js +28 -0
  202. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/IPAExtensions.js +118 -0
  203. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Latin1Supplement.js +115 -0
  204. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedA.js +154 -0
  205. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedAdditional.js +35 -0
  206. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedB.js +63 -0
  207. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedD.js +28 -0
  208. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LetterlikeSymbols.js +82 -0
  209. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Main.js +380 -0
  210. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathBold.js +89 -0
  211. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathBoldItalic.js +79 -0
  212. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathBoldScript.js +79 -0
  213. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathItalic.js +78 -0
  214. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathOperators.js +207 -0
  215. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSS.js +89 -0
  216. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSSBold.js +90 -0
  217. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSSItalic.js +79 -0
  218. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSSItalicBold.js +79 -0
  219. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathScript.js +68 -0
  220. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathTT.js +88 -0
  221. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscMathSymbolsA.js +66 -0
  222. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscMathSymbolsB.js +154 -0
  223. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscSymbols.js +74 -0
  224. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscSymbolsAndArrows.js +91 -0
  225. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscTechnical.js +80 -0
  226. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/NumberForms.js +39 -0
  227. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/PhoneticExtensions.js +36 -0
  228. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SpacingModLetters.js +79 -0
  229. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Specials.js +28 -0
  230. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SuperAndSubscripts.js +28 -0
  231. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SuppMathOperators.js +271 -0
  232. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SupplementalArrowsA.js +35 -0
  233. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SupplementalArrowsB.js +155 -0
  234. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/ij.js +29 -0
  235. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsD/Bold/All.js +55 -0
  236. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsD/Regular/All.js +54 -0
  237. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsD/Regular/Main.js +36 -0
  238. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsSm/Bold/All.js +55 -0
  239. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsSm/Regular/All.js +54 -0
  240. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsSm/Regular/Main.js +36 -0
  241. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUp/Bold/All.js +55 -0
  242. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUp/Regular/All.js +54 -0
  243. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUp/Regular/Main.js +36 -0
  244. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpD/Bold/All.js +55 -0
  245. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpD/Regular/All.js +54 -0
  246. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpD/Regular/Main.js +36 -0
  247. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpSm/Bold/All.js +55 -0
  248. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpSm/Regular/All.js +54 -0
  249. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpSm/Regular/Main.js +36 -0
  250. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Bold/All.js +29 -0
  251. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Bold/Main.js +35 -0
  252. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Bold/PrivateUse.js +182 -0
  253. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/BoldItalic/All.js +29 -0
  254. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/BoldItalic/Main.js +36 -0
  255. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/BoldItalic/PrivateUse.js +215 -0
  256. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Italic/All.js +29 -0
  257. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Italic/Main.js +60 -0
  258. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Italic/PrivateUse.js +242 -0
  259. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Regular/All.js +29 -0
  260. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Regular/Main.js +57 -0
  261. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Regular/PrivateUse.js +387 -0
  262. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFiveSym/Regular/All.js +51 -0
  263. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFiveSym/Regular/Main.js +43 -0
  264. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFourSym/Bold/Main.js +46 -0
  265. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFourSym/Regular/All.js +63 -0
  266. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFourSym/Regular/Main.js +62 -0
  267. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Bold/All.js +28 -0
  268. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Bold/Main.js +52 -0
  269. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Regular/All.js +77 -0
  270. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Regular/Main.js +105 -0
  271. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeThreeSym/Bold/Main.js +46 -0
  272. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeThreeSym/Regular/All.js +63 -0
  273. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeThreeSym/Regular/Main.js +62 -0
  274. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeTwoSym/Bold/Main.js +46 -0
  275. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeTwoSym/Regular/All.js +64 -0
  276. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeTwoSym/Regular/Main.js +63 -0
  277. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Bold/All.js +60 -0
  278. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Bold/Main.js +44 -0
  279. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Regular/All.js +120 -0
  280. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Regular/Main.js +49 -0
  281. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/fontdata-beta.js +373 -0
  282. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/fontdata.js +1403 -0
  283. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js +65 -0
  284. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js +55 -0
  285. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js +33 -0
  286. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js +29 -0
  287. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js +29 -0
  288. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js +28 -0
  289. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js +28 -0
  290. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js +36 -0
  291. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js +29 -0
  292. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js +31 -0
  293. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js +28 -0
  294. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js +34 -0
  295. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js +51 -0
  296. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js +138 -0
  297. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js +28 -0
  298. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js +28 -0
  299. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js +29 -0
  300. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js +43 -0
  301. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js +29 -0
  302. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js +50 -0
  303. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Main.js +96 -0
  304. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Main.js +95 -0
  305. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/BasicLatin.js +109 -0
  306. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Main.js +36 -0
  307. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Other.js +30 -0
  308. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/PUA.js +34 -0
  309. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/BasicLatin.js +109 -0
  310. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Main.js +35 -0
  311. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Other.js +30 -0
  312. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/PUA.js +35 -0
  313. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Main.js +43 -0
  314. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Main.js +110 -0
  315. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Main.js +109 -0
  316. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Main.js +42 -0
  317. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Arrows.js +51 -0
  318. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiacritMarks.js +39 -0
  319. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiactForSymbols.js +28 -0
  320. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js +44 -0
  321. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeometricShapes.js +32 -0
  322. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GreekAndCoptic.js +38 -0
  323. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Latin1Supplement.js +36 -0
  324. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedA.js +28 -0
  325. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedB.js +28 -0
  326. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LetterlikeSymbols.js +33 -0
  327. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Main.js +161 -0
  328. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MathOperators.js +94 -0
  329. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscMathSymbolsA.js +29 -0
  330. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscSymbols.js +34 -0
  331. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscTechnical.js +33 -0
  332. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SpacingModLetters.js +36 -0
  333. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SuppMathOperators.js +30 -0
  334. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SupplementalArrowsA.js +34 -0
  335. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/CombDiacritMarks.js +38 -0
  336. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GeneralPunctuation.js +33 -0
  337. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GreekAndCoptic.js +38 -0
  338. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Latin1Supplement.js +28 -0
  339. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LatinExtendedA.js +28 -0
  340. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LatinExtendedB.js +28 -0
  341. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LetterlikeSymbols.js +28 -0
  342. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Main.js +137 -0
  343. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Arrows.js +51 -0
  344. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js +39 -0
  345. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiactForSymbols.js +28 -0
  346. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeneralPunctuation.js +38 -0
  347. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeometricShapes.js +32 -0
  348. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GreekAndCoptic.js +38 -0
  349. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Latin1Supplement.js +32 -0
  350. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/LatinExtendedA.js +28 -0
  351. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/LatinExtendedB.js +28 -0
  352. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/LetterlikeSymbols.js +33 -0
  353. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Main.js +304 -0
  354. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MathOperators.js +94 -0
  355. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscMathSymbolsA.js +31 -0
  356. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscSymbols.js +34 -0
  357. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscTechnical.js +35 -0
  358. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SpacingModLetters.js +28 -0
  359. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SuppMathOperators.js +30 -0
  360. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SupplementalArrowsA.js +34 -0
  361. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js +205 -0
  362. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Main.js +204 -0
  363. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/BasicLatin.js +115 -0
  364. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js +38 -0
  365. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Main.js +36 -0
  366. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Other.js +47 -0
  367. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js +115 -0
  368. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/CombDiacritMarks.js +38 -0
  369. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js +36 -0
  370. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Other.js +47 -0
  371. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/BasicLatin.js +115 -0
  372. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/CombDiacritMarks.js +38 -0
  373. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Main.js +35 -0
  374. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Other.js +47 -0
  375. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/BasicLatin.js +54 -0
  376. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Main.js +62 -0
  377. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Other.js +28 -0
  378. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Main.js +74 -0
  379. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Main.js +66 -0
  380. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Main.js +50 -0
  381. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Main.js +77 -0
  382. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/BasicLatin.js +123 -0
  383. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/CombDiacritMarks.js +36 -0
  384. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Main.js +35 -0
  385. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Other.js +44 -0
  386. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinChrome/Regular/Main.js +43 -0
  387. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js +56 -0
  388. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js +82 -0
  389. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js +111 -0
  390. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata.js +1691 -0
  391. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/imageFonts.js +185 -0
  392. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/jax.js +1991 -0
  393. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/NativeMML/config.js +51 -0
  394. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/NativeMML/jax.js +230 -0
  395. data/lib/gollum/frontend/public/javascript/MathJax/test/index-images.html +119 -0
  396. data/lib/gollum/frontend/public/javascript/MathJax/test/index.html +127 -0
  397. data/lib/gollum/frontend/public/javascript/MathJax/test/sample.html +99 -0
  398. data/lib/gollum/frontend/public/javascript/gollum.js +244 -0
  399. data/lib/gollum/frontend/public/javascript/jquery-1.4.2.min.js +154 -0
  400. data/lib/gollum/frontend/public/javascript/jquery.previewable_comment_form.js +57 -0
  401. data/lib/gollum/frontend/public/javascript/jquery.tabs.js +59 -0
  402. data/lib/gollum/frontend/public/javascript/jquery.text_selection-1.0.0.min.js +1 -0
  403. data/lib/gollum/frontend/templates/compare.mustache +33 -0
  404. data/lib/gollum/frontend/templates/create.mustache +39 -0
  405. data/lib/gollum/frontend/templates/edit.mustache +38 -0
  406. data/lib/gollum/frontend/templates/editbar.mustache +1196 -0
  407. data/lib/gollum/frontend/templates/history.mustache +37 -0
  408. data/lib/gollum/frontend/templates/layout.mustache +33 -0
  409. data/lib/gollum/frontend/templates/page.mustache +27 -0
  410. data/lib/gollum/frontend/views/compare.rb +90 -0
  411. data/lib/gollum/frontend/views/create.rb +21 -0
  412. data/lib/gollum/frontend/views/edit.rb +13 -0
  413. data/lib/gollum/frontend/views/editable.rb +13 -0
  414. data/lib/gollum/frontend/views/history.rb +44 -0
  415. data/lib/gollum/frontend/views/layout.rb +14 -0
  416. data/lib/gollum/frontend/views/page.rb +38 -0
  417. data/lib/gollum/markup.rb +331 -0
  418. data/lib/gollum/page.rb +354 -0
  419. data/lib/gollum/pagination.rb +61 -0
  420. data/lib/gollum/wiki.rb +335 -0
  421. data/templates/formatting.html +92 -0
  422. data/test/examples/lotr.git/HEAD +1 -0
  423. data/test/examples/lotr.git/config +5 -0
  424. data/test/examples/lotr.git/description +1 -0
  425. data/test/examples/lotr.git/hooks/applypatch-msg.sample +15 -0
  426. data/test/examples/lotr.git/hooks/commit-msg.sample +24 -0
  427. data/test/examples/lotr.git/hooks/post-commit.sample +8 -0
  428. data/test/examples/lotr.git/hooks/post-receive.sample +15 -0
  429. data/test/examples/lotr.git/hooks/post-update.sample +8 -0
  430. data/test/examples/lotr.git/hooks/pre-applypatch.sample +14 -0
  431. data/test/examples/lotr.git/hooks/pre-commit.sample +46 -0
  432. data/test/examples/lotr.git/hooks/pre-rebase.sample +169 -0
  433. data/test/examples/lotr.git/hooks/prepare-commit-msg.sample +36 -0
  434. data/test/examples/lotr.git/hooks/update.sample +128 -0
  435. data/test/examples/lotr.git/info/exclude +6 -0
  436. data/test/examples/lotr.git/info/refs +1 -0
  437. data/test/examples/lotr.git/objects/06/131480411710c92a82fe2d1e76932c70feb2e5 +0 -0
  438. data/test/examples/lotr.git/objects/0a/de1e2916346d4c1f2fb63b863fd3c16808fe44 +0 -0
  439. data/test/examples/lotr.git/objects/0e/d8cbe0a25235bd867e65193c7d837c66b328ef +3 -0
  440. data/test/examples/lotr.git/objects/24/49c2681badfd3c189e8ed658dacffe8ba48fe5 +0 -0
  441. data/test/examples/lotr.git/objects/2c/b9156ad383914561a8502fc70f5a1d887e48ad +4 -0
  442. data/test/examples/lotr.git/objects/5d/cac289a8603188d2c5caf481dcba2985126aaa +0 -0
  443. data/test/examples/lotr.git/objects/60/f12f4254f58801b9ee7db7bca5fa8aeefaa56b +0 -0
  444. data/test/examples/lotr.git/objects/71/4323c104239440a5c66ab12a67ed07a83c404f +0 -0
  445. data/test/examples/lotr.git/objects/93/6b83ee0dd8837adb82511e40d5e4ebe59bb675 +0 -0
  446. data/test/examples/lotr.git/objects/94/523d7ae48aeba575099dd12926420d8fd0425d +2 -0
  447. data/test/examples/lotr.git/objects/96/97dc65e095658bbd1b8e8678e08881e86d32f1 +0 -0
  448. data/test/examples/lotr.git/objects/aa/b61fe89d56f8614c0a8151da34f939dcedfa68 +0 -0
  449. data/test/examples/lotr.git/objects/c3/b43e9f08966b088e7a0192e436b7a884542e05 +0 -0
  450. data/test/examples/lotr.git/objects/dc/596d6b2dd89ab05c66f4abd7d5eb706bc17f19 +0 -0
  451. data/test/examples/lotr.git/objects/ec/da3205bee14520aab5a7bb307392064b938e83 +0 -0
  452. data/test/examples/lotr.git/objects/fa/e7ef5344202bba4129abdc13060d9297d99465 +3 -0
  453. data/test/examples/lotr.git/objects/info/packs +2 -0
  454. data/test/examples/lotr.git/objects/pack/pack-dcbeaf3f6ff6c5eb08ea2b0a2d83626e8763546b.idx +0 -0
  455. data/test/examples/lotr.git/objects/pack/pack-dcbeaf3f6ff6c5eb08ea2b0a2d83626e8763546b.pack +0 -0
  456. data/test/examples/lotr.git/packed-refs +2 -0
  457. data/test/examples/lotr.git/refs/heads/master +1 -0
  458. data/test/helper.rb +38 -0
  459. data/test/test_file.rb +18 -0
  460. data/test/test_markup.rb +348 -0
  461. data/test/test_page.rb +112 -0
  462. data/test/test_wiki.rb +201 -0
  463. metadata +626 -0
@@ -0,0 +1,61 @@
1
+ .highlight { background: #ffffff; }
2
+ .highlight .c { color: #999988; font-style: italic } /* Comment */
3
+ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
4
+ .highlight .k { font-weight: bold } /* Keyword */
5
+ .highlight .o { font-weight: bold } /* Operator */
6
+ .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
7
+ .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
8
+ .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
9
+ .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
10
+ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
11
+ .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
12
+ .highlight .ge { font-style: italic } /* Generic.Emph */
13
+ .highlight .gr { color: #aa0000 } /* Generic.Error */
14
+ .highlight .gh { color: #999999 } /* Generic.Heading */
15
+ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
16
+ .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
17
+ .highlight .gc { color: #999; background-color: #EAF2F5 }
18
+ .highlight .go { color: #888888 } /* Generic.Output */
19
+ .highlight .gp { color: #555555 } /* Generic.Prompt */
20
+ .highlight .gs { font-weight: bold } /* Generic.Strong */
21
+ .highlight .gu { color: #aaaaaa } /* Generic.Subheading */
22
+ .highlight .gt { color: #aa0000 } /* Generic.Traceback */
23
+ .highlight .kc { font-weight: bold } /* Keyword.Constant */
24
+ .highlight .kd { font-weight: bold } /* Keyword.Declaration */
25
+ .highlight .kp { font-weight: bold } /* Keyword.Pseudo */
26
+ .highlight .kr { font-weight: bold } /* Keyword.Reserved */
27
+ .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
28
+ .highlight .m { color: #009999 } /* Literal.Number */
29
+ .highlight .s { color: #d14 } /* Literal.String */
30
+ .highlight .na { color: #008080 } /* Name.Attribute */
31
+ .highlight .nb { color: #0086B3 } /* Name.Builtin */
32
+ .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
33
+ .highlight .no { color: #008080 } /* Name.Constant */
34
+ .highlight .ni { color: #800080 } /* Name.Entity */
35
+ .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
36
+ .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
37
+ .highlight .nn { color: #555555 } /* Name.Namespace */
38
+ .highlight .nt { color: #000080 } /* Name.Tag */
39
+ .highlight .nv { color: #008080 } /* Name.Variable */
40
+ .highlight .ow { font-weight: bold } /* Operator.Word */
41
+ .highlight .w { color: #bbbbbb } /* Text.Whitespace */
42
+ .highlight .mf { color: #009999 } /* Literal.Number.Float */
43
+ .highlight .mh { color: #009999 } /* Literal.Number.Hex */
44
+ .highlight .mi { color: #009999 } /* Literal.Number.Integer */
45
+ .highlight .mo { color: #009999 } /* Literal.Number.Oct */
46
+ .highlight .sb { color: #d14 } /* Literal.String.Backtick */
47
+ .highlight .sc { color: #d14 } /* Literal.String.Char */
48
+ .highlight .sd { color: #d14 } /* Literal.String.Doc */
49
+ .highlight .s2 { color: #d14 } /* Literal.String.Double */
50
+ .highlight .se { color: #d14 } /* Literal.String.Escape */
51
+ .highlight .sh { color: #d14 } /* Literal.String.Heredoc */
52
+ .highlight .si { color: #d14 } /* Literal.String.Interpol */
53
+ .highlight .sx { color: #d14 } /* Literal.String.Other */
54
+ .highlight .sr { color: #009926 } /* Literal.String.Regex */
55
+ .highlight .s1 { color: #d14 } /* Literal.String.Single */
56
+ .highlight .ss { color: #990073 } /* Literal.String.Symbol */
57
+ .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
58
+ .highlight .vc { color: #008080 } /* Name.Variable.Class */
59
+ .highlight .vg { color: #008080 } /* Name.Variable.Global */
60
+ .highlight .vi { color: #008080 } /* Name.Variable.Instance */
61
+ .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,1704 @@
1
+ /*************************************************************
2
+ *
3
+ * MathJax.js
4
+ *
5
+ * The main support code for the MathJax Hub, including the
6
+ * Ajax, CallBack, Messaging, and Object-Oriented Programming
7
+ * libraries, as well as the base Jax classes, and startup
8
+ * processing code.
9
+ *
10
+ * ---------------------------------------------------------------------
11
+ *
12
+ * Copyright (c) 2009 Design Science, Inc.
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
+
27
+ if (document.getElementById && document.childNodes && document.createElement) {
28
+
29
+ if (!window.MathJax) {window.MathJax= {}}
30
+ MathJax.version = "0.9.8";
31
+
32
+ /**********************************************************/
33
+
34
+ (function (BASENAME) {
35
+ var BASE = window[BASENAME];
36
+ if (!BASE) {BASE = window[BASENAME] = {}}
37
+
38
+ var PROTO = []; // a static object used to indicate when a prototype is being created
39
+ var OBJECT = function (def) {
40
+ var obj = def.constructor; if (!obj) {obj = new Function("")}
41
+ for (var id in def) {if (id !== 'constructor' && def.hasOwnProperty(id)) {obj[id] = def[id]}}
42
+ return obj;
43
+ };
44
+ var CONSTRUCTOR = function () {
45
+ return new Function ("return arguments.callee.Init.call(this,arguments)");
46
+ };
47
+ //
48
+ // Test for Safari 2.x bug (can't replace prototype for result of new Function()).
49
+ // (We don't use this version for everyone since it is a closure and we don't need that).
50
+ //
51
+ var BUGTEST = CONSTRUCTOR(); BUGTEST.prototype = {bug_test: 1};
52
+ if (!BUGTEST.prototype.bug_test) {
53
+ CONSTRUCTOR = function () {
54
+ return function () {return arguments.callee.Init.call(this,arguments)};
55
+ };
56
+ };
57
+
58
+ BASE.Object = OBJECT({
59
+ constructor: CONSTRUCTOR(),
60
+
61
+ Subclass: function (def,classdef) {
62
+ var obj = CONSTRUCTOR();
63
+ obj.SUPER = this; obj.Init = this.Init;
64
+ obj.Subclass = this.Subclass; obj.Augment = this.Augment;
65
+ obj.protoFunction = this.protoFunction;
66
+ obj.can = this.can; obj.has = this.has; obj.isa = this.isa;
67
+ obj.prototype = new this(PROTO);
68
+ obj.prototype.constructor = obj; // the real constructor
69
+ obj.Augment(def,classdef);
70
+ return obj;
71
+ },
72
+
73
+ Init: function (args) {
74
+ var obj = this;
75
+ if (args.length !== 1 || args[0] !== PROTO) {
76
+ if (!(obj instanceof args.callee)) {obj = new args.callee(PROTO)}
77
+ obj.Init.apply(obj,args);
78
+ }
79
+ return obj;
80
+ },
81
+
82
+ Augment: function (def,classdef) {
83
+ var id;
84
+ if (def != null) {
85
+ for (id in def) {if (def.hasOwnProperty(id)) {this.protoFunction(id,def[id])}}
86
+ // MSIE doesn't list toString even if it is not native so handle it separately
87
+ if (def.toString !== this.prototype.toString && def.toString !== {}.toString)
88
+ {this.protoFunction('toString',def.toString)}
89
+ }
90
+ if (classdef != null) {
91
+ for (id in classdef) {if (classdef.hasOwnProperty(id)) {this[id] = classdef[id]}}
92
+ }
93
+ },
94
+
95
+ protoFunction: function (id,def) {
96
+ this.prototype[id] = def;
97
+ if (def instanceof Function) {def.SUPER = this.SUPER.prototype}
98
+ },
99
+
100
+ prototype: {
101
+ Init: function () {},
102
+ SUPER: function (fn) {return fn.callee.SUPER},
103
+ can: function (method) {return typeof(this[method]) === "function"},
104
+ has: function (property) {return typeof(this[property]) !== "undefined"},
105
+ isa: function (obj) {return (obj instanceof Object) && (this instanceof obj)}
106
+ },
107
+
108
+ can: function (method) {return this.prototype.can.call(this,method)},
109
+ has: function (property) {return this.prototype.has.call(this,property)},
110
+ isa: function (obj) {
111
+ var constructor = this;
112
+ while (constructor) {
113
+ if (constructor === obj) {return true} else {constructor = constructor.SUPER}
114
+ }
115
+ return false;
116
+ },
117
+
118
+
119
+ SimpleSUPER: OBJECT({
120
+ constructor: function (def) {return this.SimpleSUPER.define(def)},
121
+
122
+ define: function (src) {
123
+ var dst = {};
124
+ if (src != null) {
125
+ for (var id in def) {if (def.hasOwnProperty(id)) {this.protoFunction(id,def[id])}}
126
+ // MSIE doesn't list toString even if it is not native so handle it separately
127
+ if (def.toString !== this.prototype.toString && def.toString !== {}.toString)
128
+ {this.protoFunction('toString',def.toString)}
129
+ }
130
+ return dst;
131
+ },
132
+
133
+ wrap: function (id,f) {
134
+ if (typeof(f) === 'function' && f.toString().match(/\.\s*SUPER\s*\(/)) {
135
+ var fn = new Function(this.wrapper);
136
+ fn.label = id; fn.original = f; f = fn;
137
+ fn.toString = this.stringify;
138
+ }
139
+ return f;
140
+ },
141
+
142
+ wrapper: function () {
143
+ var fn = arguments.callee;
144
+ this.SUPER = fn.SUPER[fn.label];
145
+ try {var result = fn.original.apply(this,arguments)}
146
+ catch (err) {delete this.SUPER; throw err}
147
+ delete this.SUPER;
148
+ return result;
149
+ }.toString().replace(/^\s*function \(\)\s*\{\s*/i,"").replace(/\s*\}\s*$/i,""),
150
+
151
+ toString: function () {
152
+ return this.original.toString.apply(this.original,arguments);
153
+ }
154
+ })
155
+ });
156
+
157
+ })("MathJax");
158
+
159
+ /**********************************************************/
160
+
161
+ /*
162
+ * Create a callback function from various forms of data:
163
+ *
164
+ * MathJax.CallBack(fn) -- callback to a function
165
+ *
166
+ * MathJax.CallBack([fn]) -- callback to function
167
+ * MathJax.CallBack([fn,data...])
168
+ * -- callback to function with given data as arguments
169
+ * MathJax.CallBack([object,fn])
170
+ * -- call fn with object as "this"
171
+ * MathJax.CallBack([object,fn,data...])
172
+ * -- call fn with object as "this" and data as arguments
173
+ * MathJax.CallBack(["method",object])
174
+ * -- call method of object wth object as "this"
175
+ * MathJax.CallBack(["method",object,data...])
176
+ * -- as above, but with data as arguments to method
177
+ *
178
+ * MathJax.CallBack({hook: fn, data: [...], object: this})
179
+ * -- give function, data, and object to act as "this" explicitly
180
+ *
181
+ * MathJax.CallBack("code") -- callback that compiles and executes a string
182
+ *
183
+ * MathJax.CallBack([...],i)
184
+ * -- use slice of array starting at i and interpret
185
+ * result as above. (Used for passing "arguments" array
186
+ * and trimming initial arguments, if any.)
187
+ */
188
+
189
+ /*
190
+ * MathJax.CallBack.After([...],cb1,cb2,...)
191
+ * -- make a callback that isn't called until all the other
192
+ * ones are called first. I.e., wait for a union of
193
+ * callbacks to occur before making the given callback.
194
+ */
195
+
196
+ /*
197
+ * MathJax.CallBack.Queue([callback,...])
198
+ * -- make a synchronized queue of commands that process
199
+ * sequentially, waiting for those that return uncalled
200
+ * callbacks.
201
+ */
202
+
203
+ /*
204
+ * MathJax.CallBack.Signal(name)
205
+ * -- finds or creates a names signal, to which listeners
206
+ * can be attached and are signaled by messages posted
207
+ * to the signal. Responses can be asynchronous.
208
+ */
209
+
210
+ (function (BASENAME) {
211
+ var BASE = window[BASENAME];
212
+ if (!BASE) {BASE = window[BASENAME] = {}}
213
+ //
214
+ // Create a callback from an associative array
215
+ //
216
+ var CALLBACK = function (data) {
217
+ var cb = new Function("return arguments.callee.execute.apply(arguments.callee,arguments)");
218
+ for (var id in CALLBACK.prototype) {
219
+ if (CALLBACK.prototype.hasOwnProperty(id)) {
220
+ if (typeof(data[id]) !== 'undefined') {cb[id] = data[id]}
221
+ else {cb[id] = CALLBACK.prototype[id]}
222
+ }
223
+ }
224
+ cb.toString = CALLBACK.prototype.toString;
225
+ return cb;
226
+ };
227
+ CALLBACK.prototype = {
228
+ isCallback: true,
229
+ hook: function () {},
230
+ data: [],
231
+ object: window,
232
+ execute: function () {
233
+ if (!this.called || this.autoReset) {
234
+ this.called = !this.autoReset;
235
+ return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)));
236
+ }
237
+ },
238
+ reset: function () {delete this.called},
239
+ toString: function () {return this.hook.toString.apply(this.hook,arguments)}
240
+ };
241
+ var ISCALLBACK = function (f) {
242
+ return (f instanceof Function && f.isCallback);
243
+ }
244
+ //
245
+ // Evaluate a string in global context
246
+ //
247
+ var EVAL = function (code) {return eval.call(window,code)}
248
+ EVAL("var __TeSt_VaR__ = 1"); // check if it works in global context
249
+ if (window.__TeSt_VaR__) {delete window.__TeSt_VaR__} else {
250
+ if (window.execScript) {
251
+ // IE
252
+ EVAL = function (code) {
253
+ BASE.__code = code;
254
+ code = "try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";
255
+ window.execScript(code);
256
+ var result = BASE.__result; delete BASE.__result; delete BASE.__code;
257
+ if (result instanceof Error) {throw result}
258
+ return result;
259
+ }
260
+ } else {
261
+ // Safari2
262
+ EVAL = function (code) {
263
+ BASE.__code = code;
264
+ code = "try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";
265
+ var head = (document.getElementsByTagName("head"))[0]; if (!head) {head = document.body}
266
+ var script = document.createElement("script");
267
+ script.appendChild(document.createTextNode(code));
268
+ head.appendChild(script); head.removeChild(script);
269
+ var result = BASE.__result; delete BASE.__result; delete BASE.__code;
270
+ if (result instanceof Error) {throw result}
271
+ return result;
272
+ }
273
+ }
274
+ }
275
+ //
276
+ // Create a callback from various types of data
277
+ //
278
+ var USING = function (args,i) {
279
+ if (arguments.length > 1) {
280
+ if (arguments.length === 2 && !(arguments[0] instanceof Function) &&
281
+ arguments[0] instanceof Object && typeof arguments[1] === 'number')
282
+ {args = [].slice.call(args,i)}
283
+ else {args = [].slice.call(arguments,0)}
284
+ }
285
+ if (args instanceof Array && args.length === 1) {args = args[0]}
286
+ if (args instanceof Function) {
287
+ if (args.execute === CALLBACK.prototype.execute) {return args}
288
+ return CALLBACK({hook: args});
289
+ } else if (args instanceof Array) {
290
+ if (typeof(args[0]) === 'string' && args[1] instanceof Object &&
291
+ args[1][args[0]] instanceof Function) {
292
+ return CALLBACK({hook: args[1][args[0]], object: args[1], data: args.slice(2)});
293
+ } else if (args[0] instanceof Function) {
294
+ return CALLBACK({hook: args[0], data: args.slice(1)});
295
+ } else if (args[1] instanceof Function) {
296
+ return CALLBACK({hook: args[1], object: args[0], data: args.slice(2)});
297
+ }
298
+ } else if (typeof(args) === 'string') {
299
+ return CALLBACK({hook: EVAL, data: [args]});
300
+ } else if (args instanceof Object) {
301
+ return CALLBACK(args);
302
+ } else if (typeof(args) === 'undefined') {
303
+ return CALLBACK({});
304
+ }
305
+ throw Error("Can't make callback from given data");
306
+ };
307
+
308
+ //
309
+ // Wait for a given time to elapse and then perform the callback
310
+ //
311
+ var DELAY = function (time,callback) {
312
+ callback = USING(callback);
313
+ callback.timeout = setTimeout(callback,time);
314
+ return callback;
315
+ };
316
+
317
+ //
318
+ // Callback used by AFTER, QUEUE, and SIGNAL to check if calls have completed
319
+ //
320
+ var WAITFOR = function (callback,signal) {
321
+ callback = USING(callback);
322
+ if (!callback.called) {WAITSIGNAL(callback,signal); signal.pending++}
323
+ };
324
+ var WAITEXECUTE = function () {
325
+ var signals = this.signal; delete this.signal;
326
+ this.execute = this.oldExecute; delete this.oldExecute;
327
+ var result = this.execute.apply(this,arguments);
328
+ if (ISCALLBACK(result) && !result.called) {WAITSIGNAL(result,signals)} else {
329
+ for (var i = 0, m = signals.length; i < m; i++) {
330
+ signals[i].pending--;
331
+ if (signals[i].pending <= 0) {var result = signals[i].call()}
332
+ }
333
+ }
334
+ };
335
+ var WAITSIGNAL = function (callback,signals) {
336
+ if (!(signals instanceof Array)) {signals = [signals]}
337
+ if (!callback.signal) {
338
+ callback.oldExecute = callback.execute;
339
+ callback.execute = WAITEXECUTE;
340
+ callback.signal = signals;
341
+ } else if (signals.length === 1) {callback.signal.push(signals[0])}
342
+ else {callback.signal = callback.signal.concat(signals)}
343
+ };
344
+
345
+ //
346
+ // Create a callback that is called when a collection of other callbacks have
347
+ // all been executed. If the callback gets calledimmediately (i.e., the
348
+ // others are all already called), check if it returns another callback
349
+ // and return that instead.
350
+ //
351
+ var AFTER = function (callback) {
352
+ callback = USING(callback);
353
+ callback.pending = 0;
354
+ for (var i = 1, m = arguments.length; i < m; i++)
355
+ {if (arguments[i]) {WAITFOR(arguments[i],callback)}}
356
+ if (callback.pending === 0) {
357
+ var result = callback();
358
+ if (ISCALLBACK(result)) {callback = result}
359
+ }
360
+ return callback;
361
+ };
362
+
363
+ //
364
+ // Run an array of callbacks passing them the given data.
365
+ // If any return callbacks, return a callback that will be
366
+ // executed when they all have completed.
367
+ //
368
+ var HOOKS = function (hooks,data,reset) {
369
+ if (!hooks) {return null}
370
+ if (!(hooks instanceof Array)) {hooks = [hooks]}
371
+ if (!(data instanceof Array)) {data = (data == null ? [] : [data])}
372
+ var callbacks = [{}];
373
+ for (var i = 0, m = hooks.length; i < m; i++) {
374
+ if (reset) {hooks[i].reset()}
375
+ var result = hooks[i].apply(window,data);
376
+ if (ISCALLBACK(result) && !result.called) {callbacks.push(result)}
377
+ }
378
+ if (callbacks.length === 1) {return null}
379
+ if (callbacks.length === 2) {return callbacks[1]}
380
+ return AFTER.apply({},callbacks);
381
+ };
382
+
383
+ //
384
+ // Command queue that performs commands in order, waiting when
385
+ // necessary for commands to complete asynchronousely
386
+ //
387
+ var QUEUE = BASE.Object.Subclass({
388
+ //
389
+ // Create the queue and push any commands that are specified
390
+ //
391
+ Init: function () {
392
+ this.pending = 0; this.running = 0;
393
+ this.queue = [];
394
+ this.Push.apply(this,arguments);
395
+ },
396
+ //
397
+ // Add commands to the queue and run them. Adding a callback object
398
+ // (rather than a callback specification) queues a wait for that callback.
399
+ // Return the final callback for synchronization purposes.
400
+ //
401
+ Push: function () {
402
+ var callback;
403
+ for (var i = 0, m = arguments.length; i < m; i++) {
404
+ callback = USING(arguments[i]);
405
+ if (callback === arguments[i] && !callback.called)
406
+ {callback = USING(["wait",this,callback])}
407
+ this.queue.push(callback);
408
+ }
409
+ if (!this.running && !this.pending) {this.Process()}
410
+ return callback;
411
+ },
412
+ //
413
+ // Process the command queue if we aren't waiting on another command
414
+ //
415
+ Process: function (queue) {
416
+ while (!this.running && !this.pending && this.queue.length) {
417
+ var callback = this.queue[0];
418
+ queue = this.queue.slice(1); this.queue = [];
419
+ this.Suspend(); var result = callback(); this.Resume();
420
+ if (queue.length) {this.queue = queue.concat(this.queue)}
421
+ if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
422
+ }
423
+ },
424
+ //
425
+ // Suspend/Resume command processing on this queue
426
+ //
427
+ Suspend: function () {this.running++},
428
+ Resume: function () {if (this.running) {this.running--}},
429
+ //
430
+ // Used by WAITFOR to restart the queue when an action completes
431
+ //
432
+ call: function () {this.Process.apply(this,arguments)},
433
+ wait: function (callback) {return callback}
434
+ });
435
+
436
+ //
437
+ // Create a named signal that listeners can attach to, to be signaled by
438
+ // postings made to the signal. Posts are queued if they occur while one
439
+ // is already in process.
440
+ //
441
+ var SIGNAL = QUEUE.Subclass({
442
+ Init: function (name) {
443
+ QUEUE.prototype.Init.call(this);
444
+ this.name = name;
445
+ this.posted = []; // the messages posted so far
446
+ this.listeners = []; // those with interest in this signal
447
+ },
448
+ //
449
+ // Post a message to the signal listeners, with callback for when complete
450
+ //
451
+ Post: function (message,callback,forget) {
452
+ callback = USING(callback);
453
+ if (this.posting || this.pending) {
454
+ this.Push(["Post",this,message,callback,forget]);
455
+ } else {
456
+ this.callback = callback; callback.reset();
457
+ if (!forget) {this.posted.push(message)}
458
+ this.Suspend(); this.posting = 1;
459
+ for (var i = 0, m = this.listeners.length; i < m; i++) {
460
+ this.listeners[i].reset();
461
+ var result = (this.listeners[i])(message);
462
+ if (ISCALLBACK(result) && !result.called) {WAITFOR(result,this)}
463
+ }
464
+ this.Resume(); delete this.posting;
465
+ if (!this.pending) {this.call()}
466
+ }
467
+ return callback;
468
+ },
469
+ //
470
+ // Clear the post history (so new listeners won't get old messages)
471
+ //
472
+ Clear: function (callback) {
473
+ callback = USING(callback);
474
+ if (this.posting || this.pending) {
475
+ callback = this.Push(["Clear",this,callback]);
476
+ } else {
477
+ this.posted = [];
478
+ callback();
479
+ }
480
+ return callback;
481
+ },
482
+ //
483
+ // Call the callback (all replies are in) and process the command queue
484
+ //
485
+ call: function () {this.callback(this); this.Process()},
486
+
487
+ //
488
+ // A listener calls this to register intrest in the signal (so it will be called
489
+ // when posts occur). If ignorePast is 1, it will not be sent the post history.
490
+ //
491
+ Interest: function (callback,ignorePast) {
492
+ callback = USING(callback);
493
+ this.listeners[this.listeners.length] = callback;
494
+ if (!ignorePast) {
495
+ for (var i = 0, m = this.posted.length; i < m; i++) {
496
+ callback.reset();
497
+ var result = callback(this.posted[i]);
498
+ if (ISCALLBACK(result) && i === this.posted.length-1) {WAITFOR(result,this)}
499
+ }
500
+ }
501
+ return callback;
502
+ },
503
+ //
504
+ // A listener calls this to remove itself from a signal
505
+ //
506
+ NoInterest: function (callback) {
507
+ for (var i = 0, m = this.listeners.length; i < m; i++) {
508
+ if (this.listeners[i] === callback) {this.listeners.splice(i,1); return}
509
+ }
510
+ },
511
+
512
+ //
513
+ // Hook a callback to a particular message on this signal
514
+ //
515
+ MessageHook: function (msg,callback) {
516
+ callback = USING(callback);
517
+ if (!this.hooks) {this.hooks = {}; this.Interest(["ExecuteHooks",this])}
518
+ if (!this.hooks[msg]) {this.hooks[msg] = []}
519
+ this.hooks[msg].push(callback);
520
+ for (var i = 0, m = this.posted.length; i < m; i++)
521
+ {if (this.posted[i] == msg) {callback.reset(); callback(this.posted[i])}}
522
+ return callback;
523
+ },
524
+ //
525
+ // Execute the message hooks for the given message
526
+ //
527
+ ExecuteHooks: function (msg,more) {
528
+ var type = ((msg instanceof Array) ? msg[0] : msg);
529
+ return HOOKS(this.hooks[type],[msg],true);
530
+ }
531
+
532
+ },{
533
+ signals: {}, // the named signals
534
+ find: function (name) {
535
+ if (!SIGNAL.signals[name]) {SIGNAL.signals[name] = new SIGNAL(name)}
536
+ return SIGNAL.signals[name];
537
+ }
538
+ });
539
+
540
+ //
541
+ // The main entry-points
542
+ //
543
+ BASE.CallBack = USING;
544
+ BASE.CallBack.Delay = DELAY;
545
+ BASE.CallBack.After = AFTER;
546
+ BASE.CallBack.Queue = QUEUE;
547
+ BASE.CallBack.Signal = SIGNAL.find;
548
+ BASE.CallBack.ExecuteHooks = HOOKS;
549
+ })("MathJax");
550
+
551
+ /**********************************************************/
552
+
553
+ (function (BASENAME) {
554
+ var BASE = window[BASENAME];
555
+ if (!BASE) {BASE = window[BASENAME] = {}}
556
+
557
+ var isSafari2 = (navigator.vendor === "Apple Computer, Inc." &&
558
+ typeof navigator.vendorSub === "undefined");
559
+ var sheets = 0; // used by Safari2
560
+
561
+ //
562
+ // Update sheets count and look up the head object
563
+ //
564
+ var HEAD = function (head) {
565
+ if (document.styleSheets && document.styleSheets.length > sheets)
566
+ {sheets = document.styleSheets.length}
567
+ if (!head) {
568
+ head = (document.getElementsByTagName("head"))[0];
569
+ if (!head) {head = document.body}
570
+ }
571
+ return head;
572
+ };
573
+
574
+ //
575
+ // Remove scripts that are completed so they don't clutter up the HEAD.
576
+ // This runs via setTimeout since IE7 can't remove the script while it is running.
577
+ //
578
+ var SCRIPTS = []; // stores scripts to be removed after a delay
579
+ var REMOVESCRIPTS = function () {
580
+ for (var i = 0, m = SCRIPTS.length; i < m; i++) {BASE.Ajax.head.removeChild(SCRIPTS[i])}
581
+ SCRIPTS = [];
582
+ };
583
+
584
+ BASE.Ajax = {
585
+ loaded: {}, // files already loaded
586
+ loading: {}, // files currently in process of loading
587
+ loadHooks: {}, // hooks to call when files are loaded
588
+ timeout: 15*1000, // timeout for loading of files (15 seconds)
589
+ styleDelay: 1, // delay to use before styles are available
590
+ config: {root: ""}, // URL of root directory to load from
591
+
592
+ STATUS: {
593
+ OK: 1, // file is loading or did load OK
594
+ ERROR: -1 // file timed out during load
595
+ },
596
+
597
+ rootPattern: new RegExp("^\\["+BASENAME+"\\]"),
598
+
599
+ //
600
+ // Return a complete URL to a file (replacing the root pattern)
601
+ //
602
+ fileURL: function (file) {return file.replace(this.rootPattern,this.config.root)},
603
+
604
+ //
605
+ // Load a file if it hasn't been already.
606
+ // Make sure the file URL is "safe"?
607
+ //
608
+ Require: function (file,callback) {
609
+ callback = BASE.CallBack(callback); var type;
610
+ if (file instanceof Object) {for (var i in file) {}; type = i.toUpperCase(); file = file[i]}
611
+ else {type = file.split(/\./).pop().toUpperCase()}
612
+ file = this.fileURL(file);
613
+ // FIXME: check that URL is OK
614
+ if (this.loaded[file]) {
615
+ callback(this.loaded[file]);
616
+ } else {
617
+ var FILE = {}; FILE[type] = file;
618
+ this.Load(FILE,callback);
619
+ }
620
+ return callback;
621
+ },
622
+
623
+ //
624
+ // Load a file regardless of where it is and whether it has
625
+ // already been loaded.
626
+ //
627
+ Load: function (file,callback) {
628
+ callback = BASE.CallBack(callback); var type;
629
+ if (file instanceof Object) {for (var i in file) {}; type = i.toUpperCase(); file = file[i]}
630
+ else {type = file.split(/\./).pop().toUpperCase()}
631
+ file = this.fileURL(file);
632
+ if (this.loading[file]) {
633
+ this.loading[file].callbacks.push(callback);
634
+ } else {
635
+ this.head = HEAD(this.head);
636
+ if (this.loader[type]) {this.loader[type].call(this,file,callback)}
637
+ else {throw Error("Can't load files of type "+type)}
638
+ }
639
+ return callback;
640
+ },
641
+
642
+ //
643
+ // Register a load hook for a particular file (it will be called when
644
+ // loadComplete() is called for that file)
645
+ //
646
+ LoadHook: function (file,callback) {
647
+ callback = BASE.CallBack(callback);
648
+ if (file instanceof Object) {for (var i in file) {file = file[i]}}
649
+ file = this.fileURL(file);
650
+ if (this.loaded[file]) {
651
+ callback(this.loaded[file]);
652
+ } else {
653
+ if (!this.loadHooks[file]) {this.loadHooks[file] = []}
654
+ this.loadHooks[file].push(callback);
655
+ }
656
+ return callback;
657
+ },
658
+
659
+ //
660
+ // Code used to load the various types of files
661
+ // (JS for JavaScript, CSS for style sheets)
662
+ //
663
+ loader: {
664
+ //
665
+ // Create a SCRIPT tag to load the file
666
+ //
667
+ JS: function (file,callback) {
668
+ var script = document.createElement("script");
669
+ var timeout = BASE.CallBack(["loadTimeout",this,file]);
670
+ this.loading[file] = {
671
+ callbacks: [callback],
672
+ message: BASE.Message.File(file),
673
+ timeout: setTimeout(timeout,this.timeout),
674
+ status: this.STATUS.OK,
675
+ script: script
676
+ };
677
+ script.onerror = timeout; // doesn't work in IE and no apparent substitute
678
+ script.type = "text/javascript";
679
+ script.src = file;
680
+ this.head.appendChild(script);
681
+ },
682
+ //
683
+ // Create a LINK tag to load the style sheet
684
+ //
685
+ CSS: function (file,callback) {
686
+ var link = document.createElement("link");
687
+ link.rel = "stylesheet"; link.type = "text/css"; link.href = file;
688
+ this.loading[file] = {
689
+ callbacks: [callback],
690
+ message: BASE.Message.File(file),
691
+ status: this.STATUS.OK
692
+ };
693
+ this.head.appendChild(link);
694
+ this.timer.create.call(this,[this.timer.file,file],link);
695
+ }
696
+ },
697
+
698
+ //
699
+ // Timing code for checking when style sheets are available.
700
+ //
701
+ timer: {
702
+ //
703
+ // Create the timing callback and start the timing loop.
704
+ // We use a delay because some browsers need it to allow the styles
705
+ // to be processed.
706
+ //
707
+ create: function (callback,node) {
708
+ var check; callback = BASE.CallBack(callback);
709
+ if (node.nodeName === "STYLE" && node.styleSheet &&
710
+ typeof(node.styleSheet.cssText) !== 'undefined') {
711
+ callback(this.STATUS.OK); // MSIE processes style immediately, but doesn't set its styleSheet!
712
+ } else if (window.chrome && typeof(window.sessionStorage) !== "undefined" &&
713
+ node.nodeName === "STYLE") {
714
+ callback(this.STATUS.OK); // Same for Chrome 5 (beta), Grrr.
715
+ } else if (isSafari2) {
716
+ this.timer.start(this,[this.timer.checkSafari2,sheets++,callback],this.styleDelay);
717
+ } else {
718
+ this.timer.start(this,[this.timer.checkLength,node,callback],this.styleDelay);
719
+ }
720
+ return callback;
721
+ },
722
+ //
723
+ // Start the timer for the given callback checker
724
+ //
725
+ start: function (AJAX,check,delay) {
726
+ check = BASE.CallBack(check);
727
+ check.execute = this.execute; check.time = this.time;
728
+ check.STATUS = AJAX.STATUS; check.timeout = AJAX.timeout;
729
+ check.delay = check.total = 0;
730
+ setTimeout(check,delay);
731
+ },
732
+ //
733
+ // Increment the time total, increase the delay
734
+ // and test if we are past the timeout time.
735
+ //
736
+ time: function (callback) {
737
+ this.total += this.delay;
738
+ this.delay = Math.floor(this.delay * 1.05 + 5);
739
+ if (this.total >= this.timeout) {callback(this.STATUS.ERROR); return 1}
740
+ return 0;
741
+ },
742
+ //
743
+ // For JS file loads, call the proper routine according to status
744
+ //
745
+ file: function (file,status) {
746
+ if (status < 0) {BASE.Ajax.loadTimeout(file)} else {BASE.Ajax.loadComplete(file)}
747
+ },
748
+ //
749
+ // Call the hook with the required data
750
+ //
751
+ execute: function () {this.hook.call(this.object,this,this.data[0],this.data[1])},
752
+ //
753
+ // Safari2 doesn't set the link's stylesheet, so we need to look in the
754
+ // document.styleSheets array for the new sheet when it is created
755
+ //
756
+ checkSafari2: function (check,length,callback) {
757
+ if (check.time(callback)) return;
758
+ if (document.styleSheets.length > length &&
759
+ document.styleSheets[length].cssRules &&
760
+ document.styleSheets[length].cssRules.length)
761
+ {callback(check.STATUS.OK)} else {setTimeout(check,check.delay)}
762
+ },
763
+ //
764
+ // Look for the stylesheets rules and check when they are defined
765
+ // and no longer of length zero. (This assumes there actually ARE
766
+ // some rules in the stylesheet.)
767
+ //
768
+ checkLength: function (check,node,callback) {
769
+ if (check.time(callback)) return;
770
+ var isStyle = 0; var sheet = (node.sheet || node.styleSheet);
771
+ try {if ((sheet.cssRules||sheet.rules||[]).length > 0) {isStyle = 1}} catch(err) {
772
+ if (err.message.match(/protected variable|restricted URI/)) {isStyle = 1}
773
+ else if (err.message.match(/Security error/)) {
774
+ // Firefox3 gives "Security error" for missing files, so
775
+ // can't distinguish that from OK files on remote servers.
776
+ // or OK files in different directory from local files.
777
+ isStyle = 1; // just say it is OK (can't really tell)
778
+ }
779
+ }
780
+ if (isStyle) {
781
+ // Opera 9.6 requires this setTimeout
782
+ setTimeout(BASE.CallBack([callback,check.STATUS.OK]),0);
783
+ } else {
784
+ setTimeout(check,check.delay);
785
+ }
786
+ }
787
+ },
788
+
789
+ //
790
+ // JavaScript code must call this when they are completely initialized
791
+ // (this allows them to perform asynchronous actions before indicating
792
+ // that they are complete).
793
+ //
794
+ loadComplete: function (file) {
795
+ file = this.fileURL(file);
796
+ var loading = this.loading[file];
797
+ if (loading) {
798
+ BASE.Message.Clear(loading.message);
799
+ clearTimeout(loading.timeout);
800
+ if (loading.script) {
801
+ if (SCRIPTS.length === 0) {setTimeout(REMOVESCRIPTS,0)}
802
+ SCRIPTS.push(loading.script);
803
+ }
804
+ this.loaded[file] = loading.status; delete this.loading[file];
805
+ if (this.loadHooks[file]) {
806
+ BASE.CallBack.Queue(
807
+ [BASE.CallBack.ExecuteHooks,this.loadHooks[file],loading.status],
808
+ [BASE.CallBack.ExecuteHooks,loading.callbacks,loading.status]
809
+ );
810
+ } else {
811
+ BASE.CallBack.ExecuteHooks(loading.callbacks,loading.status);
812
+ }
813
+ }
814
+ },
815
+
816
+ //
817
+ // If a file fails to load within the timeout period (or the onerror handler
818
+ // is called), this routine runs to signal the error condition.
819
+ //
820
+ loadTimeout: function (file) {
821
+ if (this.loading[file].timeout) {clearTimeout(this.loading[file].timeout)}
822
+ this.loading[file].status = this.STATUS.ERROR;
823
+ this.loadError(file);
824
+ this.loadComplete(file);
825
+ },
826
+
827
+ //
828
+ // The default error hook for file load failures
829
+ //
830
+ loadError: function (file) {BASE.Message.Set("File failed to load: "+file,null,2000)},
831
+
832
+ //
833
+ // Defines a style sheet from a hash of style declarations (key:value pairs
834
+ // where the key is the style selector and the value is a hash of CSS attributes
835
+ // and values).
836
+ //
837
+ Styles: function (styles,callback) {
838
+ var styleString = this.StyleString(styles);
839
+ if (styleString === "") {
840
+ callback = BASE.CallBack(callback);
841
+ callback();
842
+ } else {
843
+ var style = document.createElement("style"); style.type = "text/css";
844
+ this.head = HEAD(this.head);
845
+ this.head.appendChild(style);
846
+ if (style.styleSheet && typeof(style.styleSheet.cssText) !== 'undefined') {
847
+ style.styleSheet.cssText = styleString;
848
+ } else {
849
+ style.appendChild(document.createTextNode(styleString));
850
+ }
851
+ callback = this.timer.create.call(this,callback,style);
852
+ }
853
+ return callback;
854
+ },
855
+
856
+ //
857
+ // Create a stylesheet string from a style declaration object
858
+ //
859
+ StyleString: function (styles) {
860
+ if (typeof(styles) === 'string') {return styles}
861
+ var string = "", id;
862
+ for (id in styles) {if (styles.hasOwnProperty(id)) {
863
+ if (typeof styles[id] === 'string') {
864
+ string += id + " {"+styles[id]+"}\n";
865
+ } else if (styles[id] instanceof Array) {
866
+ for (var i = 0; i < styles[id].length; i++) {
867
+ var style = {}; style[id] = styles[id][i];
868
+ string += this.StyleString(style);
869
+ }
870
+ } else if (id.substr(0,6) === '@media') {
871
+ string += id + " {"+this.StyleString(styles[id])+"}\n";
872
+ } else if (styles[id] != null) {
873
+ var style = [];
874
+ for (var name in styles[id]) {
875
+ if (styles[id][name] != null)
876
+ {style[style.length] = name + ': ' + styles[id][name]}
877
+ }
878
+ string += id +" {"+style.join('; ')+"}\n";
879
+ }
880
+ }}
881
+ return string;
882
+ }
883
+ };
884
+
885
+ })("MathJax");
886
+
887
+ /**********************************************************/
888
+
889
+ MathJax.Message = {
890
+ log: [{}], current: null,
891
+ textNodeBug: (navigator.vendor === "Apple Computer, Inc." &&
892
+ typeof navigator.vendorSub === "undefined") ||
893
+ (window.hasOwnProperty && window.hasOwnProperty("konqueror")), // Konqueror displays some gibberish with text.nodeValue = "..."
894
+
895
+ styles: {
896
+ "#MathJax_Message": {
897
+ position: "fixed", left: "1px", bottom: "2px",
898
+ 'background-color': "#E6E6E6", border: "1px solid #959595",
899
+ margin: "0px", padding: "2px 8px",
900
+ 'z-index': "102", color: "black", 'font-size': "80%",
901
+ width: "auto", 'white-space': "nowrap"
902
+ },
903
+
904
+ "#MathJax_MSIE_Frame": {
905
+ position: "absolute",
906
+ top:0, left: 0, width: "0px", 'z-index': 101,
907
+ border: "0px", margin: "0px", padding: "0px"
908
+ }
909
+ },
910
+
911
+ browsers: {
912
+ MSIE: function (browser) {
913
+ MathJax.Hub.config.styles["#MathJax_Message"].position = "absolute";
914
+ MathJax.Message.quirks = (document.compatMode === "BackCompat");
915
+ },
916
+ Chrome: function (browser) {
917
+ MathJax.Hub.config.styles["#MathJax_Message"].bottom = "1.5em";
918
+ MathJax.Hub.config.styles["#MathJax_Message"].left = "1em";
919
+ }
920
+ },
921
+
922
+ Init: function() {
923
+ if (!document.body) {return false}
924
+ if (!this.div) {
925
+ var frame = document.body;
926
+ if (MathJax.Hub.Browser.isMSIE) {
927
+ frame = this.frame = this.addDiv(document.body);
928
+ frame.style.position = "absolute";
929
+ frame.style.border = frame.style.margin = frame.style.padding = "0px";
930
+ frame.style.zIndex = "101"; frame.style.height = "0px";
931
+ frame = this.addDiv(frame);
932
+ frame.id = "MathJax_MSIE_Frame";
933
+ window.attachEvent("onscroll",this.MoveFrame);
934
+ window.attachEvent("onresize",this.MoveFrame);
935
+ this.MoveFrame();
936
+ }
937
+ this.div = this.addDiv(frame);
938
+ this.div.id = "MathJax_Message"; this.div.style.display = "none";
939
+ this.text = this.div.appendChild(document.createTextNode(""));
940
+ }
941
+ return true;
942
+ },
943
+
944
+ addDiv: function (parent) {
945
+ var div = document.createElement("div");
946
+ if (parent.firstChild) {parent.insertBefore(div,parent.firstChild)}
947
+ else {parent.appendChild(div)}
948
+ return div;
949
+ },
950
+
951
+ MoveFrame: function () {
952
+ var body = (MathJax.Message.quirks ? document.body : document.documentElement);
953
+ var frame = MathJax.Message.frame;
954
+ frame.style.left = body.scrollLeft + 'px';
955
+ frame.style.top = body.scrollTop + 'px';
956
+ frame.style.width = body.clientWidth + 'px';
957
+ frame = frame.firstChild;
958
+ frame.style.height = body.clientHeight + 'px';
959
+ },
960
+
961
+ Set: function (text,n,clearDelay) {
962
+ if (this.timer) {clearTimeout(this.timer); delete this.timeout}
963
+ if (n == null) {n = this.log.length; this.log[n] = {}}
964
+ this.log[n].text = text;
965
+ if (typeof(this.log[n].next) === "undefined") {
966
+ this.log[n].next = this.current;
967
+ if (this.current != null) {this.log[this.current].prev = n}
968
+ this.current = n;
969
+ }
970
+ if (this.current === n) {
971
+ if (this.Init()) {
972
+ if (this.textNodeBug) {this.div.innerHTML = text} else {this.text.nodeValue = text}
973
+ this.div.style.display = "";
974
+ if (this.status) {window.status = ""; delete this.status}
975
+ } else {
976
+ window.status = text;
977
+ this.status = true;
978
+ }
979
+ }
980
+ if (clearDelay) {setTimeout(MathJax.CallBack(["Clear",this,n]),clearDelay)}
981
+ return n;
982
+ },
983
+
984
+ Clear: function (n,delay) {
985
+ if (this.log[n].prev != null) {this.log[this.log[n].prev].next = this.log[n].next}
986
+ if (this.log[n].next != null) {this.log[this.log[n].next].prev = this.log[n].prev}
987
+ if (this.current === n) {
988
+ this.current = this.log[n].next;
989
+ if (this.text) {
990
+ if (this.current == null) {
991
+ if (this.timer) {clearTimeout(this.timer)}
992
+ this.timer = setTimeout(MathJax.CallBack(["Remove",this]),(delay||600));
993
+ } else if (this.textNodeBug) {this.div.innerHTML = this.log[this.current].text}
994
+ else {this.text.nodeValue = this.log[this.current].text}
995
+ if (this.status) {window.status = ""; delete this.status}
996
+ } else if (this.status) {
997
+ window.status = (this.current == null ? "" : this.log[this.current].text);
998
+ }
999
+ }
1000
+ delete this.log[n].next; delete this.log[n].prev;
1001
+ },
1002
+
1003
+ Remove: function () {
1004
+ // FIXME: do a fade out or something else interesting?
1005
+ this.text.nodeValue = "";
1006
+ this.div.style.display = "none";
1007
+ },
1008
+
1009
+ File: function (file) {
1010
+ var root = MathJax.Ajax.config.root;
1011
+ if (file.substr(0,root.length) === root) {file = "[MathJax]"+file.substr(root.length)}
1012
+ return this.Set("Loading "+file);
1013
+ },
1014
+
1015
+ Log: function () {
1016
+ var strings = [];
1017
+ for (var i = 1, m = this.log.length; i < m; i++) {strings[i] = this.log[i].text}
1018
+ return strings.join("\n");
1019
+ }
1020
+
1021
+ };
1022
+
1023
+ /**********************************************************/
1024
+
1025
+ MathJax.Hub = {
1026
+ config: {
1027
+ root: "",
1028
+ config: [], // list of configuration files to load
1029
+ styleSheets: [], // list of CSS files to load
1030
+ styles: MathJax.Message.styles, // styles to generate in-line
1031
+ jax: [], // list of input and output jax to load
1032
+ extensions: [], // list of extensions to load
1033
+ browser: {}, // browser-specific files to load (by browser name)
1034
+ preJax: null, // pattern to remove from before math script tag
1035
+ postJax: null, // pattern to remove from after math script tag
1036
+ preRemoveClass: 'MathJax_Preview', // class of objects to remove preceeding math script
1037
+ showProcessingMessages: true, // display "Processing math: nn%" messages or not
1038
+ delayStartupUntil: "none", // set to "onload" to delay setup until the onload handler runs
1039
+ // or to a CallBack to wait for before continuing with the startup
1040
+ skipStartupTypeset: false, // set to true to skip PreProcess and Process during startup
1041
+
1042
+ preProcessors: [], // list of callbacks for preprocessing (initialized by extensions)
1043
+ inputJax: {}, // mime-type mapped to input jax (by registration)
1044
+ outputJax: {} // mime-type mapped to output jax list (by registration)
1045
+ },
1046
+
1047
+ processUpdateTime: 500, // time between screen updates when processing math (milliseconds)
1048
+
1049
+ signal: MathJax.CallBack.Signal("Hub"), // Signal used for Hub events
1050
+
1051
+ Config: function (def) {
1052
+ this.Insert(this.config,def);
1053
+ if (this.config.Augment) {this.Augment(this.config.Augment)}
1054
+ },
1055
+
1056
+ Register: {
1057
+ PreProcessor: function (callback) {MathJax.Hub.config.preProcessors.push(MathJax.CallBack(callback))},
1058
+ BrowserHook: function (browser,callback) {
1059
+ var browsers = MathJax.Hub.Startup.browsers;
1060
+ if (!browsers[browser]) {browsers[browser] = []}
1061
+ if (!(browsers[browser] instanceof Array)) {browsers[browser] = [browsers[browser]]}
1062
+ browsers[browser].push(callback);
1063
+ },
1064
+ MessageHook: function () {return MathJax.Hub.signal.MessageHook.apply(MathJax.Hub.signal,arguments)},
1065
+ StartupHook: function () {return MathJax.Hub.Startup.signal.MessageHook.apply(MathJax.Hub.Startup.signal,arguments)},
1066
+ LoadHook: function () {return MathJax.Ajax.LoadHook.apply(MathJax.Ajax,arguments)}
1067
+ },
1068
+
1069
+ getAllJax: function (element) {
1070
+ var jax = [], scripts = this.elementScripts(element);
1071
+ for (var i = 0, m = scripts.length; i < m; i++) {
1072
+ if (scripts[i].MathJax && scripts[i].MathJax.elementJax)
1073
+ {jax.push(scripts[i].MathJax.elementJax)}
1074
+ }
1075
+ return jax;
1076
+ },
1077
+
1078
+ getJaxByType: function (type,element) {
1079
+ var jax = [], scripts = this.elementScripts(element);
1080
+ for (var i = 0, m = scripts.length; i < m; i++) {
1081
+ if (scripts[i].MathJax && scripts[i].MathJax.elementJax &&
1082
+ scripts[i].MathJax.elementJax.mimeType === type)
1083
+ {jax.push(scripts[i].MathJax.elementJax)}
1084
+ }
1085
+ return jax;
1086
+ },
1087
+
1088
+ getJaxByInputType: function (type,element) {
1089
+ var jax = [], scripts = this.elementScripts(element);
1090
+ for (var i = 0, m = scripts.length; i < m; i++) {
1091
+ if (scripts[i].MathJax && scripts[i].MathJax.elementJax &&
1092
+ scripts[i].type && scripts[i].type.replace(/ *;(.|\s)*/,"") === type)
1093
+ {jax.push(scripts[i].MathJax.elementJax)}
1094
+ }
1095
+ return jax;
1096
+ },
1097
+
1098
+ getJaxFor: function (element) {
1099
+ if (typeof(element) === 'string') {element = document.getElementById(element)}
1100
+ if (element.MathJax) {return element.MathJax.elementJax}
1101
+ // FIXME: also check for results of outputJax
1102
+ return null;
1103
+ },
1104
+
1105
+ isJax: function (element) {
1106
+ if (typeof(element) === 'string') {element = document.getElementById(element)}
1107
+ if (element.tagName != null && element.tagName.toLowerCase() === 'script') {
1108
+ if (element.MathJax)
1109
+ {return (element.MathJax.state === MathJax.ElementJax.STATE.PROCESSED ? 1 : -1)}
1110
+ if (element.type && this.config.inputJax[element.type.replace(/ *;(.|\s)*/,"")]) {return -1}
1111
+ }
1112
+ // FIXME: check for results of outputJax
1113
+ return 0;
1114
+ },
1115
+
1116
+ Typeset: function (element,callback) {
1117
+ if (!MathJax.isReady) return null;
1118
+ var ec = this.elementCallBack(element,callback);
1119
+ return MathJax.CallBack.Queue(
1120
+ ["PreProcess",this,ec.element],
1121
+ ["Process",this,ec.element]
1122
+ ).Push(ec.callback);
1123
+ },
1124
+
1125
+ PreProcess: function (element,callback) {
1126
+ var ec = this.elementCallBack(element,callback);
1127
+ return MathJax.CallBack.Queue(
1128
+ ["Post",this.signal,"Begin PreProcess"],
1129
+ ["ExecuteHooks",MathJax.CallBack,
1130
+ (arguments.callee.disabled ? [] : this.config.preProcessors), ec.element, true],
1131
+ ["Post",this.signal,"End PreProcess"]
1132
+ ).Push(ec.callback);
1133
+ },
1134
+
1135
+ Process: function (element,callback) {return this.takeAction("Process",element,callback)},
1136
+ Update: function (element,callback) {return this.takeAction("Update",element,callback)},
1137
+ Reprocess: function (element,callback) {return this.takeAction("Reprocess",element,callback)},
1138
+
1139
+ takeAction: function (action,element,callback) {
1140
+ var ec = this.elementCallBack(element,callback);
1141
+ var scripts = []; // filled in by prepareScripts
1142
+ return MathJax.CallBack.Queue(
1143
+ ["Clear",this.signal],
1144
+ ["Post",this.signal,["Begin "+action,ec.element]],
1145
+ ["prepareScripts",this,action,ec.element,scripts],
1146
+ ["processScripts",this,scripts],
1147
+ ["Post",this.signal,["End "+action,ec.element]]
1148
+ ).Push(ec.callback);
1149
+ },
1150
+
1151
+ scriptAction: {
1152
+ Process: function (script) {},
1153
+ Update: function (script) {
1154
+ var jax = script.MathJax.elementJax;
1155
+ if (jax && jax.originalText !==
1156
+ (script.text == ""? script.innerHTML : script.text)) {jax.Remove()}
1157
+ },
1158
+ Reprocess: function (script) {
1159
+ if (script.MathJax.elementJax) {script.MathJax.elementJax.Remove()}
1160
+ }
1161
+ },
1162
+
1163
+ prepareScripts: function (action,element,math) {
1164
+ if (arguments.callee.disabled) return;
1165
+ var scripts = this.elementScripts(element);
1166
+ var STATE = MathJax.ElementJax.STATE;
1167
+ for (var i = 0, m = scripts.length; i < m; i++) {
1168
+ var script = scripts[i];
1169
+ if (script.type && this.config.inputJax[script.type.replace(/ *;(.|\n)*/,"")]) {
1170
+ if (script.MathJax && script.MathJax.state === STATE.PROCESSED)
1171
+ {this.scriptAction[action](script)}
1172
+ if (!script.MathJax) {script.MathJax = {state: STATE.PENDING}}
1173
+ if (script.MathJax.state !== STATE.PROCESSED) {math.push(script)}
1174
+ }
1175
+ }
1176
+ },
1177
+
1178
+ checkScriptSiblings: function (script) {
1179
+ if (script.MathJax && script.MathJax.checked) return;
1180
+ var config = this.config;
1181
+ var pre = script.previousSibling;
1182
+ if (pre && pre.nodeName == "#text") {
1183
+ var preJax,postJax;
1184
+ var post = script.nextSibling;
1185
+ if (post && post.nodeName != "#text") {post = null}
1186
+ if (config.preJax) {preJax = pre.nodeValue.match(config.preJax+"$")}
1187
+ if (config.postJax && post) {postJax = post.nodeValue.match("^"+config.postJax)}
1188
+ if (preJax && (!config.postJax || postJax)) {
1189
+ pre.nodeValue = pre.nodeValue.replace
1190
+ (config.preJax+"$",(preJax.length > 1? preJax[1] : ""));
1191
+ pre = null;
1192
+ }
1193
+ if (postJax && (!config.preJax || preJax)) {
1194
+ post.nodeValue = post.nodeValue.replace
1195
+ ("^"+config.postJax,(postJax.length > 1? postJax[1] : ""));
1196
+ }
1197
+ if (pre && !pre.nodeValue.match(/\S/)) {pre = pre.previousSibling}
1198
+ }
1199
+ if (config.preRemoveClass && pre && pre.className == config.preRemoveClass) {
1200
+ try {pre.innerHTML = ""} catch (err) {}
1201
+ pre.style.display = "none";
1202
+ }
1203
+ if (script.MathJax) {script.MathJax.checked = 1}
1204
+ },
1205
+
1206
+ processScripts: function (scripts,start,n) {
1207
+ if (arguments.callee.disabled) {return null}
1208
+ var result, STATE = MathJax.ElementJax.STATE;
1209
+ var inputJax = this.config.inputJax, outputJax = this.config.outputJax;
1210
+ try {
1211
+ if (!start) {start = new Date().getTime()}
1212
+ var i = 0, script;
1213
+ while (i < scripts.length) {
1214
+ script = scripts[i]; if (!script) continue;
1215
+ var type = script.type.replace(/ *;(.|\s)*/,"");
1216
+ if (!script.MathJax || script.MathJax.state === STATE.PROCESSED) continue;
1217
+ if (!script.MathJax.elementJax || script.MathJax.state === STATE.UPDATE) {
1218
+ this.checkScriptSiblings(script);
1219
+ result = inputJax[type].Translate(script);
1220
+ if (result instanceof Function) {
1221
+ if (result.called) continue; // go back and call Translate() again
1222
+ this.RestartAfter(result);
1223
+ }
1224
+ result.Attach(script,inputJax[type]);
1225
+ }
1226
+ var jax = script.MathJax.elementJax;
1227
+ if (!outputJax[jax.mimeType]) {
1228
+ script.MathJax.state = STATE.UPDATE;
1229
+ throw Error("No output jax registered for "+jax.mimeType);
1230
+ }
1231
+ jax.outputJax = outputJax[jax.mimeType][0];
1232
+ result = jax.outputJax.Translate(script);
1233
+ if (result instanceof Function) {
1234
+ script.MathJax.state = STATE.UPDATE;
1235
+ if (result.called) continue; // go back and call Translate() again
1236
+ this.RestartAfter(result);
1237
+ }
1238
+ script.MathJax.state = STATE.PROCESSED;
1239
+ this.signal.Post(["New Math",jax.inputID]); // FIXME: wait for this? (i.e., restart if returns uncalled callback)
1240
+ i++;
1241
+ if (new Date().getTime() - start > this.processUpdateTime && i < scripts.length)
1242
+ {start = 0; this.RestartAfter(MathJax.CallBack.Delay(1))}
1243
+ }
1244
+ } catch (err) {
1245
+ if (!err.restart) {throw err}
1246
+ if (!n) {n = 0}; var m = Math.floor((n+i)/(n+scripts.length)*100); n += i;
1247
+ if (this.config.showProcessingMessages) {MathJax.Message.Set("Processing math: "+m+"%",0)}
1248
+ return MathJax.CallBack.After(["processScripts",this,scripts.slice(i),start,n],err.restart);
1249
+ }
1250
+ if ((n || scripts.length) && this.config.showProcessingMessages) {
1251
+ MathJax.Message.Set("Processing Math: 100%",0);
1252
+ MathJax.Message.Clear(0);
1253
+ }
1254
+ return null;
1255
+ },
1256
+
1257
+ RestartAfter: function (callback) {
1258
+ throw this.Insert(Error("restart"),{restart: MathJax.CallBack(callback)});
1259
+ },
1260
+
1261
+ elementCallBack: function (element,callback) {
1262
+ if (callback == null && (element instanceof Array || element instanceof Function))
1263
+ {callback = element; element = document.body}
1264
+ else if (element == null) {element = document.body}
1265
+ else if (typeof(element) === 'string') {element = document.getElementById(element)}
1266
+ if (!element) {throw Error("No such element")}
1267
+ if (!callback) {callback = {}}
1268
+ return {element: element, callback: callback};
1269
+ },
1270
+
1271
+ elementScripts: function (element) {
1272
+ if (typeof(element) === 'string') {element = document.getElementById(element)}
1273
+ if (element == null) {element = document.body}
1274
+ if (element.tagName != null && element.tagName.toLowerCase() === "script") {return [element]}
1275
+ return element.getElementsByTagName("script");
1276
+ },
1277
+
1278
+ Insert: function (dst,src) {
1279
+ for (var id in src) {if (src.hasOwnProperty(id)) {
1280
+ // allow for concatenation of arrays?
1281
+ if (typeof src[id] === 'object' && !(src[id] instanceof Array) &&
1282
+ (typeof dst[id] === 'object' || typeof dst[id] === 'function')) {
1283
+ this.Insert(dst[id],src[id]);
1284
+ } else {
1285
+ dst[id] = src[id];
1286
+ }
1287
+ }}
1288
+ return dst;
1289
+ }
1290
+ };
1291
+
1292
+ //
1293
+ // Storage area for preprocessors and extensions
1294
+ // (should these be classes?)
1295
+ //
1296
+ MathJax.PreProcessor = {};
1297
+ MathJax.Extension = {};
1298
+
1299
+ //
1300
+ // Hub Startup code
1301
+ //
1302
+ MathJax.Hub.Startup = {
1303
+ script: "", // the startup script from the SCRIPT call that loads MathJax.js
1304
+ queue: MathJax.CallBack.Queue(), // Queue used for startup actions
1305
+ signal: MathJax.CallBack.Signal("Startup"), // Signal used for startup events
1306
+
1307
+ //
1308
+ // Load the configuration files
1309
+ //
1310
+ Config: function () {
1311
+ this.queue.Push(["Post",this.signal,"Begin Config"]);
1312
+ if (this.script.match(/\S/)) {this.queue.Push(this.script+';1')}
1313
+ else {this.queue.Push(["Require",MathJax.Ajax,this.URL("config","MathJax.js")])}
1314
+ if (MathJax.userConfig)
1315
+ {this.queue.Push(function () {try {MathJax.userConfig()} catch(e) {}})}
1316
+ return this.queue.Push(
1317
+ [function (config,onload) {
1318
+ if (config.delayStartupUntil.isCallback) {return config.delayStartupUntil}
1319
+ if (config.delayStartupUntil === "onload") {return onload}
1320
+ return function () {};
1321
+ }, MathJax.Hub.config, this.onload],
1322
+ ["loadArray",this,MathJax.Hub.config.config,"config"],
1323
+ ["Post",this.signal,"End Config"]
1324
+ );
1325
+ },
1326
+ //
1327
+ // Setup stylesheets and extra styles
1328
+ //
1329
+ Styles: function () {
1330
+ return this.queue.Push(
1331
+ ["Post",this.signal,"Begin Styles"],
1332
+ ["loadArray",this,MathJax.Hub.config.styleSheets,"config"],
1333
+ ["Styles",MathJax.Ajax,MathJax.Hub.config.styles],
1334
+ ["Post",this.signal,"End Styles"]
1335
+ );
1336
+ },
1337
+ //
1338
+ // Load the input and output jax
1339
+ //
1340
+ Jax: function () {
1341
+ return this.queue.Push(
1342
+ ["Post",this.signal,"Begin Jax"],
1343
+ ["loadArray",this,MathJax.Hub.config.jax,"jax","config.js"],
1344
+ ["Post",this.signal,"End Jax"]
1345
+ );
1346
+ },
1347
+ //
1348
+ // Load the extensions
1349
+ //
1350
+ Extensions: function () {
1351
+ return this.queue.Push(
1352
+ ["Post",this.signal,"Begin Extensions"],
1353
+ ["loadArray",this,MathJax.Hub.config.extensions,"extensions"],
1354
+ ["Post",this.signal,"End Extensions"]
1355
+ );
1356
+ },
1357
+
1358
+ //
1359
+ // Setup the onload callback
1360
+ //
1361
+ onLoad: function (when) {
1362
+ var onload = this.onload =
1363
+ MathJax.CallBack(function () {MathJax.Hub.Startup.signal.Post("onLoad")});
1364
+ if (window.addEventListener) {window.addEventListener("load",onload,false)}
1365
+ else if (window.attachEvent) {window.attachEvent("onload",onload)}
1366
+ else {window.onload = onload}
1367
+ return onload;
1368
+ },
1369
+
1370
+ //
1371
+ // Load any browser-specific config files
1372
+ // then call any registered browser hooks
1373
+ //
1374
+ Browser: function () {
1375
+ this.queue.Push(["Post",this.signal,"Begin Browser"]);
1376
+ var browser = MathJax.Hub.config.browser[MathJax.Hub.Browser];
1377
+ this.queue.Push(["loadArray",this,browser,"config/browsers"]);
1378
+ var hooks = this.browsers[MathJax.Hub.Browser];
1379
+ if (!(hooks instanceof Array)) {hooks = [hooks]}
1380
+ this.queue.Push.apply(this.queue,hooks);
1381
+ return this.queue.Push(["Post",this.signal,"End Browser"]);
1382
+ },
1383
+
1384
+ //
1385
+ // Code to initialize browsers
1386
+ //
1387
+ browsers: {
1388
+ MSIE: function (browser) {},
1389
+ Firefox: function (browser) {},
1390
+ Safari: function (browser) {},
1391
+ Opera: function (browser) {},
1392
+ Chrome: function (browser) {}
1393
+ },
1394
+
1395
+ //
1396
+ // Perform the initial typesetting (or skip if configuration says to)
1397
+ //
1398
+ Typeset: function (element,callback) {
1399
+ if (MathJax.Hub.config.skipStartupTypeset) {return function () {}}
1400
+ return this.queue.Push(
1401
+ ["Post",this.signal,"Begin Typeset"],
1402
+ ["Typeset",MathJax.Hub,element,callback],
1403
+ ["Post",this.signal,"End Typeset"]
1404
+ );
1405
+ },
1406
+
1407
+ //
1408
+ // Create a URL in the MathJax hierarchy
1409
+ //
1410
+ URL: function (dir,name) {
1411
+ if (!name.match(/^([a-z]+:\/\/|\[|\/)/)) {name = "[MathJax]/"+dir+"/"+name}
1412
+ return name;
1413
+ },
1414
+
1415
+ //
1416
+ // Load an array of files, waiting for all of them
1417
+ // to be loaded before going on
1418
+ //
1419
+ loadArray: function (files,dir,name) {
1420
+ if (files) {
1421
+ if (!(files instanceof Array)) {files = [files]}
1422
+ if (files.length) {
1423
+ var queue = MathJax.CallBack.Queue(), callback = {}, file;
1424
+ for (var i = 0, m = files.length; i < m; i++) {
1425
+ file = this.URL(dir,files[i]);
1426
+ if (name) {file += "/" + name}
1427
+ queue.Push(MathJax.Ajax.Require(file,callback));
1428
+ // queue.Push(["Require",MathJax.Ajax,file,callback]);
1429
+ }
1430
+ return queue.Push({}); // wait for everything to finish
1431
+ }
1432
+ }
1433
+ return null;
1434
+ }
1435
+
1436
+ };
1437
+
1438
+
1439
+ /**********************************************************/
1440
+
1441
+ (function (BASENAME) {
1442
+ var BASE = window[BASENAME];
1443
+ var HUB = BASE.Hub, AJAX = BASE.Ajax, CALLBACK = BASE.CallBack;
1444
+
1445
+ var JAX = MathJax.Object.Subclass({
1446
+ require: null, // array of files to load before jax.js is complete
1447
+ Init: function (def) {this.config = {}; HUB.Insert(this,def)},
1448
+ Augment: function (def) {HUB.Insert(this,def)},
1449
+ Translate: function (element) {
1450
+ this.Translate = this.noTranslate;
1451
+ return AJAX.Require(this.directory+"/jax.js");
1452
+ },
1453
+ noTranslate: function (element) {
1454
+ throw Error(this.directory+"/jax.js failed to redefine the Translate() method");
1455
+ },
1456
+ Register: function (mimetype) {},
1457
+ Config: function () {
1458
+ HUB.Insert(this.config,(HUB.config[this.name]||{}));
1459
+ if (this.config.Augment) {this.Augment(this.config.Augment)}
1460
+ },
1461
+ Startup: function () {},
1462
+ loadComplete: function (file) {
1463
+ if (file === "jax.js") {
1464
+ var queue = CALLBACK.Queue();
1465
+ queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Config"]);
1466
+ queue.Push(["Config",this]);
1467
+ queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Require"]);
1468
+ if (this.require) {
1469
+ var require = this.require; if (!(require instanceof Array)) {require = [require]}
1470
+ for (var i = 0, m = require.length; i < m; i++) {queue.Push(AJAX.Require(require[i]))}
1471
+ queue.Push(["loadArray",MathJax.Hub.Startup,this.config.require,"config"]);
1472
+ }
1473
+ queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Startup"]);
1474
+ queue.Push(["Startup",this]);
1475
+ queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Ready"]);
1476
+ return queue.Push(["loadComplete",AJAX,this.directory+"/"+file]);
1477
+ } else {
1478
+ return AJAX.loadComplete(this.directory+"/"+file);
1479
+ }
1480
+ }
1481
+ },{
1482
+ name: "unknown",
1483
+ version: 1.0,
1484
+ directory: "["+BASENAME+"]/jax",
1485
+ extensionDir: "["+BASENAME+"]/extensions"
1486
+ });
1487
+
1488
+ /***********************************/
1489
+
1490
+ BASE.InputJax = JAX.Subclass({
1491
+ Register: function (mimetype) {
1492
+ if (!BASE.Hub.config.inputJax) {HUB.config.inputJax = {}}
1493
+ HUB.config.inputJax[mimetype] = this;
1494
+ }
1495
+ },{
1496
+ version: 1.0,
1497
+ directory: JAX.directory+"/input",
1498
+ extensionDir: JAX.extensionDir
1499
+ });
1500
+
1501
+ /***********************************/
1502
+
1503
+ BASE.OutputJax = JAX.Subclass({
1504
+ Register: function (mimetype) {
1505
+ if (!HUB.config.outputJax) {HUB.config.outputJax = {}}
1506
+ if (!HUB.config.outputJax[mimetype]) {HUB.config.outputJax[mimetype] = []}
1507
+ HUB.config.outputJax[mimetype].push(this);
1508
+ },
1509
+ Remove: function (jax) {}
1510
+ },{
1511
+ version: 1.0,
1512
+ directory: JAX.directory+"/output",
1513
+ extensionDir: JAX.extensionDir,
1514
+ fontDir: "["+BASENAME+"]/fonts"
1515
+ });
1516
+
1517
+ /***********************************/
1518
+
1519
+ BASE.ElementJax = JAX.Subclass({
1520
+ inputJax: null,
1521
+ outputJax: null,
1522
+ inputID: null,
1523
+ originalText: "",
1524
+ mimeType: "",
1525
+
1526
+ Text: function (text,callback) {
1527
+ this.outputJax.Remove(this);
1528
+ var script = this.SourceElement();
1529
+ if (script.firstChild) {
1530
+ if (script.firstChild.nodeName !== "#text") {script.text = text}
1531
+ else {script.firstChild.nodeValue = text}
1532
+ } else {try {script.innerHTML = text} catch(err) {script.text = text}}
1533
+ script.MathJax.state = this.STATE.UPDATE;
1534
+ HUB.Update(script,callback);
1535
+ },
1536
+ Reprocess: function (callback) {
1537
+ var script = this.SourceElement();
1538
+ script.MathJax.state = this.STATE.UPDATE;
1539
+ HUB.Reprocess(script,callback);
1540
+ },
1541
+ Remove: function () {
1542
+ this.outputJax.Remove(this);
1543
+ HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish?
1544
+ this.Detach();
1545
+ },
1546
+
1547
+ SourceElement: function () {return document.getElementById(this.inputID)},
1548
+
1549
+ Attach: function (script,inputJax) {
1550
+ var jax = script.MathJax.elementJax;
1551
+ if (script.MathJax.state === this.STATE.UPDATE) {
1552
+ jax.Clone(this);
1553
+ } else {
1554
+ jax = script.MathJax.elementJax = this;
1555
+ if (script.id) {this.inputID = script.id}
1556
+ else {script.id = this.inputID = BASE.ElementJax.GetID(); this.newID = 1}
1557
+ }
1558
+ jax.originalText = (script.text == "" ? script.innerHTML : script.text);
1559
+ jax.inputJax = inputJax;
1560
+ },
1561
+ Detach: function () {
1562
+ var script = this.SourceElement(); if (!script) return;
1563
+ try {delete script.MathJax} catch(err) {script.MathJax = null}
1564
+ if (this.newID) {script.id = ""}
1565
+ },
1566
+ Clone: function (jax) {
1567
+ for (var id in this) {
1568
+ if (!this.hasOwnProperty(id)) continue;
1569
+ if (typeof(jax[id]) === 'undefined' && id !== 'newID') {delete this[id]}
1570
+ }
1571
+ for (var id in jax) {
1572
+ if (!this.hasOwnProperty(id)) continue;
1573
+ if (typeof(this[id]) === 'undefined' || (this[id] !== jax[id] && id !== 'inputID'))
1574
+ {this[id] = jax[id]}
1575
+ }
1576
+ }
1577
+ },{
1578
+ version: 1.0,
1579
+ directory: JAX.directory+"/element",
1580
+ extensionDir: JAX.extensionDir,
1581
+ ID: 0, // jax counter (for IDs)
1582
+ STATE: {
1583
+ PENDING: 1, // script is identified as math but not yet processed
1584
+ PROCESSED: 2, // script has been processed
1585
+ UPDATE: 3 // elementJax should be updated
1586
+ },
1587
+
1588
+ GetID: function () {this.ID++; return "MathJax-Element-"+this.ID},
1589
+ Subclass: function () {
1590
+ var obj = JAX.Subclass.apply(this,arguments);
1591
+ obj.loadComplete = this.prototype.loadComplete;
1592
+ return obj;
1593
+ }
1594
+ });
1595
+ BASE.ElementJax.prototype.STATE = BASE.ElementJax.STATE;
1596
+
1597
+ })("MathJax");
1598
+
1599
+ /**********************************************************/
1600
+
1601
+ (function (BASENAME) {
1602
+ var BASE = window[BASENAME];
1603
+ if (!BASE) {BASE = window[BASENAME] = {}}
1604
+
1605
+ var HUB = BASE.Hub; var STARTUP = HUB.Startup; var CONFIG = HUB.config;
1606
+ var HEAD = document.getElementsByTagName("head")[0];
1607
+ if (!HEAD) {HEAD = document.childNodes[0]};
1608
+ var scripts = (document.documentElement || document).getElementsByTagName("script");
1609
+ var namePattern = new RegExp("(^|/)"+BASENAME+"\\.js$");
1610
+ for (var i = scripts.length-1; i >= 0; i--) {
1611
+ if (scripts[i].src.match(namePattern)) {
1612
+ STARTUP.script = scripts[i].innerHTML;
1613
+ CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*$/,'');
1614
+ break;
1615
+ }
1616
+ }
1617
+ BASE.Ajax.config = CONFIG;
1618
+
1619
+ var BROWSERS = {
1620
+ isMac: (navigator.platform.substr(0,3) === "Mac"),
1621
+ isPC: (navigator.platform.substr(0,3) === "Win"),
1622
+ isMSIE: (document.all != null && !window.opera),
1623
+ isFirefox: (document.ATTRIBUTE_NODE != null && window.directories != null),
1624
+ isSafari: (navigator.vendor != null && navigator.vendor.match(/Apple/) != null && !navigator.omniWebString),
1625
+ isOpera: (window.opera != null && window.opera.version != null),
1626
+ isChrome: (navigator.vendor != null && navigator.vendor.match(/Google/) != null),
1627
+ isKonqueror: (window.hasOwnProperty && window.hasOwnProperty("konqueror")),
1628
+ versionAtLeast: function (v) {
1629
+ var bv = (this.version).split('.'); v = (new String(v)).split('.');
1630
+ for (var i = 0, m = v.length; i < m; i++)
1631
+ {if (bv[i] != v[i]) {return parseInt(bv[i]||"0") >= parseInt(v[i])}}
1632
+ return true;
1633
+ },
1634
+ Select: function (choices) {
1635
+ var browser = choices[HUB.Browser];
1636
+ if (browser) {return browser(HUB.Browser)}
1637
+ return null;
1638
+ }
1639
+ };
1640
+
1641
+ var AGENT = navigator.userAgent
1642
+ .replace(/^Mozilla\/(\d+\.)+\d+ /,"") // remove initial Mozilla, which is never right
1643
+ .replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"") // remove linux version
1644
+ .replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,""); // special case for these
1645
+
1646
+ HUB.Browser = HUB.Insert(HUB.Insert(new String("Unknown"),{version: "0.0"}),BROWSERS);
1647
+ for (var browser in BROWSERS) {if (BROWSERS.hasOwnProperty(browser)) {
1648
+ if (BROWSERS[browser] && browser.substr(0,2) === "is") {
1649
+ browser = browser.slice(2);
1650
+ if (browser === "Mac" || browser === "PC") continue;
1651
+ HUB.Browser = HUB.Insert(new String(browser),BROWSERS);
1652
+ var VERSION = new RegExp(
1653
+ ".*(Version)/((?:\\d+\\.)+\\d+)|" + // for Safari and Opera10
1654
+ ".*("+browser+")"+(browser == "MSIE" ? " " : "/")+"((?:\\d+\\.)*\\d+)|"+ // for one of the main browser
1655
+ "(?:^|\\(| )([a-z][-a-z0-9._: ]+)/((?:\\d+\\.)+\\d+)"); // for unrecognized browser
1656
+ var MATCH = VERSION.exec(AGENT) || ["","","","unknown","0.0"];
1657
+ HUB.Browser.name = (MATCH[1] == "Version" ? browser : (MATCH[3] || MATCH[5]));
1658
+ HUB.Browser.version = MATCH[2] || MATCH[4] || MATCH[6];
1659
+ break;
1660
+ }
1661
+ }};
1662
+
1663
+ //
1664
+ // Initial browser-specific info (e.g., touch up version or name)
1665
+ //
1666
+ HUB.Browser.Select({
1667
+ Safari: function (browser) {
1668
+ var v = parseInt((String(browser.version).split("."))[0]);
1669
+ if (v >= 526) {browser.version = "4.0"}
1670
+ else if (v >= 525) {browser.version = "3.1"}
1671
+ else if (v > 500) {browser.version = "3.0"}
1672
+ else if (v > 400) {browser.version = "2.0"}
1673
+ else if (v > 85) {browser.version = "1.0"}
1674
+ },
1675
+ Firefox: function (browser) {
1676
+ if (browser.version === "0.0" && navigator.product === "Gecko" && navigator.productSub) {
1677
+ var date = navigator.productSub.substr(0,8);
1678
+ if (date >= "20090630") {browser.version = "3.5"}
1679
+ else if (date >= "20080617") {browser.version = "3.0"}
1680
+ else if (date >= "20061024") {browser.version = "2.0"}
1681
+ }
1682
+ },
1683
+ Opera: function (browser) {browser.verion = opera.version()}
1684
+ });
1685
+ HUB.Browser.Select(MathJax.Message.browsers);
1686
+
1687
+ BASE.CallBack.Queue(
1688
+ ["Post",STARTUP.signal,"Begin"],
1689
+ ["Config",STARTUP],
1690
+ ["Styles",STARTUP],
1691
+ ["Jax",STARTUP],
1692
+ ["Extensions",STARTUP],
1693
+ STARTUP.onLoad(),
1694
+ ["Browser",STARTUP],
1695
+ function () {MathJax.isReady = true}, // indicates that MathJax is ready to process math
1696
+ ["Typeset",STARTUP],
1697
+ ["Post",STARTUP.signal,"End"]
1698
+ );
1699
+
1700
+ })("MathJax");
1701
+
1702
+ }
1703
+
1704
+ /**********************************************************/