mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

virtual keyboard - override

Open FahNos opened this issue 5 months ago • 4 comments

Hi I have issue with virtual keyboard, at the integral button, the characters are missing I have tried every way to overwrite the current button, reduce the font, but all cannot be changed Can you please guide me a possible way to make the button not lose characters? Please see picture

Image

FahNos avatar Aug 09 '25 14:08 FahNos

The required math font is not loaded.

arnog avatar Aug 09 '25 16:08 arnog

Thank you so much for quick response ! I use flutter and was arrange fonts folder same position with mathfield.html, why the math font was not load Can you spare some time to check for me ? `

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>MathLive Editor</title>
    <script src="/assets/mathlive/mathlive.min.js"></script>
    <style>

    </style>
</head>
<body>
<div class="editor-container">
    <math-field id="mathfield"
                asset-path="/assets/mathlive" 
                virtual-keyboard-mode="auto"
                onInput="onMathfieldInput()"         
                show-virtual-keyboard-toggle="false"
                show-menu-toolbar="false">
    </math-field>
</div>

<script>
    const mathfield = document.getElementById('mathfield');
    const keyboardBtn = document.getElementById('keyboardBtn');
    const menuBtn = document.getElementById('menuBtn');
    let isVirtualKeyboardVisible = false; 
    

    function onMathfieldInput() {
        const latex = mathfield.getValue('latex');
        if (window.flutter_inappwebview) {
            window.flutter_inappwebview.callHandler('onLatexChanged', latex);
        }
    }

    function toggleVirtualKeyboard() {
        mathfield.executeCommand('toggleVirtualKeyboard');
    }     

</script>
</body>
</html>

`

Image

FahNos avatar Aug 09 '25 17:08 FahNos

I’m sorry, I don’t know much about Flutter. I suggest you check the Network tab of your browser: it should include a request for the fonts, with an error code. It should also tell you the path that the browser was expecting to find the fonts at

arnog avatar Aug 09 '25 19:08 arnog

Hi master, I think I load math font, the result better than old picture Image

Image

but at the integral button, the characters still are missing even I reduce small size of font, but the size of integral keycap do not reduce I checked you use different character for integral keycap as picture in website mathlive.io Can you instruct me or have any suggestion for solving this issue?

Image

FahNos avatar Aug 10 '25 03:08 FahNos