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

mhchem arrow length in chromium #72

Open
ermv opened this issue Nov 5, 2024 · 3 comments
Open

mhchem arrow length in chromium #72

ermv opened this issue Nov 5, 2024 · 3 comments

Comments

@ermv
Copy link

ermv commented Nov 5, 2024

Hello!
mhchem arrow length is too short in Chrome when using STIX. Works fine in Firefox though. It can be reproduced on temml official website with this TeX: \ce{A->B}
Is there any workaround?

in Chrome:
image

in Firefox:
image

@ronkok
Copy link
Owner

ronkok commented Nov 5, 2024

Is there any workaround?

None that I am aware of, and I've looked pretty hard. Two years ago, I opened an issue in the Chromium bug tracker. There has been no action (that I am aware of) so far.

On my own pages, I ship the Latin Modern font, partly to get better rendering of this feature.

@ermv
Copy link
Author

ermv commented Nov 6, 2024

I found a hack: somehow backwards arrow stretches fine and I can use it and then mirror with css. Steps to reproduce:

  1. TeX : \ce{A <- B}
  2. CSS:
.mirror {
      -moz-transform: scale(-1, 1);
      -webkit-transform: scale(-1, 1);
      -o-transform: scale(-1, 1);
      -ms-transform: scale(-1, 1);
      transform: scale(-1, 1);
    }
  1. Add class to tag with arrow
    <mo stretchy="true" lspace="0" rspace="0" class="mirror">←</mo>

Works ok in both Firefox and Chrome

@ronkok
Copy link
Owner

ronkok commented Nov 6, 2024

That's creative!

My first impulse is to not put something like this into the library. It gives a screen reader false information and it would break documents someday in the future when I can use the proper character.

It is food for thought, though. Maybe I can find another workaround if I just work at it some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants