|
24 | 24 | import {PropertyList} from '../../Tree/Node.js'; |
25 | 25 | import {AbstractMmlTokenNode, MmlNode, AttributeList, TEXCLASS} from '../MmlNode.js'; |
26 | 26 | import {MmlMrow} from './mrow.js'; |
27 | | -import {OperatorList, OPTABLE, RangeDef, RANGES} from '../OperatorDictionary.js'; |
| 27 | +import {OperatorList, OPTABLE, RangeDef, RANGES, MMLSPACING} from '../OperatorDictionary.js'; |
28 | 28 |
|
29 | 29 | /*****************************************************************/ |
30 | 30 | /* |
@@ -59,9 +59,10 @@ export class MmlMo extends AbstractMmlTokenNode { |
59 | 59 | }; |
60 | 60 |
|
61 | 61 | /* |
62 | | - * Unicode ranges and their default TeX classes |
| 62 | + * Unicode ranges and their default TeX classes and MathML spacing |
63 | 63 | */ |
64 | | - public static RANGES: RangeDef[] = RANGES; |
| 64 | + public static RANGES = RANGES; |
| 65 | + public static MMLSPACING = MMLSPACING; |
65 | 66 |
|
66 | 67 | /* |
67 | 68 | * The Operator Dictionary. |
@@ -243,9 +244,9 @@ export class MmlMo extends AbstractMmlTokenNode { |
243 | 244 | let range = this.getRange(mo); |
244 | 245 | if (range) { |
245 | 246 | this.texClass = range[2]; |
246 | | - // TODO: Fix range numbers. |
247 | | - // this.lspace = (range[0] + 1) / 18; |
248 | | - // this.rspace = (range[1] + 1) / 18; |
| 247 | + const spacing = (this.constructor as typeof MmlMo).MMLSPACING[range[2]]; |
| 248 | + this.lspace = (spacing[0] + 1) / 18; |
| 249 | + this.rspace = (spacing[1] + 1) / 18; |
249 | 250 | } |
250 | 251 | } |
251 | 252 | } |
|
0 commit comments