-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Code ExampleContains an illustrative code example, solution, or work-aroundContains an illustrative code example, solution, or work-aroundExpected BehaviorThis is how MathJax worksThis is how MathJax worksv4
Description
Steps to Reproduce:
I have the following expression in an inline math expression:
\mathit{leftChild}
Technical details:
- MathJax Version: 4.0
- Client OS: Windows 11
- Browser: Firefox 145 and Edge 142
I am using the following MathJax configuration:
MathJax = {
tex: { inlineMath: [ ["$","$"], ["\\(","\\)"] ] },
output: {
font: 'mathjax-asana',
scale: 1, // also tried this at > 1 scales
},
loader: { load: ['[tex]/noerrors'] }
};and loading MathJax via
<script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script>Supporting information:
- A complete sample file is
<!doctype HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
window.MathJax = {
tex: { inlineMath: [ ["$","$"], ["\\(","\\)"] ] },
output: { font: 'mathjax-asana' },
loader: { load: ['[tex]/noerrors'] }
};
</script>
<script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script>
<style>
body { font-size: 1.18rem; }
</style>
</head>
<body>
<p>
<ul>
<li><p>\(leftChild(idx) = \mathit{leftChild}(idx) = 2 * idx + 1\)</p></li>
<li><p>\(rightChild(idx) = \mathit{rightChild}(idx) = 2 * idx + 2\)</p></li>
<li><p>\(parent(idx) = \mathit{parent}(idx) = \mathit{floor}((idx - 1) / 2)\)</p></li>
</ul>
</p>
</body>
</html>- I rendered this four times:
Using \mathit{...} |
Omitting \mathit{...} |
|
|---|---|---|
| Asana | ||
| NewCM |
Things I noticed:
- The two Asana renderings are basically identical, but the two NewCM renderings clearly show the difference that
mathitmakes - If you look at the full example above, the other words look much more consistent in their kerning; only the
fis really wrong.
Metadata
Metadata
Assignees
Labels
Code ExampleContains an illustrative code example, solution, or work-aroundContains an illustrative code example, solution, or work-aroundExpected BehaviorThis is how MathJax worksThis is how MathJax worksv4