mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

LaTex cancel symbol graphical bug

Open benjaminwols opened this issue 1 year ago • 6 comments

I noticed I posted this in a solved issue, so I'm posting it again here for visibility.

@arnog I just upgraded to version 0.106.0, but I'm afraid the improvements don't work yet. I don't see any diagonal lines anymore: Image

I also observe the same behaviour in the documentation: Image

Most of the enclose commands look wrong or are missing diagonal lines: Image

I'm on Chrome version 138.0.7204.101 (Official Build) (arm64)

Originally posted by @benjaminwols in #2727

benjaminwols avatar Aug 25 '25 09:08 benjaminwols

@arnog I did some digging into this issue and noticed that in this commit: https://github.com/arnog/mathlive/commit/fa753eaba7cca02796c7f17cd10d5c966454a516, both notation.width and result.width are commented out. When creating the box svg element, it has no width, so the viewBox is created with 0 0 0 1.28, notice the 3rd element is 0 so the svg element has no width. This causes the svg from no longer being visible. If I change the third element to 1.35 (what it used to be), the diagonal lines are visible again.

I have fixed this for now by uncommenting both notation.width and result.width, but hopefully this will help you to come up with a better solution. If you can give me some direction on how this should be resolved, I'd be happy to attempt to fix it myself and open a PR.

benjaminwols avatar Aug 29 '25 08:08 benjaminwols

I've tested the 107 version but the cancel symbol is still not visible :( @benjaminwols do you have any workaround for me? I use angular with node module downloaded with npm so i cannot modify the source probably.

GGilli avatar Sep 18 '25 09:09 GGilli

@GGilli I don't have any experience with Angular, so I'm afraid I can't help you. I modified the source and created a custom mathlive.min.mjs which I included in my assets.

benjaminwols avatar Sep 19 '25 06:09 benjaminwols

thanks @benjaminwols. @arnog do you have any news or update on this? Because now the symbols are not visible

GGilli avatar Sep 19 '25 07:09 GGilli

@GGilli Is there a specific reason you need to use version 107? Version 105 renders the symbols, but in a slightly incorrect position.

benjaminwols avatar Sep 19 '25 10:09 benjaminwols

@benjaminwols right now no, I didn't read the changelog in depth. Right now I'm on 103. I'll check the changes from my version to 105. Installing 107 was just to update to last version.

GGilli avatar Sep 19 '25 11:09 GGilli