Skip to content

Commit

Permalink
arch
Browse files Browse the repository at this point in the history
  • Loading branch information
arnog committed Sep 2, 2023
1 parent ac2f460 commit 0e162f9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 4 additions & 0 deletions src/addons/math-ml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,12 @@ function scanOperator(stream: MathMLStream, final: number, options) {
'\\vert': '|',
'\\Vert': '\u2225',
'\\mid': '\u2223',
'\\{': '{',
'\\}': '}',
'\\lbrace': '{',
'\\rbrace': '}',
'\\lbrack': '[',
'\\rbrack': ']',
'\\lparen': '(',
'\\rparen': ')',
'\\langle': '\u27E8',
Expand Down
2 changes: 2 additions & 0 deletions src/editor/atom-to-ascii-math.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ const SPECIAL_OPERATORS = {
'\\vert': '|',
'\\Vert': '||',
'\\mid': '|',
'\\lbrack': '[',
'\\rbrack': ']',
'\\lbrace': '{',
'\\rbrace': '}',
'\\lparen': '(',
Expand Down
7 changes: 1 addition & 6 deletions src/public/core-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ export type Token = string;
export type ParseMode = 'math' | 'text' | 'latex';

/**
* Error code passed to the [[`ErrorListener`]] function.
* Error codes returned by the `mf.errors` property.
*
* See [[`MathfieldOptions`]], [[`convertLatexToMarkup`]]
*
*
| | |
Expand Down Expand Up @@ -89,10 +88,6 @@ export type LatexSyntaxError<T = ParserErrorCode> = {
after?: string;
};

export type ErrorListener<T = ParserErrorCode> = (
err: LatexSyntaxError<T>
) => void;

/**
* Variants indicate a stylistic alternate for some characters.
*
Expand Down
1 change: 1 addition & 0 deletions src/public/mathfield-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,7 @@ import 'https://unpkg.com/@cortex-js/compute-engine?module';
}

/**
* Return an array of LaTeX syntax errors, if any.
* @category Accessing and changing the content
*/
get errors(): LatexSyntaxError[] {
Expand Down
2 changes: 0 additions & 2 deletions src/public/mathlive-ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ export function validateLatex(s: string): LatexSyntaxError[] {
* @param options.generateId If true, add an `"extid"` attribute
* to the MathML nodes with a value matching the `atomID`. This can be used
* to map items on the screen with their MathML representation or vice-versa.
* @param options.onError Callback invoked when an error is encountered while
* parsing the input string.
*
* @category Converting
*/
Expand Down
2 changes: 1 addition & 1 deletion src/public/virtual-keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface VirtualKeyboardKeycap {
* CSS classes to apply to the keycap.
*
* - `tex`: use the TeX font for its label.
* Using the tex class is not necessary if using the latex property to
* Using the tex class is not necessary if using the `latex` property to
* define the label.
* - `shift`: a shift key
* - `small`: display the label in a smaller size
Expand Down
4 changes: 2 additions & 2 deletions src/virtual-keyboard/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const LAYOUTS: Partial<
{ latex: '\\iiint', class: 'small' },
{ latex: '\\oint', class: 'small' },
'\\mathrm{d}x',
{ latex: '\\dfrac{\\rd}{\\rd x}', class: 'small' },
{ latex: '\\dfrac{\\mathrm{d}}{\\mathrm{d} x}', class: 'small' },
{ latex: '\\frac{\\partial}{\\partial x}', class: 'small' },

'\\partial',
Expand Down Expand Up @@ -607,7 +607,7 @@ export const LAYOUTS: Partial<

variants: [
'\\mathrm{d}x',
{ latex: '\\dfrac{\\rd}{\\rd x}', class: 'small' },
{ latex: '\\dfrac{\\mathrm{d}}{\\mathrm{d} x}', class: 'small' },
{ latex: '\\frac{\\partial}{\\partial x}', class: 'small' },

'\\partial',
Expand Down

0 comments on commit 0e162f9

Please sign in to comment.