Skip to content

\overline displayed varyingly as an overline or as nothing depending on font size #3357

Open
@nabijaczleweli

Description

@nabijaczleweli

Issue Summary

\overline{Set(O)} either has an overline or doesn't depending on font-size. In my case I'm using font-size: smaller; which hides the overline. I would like to have the overline.

Steps to Reproduce:

  1. Write \overline{Set(O)}
  2. Tune font-size of parent element
  3. Despair

Behold a video:

demo.mp4

Technical details:

  • MathJax Version: 3.2.2/whatever the demo is
  • Client OS: Windows 10, Bookworm
  • Browser: Nightly 139.0a1 (2025-04-02) (64-bit)

I am using the following MathJax configuration:

MathJax = {
  tex: {
    inlineMath:  [['[​[​',  '​]​]']],
    displayMath: [['[​![​', '​]!​]']]
  },

  // https://github.com/mathjax/MathJax/issues/3345#issuecomment-2731197248
  startup: {
    ready() {
      const {mathjax} = MathJax._.mathjax;
      const {STATE} = MathJax._.core.MathItem;
      const {Menu} = MathJax._.ui.menu.Menu;
      Menu.prototype.rerender = function rerender(start = STATE.TYPESET) {
        this.rerenderStart = Math.min(start, this.rerenderStart);
        const startup = MathJax.startup;
        if(!Menu.loading)
          startup.promise = startup.promise.then(
            () => mathjax.handleRetriesFor(
              () => {
                if (this.rerenderStart <= STATE.COMPILED)
                  this.document.reset({inputJax: []});
                this.document.rerender(this.rerenderStart);
                this.rerenderStart = STATE.LAST;
              }
            )
          );
      };
      MathJax.startup.defaultReady();
    }
  }
}

and loading MathJax via

<script id="MathJax-script" defer src="//cdn.jsdelivr.net/npm/[email protected]/es5/tex-chtml.js"></script>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions