Closed Sean2358 closed 5 years ago
Lib version is 1.0.7, and the code i use
private BufferedImage latex2Img(String latex, float size) {
TeXFormula formula = new TeXFormula(latex);
TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, size);
BufferedImage image = new BufferedImage(icon.getIconWidth(),
icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
g2.setStroke(new BasicStroke(1));
g2.setColor(Color.BLACK);
JLabel jl = new JLabel();
jl.setForeground(new Color(0, 0, 0));
synchronized (this) {
icon.paintIcon(jl, g2, 0, 0);
}
return image;
}
...
Is it better with the experimental branch? https://github.com/opencollab/jlatexmath/tree/experimental
Is it better with the experimental branch? https://github.com/opencollab/jlatexmath/tree/experimental Thanks for suggestions! I will try it. But i don't know the trigger condition for this situation, so it's hard for me to judge whether it is better。
I have a strange problem. The command
\neq
work fine at the beginning,looks like this:But after running for a while, i don't know when and how, it is changed:
Is it because of some other command that changed the environment?