-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
\left and \right delimiters have issues rendering? #231
Comments
Hey alan-foo, yeah the LaTeX renderer isn't great. Can you try turning on the LaTeX renderer of your system using |
Hello! I do not see any output though. Was I suppose to install any latex packages such as MacTex? (I am using a macbook) |
You have to have some sort of LaTeX package installed. Specifically, it uses the |
I've tested it out, the output is actually still buggy. Not sure if I am doing anything wrongly. I am actually building something that requires me to process the latex equations into an image at the backend in golang, so that I can insert it into documents. Your library is the best there is. Are there any other workarounds that you know of? Sorry for asking something not part of this package. But appreciate your reply! |
So you installed LaTeX on your system and used the When using the system's LaTeX there isn't much that can go wrong. It literally creates a TeX file, compiles it, takes the DVI output and converts it to SVG using the same LaTeX build system, and the SVG is then converted to canvas' internal path structure. The problem with using the ported Go version of LaTeX is that the DVI is created as before, which is perfect, but there is no reliable way to convert the DVI to SVG/canvas' paths since we don't have the original fonts the DVI uses. LaTeX uses some old and odd font formats, especially the mapping and some placement instructions for symbols is way off. The only way to fix this is not to use TeX, but some sort of pdfTeX or XeTeX which use the modern unicode fonts. Then we could use the official fonts since we can load those unicode based fonts (OTF) in canvas. Support for a ported XeTeX in Go is difficult which uses https://git.sr.ht/~sbinet/star-tex and depends on |
Please run it as |
Hello! My apologies, I am very inexperienced in this, but yes I have managed to get them onto my path. I ran my code once, and it produced the image according to what it should look like. But when I run the same code with different latex input, the code runs, but no new output. Not too sure what's the issue now. |
Did you check the error that comes out of p, err := canvas.ParseLaTeX(`$y_i = y$`)
if err != nil {
panic(err)
} |
Hello! I have some issues with latex rendering.
When I run the example above, the png file that I get looks like this:
Did I do anything wrongly? Appreciate your reply, thank you!
The text was updated successfully, but these errors were encountered: