opencollab / jlatexmath

A Java API to render LaTeX
Other
513 stars 109 forks source link

\cancel isn't supported? #73

Closed abdelfattahradwan closed 3 years ago

abdelfattahradwan commented 4 years ago

Hello,

I have recently started using jlatexmath in one of my projects and found out that \cancel isn't supported.

When I try to render a formula with \cancel it results in the following error:

2020-11-21_23-51-28

I hope someone can help with this.

Thanks.

murkle commented 4 years ago

Use the experimental branch, that has loads of improvements

abdelfattahradwan commented 4 years ago

Use the experimental branch, that has loads of improvements

@murkle could you please tell me how (what is the proper artifact ID to use I mean) ? I'm using maven. Also, it it stable enough to be used in production?

abdelfattahradwan commented 4 years ago

@murkle when building the experimental version, the build fails with errors relating to something in Opentype.java and com.google.* packages not existing.

murkle commented 4 years ago

Are the compile errors in the tests, or somewhere important?

Stable: yes - very

Maven: sorry, no

abdelfattahradwan commented 4 years ago

Are the compile errors in the tests, or somewhere important?

Stable: yes - very

Maven: sorry, no

The errors are related to the tests yeah.

murkle commented 4 years ago

OK, you can either ignore the errors or try to fix them of course :)

abdelfattahradwan commented 4 years ago

OK, you can either ignore the errors or try to fix them of course :)

Well, 99.9% of the errors are related to missing symbols but when I go to the files where it says they're missing, I find everything in place, also ignoring them, when I import the generated jars GraphicsFactory is always null, and TeXFormula is missing all create* methods?!

abdelfattahradwan commented 4 years ago

@murkle Also, when I do mvn clean install -fn it still doesn't output jars :(

abdelfattahradwan commented 4 years ago

I have attached a file containing the resulting logs of running mvn clean install -fn -X inside the jlatexmath folder

build.txt

murkle commented 4 years ago

The "web" package is just for use with GWT

abdelfattahradwan commented 4 years ago

Okay then, I'm sorry if I'm taking much of your time, but can you please tell me how to properly build this thing?! I swear I have been trying all day with no success!!

abdelfattahradwan commented 4 years ago

@murkle any help possible or I will just have to wait until you guys release the new version?

murkle commented 4 years ago

It should work if you delete the "web" package and testing bits

abdelfattahradwan commented 4 years ago

@murkle

2020-11-23_19-08-20

2020-11-23_19-09-09

murkle commented 4 years ago

Can you run https://github.com/opencollab/jlatexmath/blob/experimental/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/desktop/TestJlmDesktop.java ?

abdelfattahradwan commented 4 years ago

Can you run https://github.com/opencollab/jlatexmath/blob/experimental/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/desktop/TestJlmDesktop.java ?

Excuse my inexperience but how do I run this test alone?

murkle commented 4 years ago

It's not a test - it has this. Just run it:

public static void main(String[] args) {
        Configuration.getFontMapping();
        TestJlmDesktop s = new TestJlmDesktop();
        s.setVisible(true);
    }
abdelfattahradwan commented 4 years ago

@murkle

Result:

TestJlmDesktop.java:9: error: package org.scilab.forge.jlatexmath.desktop.graphics does not exist import org.scilab.forge.jlatexmath.desktop.graphics.Graphics2DD; ^ TestJlmDesktop.java:10: error: package org.scilab.forge.jlatexmath.share does not exist import org.scilab.forge.jlatexmath.share.Colors; ^ TestJlmDesktop.java:11: error: package org.scilab.forge.jlatexmath.share does not exist import org.scilab.forge.jlatexmath.share.Configuration; ^ TestJlmDesktop.java:12: error: package org.scilab.forge.jlatexmath.share does not exist import org.scilab.forge.jlatexmath.share.TeXConstants; ^ TestJlmDesktop.java:13: error: package org.scilab.forge.jlatexmath.share does not exist import org.scilab.forge.jlatexmath.share.TeXFormula; ^ TestJlmDesktop.java:14: error: package org.scilab.forge.jlatexmath.share.platform does not exist import org.scilab.forge.jlatexmath.share.platform.FactoryProvider; ^ TestJlmDesktop.java:15: error: package org.scilab.forge.jlatexmath.share.platform.graphics does not exist import org.scilab.forge.jlatexmath.share.platform.graphics.Image; ^ TestJlmDesktop.java:20: error: cannot find symbol if (FactoryProvider.getInstance() == null) { ^ symbol: variable FactoryProvider location: class TestJlmDesktop TestJlmDesktop.java:21: error: cannot find symbol FactoryProvider.setInstance(new FactoryProviderDesktop()); ^ symbol: class FactoryProviderDesktop location: class TestJlmDesktop TestJlmDesktop.java:21: error: cannot find symbol FactoryProvider.setInstance(new FactoryProviderDesktop()); ^ symbol: variable FactoryProvider location: class TestJlmDesktop TestJlmDesktop.java:37: error: cannot find symbol Graphics2DD g2d = new Graphics2DD(g2); ^ symbol: class Graphics2DD location: class TestJlmDesktop TestJlmDesktop.java:37: error: cannot find symbol Graphics2DD g2d = new Graphics2DD(g2); ^ symbol: class Graphics2DD location: class TestJlmDesktop TestJlmDesktop.java:61: error: cannot find symbol TeXFormula formula = new TeXFormula(text); ^ symbol: class TeXFormula location: class TestJlmDesktop TestJlmDesktop.java:61: error: cannot find symbol TeXFormula formula = new TeXFormula(text); ^ symbol: class TeXFormula location: class TestJlmDesktop TestJlmDesktop.java:62: error: cannot find symbol Image im = formula.createBufferedImage(TeXConstants.STYLE_DISPLAY, ^ symbol: class Image location: class TestJlmDesktop TestJlmDesktop.java:62: error: cannot find symbol Image im = formula.createBufferedImage(TeXConstants.STYLE_DISPLAY, ^ symbol: variable TeXConstants location: class TestJlmDesktop TestJlmDesktop.java:63: error: cannot find symbol 30, Colors.BLACK, Colors.WHITE); ^ symbol: variable Colors location: class TestJlmDesktop TestJlmDesktop.java:63: error: cannot find symbol 30, Colors.BLACK, Colors.WHITE); ^ symbol: variable Colors location: class TestJlmDesktop TestJlmDesktop.java:70: error: cannot find symbol Configuration.getFontMapping(); ^ symbol: variable Configuration location: class TestJlmDesktop 19 errors

abdelfattahradwan commented 4 years ago

@murkle any idea what's causing the error above?

abdelfattahradwan commented 3 years ago

@murkle any update?!

sylvestre commented 3 years ago

afaik, it is still happening. Why did you close it @murkle ?

murkle commented 3 years ago

See https://github.com/opencollab/jlatexmath/issues/18

sylvestre commented 3 years ago

@murkle please add a comment then...