Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CommonHTML] manual line-breaks not working #335

Closed
pkra opened this issue Jun 7, 2017 · 3 comments
Closed

[CommonHTML] manual line-breaks not working #335

pkra opened this issue Jun 7, 2017 · 3 comments

Comments

@pkra
Copy link
Contributor

pkra commented Jun 7, 2017

Via lwchkg/gitbook-plugin-mathjax-commonhtml#4

Something like A \\ B generates something like

<span class="mjx-chtml MJXc-display">
    <span class="mjx-math" style="width: 100%;" aria-label="A \\ B ">
        <span class="mjx-mrow" style="width: 100%;" aria-hidden="true">
            <span class="mjx-stack" style="width: 100%; vertical-align: 0;">
                <span class="mjx-block" style="text-align: center;">
                    <span class="mjx-box">
                        <span class="mjx-mi">
                            <span class="mjx-char MJXc-TeX-math-I" style="padding-top: 0.519em; padding-bottom: 0.298em;">A</span>
                        </span>
                        <span class="mjx-mspace" style="width: 0px; height: 0px;"></span>
                        <span class="mjx-mi">
                            <span class="mjx-char MJXc-TeX-math-I" style="padding-top: 0.446em; padding-bottom: 0.298em;">B</span>
                        </span>
                    </span>
                </span>
            </span>
        </span>
    </span>
</span>

whereas in the browser we get something like

<span class="mjx-chtml MJXc-display">
    <span id="MathJax-Element-4-Frame" class="mjx-full-width mjx-chtml MathJax_CHTML" tabindex="0" style="font-size: 103%; min-width: 0.759em;">
        <span id="MJXc-Node-15" class="mjx-math" style="width: 100%;">
            <span id="MJXc-Node-16" class="mjx-mrow" style="width: 100%;">
                <span class="mjx-stack" style="width: 100%; vertical-align: -1.2em;">
                    <span class="mjx-block" style="text-align: center;">
                        <span class="mjx-box">
                            <span id="MJXc-Node-17" class="mjx-mi">
                                <span class="mjx-char MJXc-TeX-math-I" style="padding-top: 0.488em; padding-bottom: 0.306em;">A</span>
                            </span>
                        </span>
                    </span>
                    <span class="mjx-block" style="text-align: center; padding-top: 0.467em;">
                        <span class="mjx-box">
                            <span id="MJXc-Node-18" class="mjx-mspace" style="width: 0px; height: 0px;"></span>
                            <span id="MJXc-Node-19" class="mjx-mi">
                                <span class="mjx-char MJXc-TeX-math-I" style="padding-top: 0.488em; padding-bottom: 0.306em;">B</span>
                            </span>
                        </span>
                    </span>
                </span>
            </span>
        </span>
    </span>
</span>
@dpvc
Copy link
Member

dpvc commented Jun 7, 2017

The problem is line 397. It turns out that CHTML.BIGDIMEN doesn't exist (like it does in SVG), and in CHTML, it is just a variable in the jax.js file. So you should change CHTML.BIGDIMEN to 1000000.

@pkra
Copy link
Contributor Author

pkra commented Jun 8, 2017

Thanks, Davide. I'll make a PR when I get the chance..

@pkra
Copy link
Contributor Author

pkra commented Jul 10, 2017

Fixed in develop.

@pkra pkra closed this as completed Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants