-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
\vec{} arrow renders in the wrong place #2562
Comments
Since this is a problem I can't reproduce, I'm afraid I can't fix it. |
Thanks for getting back to me so fast. I had some font issues a bit earlier but I thought I'd fixed them... In my environment, when I first installed MathLive via I did some searching in and around the docs and some related issues/discussions here and found that I could set the MathfieldElement.fontsDirectory = "../../mathlive/dist/fonts" This appeared to solve my original font issue. It drastically improved actually. But now there's this tiny inconsistency with the vector arrow. I've also found a few other instances, mostly to do with fraction spacing in matrix environments. This is most likely a font issue too because I can't replicate the behaviour on the demo website. @arnog I'm hoping something that I've said above may have raised some red flags for you. Is my understanding of the font directory pathing wrong? What's the best way to ensure that I am using all of the correct fonts? To be extra safe, I cloned this repo down and copied the font directory exactly into the correct location in my project just to see if the font files were different or missing, and that didn't seem to change anything. Any ideas you might have would be greatly appreciated. I'm a bit of a novice when it comes to "web tech". I'm not always clear on the standards when it comes to installing 3rd party libraries/packages from NodeJS. |
If you are unfamiliar using asset pipelines in your toolchain, I would recommend using the CDN version of MathLive instead, which will insure the correct font package is used. |
Thanks for the suggestion. I just had a go with your idea now. I uninstalled the MathLive package I was using via I am convinced that it's not a font issue now. I made sure to disable any other fonts I am using in my environment, so the I am wondering if it might be some conflicting CSS property that I have set which is accidentally targeting some of the components in the My next step is going to be to create a fresh new project with nothing in it except for the dependency to MathLive to see if I can replicate the issue there. |
Quick update: I just tried out the above in a completely fresh project. There's nothing in it at all except for a single page and the I am at a loss here. Also on a side note, I don't know if this helps at all, but I also noticed that highlighting the elements with the vector arrow over it causes the arrow to shift slightly. I am assuming that is also not intended behaviour? Highlighted (arrow is slightly shifted down and kind of italicised): Any ideas what could be happening here? (Edit): |
Sorry to keep piling on here, but I'm experiencing some even more weirdness. I've just swapped over to my Windows machine (previously I was on Mac) to do all of the same testing as above. Firstly, I do see the same behaviour on my Windows machine using the same project as on my Mac but there's some extra weirdness there which I will describe soon! Crazy enough though, when I try it out on https://cortexjs.io/mathlive/demo/ in Google Chrome I DO see the weird behaviour (I'm not crazy haha)! Take a look at these screenshots from the CortexJS demo page: Ain't that interesting! Anyway, back to the weirdness in the There's layers of weirdness here. I created the first vector Sorry to be hammering you, I just wanted to note down all of my discoveries when I find them. Thoughts on this? |
Sounds like you've made some progress in your investigation. |
OK, so that seems to be a Windows specific issue. I don't have a Windows machine. If anybody has any idea what might be going on, speak up. |
@arnog thanks for your help. With regards to the "Bonus issue" to do with the |
Description
The
\vec{}
command for drawing vector arrows over elements is being positioned in the wrong place (slightly too far to the right of the correct position). See screenshots, LaTeX code snippets, and expected behaviour below.Side note: I am hoping this is just an issue with my environment that I am working with. It is a bit too complicated to share specifics here. I'm hoping it might be a font issue, but I have double checked everything I have suspected could be the cause of the issue and am at a loss, hence why I am raising an issue here.
Steps to Reproduce
<math-field />
element (mine is specifically:formula
variable is a string containing the following LaTeX snippet:In general though, the following much simpler LaTeX snippet also shows the same problem:
\vec{x}
\vec{}
command is drawing in the incorrect place.Actual Behavior
In my environment, the following output is drawn:
However, when trying the same formula in the demo page on https://cortexjs.io/mathlive/demo/, the math is drawn correctly:
Expected Behavior
The expected behaviour is as shown above, but I also rendered the LaTeX in another piece of software I use frequently and it also looks correct:
Environment
MathLive version: 0.102.0. (installed via
npm install --save mathlive
)Operating System: macOS Sonoma v14.3.1
Browser: Chrome (tried in Safari as well with the same result)
The text was updated successfully, but these errors were encountered: