Skip to content

[lecture_comparison]_clicking_math_will_enlarge_gaps #18

Closed

Description

@shlff

Hi @mmcky , I noticed a possible difference/issue in the myst website:

  • once you click any math expression, gaps above and below the expression will be enlarged like the following

e.g., in lecture mle, before:
Screen Shot 2021-01-02 at 8 13 40 am

After clicking the math expression, the gaps are wider (please see those areas with red lines):
Screen Shot 2021-01-02 at 8 15 29 am

Do you think it is an issue or we can ignore this?

Activity

  1. mmcky commented on Jan 6, 2021

    @mmcky
    Contributor

    Interesting. I don't think is a big issue but will see what @DrDrij thinks

    The HTML is:

    <div class="math notranslate nohighlight">
    <span class="MathJax_Preview" style="color: inherit; display: none;"></span><div class="MathJax_Display" style="text-align: center;"><span class="MathJax" id="MathJax-Element-3-Frame" tabindex="0" data-mathml="<math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot; display=&quot;block&quot;><mi>f</mi><mo stretchy=&quot;false&quot;>(</mo><mi>y</mi><mo stretchy=&quot;false&quot;>)</mo><mo>=</mo><mfrac><msup><mi>&amp;#x03BC;</mi><mrow class=&quot;MJX-TeXAtom-ORD&quot;><mi>y</mi></mrow></msup><mrow><mi>y</mi><mo>!</mo></mrow></mfrac><msup><mi>e</mi><mrow class=&quot;MJX-TeXAtom-ORD&quot;><mo>&amp;#x2212;</mo><mi>&amp;#x03BC;</mi></mrow></msup><mo>,</mo><mspace width=&quot;2em&quot; /><mi>y</mi><mo>=</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mo>&amp;#x2026;</mo><mo>,</mo><mi mathvariant=&quot;normal&quot;>&amp;#x221E;</mi></math>" role="presentation" style="text-align: center; position: relative;"><nobr aria-hidden="true"><span class="math" id="MathJax-Span-20" style="width: 18.606em; display: inline-block;"><span style="display: inline-block; position: relative; width: 15.241em; height: 0px; font-size: 122%;"><span style="position: absolute; clip: rect(0.992em, 1015.175em, 3.515em, -999.981em); top: -2.471em; left: 0em;"><span class="mrow" id="MathJax-Span-21"><span class="mi" id="MathJax-Span-22" style="font-family: STIXGeneral-Italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.151em;"></span></span><span class="mo" id="MathJax-Span-23" style="font-family: STIXGeneral-Regular;">(</span><span class="mi" id="MathJax-Span-24" style="font-family: STIXGeneral-Italic;">y</span><span class="mo" id="MathJax-Span-25" style="font-family: STIXGeneral-Regular;">)</span><span class="mo" id="MathJax-Span-26" style="font-family: STIXGeneral-Regular; padding-left: 0.299em;">=</span><span class="mfrac" id="MathJax-Span-27" style="padding-left: 0.299em;"><span style="display: inline-block; position: relative; width: 1.041em; height: 0px; margin-right: 0.101em; margin-left: 0.101em;"><span style="position: absolute; clip: rect(3.169em, 1000.926em, 4.356em, -999.981em); top: -4.698em; left: 50%; margin-left: -0.443em;"><span class="msubsup" id="MathJax-Span-28"><span style="display: inline-block; position: relative; width: 0.893em; height: 0px;"><span style="position: absolute; clip: rect(3.416em, 1000.481em, 4.356em, -999.981em); top: -4.005em; left: 0em;"><span class="mi" id="MathJax-Span-29" style="font-family: STIXGeneral-Italic;">μ</span><span style="display: inline-block; width: 0px; height: 4.01em;"></span></span><span style="position: absolute; top: -4.352em; left: 0.547em;"><span class="texatom" id="MathJax-Span-30"><span class="mrow" id="MathJax-Span-31"><span class="mi" id="MathJax-Span-32" style="font-size: 70.7%; font-family: STIXGeneral-Italic;">y</span></span></span><span style="display: inline-block; width: 0px; height: 4.01em;"></span></span></span></span><span style="display: inline-block; width: 0px; height: 4.01em;"></span></span><span style="position: absolute; clip: rect(3.169em, 1000.679em, 4.356em, -999.981em); top: -3.312em; left: 50%; margin-left: -0.393em;"><span class="mrow" id="MathJax-Span-33"><span class="mi" id="MathJax-Span-34" style="font-family: STIXGeneral-Italic;">y</span><span class="mo" id="MathJax-Span-35" style="font-family: STIXGeneral-Regular;">!</span></span><span style="display: inline-block; width: 0px; height: 4.01em;"></span></span><span style="position: absolute; clip: rect(0.844em, 1001.025em, 1.19em, -999.981em); top: -1.234em; left: 0em;"><span style="display: inline-block; overflow: hidden; vertical-align: 0em; border-top-width: 1.3px; border-top-style: solid; width: 1.041em; height: 0px;"></span><span style="display: inline-block; width: 0px; height: 1.041em;"></span></span></span></span><span class="msubsup" id="MathJax-Span-36"><span style="display: inline-block; position: relative; width: 1.388em; height: 0px;"><span style="position: absolute; clip: rect(3.416em, 1000.431em, 4.159em, -999.981em); top: -4.005em; left: 0em;"><span class="mi" id="MathJax-Span-37" style="font-family: STIXGeneral-Italic;">e</span><span style="display: inline-block; width: 0px; height: 4.01em;"></span></span><span style="position: absolute; top: -4.401em; left: 0.448em;"><span class="texatom" id="MathJax-Span-38"><span class="mrow" id="MathJax-Span-39"><span class="mo" id="MathJax-Span-40" style="font-size: 70.7%; font-family: STIXGeneral-Regular;">−</span><span class="mi" id="MathJax-Span-41" style="font-size: 70.7%; font-family: STIXGeneral-Italic;">μ</span></span></span><span style="display: inline-block; width: 0px; height: 4.01em;"></span></span></span></span><span class="mo" id="MathJax-Span-42" style="font-family: STIXGeneral-Regular;">,</span><span class="mspace" id="MathJax-Span-43" style="height: 0em; vertical-align: 0em; width: 2.229em; display: inline-block; overflow: hidden;"></span><span class="mi" id="MathJax-Span-44" style="font-family: STIXGeneral-Italic; padding-left: 0.2em;">y</span><span class="mo" id="MathJax-Span-45" style="font-family: STIXGeneral-Regular; padding-left: 0.299em;">=</span><span class="mn" id="MathJax-Span-46" style="font-family: STIXGeneral-Regular; padding-left: 0.299em;">0</span><span class="mo" id="MathJax-Span-47" style="font-family: STIXGeneral-Regular;">,</span><span class="mn" id="MathJax-Span-48" style="font-family: STIXGeneral-Regular; padding-left: 0.2em;">1</span><span class="mo" id="MathJax-Span-49" style="font-family: STIXGeneral-Regular;">,</span><span class="mn" id="MathJax-Span-50" style="font-family: STIXGeneral-Regular; padding-left: 0.2em;">2</span><span class="mo" id="MathJax-Span-51" style="font-family: STIXGeneral-Regular;">,</span><span class="mo" id="MathJax-Span-52" style="font-family: STIXGeneral-Regular; padding-left: 0.2em;">…</span><span class="mo" id="MathJax-Span-53" style="font-family: STIXGeneral-Regular; padding-left: 0.2em;">,</span><span class="mi" id="MathJax-Span-54" style="font-family: STIXGeneral-Regular; padding-left: 0.2em;">∞</span></span><span style="display: inline-block; width: 0px; height: 2.476em;"></span></span></span><span style="display: inline-block; overflow: hidden; vertical-align: -1.144em; border-left-width: 0px; border-left-style: solid; width: 0px; height: 2.84em;"></span></span></nobr><span class="MJX_Assistive_MathML MJX_Assistive_MathML_Block" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi>f</mi><mo stretchy="false">(</mo><mi>y</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><msup><mi>μ</mi><mrow class="MJX-TeXAtom-ORD"><mi>y</mi></mrow></msup><mrow><mi>y</mi><mo>!</mo></mrow></mfrac><msup><mi>e</mi><mrow class="MJX-TeXAtom-ORD"><mo>−</mo><mi>μ</mi></mrow></msup><mo>,</mo><mspace width="2em"></mspace><mi>y</mi><mo>=</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mo>…</mo><mo>,</mo><mi mathvariant="normal">∞</mi></math></span></span></div><script type="math/tex; mode=display" id="MathJax-Element-3">
    f(y) = \frac{\mu^{y}}{y!} e^{-\mu},
    \qquad y = 0, 1, 2, \ldots, \infty
    </script></div>

    so maybe this is a mathjax object thing.

  2. DrDrij commented on Feb 12, 2021

    @DrDrij
    Member

    Known issue, many solutions but only this one worked for me: mathjax/MathJax#1979 (comment)
    QuantEcon/quantecon-book-theme@dda2226
    @mmcky Tested Ok, close once published :)

  3. mmcky commented on Feb 15, 2021

    @mmcky
    Contributor

    thanks @DrDrij

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

low-priorityNice to have, no time pressure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions