|
122 | 122 | }
|
123 | 123 | }
|
124 | 124 | },
|
| 125 | + handlesVariants: false, // true if native support for mathvariants |
125 | 126 | settings: HUB.config.menuSettings,
|
126 | 127 | ex: 1, scale: 1, // filled in later
|
127 | 128 | adjustWidths: [], // array of elements to have their widths adjusted
|
|
856 | 857 | var fontDir = AJAX.fileURL(MathJax.OutputJax.fontDir+"/HTML-CSS/TeX/otf");
|
857 | 858 |
|
858 | 859 | /*
|
859 |
| - * Add fix for mathvariant issues in FF |
| 860 | + * Add fix for mathvariant issues |
860 | 861 | */
|
861 | 862 | nMML.Augment({
|
862 |
| - config: { |
863 |
| - styles: { |
864 |
| - '[mathvariant="double-struck"]': {"font-family":"MathJax_AMS, MathJax_AMS-WEB"}, |
865 |
| - '[mathvariant="script"]': {"font-family":"MathJax_Script, MathJax_Script-WEB"}, |
866 |
| - '[mathvariant="fraktur"]': {"font-family":"MathJax_Fraktur, MathJax_Fraktur-WEB"}, |
867 |
| - '[mathvariant="bold-script"]': {"font-family":"MathJax_Script, MathJax_Caligraphic-WEB", "font-weight":"bold"}, |
868 |
| - '[mathvariant="bold-fraktur"]': {"font-family":"MathJax_Fraktur, MathJax_Fraktur-WEB", "font-weight":"bold"}, |
869 |
| - '[mathvariant="monospace"]': {"font-family":"monospace"}, |
870 |
| - '[mathvariant="sans-serif"]': {"font-family":"sans-serif"}, |
871 |
| - '[mathvariant="bold-sans-serif"]': {"font-family":"sans-serif", "font-weight":"bold"}, |
872 |
| - '[mathvariant="sans-serif-italic"]': {"font-family":"sans-serif", "font-style":"italic"}, |
873 |
| - '[mathvariant="sans-serif-bold-italic"]': {"font-family":"sans-serif", "font-style":"italic", "font-weight":"bold"}, |
874 |
| - '[class="MJX-tex-oldstyle"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB"}, |
875 |
| - '[class="MJX-tex-oldstyle-bold"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB", "font-weight":"bold"}, |
876 |
| - '[class="MJX-tex-caligraphic"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB"}, |
877 |
| - '[class="MJX-tex-caligraphic-bold"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB", "font-weight":"bold"}, |
| 863 | + config: { |
| 864 | + styles: { |
| 865 | + '[class="MJX-tex-oldstyle"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB"}, |
| 866 | + '[class="MJX-tex-oldstyle-bold"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB", "font-weight":"bold"}, |
| 867 | + '[class="MJX-tex-caligraphic"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB"}, |
| 868 | + '[class="MJX-tex-caligraphic-bold"]': {"font-family":"MathJax_Caligraphic, MathJax_Caligraphic-WEB", "font-weight":"bold"}, |
878 | 869 |
|
879 |
| - '@font-face /*1*/': { |
880 |
| - "font-family": "MathJax_AMS-WEB", |
881 |
| - "src": "url('"+fontDir+"/MathJax_AMS-Regular.otf')" |
882 |
| - }, |
883 |
| - '@font-face /*2*/': { |
884 |
| - "font-family": "MathJax_Script-WEB", |
885 |
| - "src": "url('"+fontDir+"/MathJax_Script-Regular.otf')" |
886 |
| - }, |
887 |
| - '@font-face /*3*/': { |
888 |
| - "font-family": "MathJax_Fraktur-WEB", |
889 |
| - "src": "url('"+fontDir+"/MathJax_Fraktur-Regular.otf')" |
890 |
| - }, |
891 |
| - '@font-face /*4*/': { |
892 |
| - "font-family": "MathJax_Caligraphic-WEB", |
893 |
| - "src": "url('"+fontDir+"/MathJax_Caligraphic-Regular.otf')" |
894 |
| - }, |
895 |
| - '@font-face /*5*/': { |
896 |
| - "font-family": "MathJax_Fraktur-WEB", "font-weight":"bold", |
897 |
| - "src": "url('"+fontDir+"/MathJax_Fraktur-Bold.otf')" |
898 |
| - }, |
899 |
| - '@font-face /*6*/': { |
900 |
| - "font-family": "MathJax_Caligraphic-WEB", "font-weight":"bold", |
901 |
| - "src": "url('"+fontDir+"/MathJax_Caligraphic-Bold.otf')" |
902 |
| - } |
903 |
| - } |
904 |
| - } |
| 870 | + '@font-face /*1*/': { |
| 871 | + "font-family": "MathJax_Caligraphic-WEB", |
| 872 | + "src": "url('"+fontDir+"/MathJax_Caligraphic-Regular.otf')" |
| 873 | + }, |
| 874 | + '@font-face /*2*/': { |
| 875 | + "font-family": "MathJax_Caligraphic-WEB", "font-weight":"bold", |
| 876 | + "src": "url('"+fontDir+"/MathJax_Caligraphic-Bold.otf')" |
| 877 | + } |
| 878 | + } |
| 879 | + } |
905 | 880 | });
|
| 881 | + if (!this.handlesVariants) { |
| 882 | + nMML.Augment({ |
| 883 | + config: { |
| 884 | + styles: { |
| 885 | + '[mathvariant="double-struck"]': {"font-family":"MathJax_AMS, MathJax_AMS-WEB"}, |
| 886 | + '[mathvariant="script"]': {"font-family":"MathJax_Script, MathJax_Script-WEB"}, |
| 887 | + '[mathvariant="fraktur"]': {"font-family":"MathJax_Fraktur, MathJax_Fraktur-WEB"}, |
| 888 | + '[mathvariant="bold-script"]': {"font-family":"MathJax_Script, MathJax_Caligraphic-WEB", "font-weight":"bold"}, |
| 889 | + '[mathvariant="bold-fraktur"]': {"font-family":"MathJax_Fraktur, MathJax_Fraktur-WEB", "font-weight":"bold"}, |
| 890 | + '[mathvariant="monospace"]': {"font-family":"monospace"}, |
| 891 | + '[mathvariant="sans-serif"]': {"font-family":"sans-serif"}, |
| 892 | + '[mathvariant="bold-sans-serif"]': {"font-family":"sans-serif", "font-weight":"bold"}, |
| 893 | + '[mathvariant="sans-serif-italic"]': {"font-family":"sans-serif", "font-style":"italic"}, |
| 894 | + '[mathvariant="sans-serif-bold-italic"]': {"font-family":"sans-serif", "font-style":"italic", "font-weight":"bold"}, |
| 895 | + |
| 896 | + '@font-face /*3*/': { |
| 897 | + "font-family": "MathJax_AMS-WEB", |
| 898 | + "src": "url('"+fontDir+"/MathJax_AMS-Regular.otf')" |
| 899 | + }, |
| 900 | + '@font-face /*4*/': { |
| 901 | + "font-family": "MathJax_Script-WEB", |
| 902 | + "src": "url('"+fontDir+"/MathJax_Script-Regular.otf')" |
| 903 | + }, |
| 904 | + '@font-face /*5*/': { |
| 905 | + "font-family": "MathJax_Fraktur-WEB", |
| 906 | + "src": "url('"+fontDir+"/MathJax_Fraktur-Regular.otf')" |
| 907 | + }, |
| 908 | + '@font-face /*6*/': { |
| 909 | + "font-family": "MathJax_Fraktur-WEB", "font-weight":"bold", |
| 910 | + "src": "url('"+fontDir+"/MathJax_Fraktur-Bold.otf')" |
| 911 | + } |
| 912 | + } |
| 913 | + } |
| 914 | + }); |
| 915 | + } |
906 | 916 | }
|
907 | 917 |
|
908 | 918 | MML.math.Augment({
|
|
1309 | 1319 | nMML.mmultiscriptsBug = true;
|
1310 | 1320 | },
|
1311 | 1321 | Firefox: function (browser) {
|
| 1322 | + var is29 = browser.versionAtLeast("29.0"); |
1312 | 1323 | nMML.ffTableWidthBug = !browser.versionAtLeast("13.0"); // <mtable width="xx"> not implemented
|
1313 |
| - nMML.forceReflow = true; // <mtable> with alignments set don't display properly without a reflow |
1314 |
| - nMML.widthBug = true; // <math> elements don't always get the correct width |
| 1324 | + nMML.forceReflow = !is29; // <mtable> with alignments set don't display properly without a reflow |
| 1325 | + nMML.widthBug = !is29; // <math> elements don't always get the correct width |
| 1326 | + nMML.mtdWidthBug = !is29; // <mtd> widths not properly determined |
| 1327 | + nMML.handlesVariants = is29; // FF >=29 handles all math variants |
1315 | 1328 |
|
1316 | 1329 | // In Firefox < 20, the intrinsic width of <mspace> is not computed
|
1317 | 1330 | // correctly and thus the element is displayed incorrectly in <mtable>.
|
1318 | 1331 | nMML.spaceWidthBug = !browser.versionAtLeast("20.0");
|
1319 | 1332 |
|
1320 |
| - nMML.mtdWidthBug = true; // <mtd> widths not properly determined |
1321 |
| - |
1322 | 1333 | nMML.tableSpacingBug = true; // mtable@rowspacing/mtable@columnspacing not
|
1323 | 1334 | // supported.
|
1324 | 1335 | nMML.tableLabelBug = true; // mlabeledtr is not implemented.
|
|
0 commit comments