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

\text fails with grave, acute accents #2526

Closed
bdtc opened this issue Sep 8, 2020 · 2 comments
Closed

\text fails with grave, acute accents #2526

bdtc opened this issue Sep 8, 2020 · 2 comments

Comments

@bdtc
Copy link

bdtc commented Sep 8, 2020

Issue Summary

\text fails with grave and acute accents.

The other accents work fine.

Technical details:

Current MathJax 3, Firefox

Supporting information:

<!DOCTYPE html>
<html lang="en-US">

<head>

<meta charset="UTF-8" />

<script>
MathJax = {
    loader: {
         load: ['[tex]/textmacros'],
    },
    tex: {
         packages: {'[+]': ['textmacros']},
    }
}
</script>

<script
         id="MathJax-script"
         src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
></script>

</head>


<body>



<p>
acute accent \(abc + \text {t\’{e}xt}\)
</p>

<p>
grave accent \(abc + \text {t\‘{e}xt}\)
</p>

</body>
</html>
@dpvc
Copy link
Member

dpvc commented Sep 8, 2020

The problem, here, is that you aren't actually using the correct macros. The macros are \' and \`, using the ASCII characters U+0027 and U+0060, whereas your examples have substituted "smart quotes", as \’ and \‘, using U+2019 and U+2018. MathJax is correctly reporting that these are undefined. It may be that your content-management system is substituting the smart quotes automatically.

It would make sense to define these as equivalent to the correct macros, for situations where that is the case.

@bdtc
Copy link
Author

bdtc commented Sep 9, 2020

In the meantime, I've now made the LaTeX Lwarp package to use HTML entities, avoiding the font/pdftotext issue with quotes. Thanks.

dpvc added a commit to mathjax/MathJax-src that referenced this issue Sep 12, 2020
Add 'smart quote' version of acute and grave accents. (mathjax/MathJax#2526)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Sep 12, 2020
@dpvc dpvc added Fixed v3.1 and removed Merged Merged into develop branch labels Nov 30, 2020
@dpvc dpvc closed this as completed Nov 30, 2020
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