lettus_conf_mj.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. @licstart The following is the entire license notice for the
  3. JavaScript code in this page.
  4. Copyright (C) 2015-2018 Emilia Blåsten emily@countermail.com
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU Affero General Public License as
  7. published by the Free Software Foundation, either version 3 of the
  8. License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU Affero General Public License for more details.
  13. You should have received a copy of the GNU Affero General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. @licend The above is the entire license notice for the JavaScript code
  16. in this page.
  17. Contributions are welcome: https://notabug.org/emily/Lettus-CSS-MathJax
  18. */
  19. /*
  20. IMPORTANT:
  21. This configuration file should be loaded _before_ MathJax unless you
  22. know better. You should include it in the <head>-section, for example
  23. as follows:
  24. <script src="lettus_conf_mj.js"></script>
  25. and after that you are free to load MathJax, either through the content
  26. delivery network by writing:
  27. <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
  28. or loading it using your own code. For example if you load it using the
  29. file lettus_mj.js, then you should include the tag
  30. <script src="lettus_mj.js"></script>
  31. assuming the the file resides in the same URL as your HTML-file.
  32. */
  33. /* Create the MathJax element containing its configuration */
  34. window.MathJax = {
  35. jax: ["input/TeX","output/CommonHTML"],
  36. TeX: {equationNumbers: {autoNumber: "AMS"}},
  37. /* Align equations to the left with a margin */
  38. displayAlign: "left",
  39. displayIndent: "2em",
  40. /* Allow the use of $..$ for inline math and \$ for in-text dollar */
  41. tex2jax: {
  42. inlineMath: [['$','$'], ['\\(','\\)']],
  43. processEscapes: true
  44. },
  45. /* Force SVG to scale to the same size as HTML-CSS in firefox */
  46. SVG: {
  47. scale: 80,
  48. font: "STIX-Web"
  49. },
  50. /* Force HTML-CSS to use a font compatible with the main text */
  51. "HTML-CSS": {
  52. availableFonts: ["STIX"],
  53. preferredFont: "STIX",
  54. webFont: "STIX-Web",
  55. matchFontHeight: false
  56. },
  57. /* Options for CommonHTML */
  58. "CommonHTML": {
  59. scale: 90
  60. },
  61. /* Disable the HTML fast preview by default. Fixes page blinking. */
  62. "fast-preview": {
  63. disabled: true
  64. },
  65. "CHTML-preview": {
  66. disabled: true
  67. }
  68. };