Extract the body of the symbol, and the modifiers * (accents and styles)
( s: string )
| 526 | logicStyle( |
| 527 | expr: MathJsonExpression, |
| 528 | level: number |
| 529 | ): 'word' | 'boolean' | 'uppercase-word' | 'punctuation' { |
| 530 | return this.options.logicStyle(expr, level); |
| 531 | } |
| 532 | |
| 533 | powerStyle( |
| 534 | expr: MathJsonExpression, |
| 535 | level: number |
| 536 | ): 'root' | 'solidus' | 'quotient' { |
| 537 | return this.options.powerStyle(expr, level); |
| 538 | } |
| 539 | |
| 540 | numericSetStyle( |
| 541 | expr: MathJsonExpression, |
| 542 | level: number |
| 543 | ): 'compact' | 'regular' | 'interval' | 'set-builder' { |
| 544 | return this.options.numericSetStyle(expr, level); |
| 545 | } |
| 546 | |
| 547 | indexStyle(expr: MathJsonExpression, level: number): 'subscript' | 'bracket' { |
| 548 | return this.options.indexStyle(expr, level); |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | export function appendLatex(src: string, s: string): string { |
| 553 | if (!s) return src; |
| 554 | |
| 555 | // If the source end in a LaTeX command, |
| 556 | // and the appended string begins with a letter |
| 557 | if (/\\[a-zA-Z]+\*?$/.test(src) && /[a-zA-Z]/.test(s[0])) { |
| 558 | // Add a space between them |
no test coverage detected