From c318b56ef0c271f15025df070ff89c0319f3cc6c Mon Sep 17 00:00:00 2001 From: Arno Gourdol Date: Wed, 26 Jul 2023 15:57:51 -0700 Subject: [PATCH] feat: add shortcut for triple-prime --- src/editor/shortcuts-definitions.ts | 1 + test/smoke/index.html | 48 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/editor/shortcuts-definitions.ts b/src/editor/shortcuts-definitions.ts index d4511a14c..2edd6c67a 100644 --- a/src/editor/shortcuts-definitions.ts +++ b/src/editor/shortcuts-definitions.ts @@ -11,6 +11,7 @@ export const INLINE_SHORTCUTS: InlineShortcutDefinitions = { // Primes "''": '^{\\doubleprime}', + "'''": '^{\\prime\\prime\\prime}', // Greek letters 'alpha': '\\alpha', diff --git a/test/smoke/index.html b/test/smoke/index.html index 150bc372b..e775c4bc3 100644 --- a/test/smoke/index.html +++ b/test/smoke/index.html @@ -23,6 +23,7 @@ max-width: 640px; width: 100%; } + /* math-field::part(content) { justify-content: center; } */ @@ -30,6 +31,10 @@ --selection-background-color: red; --selection-color: #f80; } */ + + .MLK__shift { + transform: translate(0, -5px); + } @@ -131,6 +136,49 @@

Latex to Speakable Text

// }); // MathfieldElement.computeEngine = ce; + mathVirtualKeyboard.layouts = [ + { + label: 'minimal', + tooltip: 'Only the essential', + layers: [ + { + style: + '.digit { background: blue !important; color: white !important }', + rows: [ + [ + { + latex: 'x', + insert: 'x', + shift: { latex: 'a', insert: 's' }, + }, + '-', + '\\times', + '\\frac{#@}{#?}', + '=', + '.', + '(', + ')', + '\\sqrt{#0}', + '#@^{#?}', + ], + [ + { class: 'digit', latex: '1' }, + { class: 'digit', latex: '2' }, + { class: 'digit', latex: '3' }, + { class: 'digit', latex: '4' }, + { class: 'digit', latex: '5' }, + { class: 'digit', latex: '6' }, + { class: 'digit', latex: '7' }, + { class: 'digit', latex: '8' }, + { class: 'digit', latex: '9' }, + { class: 'digit', latex: '0' }, + ], + ], + }, + ], + }, + 'alphabetic', + ]; const mf = document.getElementById('mf'); mf.smartMode = true;