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

\\ cannot produce breakline #2382

Closed
zq1997 opened this issue Mar 25, 2020 · 1 comment
Closed

\\ cannot produce breakline #2382

zq1997 opened this issue Mar 25, 2020 · 1 comment

Comments

@zq1997
Copy link

zq1997 commented Mar 25, 2020

Issue Summary

\\ cannot produce breakline in chtml.

Steps to Reproduce:

Just try this html

<html>

<head>
    <script defer src="https://cdn.jsdelivr.net/npm/mathjax/es5/tex-chtml-full.js"></script>
</head>

<body>
    <script type="math/tex; mode=display">
        \alpha = \beta + \beta\\
        \alpha = 2\beta
    </script>

    <script>
        window.MathJax = {
            options: {
                renderActions: {
                    addMenu: [0, '', ''],
                    findScript: [10, doc => {
                        document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
                            const display = !!node.type.match(/; *mode=display/);
                            const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
                            const text = document.createTextNode('');
                            node.parentNode.replaceChild(text, node);
                            math.start = { node: text, delim: '', n: 0 };
                            math.end = { node: text, delim: '', n: 0 };
                            doc.math.push(math);
                        });
                    }, '', false]
                }
            }
        };
    </script>
</body>

</html>

It gives me such result, no breakline produced
image

Technical details:

  • MathJax Version: 3.0.1
  • Client OS: Linux Mint 19.3
  • Browser: Chromium 80.0.3987.87
@dpvc
Copy link
Member

dpvc commented Mar 25, 2020

This is a duplicate of issue #2312.

Linebreaks are not yet implemented in version 3. This is one of the significant features from version 2 that been ported to version 3.

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