-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
MathJax not working properly with speaker notes #1726
Comments
Update: The generated HTML source reads: <span class="MathJax" id="MathJax-Element-9-Frame" tabindex="0" data-mathml="<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>m</mi><mo>,</mo><mi>n</mi><mo>&gt;</mo><mn>0</mn></math>" role="presentation" style="position: relative;">
<nobr aria-hidden="true"><span class="math" id="MathJax-Span-223" role="math" style="width: 4.071em; display: inline-block;"><span style="display: inline-block; position: relative; width: 3.835em; height: 0px; font-size: 106%;"><span style="position: absolute; clip: rect(1.359em 1003.78em 2.538em -999.997em); top: -2.179em; left: 0.003em;"><span class="mrow" id="MathJax-Span-224"><span class="mi" id="MathJax-Span-225" style="font-family: MathJax_Math; font-style: italic;">m</span><span class="mo" id="MathJax-Span-226" style="font-family: MathJax_Main;">,</span><span class="mi" id="MathJax-Span-227" style="font-family: MathJax_Math; font-style: italic; padding-left: 0.18em;">n</span><span class="mo" id="MathJax-Span-228" style="font-family: MathJax_Main; padding-left: 0.298em;">></span><span class="mn" id="MathJax-Span-229" style="font-family: MathJax_Main; padding-left: 0.298em;">0</span></span><span style="display: inline-block; width: 0px; height: 2.185em;"></span></span></span><span style="display: inline-block; overflow: hidden; vertical-align: -0.247em; border-left-width: 0px; border-left-style: solid; width: 0px; height: 1.066em;"></span></span></nobr>
<span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>m</mi><mo>,</mo><mi>n</mi><mo>></mo><mn>0</mn></math></span></span> So, the MJX_Assistive_MathML is not hidden as it should be (and is within the presentation itself). |
Mathjax-Assist- span was not hidden in Notes. CSS-style from main part was inserted. Fixes Issue hakimel#1726.
@DL6ER Pointed it already out. Maybe not a nice solution. But it works. |
The described procedure does not work for me.
See also http://docs.mathjax.org/en/latest/options/extensions/assistive-mml.html |
Switch to MathJax' CommonHTML renderer, involving these changes: - switch to latest mathjax version (2.7.5) and use TeX-AMS_CHTML-full as default configuration - disable mathing of font height, as it causes problems both in the new CommonHTML and the previous HTML-CSS (issue hakimel#2105) - disable AssistiveMML, since it duplicated math equations in speaker notes (issue hakimel#1726) - use the new Promise mechanism to ensure that equations are properly typeset before emitting 'ready' in PDF export (issue hakimel#2256)
I just ran into this problem again; duplicate math text still seems to be present in speaker notes. As an update for anyone finding this from now on, it should be noted that @rschmehl's solution disabling Given that math config options can now be set within the I was a bit curious about where this artifact orginated from, and it seems to be due to the fact that speaker notes written in an
It seems like this may be stripping the normal formatting that MathJax uses to hide the "AssistiveMML" text (suggested by this StackOverflow discussion). A workaround could be to reconfigure the |
The following monkey patch has worked well for me. It injects css that hides the assistive text into the window for the speaker notes. // Monkeypatch `open` to inject css that hides assistive mathml.
window._open = window.open;
window.open = (url, target, features) => {
let child = window._open(url, target, features);
setTimeout(() => {
let element = child.document.createElement("style");
element.textContent = "#speaker-controls .katex-html { display: none; }";
child.document.head.appendChild(element);
}, 500);
return child;
} |
Whenever I try to use LaTeX on speaker notes, the output is different from what I expect: The "raw" input is always shown next to the (correctly) rendered math although it should be hidden.
Example 1 (single $):
Example 2 (double $):
The text was updated successfully, but these errors were encountered: