davidgutierrezrubio / jmathanim

A Java library to make mathematical animations
https://davidgutierrezrubio.github.io/jmathanim/
20 stars 2 forks source link

Latex: ! Undefined control sequence. #10

Closed Duster-Cule closed 2 years ago

Duster-Cule commented 2 years ago

I was using JMathAnim 0.9.4, and using texlive 2022. When i use "LaTeXMathObject.make("$\sin^2x+\cos^2x=1$");" the console said "DEBUG - ! Undefined control sequence." but while i using cmd terminal and typing "pdflatex " in folder "tex", it complied successfully and generate an pdf file, which is normal. why is it? and how can i fix it?

davidgutierrezrubio commented 2 years ago

I was using JMathAnim 0.9.4, and using texlive 2022. When i use "LaTeXMathObject.make("$\sin^2x+\cos^2x=1$");" the console said "DEBUG - ! Undefined control sequence." but while i using cmd terminal and typing "pdflatex " in folder "tex", it complied successfully and generate an pdf file, which is normal. why is it? and how can i fix it?

Hello Duster, JMathAnim uses the external executables "latex" and "dvisvgm" to compile file, convert it to svg and import them as a Shape. Are they available from your path? Anyway, since v0.9.5 LaTeX formulas are by default created used the JLateXMath library which removes the dependency from a LaTeX system (it works great for most cases, for some particular things, like \begin{verbatim} for example you should rely on an external LaTeX executable). I suggest you to upgrade to a more recent version. Current version is v0.9.6 or v0.9.7-SNAPSHOT with the most recent changes prior to v0.9.7. Thank you for trying JMathAnim! David