diff --git a/.gitignore b/.gitignore
index a6ba0025..3d717a80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
-*.class
-*~
-dist/*
-bin/*
\ No newline at end of file
+target
+.classpath
+.settings
+.project
+/bin
+/dist
diff --git a/.travis.yml b/.travis.yml
index 4af1db35..7383c264 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,3 +8,13 @@ jdk:
before_install:
- sudo apt-get -qq update
- sudo apt-get build-dep libjlatexmath-java
+
+before_script:
+ - "export DISPLAY=:99.0"
+ - "sh -e /etc/init.d/xvfb start"
+ - sleep 3 # give xvfb some time to start
+
+addons:
+ hosts:
+ - jlmhost
+ hostname: jlmhost
diff --git a/README.md b/README.md
index 5425c3d8..7aa0a6de 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+
JLaTeXMath is a Java library. Its main purpose is to display mathematical formulas written in LaTeX. JLaTeXMath is the best Java library to display LaTeX code.
This library is used by numerous important projects like Scilab, Geogebra, Freeplane, Mathpiper, CaRMetal, Ultrastudio, etc.
@@ -25,13 +25,13 @@
There is no dependency and no external programs to install : JLaTeXMath is fully functional by itself.
Few examples are available in the source distribution, they show how to use JLaTeXMath and for developpers how to write new commands in using Java.
A first example :
-
+
a second one :
-
+
and a third one :
-
+
JLaTeXMath is used by Scilab to display formulas wrote in LaTeX in graphic windows :
-
+
JLaTeXMath is a fork of the excellent project JMathTeX.
To build the jlatexmath library just type ant...
diff --git a/build.xml b/build.xml
deleted file mode 100644
index c2a90f8b..00000000
--- a/build.xml
+++ /dev/null
@@ -1,240 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/images/Formula1.png b/docs/images/Formula1.png
similarity index 100%
rename from images/Formula1.png
rename to docs/images/Formula1.png
diff --git a/images/Formula2.png b/docs/images/Formula2.png
similarity index 100%
rename from images/Formula2.png
rename to docs/images/Formula2.png
diff --git a/images/Formula3.png b/docs/images/Formula3.png
similarity index 100%
rename from images/Formula3.png
rename to docs/images/Formula3.png
diff --git a/images/Logo.png b/docs/images/Logo.png
similarity index 100%
rename from images/Logo.png
rename to docs/images/Logo.png
diff --git a/images/ScilabScreenshot.png b/docs/images/ScilabScreenshot.png
similarity index 100%
rename from images/ScilabScreenshot.png
rename to docs/images/ScilabScreenshot.png
diff --git a/examples/Basic/Example1.java b/examples/Basic/Example1.java
deleted file mode 100644
index 15dffbff..00000000
--- a/examples/Basic/Example1.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Example1.java
- * =========================================================================
- * This file is part of the JLaTeXMath Library - http://jlatexmath.sourceforge.net
- *
- * Copyright (C) 2009 DENIZET Calixte
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * A copy of the GNU General Public License can be found in the file
- * LICENSE.txt provided with the source distribution of this program (see
- * the META-INF directory in the source jar). This license can also be
- * found on the GNU website at http://www.gnu.org/licenses/gpl.html.
- *
- * If you did not receive a copy of the GNU General Public License along
- * with this program, contact the lead developer, or write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- * Linking this library statically or dynamically with other modules
- * is making a combined work based on this library. Thus, the terms
- * and conditions of the GNU General Public License cover the whole
- * combination.
- *
- * As a special exception, the copyright holders of this library give you
- * permission to link this library with independent modules to produce
- * an executable, regardless of the license terms of these independent
- * modules, and to copy and distribute the resulting executable under terms
- * of your choice, provided that you also meet, for each linked independent
- * module, the terms and conditions of the license of that module.
- * An independent module is a module which is not derived from or based
- * on this library. If you modify this library, you may extend this exception
- * to your version of the library, but you are not obliged to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- */
-
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Color;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import javax.imageio.ImageIO;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-
-import org.scilab.forge.jlatexmath.TeXConstants;
-import org.scilab.forge.jlatexmath.TeXFormula;
-import org.scilab.forge.jlatexmath.TeXIcon;
-
-/**
- * A class to test LaTeX rendering.
- **/
-public class Example1 {
- public static void main(String[] args) {
-
- String latex = "\\begin{array}{lr}\\mbox{\\textcolor{Blue}{Russian}}&\\mbox{\\textcolor{Melon}{Greek}}\\\\";
- latex += "\\mbox{" + "привет мир".toUpperCase() + "}&\\mbox{" + "γειά κόσμο".toUpperCase() + "}\\\\";
- latex += "\\mbox{привет мир}&\\mbox{γειά κόσμο}\\\\";
- latex += "\\mathbf{\\mbox{привет мир}}&\\mathbf{\\mbox{γειά κόσμο}}\\\\";
- latex += "\\mathit{\\mbox{привет мир}}&\\mathit{\\mbox{γειά κόσμο}}\\\\";
- latex += "\\mathsf{\\mbox{привет мир}}&\\mathsf{\\mbox{γειά κόσμο}}\\\\";
- latex += "\\mathtt{\\mbox{привет мир}}&\\mathtt{\\mbox{γειά κόσμο}}\\\\";
- latex += "\\mathbf{\\mathit{\\mbox{привет мир}}}&\\mathbf{\\mathit{\\mbox{γειά κόσμο}}}\\\\";
- latex += "\\mathbf{\\mathsf{\\mbox{привет мир}}}&\\mathbf{\\mathsf{\\mbox{γειά κόσμο}}}\\\\";
- latex += "\\mathsf{\\mathit{\\mbox{привет мир}}}&\\mathsf{\\mathit{\\mbox{γειά κόσμο}}}\\\\";
- latex += "&\\\\";
- latex += "\\mbox{\\textcolor{Salmon}{Bulgarian}}&\\mbox{\\textcolor{Tan}{Serbian}}\\\\";
- latex += "\\mbox{здравей свят}&\\mbox{Хелло уорлд}\\\\";
- latex += "&\\\\";
- latex += "\\mbox{\\textcolor{Turquoise}{Bielorussian}}&\\mbox{\\textcolor{LimeGreen}{Ukrainian}}\\\\";
- latex += "\\mbox{прывітаньне Свет}&\\mbox{привіт світ}\\\\";
- latex += "\\end{array}";
-
- TeXFormula formula = new TeXFormula(latex);
-
- // Note: Old interface for creating icons:
- //TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
- // Note: New interface using builder pattern (inner class):
- TeXIcon icon = formula.new TeXIconBuilder().setStyle(TeXConstants.STYLE_DISPLAY).setSize(20).build();
-
- icon.setInsets(new Insets(5, 5, 5, 5));
-
- BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2 = image.createGraphics();
- g2.setColor(Color.white);
- g2.fillRect(0,0,icon.getIconWidth(),icon.getIconHeight());
- JLabel jl = new JLabel();
- jl.setForeground(new Color(0, 0, 0));
- icon.paintIcon(jl, g2, 0, 0);
- File file = new File("Example1.png");
- try {
- ImageIO.write(image, "png", file.getAbsoluteFile());
- } catch (IOException ex) { }
- }
-}
diff --git a/examples/Export/Main.java b/examples/Export/Main.java
deleted file mode 100644
index 2eb24633..00000000
--- a/examples/Export/Main.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Main.java
- * =========================================================================
- * This file is part of the JLaTeXMath Library - http://jlatexmath.sourceforge.net
- *
- * Copyright (C) 2009 DENIZET Calixte
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * A copy of the GNU General Public License can be found in the file
- * LICENSE.txt provided with the source distribution of this program (see
- * the META-INF directory in the source jar). This license can also be
- * found on the GNU website at http://www.gnu.org/licenses/gpl.html.
- *
- * If you did not receive a copy of the GNU General Public License along
- * with this program, contact the lead developer, or write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- *
- * Linking this library statically or dynamically with other modules
- * is making a combined work based on this library. Thus, the terms
- * and conditions of the GNU General Public License cover the whole
- * combination.
- *
- * As a special exception, the copyright holders of this library give you
- * permission to link this library with independent modules to produce
- * an executable, regardless of the license terms of these independent
- * modules, and to copy and distribute the resulting executable under terms
- * of your choice, provided that you also meet, for each linked independent
- * module, the terms and conditions of the license of that module.
- * An independent module is a module which is not derived from or based
- * on this library. If you modify this library, you may extend this exception
- * to your version of the library, but you are not obliged to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- */
-
-public class Main {
- public static void main(String[] args) {
- Example1.main(new String[0]);
- Example2.main(new String[0]);
- Example3.main(new String[0]);
- Example4.main(new String[0]);
- Example5.main(new String[0]);
- }
-}
diff --git a/examples/Export/build.xml b/examples/Export/build.xml
deleted file mode 100644
index ff754b96..00000000
--- a/examples/Export/build.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/GIWS/build.xml b/examples/GIWS/build.xml
deleted file mode 100644
index ad6a6513..00000000
--- a/examples/GIWS/build.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/fop.properties b/fop.properties
deleted file mode 100644
index 147871d6..00000000
--- a/fop.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# Defines the path to fop
-# Mandatory are build & run time
-fop.jar=/usr/share/java/fop.jar
-
-# Mandatory only at runtime
-xmlgraphics-commons.jar=/usr/share/java/xmlgraphics-commons.jar
-batik.jar=/usr/share/java/batik.jar
-avalon-framework.jar=/usr/share/java/avalon-framework.jar
-commons-io.jar=/usr/share/java/commons-io.jar
-commons-logging.jar=/usr/share/java/commons-logging.jar
-xml-apis-ext.jar=/usr/share/java/xml-apis-ext.jar
-
-# If you have already built jlatexmath, you can give the correct path
-# else ant will try to build jlatexmath from ../..
-#jlatexmath.jar=/usr/share/java/jlatexmath.jar
diff --git a/jlatexmath-example-export/pom.xml b/jlatexmath-example-export/pom.xml
new file mode 100644
index 00000000..ebea182e
--- /dev/null
+++ b/jlatexmath-example-export/pom.xml
@@ -0,0 +1,45 @@
+
+ 4.0.0
+
+
+ org.scilab.forge
+ jlatexmath-parent
+ 1.0.7-SNAPSHOT
+
+ jlatexmath-example-export
+ jar
+
+ ${project.artifactId}
+ TODO
+
+
+
+ ${project.parent.groupId}
+ jlatexmath
+ ${project.parent.version}
+
+
+ org.apache.xmlgraphics
+ fop
+ ${fop.version}
+
+
+ org.apache.xmlgraphics
+ batik-codec
+ 1.7
+
+
+ org.apache.xmlgraphics
+ xmlgraphics-commons
+ 2.1
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
+
+
+
diff --git a/examples/Export/README b/jlatexmath-example-export/src/README
similarity index 100%
rename from examples/Export/README
rename to jlatexmath-example-export/src/README
diff --git a/examples/Export/Convert.java b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Convert.java
similarity index 61%
rename from examples/Export/Convert.java
rename to jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Convert.java
index 0aa73519..9ac2648e 100644
--- a/examples/Export/Convert.java
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Convert.java
@@ -1,34 +1,32 @@
-import java.awt.Insets;
+package org.scilab.forge.jlatexmath.examples.export;
+
import java.awt.Color;
import java.awt.Dimension;
-import java.io.FileOutputStream;
+import java.awt.Insets;
import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
+
import javax.swing.JLabel;
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.apache.batik.dom.GenericDOMImplementation;
+import org.apache.batik.svggen.SVGGeneratorContext;
+import org.apache.batik.svggen.SVGGraphics2D;
+import org.apache.batik.transcoder.TranscoderInput;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.fop.render.ps.EPSTranscoder;
+import org.apache.fop.render.ps.PSTranscoder;
+import org.apache.fop.svg.AbstractFOPTranscoder;
+import org.apache.fop.svg.PDFTranscoder;
+import org.scilab.forge.jlatexmath.DefaultTeXFont;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;
-import org.scilab.forge.jlatexmath.DefaultTeXFont;
-
import org.scilab.forge.jlatexmath.cyrillic.CyrillicRegistration;
import org.scilab.forge.jlatexmath.greek.GreekRegistration;
-
-import org.apache.batik.transcoder.TranscoderOutput;
-import org.apache.batik.transcoder.TranscoderInput;
-import org.apache.fop.svg.AbstractFOPTranscoder;
-import org.apache.fop.svg.PDFTranscoder;
-import org.apache.fop.render.ps.PSTranscoder;
-import org.apache.fop.render.ps.EPSTranscoder;
-import org.apache.avalon.framework.configuration.DefaultConfiguration;
-
-import org.apache.batik.svggen.SVGGeneratorContext;
-import org.apache.batik.svggen.SVGGraphics2D;
-import org.apache.batik.dom.GenericDOMImplementation;
-
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
@@ -37,62 +35,67 @@ public class Convert {
public static final int PDF = 0;
public static final int PS = 1;
public static final int EPS = 2;
-
+
public static void toSVG(String latex, String file, boolean fontAsShapes) throws IOException {
DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
String svgNS = "http://www.w3.org/2000/svg";
Document document = domImpl.createDocument(svgNS, "svg", null);
SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(document);
-
+
SVGGraphics2D g2 = new SVGGraphics2D(ctx, fontAsShapes);
- DefaultTeXFont.registerAlphabet(new CyrillicRegistration());
- DefaultTeXFont.registerAlphabet(new GreekRegistration());
+ DefaultTeXFont.registerAlphabet(new CyrillicRegistration());
+ DefaultTeXFont.registerAlphabet(new GreekRegistration());
- TeXFormula formula = new TeXFormula(latex);
- TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
- icon.setInsets(new Insets(5, 5, 5, 5));
- g2.setSVGCanvasSize(new Dimension(icon.getIconWidth(),icon.getIconHeight()));
+ TeXFormula formula = new TeXFormula(latex);
+ TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
+ icon.setInsets(new Insets(5, 5, 5, 5));
+ g2.setSVGCanvasSize(new Dimension(icon.getIconWidth(), icon.getIconHeight()));
g2.setColor(Color.white);
- g2.fillRect(0,0,icon.getIconWidth(),icon.getIconHeight());
+ g2.fillRect(0, 0, icon.getIconWidth(), icon.getIconHeight());
+
+ JLabel jl = new JLabel();
+ jl.setForeground(new Color(0, 0, 0));
+ icon.paintIcon(jl, g2, 0, 0);
- JLabel jl = new JLabel();
- jl.setForeground(new Color(0, 0, 0));
- icon.paintIcon(jl, g2, 0, 0);
-
- boolean useCSS = true;
- FileOutputStream svgs = new FileOutputStream(file);
- Writer out = new OutputStreamWriter(svgs, "UTF-8");
+ boolean useCSS = true;
+ FileOutputStream svgs = new FileOutputStream("target/" + file);
+ Writer out = new OutputStreamWriter(svgs, "UTF-8");
g2.stream(out, useCSS);
- svgs.flush();
- svgs.close();
+ svgs.flush();
+ svgs.close();
}
public static void SVGTo(String inSVG, String out, int type) {
AbstractFOPTranscoder trans;
switch (type) {
- case PDF :
+ case PDF:
trans = new PDFTranscoder();
break;
- case PS :
+ case PS:
trans = new PSTranscoder();
break;
- case EPS :
+ case EPS:
trans = new EPSTranscoder();
break;
- default :
+ default:
trans = null;
}
try {
- TranscoderInput input = new TranscoderInput(new FileInputStream(inSVG));
- OutputStream os = new FileOutputStream(out);
+ String filename = "target/" + inSVG;
+ System.out.println("transcoding "
+ + filename);
+ TranscoderInput input = new TranscoderInput(new FileInputStream(filename));
+ OutputStream os = new FileOutputStream("target/" + out);
TranscoderOutput output = new TranscoderOutput(os);
trans.transcode(input, output);
os.flush();
os.close();
} catch (Exception e) {
- System.out.println("Problem when exporting " + inSVG + " to " + out + "!\n" + e.toString());
+ System.out.println(
+ "Problem when exporting " + inSVG + " to " + out + "!\n" + e.toString());
+ throw new RuntimeException(e);
}
}
}
diff --git a/examples/Export/Example1.java b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example1.java
similarity index 89%
rename from examples/Export/Example1.java
rename to jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example1.java
index 5641cfbe..3b0764cb 100644
--- a/examples/Export/Example1.java
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example1.java
@@ -42,25 +42,10 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.export;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Color;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import javax.imageio.ImageIO;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-
-import org.scilab.forge.jlatexmath.TeXConstants;
-import org.scilab.forge.jlatexmath.TeXFormula;
-import org.scilab.forge.jlatexmath.TeXIcon;
-
/**
* A class to test LaTeX rendering.
**/
@@ -92,6 +77,8 @@ public static void main(String[] args) {
Convert.SVGTo("Example1_shaped.svg", "Example1_shaped.pdf", Convert.PDF);
Convert.SVGTo("Example1.svg", "Example1.ps", Convert.PS);
Convert.SVGTo("Example1.svg", "Example1.eps", Convert.EPS);
- } catch (IOException ex) {}
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
}
}
diff --git a/examples/Export/Example2.java b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example2.java
similarity index 55%
rename from examples/Export/Example2.java
rename to jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example2.java
index e3064444..bfa4709d 100644
--- a/examples/Export/Example2.java
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example2.java
@@ -42,50 +42,36 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.export;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Color;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import javax.imageio.ImageIO;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-
-import org.scilab.forge.jlatexmath.TeXConstants;
-import org.scilab.forge.jlatexmath.TeXFormula;
-import org.scilab.forge.jlatexmath.TeXIcon;
-
/**
* A class to test LaTeX rendering.
**/
public class Example2 {
public static void main(String[] args) {
-
- String latex = "\\begin{array}{l}";
- latex += "\\forall\\varepsilon\\in\\mathbb{R}_+^*\\ \\exists\\eta>0\\ |x-x_0|\\leq\\eta\\Longrightarrow|f(x)-f(x_0)|\\leq\\varepsilon\\\\";
- latex += "\\det\\begin{bmatrix}a_{11}&a_{12}&\\cdots&a_{1n}\\\\a_{21}&\\ddots&&\\vdots\\\\\\vdots&&\\ddots&\\vdots\\\\a_{n1}&\\cdots&\\cdots&a_{nn}\\end{bmatrix}\\overset{\\mathrm{def}}{=}\\sum_{\\sigma\\in\\mathfrak{S}_n}\\varepsilon(\\sigma)\\prod_{k=1}^n a_{k\\sigma(k)}\\\\";
- latex += "\\sideset{_\\alpha^\\beta}{_\\gamma^\\delta}{\\begin{pmatrix}a&b\\\\c&d\\end{pmatrix}}\\\\";
- latex += "\\int_0^\\infty{x^{2n} e^{-a x^2}\\,dx} = \\frac{2n-1}{2a} \\int_0^\\infty{x^{2(n-1)} e^{-a x^2}\\,dx} = \\frac{(2n-1)!!}{2^{n+1}} \\sqrt{\\frac{\\pi}{a^{2n+1}}}\\\\";
- latex += "\\int_a^b{f(x)\\,dx} = (b - a) \\sum\\limits_{n = 1}^\\infty {\\sum\\limits_{m = 1}^{2^n - 1} {\\left( { - 1} \\right)^{m + 1} } } 2^{ - n} f(a + m\\left( {b - a} \\right)2^{-n} )\\\\";
- latex += "\\int_{-\\pi}^{\\pi} \\sin(\\alpha x) \\sin^n(\\beta x) dx = \\textstyle{\\left \\{ \\begin{array}{cc} (-1)^{(n+1)/2} (-1)^m \\frac{2 \\pi}{2^n} \\binom{n}{m} & n \\mbox{ odd},\\ \\alpha = \\beta (2m-n) \\\\ 0 & \\mbox{otherwise} \\\\ \\end{array} \\right .}\\\\";
- latex += "L = \\int_a^b \\sqrt{ \\left|\\sum_{i,j=1}^ng_{ij}(\\gamma(t))\\left(\\frac{d}{dt}x^i\\circ\\gamma(t)\\right)\\left(\\frac{d}{dt}x^j\\circ\\gamma(t)\\right)\\right|}\\,dt\\\\";
- latex += "\\begin{array}{rl} s &= \\int_a^b\\left\\|\\frac{d}{dt}\\vec{r}\\,(u(t),v(t))\\right\\|\\,dt \\\\ &= \\int_a^b \\sqrt{u'(t)^2\\,\\vec{r}_u\\cdot\\vec{r}_u + 2u'(t)v'(t)\\, \\vec{r}_u\\cdot\\vec{r}_v+ v'(t)^2\\,\\vec{r}_v\\cdot\\vec{r}_v}\\,\\,\\, dt. \\end{array}\\\\";
- latex += "\\end{array}";
-
+
+ String latex = "\\begin{array}{l}";
+ latex += "\\forall\\varepsilon\\in\\mathbb{R}_+^*\\ \\exists\\eta>0\\ |x-x_0|\\leq\\eta\\Longrightarrow|f(x)-f(x_0)|\\leq\\varepsilon\\\\";
+ latex += "\\det\\begin{bmatrix}a_{11}&a_{12}&\\cdots&a_{1n}\\\\a_{21}&\\ddots&&\\vdots\\\\\\vdots&&\\ddots&\\vdots\\\\a_{n1}&\\cdots&\\cdots&a_{nn}\\end{bmatrix}\\overset{\\mathrm{def}}{=}\\sum_{\\sigma\\in\\mathfrak{S}_n}\\varepsilon(\\sigma)\\prod_{k=1}^n a_{k\\sigma(k)}\\\\";
+ latex += "\\sideset{_\\alpha^\\beta}{_\\gamma^\\delta}{\\begin{pmatrix}a&b\\\\c&d\\end{pmatrix}}\\\\";
+ latex += "\\int_0^\\infty{x^{2n} e^{-a x^2}\\,dx} = \\frac{2n-1}{2a} \\int_0^\\infty{x^{2(n-1)} e^{-a x^2}\\,dx} = \\frac{(2n-1)!!}{2^{n+1}} \\sqrt{\\frac{\\pi}{a^{2n+1}}}\\\\";
+ latex += "\\int_a^b{f(x)\\,dx} = (b - a) \\sum\\limits_{n = 1}^\\infty {\\sum\\limits_{m = 1}^{2^n - 1} {\\left( { - 1} \\right)^{m + 1} } } 2^{ - n} f(a + m\\left( {b - a} \\right)2^{-n} )\\\\";
+ latex += "\\int_{-\\pi}^{\\pi} \\sin(\\alpha x) \\sin^n(\\beta x) dx = \\textstyle{\\left \\{ \\begin{array}{cc} (-1)^{(n+1)/2} (-1)^m \\frac{2 \\pi}{2^n} \\binom{n}{m} & n \\mbox{ odd},\\ \\alpha = \\beta (2m-n) \\\\ 0 & \\mbox{otherwise} \\\\ \\end{array} \\right .}\\\\";
+ latex += "L = \\int_a^b \\sqrt{ \\left|\\sum_{i,j=1}^ng_{ij}(\\gamma(t))\\left(\\frac{d}{dt}x^i\\circ\\gamma(t)\\right)\\left(\\frac{d}{dt}x^j\\circ\\gamma(t)\\right)\\right|}\\,dt\\\\";
+ latex += "\\begin{array}{rl} s &= \\int_a^b\\left\\|\\frac{d}{dt}\\vec{r}\\,(u(t),v(t))\\right\\|\\,dt \\\\ &= \\int_a^b \\sqrt{u'(t)^2\\,\\vec{r}_u\\cdot\\vec{r}_u + 2u'(t)v'(t)\\, \\vec{r}_u\\cdot\\vec{r}_v+ v'(t)^2\\,\\vec{r}_v\\cdot\\vec{r}_v}\\,\\,\\, dt. \\end{array}\\\\";
+ latex += "\\end{array}";
+
try {
- Convert.toSVG(latex, "Example2.svg", false);
+ Convert.toSVG(latex, "Example2.svg", false);
Convert.toSVG(latex, "Example2_shaped.svg", true);
Convert.SVGTo("Example2.svg", "Example2.pdf", Convert.PDF);
Convert.SVGTo("Example2_shaped.svg", "Example2_shaped.pdf", Convert.PDF);
Convert.SVGTo("Example2.svg", "Example2.ps", Convert.PS);
Convert.SVGTo("Example2.svg", "Example2.eps", Convert.EPS);
- } catch (IOException ex) {}
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
}
}
-
diff --git a/examples/Export/Example3.java b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example3.java
similarity index 90%
rename from examples/Export/Example3.java
rename to jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example3.java
index 3703c0ac..f7b29ab6 100644
--- a/examples/Export/Example3.java
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example3.java
@@ -42,32 +42,18 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.export;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Color;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import javax.imageio.ImageIO;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-
-import org.scilab.forge.jlatexmath.TeXConstants;
-import org.scilab.forge.jlatexmath.TeXFormula;
-import org.scilab.forge.jlatexmath.TeXIcon;
-
/**
* A class to test LaTeX rendering.
**/
public class Example3 {
public static void main(String[] args) {
-
+
String latex = "\\definecolor{gris}{gray}{0.9}";
+ latex += "\\definecolor{noir}{rgb}{0,0,0}";
latex += "\\definecolor{bleu}{rgb}{0,0,1}\\newcommand{\\pa}{\\left|}";
latex += "\\begin{array}{c}";
latex += "\\JLaTeXMath\\\\";
@@ -86,14 +72,16 @@ public static void main(String[] args) {
latex += "\\end{split}\\\\";
latex += "\\rotatebox{30}{\\sum_{n=1}^{+\\infty}}\\quad\\mbox{Mirror rorriM}\\reflectbox{\\mbox{Mirror rorriM}}";
latex += "\\end{array}";
-
- try {
- Convert.toSVG(latex, "Example3.svg", false);
+
+ try {
+ Convert.toSVG(latex, "Example3.svg", false);
Convert.toSVG(latex, "Example3_shaped.svg", true);
Convert.SVGTo("Example3.svg", "Example3.pdf", Convert.PDF);
Convert.SVGTo("Example3_shaped.svg", "Example3_shaped.pdf", Convert.PDF);
Convert.SVGTo("Example3.svg", "Example3.ps", Convert.PS);
Convert.SVGTo("Example3.svg", "Example3.eps", Convert.EPS);
- } catch (IOException ex) {}
- }
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
}
diff --git a/examples/Export/Example4.java b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example4.java
similarity index 81%
rename from examples/Export/Example4.java
rename to jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example4.java
index 96e7415e..94fee4b5 100644
--- a/examples/Export/Example4.java
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example4.java
@@ -42,40 +42,27 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.export;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Color;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import javax.imageio.ImageIO;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-
-import org.scilab.forge.jlatexmath.TeXConstants;
-import org.scilab.forge.jlatexmath.TeXFormula;
-import org.scilab.forge.jlatexmath.TeXIcon;
-
/**
* A class to test LaTeX rendering.
**/
public class Example4 {
public static void main(String[] args) {
-
- String latex = "\\mbox{An image from the \\LaTeX3 project }\\includegraphics{lion.png}";
-
+
+ String latex = "\\mbox{An image from the \\LaTeX3 project }\\includegraphics{src/test/resources/lion.png}";
+
try {
- Convert.toSVG(latex, "Example4.svg", false);
+ Convert.toSVG(latex, "Example4.svg", false);
Convert.toSVG(latex, "Example4_shaped.svg", true);
Convert.SVGTo("Example4.svg", "Example4.pdf", Convert.PDF);
Convert.SVGTo("Example4_shaped.svg", "Example4_shaped.pdf", Convert.PDF);
Convert.SVGTo("Example4.svg", "Example4.ps", Convert.PS);
Convert.SVGTo("Example4.svg", "Example4.eps", Convert.EPS);
- } catch (IOException ex) {}
- }
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
}
diff --git a/examples/Export/Example5.java b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example5.java
similarity index 71%
rename from examples/Export/Example5.java
rename to jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example5.java
index 6691815d..9e75b705 100644
--- a/examples/Export/Example5.java
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/Example5.java
@@ -42,48 +42,35 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.export;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Color;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import javax.imageio.ImageIO;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-
-import org.scilab.forge.jlatexmath.TeXConstants;
-import org.scilab.forge.jlatexmath.TeXFormula;
-import org.scilab.forge.jlatexmath.TeXIcon;
-
/**
* A class to test LaTeX rendering.
**/
public class Example5 {
public static void main(String[] args) {
-
- String latex = "\\begin{array}{|c|l|||r|c|}";
- latex += "\\hline";
- latex += "\\text{Matrix}&\\multicolumn{2}{|c|}{\\text{Multicolumns}}&\\text{Font sizes commands}\\cr";
- latex += "\\hline";
- latex += "\\begin{pmatrix}\\alpha_{11}&\\cdots&\\alpha_{1n}\\cr\\hdotsfor{3}\\cr\\alpha_{n1}&\\cdots&\\alpha_{nn}\\end{pmatrix}&\\Large \\text{Large Right}&\\small \\text{small Left}&\\tiny \\text{tiny Tiny}\\cr";
- latex += "\\hline";
- latex += "\\multicolumn{4}{|c|}{\\Huge \\text{Huge Multicolumns}}\\cr";
- latex += "\\hline";
- latex += "\\end{array}";
+
+ String latex = "\\begin{array}{|c|l|||r|c|}";
+ latex += "\\hline";
+ latex += "\\text{Matrix}&\\multicolumn{2}{|c|}{\\text{Multicolumns}}&\\text{Font sizes commands}\\cr";
+ latex += "\\hline";
+ latex += "\\begin{pmatrix}\\alpha_{11}&\\cdots&\\alpha_{1n}\\cr\\hdotsfor{3}\\cr\\alpha_{n1}&\\cdots&\\alpha_{nn}\\end{pmatrix}&\\Large \\text{Large Right}&\\small \\text{small Left}&\\tiny \\text{tiny Tiny}\\cr";
+ latex += "\\hline";
+ latex += "\\multicolumn{4}{|c|}{\\Huge \\text{Huge Multicolumns}}\\cr";
+ latex += "\\hline";
+ latex += "\\end{array}";
try {
- Convert.toSVG(latex, "Example5.svg", false);
+ Convert.toSVG(latex, "Example5.svg", false);
Convert.toSVG(latex, "Example5_shaped.svg", true);
Convert.SVGTo("Example5.svg", "Example5.pdf", Convert.PDF);
Convert.SVGTo("Example5_shaped.svg", "Example5_shaped.pdf", Convert.PDF);
Convert.SVGTo("Example5.svg", "Example5.ps", Convert.PS);
Convert.SVGTo("Example5.svg", "Example5.eps", Convert.EPS);
- } catch (IOException ex) {}
- }
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
}
diff --git a/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/ExamplesTest.java b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/ExamplesTest.java
new file mode 100644
index 00000000..09f806fe
--- /dev/null
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/ExamplesTest.java
@@ -0,0 +1,175 @@
+/* Main.java
+ * =========================================================================
+ * This file is part of the JLaTeXMath Library - http://jlatexmath.sourceforge.net
+ *
+ * Copyright (C) 2009 DENIZET Calixte
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * A copy of the GNU General Public License can be found in the file
+ * LICENSE.txt provided with the source distribution of this program (see
+ * the META-INF directory in the source jar). This license can also be
+ * found on the GNU website at http://www.gnu.org/licenses/gpl.html.
+ *
+ * If you did not receive a copy of the GNU General Public License along
+ * with this program, contact the lead developer, or write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Linking this library statically or dynamically with other modules
+ * is making a combined work based on this library. Thus, the terms
+ * and conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce
+ * an executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under terms
+ * of your choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from or based
+ * on this library. If you modify this library, you may extend this exception
+ * to your version of the library, but you are not obliged to do so.
+ * If you do not wish to do so, delete this exception statement from your
+ * version.
+ *
+ */
+package org.scilab.forge.jlatexmath.examples.export;
+
+import static org.junit.Assert.assertTrue;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import org.apache.batik.transcoder.TranscoderException;
+import org.apache.batik.transcoder.TranscoderInput;
+import org.apache.batik.transcoder.TranscoderOutput;
+import org.apache.batik.transcoder.image.PNGTranscoder;
+import org.junit.FixMethodOrder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runners.MethodSorters;
+import org.scilab.forge.jlatexmath.internal.util.Images;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class ExamplesTest {
+
+ @Test
+ public void testExample1() throws FileNotFoundException, TranscoderException, IOException {
+ Example1.main(new String[0]);
+ saveSvgAsPngAndCheck("Example1");
+ }
+
+ @Test
+ public void testExample1Shaped()
+ throws FileNotFoundException, TranscoderException, IOException {
+ Example1.main(new String[0]);
+ saveSvgAsPngAndCheck("Example1_shaped");
+ }
+
+ @Test
+ @Ignore
+ public void testExample2() throws FileNotFoundException, TranscoderException, IOException {
+ // TODO get this working (copy relevant fonts to some
+ Example2.main(new String[0]);
+ saveSvgAsPngAndCheck("Example2");
+ }
+
+ @Test
+ public void testExample2Shaped()
+ throws FileNotFoundException, TranscoderException, IOException {
+ Example2.main(new String[0]);
+ saveSvgAsPngAndCheck("Example2_shaped");
+ }
+
+ @Test
+ @Ignore
+ public void testExample3() throws FileNotFoundException, TranscoderException, IOException {
+ // TODO get this working
+ Example3.main(new String[0]);
+ saveSvgAsPngAndCheck("Example3");
+ }
+
+ @Test
+ public void testExample3Shaped()
+ throws FileNotFoundException, TranscoderException, IOException {
+ Example3.main(new String[0]);
+ saveSvgAsPngAndCheck("Example3_shaped");
+ }
+
+ @Test
+ public void testExample4() throws TranscoderException, IOException {
+ Example4.main(new String[0]);
+ saveSvgAsPngAndCheck("Example4");
+ }
+
+ @Test
+ public void testExample4Shaped() throws TranscoderException, IOException {
+ Example4.main(new String[0]);
+ saveSvgAsPngAndCheck("Example4_shaped");
+ }
+
+ private static void saveSvgAsPngAndCheck(String name)
+ throws FileNotFoundException, TranscoderException, IOException {
+ saveSvgAsPng(name);
+ check(name + ".png");
+ }
+
+ private static void saveSvgAsPng(String name)
+ throws FileNotFoundException, TranscoderException, IOException {
+ TranscoderInput ti = new TranscoderInput(new FileInputStream("target/" + name + ".svg"));
+ FileOutputStream os = new FileOutputStream("target/" + name + ".png");
+ TranscoderOutput to = new TranscoderOutput(os);
+ PNGTranscoder pt = new PNGTranscoder();
+ pt.transcode(ti, to);
+ os.flush();
+ os.close();
+ }
+
+ @Test
+ public void testExample5() {
+ Example5.main(new String[0]);
+ }
+
+ @Test
+ public void testURI() {
+ String s = "jar:file:/C:/Users/david/.m2/repository/org/scilab/forge/jlatexmath/1.0.5-SNAPSHOT/jlatexmath-1.0.5-SNAPSHOT.jar!/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.ttf";
+ File f = new File(s);
+ System.out.println(f.exists());
+ }
+
+ private static void check(String filename) {
+ try {
+ System.out.println("checking image " + filename);
+ BufferedImage a = ImageIO.read(new File("src/test/resources/expected/" + filename));
+ BufferedImage b = ImageIO.read(new File("target/" + filename));
+ double distance = Images.distance(a, b);
+ System.out.println("distance=" + distance);
+ // TODO establish a reasonable threshold after running the tests on
+ // different platforms (windows, osx, linux, others?)
+ final double THRESHOLD = Images.DISTANCE_THRESHOLD;
+ assertTrue("actual and expected images for " + filename + " are different sizes!",
+ distance >= 0);
+ assertTrue("distance is above threshold, images are probably significantly different, distance="
+ + distance,
+ distance <= THRESHOLD);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/README b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/README
new file mode 100644
index 00000000..1e0cc07e
--- /dev/null
+++ b/jlatexmath-example-export/src/test/java/org/scilab/forge/jlatexmath/examples/export/README
@@ -0,0 +1,9 @@
+In using fop 0.95 it's possible to generate PDF, PS or EPS via a SVG file.
+The glyphs can be converted into path to avoid the embedding of the fonts and make readable SVG files for the web or other usage.
+
+To compile check you have put in the classpath or in a directory you can precise in build.xml (with the variable myclasspath), the following jars :
+ fop.jar
+ avalon-framework.jar
+ xml-apis-ext.jar
+ commons-io.jar
+ commons-logging.jar
\ No newline at end of file
diff --git a/jlatexmath-example-export/src/test/resources/expected/Example1.png b/jlatexmath-example-export/src/test/resources/expected/Example1.png
new file mode 100644
index 00000000..ae5c026a
Binary files /dev/null and b/jlatexmath-example-export/src/test/resources/expected/Example1.png differ
diff --git a/jlatexmath-example-export/src/test/resources/expected/Example1_shaped.png b/jlatexmath-example-export/src/test/resources/expected/Example1_shaped.png
new file mode 100644
index 00000000..85d6eba5
Binary files /dev/null and b/jlatexmath-example-export/src/test/resources/expected/Example1_shaped.png differ
diff --git a/jlatexmath-example-export/src/test/resources/expected/Example2_shaped.png b/jlatexmath-example-export/src/test/resources/expected/Example2_shaped.png
new file mode 100644
index 00000000..a915d47f
Binary files /dev/null and b/jlatexmath-example-export/src/test/resources/expected/Example2_shaped.png differ
diff --git a/jlatexmath-example-export/src/test/resources/expected/Example3_shaped.png b/jlatexmath-example-export/src/test/resources/expected/Example3_shaped.png
new file mode 100644
index 00000000..78e936bc
Binary files /dev/null and b/jlatexmath-example-export/src/test/resources/expected/Example3_shaped.png differ
diff --git a/jlatexmath-example-export/src/test/resources/expected/Example4.png b/jlatexmath-example-export/src/test/resources/expected/Example4.png
new file mode 100644
index 00000000..f3a0e0ed
Binary files /dev/null and b/jlatexmath-example-export/src/test/resources/expected/Example4.png differ
diff --git a/jlatexmath-example-export/src/test/resources/expected/Example4_shaped.png b/jlatexmath-example-export/src/test/resources/expected/Example4_shaped.png
new file mode 100644
index 00000000..6ed8b3a5
Binary files /dev/null and b/jlatexmath-example-export/src/test/resources/expected/Example4_shaped.png differ
diff --git a/examples/Basic/lion.png b/jlatexmath-example-export/src/test/resources/lion.png
similarity index 100%
rename from examples/Basic/lion.png
rename to jlatexmath-example-export/src/test/resources/lion.png
diff --git a/examples/Export/logging.properties b/jlatexmath-example-export/src/test/resources/logging.properties
similarity index 100%
rename from examples/Export/logging.properties
rename to jlatexmath-example-export/src/test/resources/logging.properties
diff --git a/examples/GIWS/LaTeXGenerator.giws.xml b/jlatexmath-example-giws/LaTeXGenerator.giws.xml
similarity index 100%
rename from examples/GIWS/LaTeXGenerator.giws.xml
rename to jlatexmath-example-giws/LaTeXGenerator.giws.xml
diff --git a/examples/GIWS/Makefile b/jlatexmath-example-giws/Makefile
similarity index 100%
rename from examples/GIWS/Makefile
rename to jlatexmath-example-giws/Makefile
diff --git a/examples/GIWS/README b/jlatexmath-example-giws/README
similarity index 100%
rename from examples/GIWS/README
rename to jlatexmath-example-giws/README
diff --git a/examples/GIWS/examples-ant.vcxproj b/jlatexmath-example-giws/examples-ant.vcxproj
similarity index 100%
rename from examples/GIWS/examples-ant.vcxproj
rename to jlatexmath-example-giws/examples-ant.vcxproj
diff --git a/examples/GIWS/examples-ant.vcxproj.filters b/jlatexmath-example-giws/examples-ant.vcxproj.filters
similarity index 100%
rename from examples/GIWS/examples-ant.vcxproj.filters
rename to jlatexmath-example-giws/examples-ant.vcxproj.filters
diff --git a/examples/GIWS/examples.sln b/jlatexmath-example-giws/examples.sln
similarity index 100%
rename from examples/GIWS/examples.sln
rename to jlatexmath-example-giws/examples.sln
diff --git a/examples/GIWS/examples.vcxproj b/jlatexmath-example-giws/examples.vcxproj
similarity index 100%
rename from examples/GIWS/examples.vcxproj
rename to jlatexmath-example-giws/examples.vcxproj
diff --git a/examples/GIWS/examples.vcxproj.filters b/jlatexmath-example-giws/examples.vcxproj.filters
similarity index 100%
rename from examples/GIWS/examples.vcxproj.filters
rename to jlatexmath-example-giws/examples.vcxproj.filters
diff --git a/examples/GIWS/latex.cpp b/jlatexmath-example-giws/latex.cpp
similarity index 100%
rename from examples/GIWS/latex.cpp
rename to jlatexmath-example-giws/latex.cpp
diff --git a/jlatexmath-example-giws/pom.xml b/jlatexmath-example-giws/pom.xml
new file mode 100644
index 00000000..42b088bb
--- /dev/null
+++ b/jlatexmath-example-giws/pom.xml
@@ -0,0 +1,29 @@
+
+ 4.0.0
+
+
+ org.scilab.forge
+ jlatexmath-parent
+ 1.0.7-SNAPSHOT
+
+ jlatexmath-example-giws
+ jar
+
+ ${project.artifactId}
+ TODO
+
+
+
+ ${project.parent.groupId}
+ jlatexmath
+ ${project.parent.version}
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
+
+
diff --git a/examples/GIWS/src/org/scilab/forge/example/giws/LaTeXGenerator.java b/jlatexmath-example-giws/src/main/java/org/scilab/forge/example/giws/LaTeXGenerator.java
similarity index 100%
rename from examples/GIWS/src/org/scilab/forge/example/giws/LaTeXGenerator.java
rename to jlatexmath-example-giws/src/main/java/org/scilab/forge/example/giws/LaTeXGenerator.java
diff --git a/plugin/fop/COPYING b/jlatexmath-font-cyrillic/COPYING
similarity index 100%
rename from plugin/fop/COPYING
rename to jlatexmath-font-cyrillic/COPYING
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/LICENSE b/jlatexmath-font-cyrillic/LICENSE
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/LICENSE
rename to jlatexmath-font-cyrillic/LICENSE
diff --git a/jlatexmath-font-cyrillic/pom.xml b/jlatexmath-font-cyrillic/pom.xml
new file mode 100644
index 00000000..fbcb80dd
--- /dev/null
+++ b/jlatexmath-font-cyrillic/pom.xml
@@ -0,0 +1,56 @@
+
+ 4.0.0
+
+
+ org.scilab.forge
+ jlatexmath-parent
+ 1.0.7-SNAPSHOT
+
+ jlatexmath-font-cyrillic
+ jar
+
+ ${project.artifactId}
+ TODO
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${jar.plugin.version}
+
+
+ src/main/resources/META-INF/MANIFEST.MF
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build.helper.plugin.version}
+
+
+ add-resource
+ generate-resources
+
+ add-resource
+
+
+
+
+ ${project.basedir}
+ META-INF
+
+ LICENSE
+ COPYING
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/MANIFEST.MF b/jlatexmath-font-cyrillic/src/main/resources/META-INF/MANIFEST.MF
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/MANIFEST.MF
rename to jlatexmath-font-cyrillic/src/main/resources/META-INF/MANIFEST.MF
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_cyrillic.map.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_cyrillic.map.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_cyrillic.map.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_cyrillic.map.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbx10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnbxti10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnr10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnss10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssbx10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnssi10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wnti10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.ttf b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.ttf
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/jlm_wntt10.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/language_cyrillic.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/language_cyrillic.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/language_cyrillic.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/language_cyrillic.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/mappings_cyrillic.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/mappings_cyrillic.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/mappings_cyrillic.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/mappings_cyrillic.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/fonts/symbols_cyrillic.xml b/jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/symbols_cyrillic.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/fonts/symbols_cyrillic.xml
rename to jlatexmath-font-cyrillic/src/main/resources/org/scilab/forge/jlatexmath/cyrillic/fonts/symbols_cyrillic.xml
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/COPYING b/jlatexmath-font-greek/COPYING
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/COPYING
rename to jlatexmath-font-greek/COPYING
diff --git a/src/org/scilab/forge/jlatexmath/greek/LICENSE b/jlatexmath-font-greek/LICENSE
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/LICENSE
rename to jlatexmath-font-greek/LICENSE
diff --git a/jlatexmath-font-greek/pom.xml b/jlatexmath-font-greek/pom.xml
new file mode 100644
index 00000000..990a67a0
--- /dev/null
+++ b/jlatexmath-font-greek/pom.xml
@@ -0,0 +1,55 @@
+
+ 4.0.0
+
+
+ org.scilab.forge
+ jlatexmath-parent
+ 1.0.7-SNAPSHOT
+
+ jlatexmath-font-greek
+ jar
+
+ ${project.artifactId}
+ TODO
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${jar.plugin.version}
+
+
+ src/main/resources/META-INF/MANIFEST.MF
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build.helper.plugin.version}
+
+
+ add-resource
+ generate-resources
+
+ add-resource
+
+
+
+
+ ${project.basedir}
+ META-INF
+
+ LICENSE
+ COPYING
+
+
+
+
+
+
+
+
+
+
diff --git a/src/org/scilab/forge/jlatexmath/greek/MANIFEST.MF b/jlatexmath-font-greek/src/main/resources/META-INF/MANIFEST.MF
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/MANIFEST.MF
rename to jlatexmath-font-greek/src/main/resources/META-INF/MANIFEST.MF
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbipg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmbpg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmripg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcmrpg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsbpg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsropg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fcsrpg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.ttf b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.ttf
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.ttf
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_fctrpg.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/jlm_greek.map.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_greek.map.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/jlm_greek.map.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/jlm_greek.map.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/language_greek.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/language_greek.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/language_greek.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/language_greek.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/mappings_greek.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/mappings_greek.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/mappings_greek.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/mappings_greek.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/fonts/symbols_greek.xml b/jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/symbols_greek.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/fonts/symbols_greek.xml
rename to jlatexmath-font-greek/src/main/resources/org/scilab/forge/jlatexmath/greek/fonts/symbols_greek.xml
diff --git a/src/org/scilab/forge/jlatexmath/greek/COPYING b/jlatexmath-fop/COPYING
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/COPYING
rename to jlatexmath-fop/COPYING
diff --git a/plugin/fop/LICENSE b/jlatexmath-fop/LICENSE
similarity index 100%
rename from plugin/fop/LICENSE
rename to jlatexmath-fop/LICENSE
diff --git a/plugin/fop/README b/jlatexmath-fop/README
similarity index 100%
rename from plugin/fop/README
rename to jlatexmath-fop/README
diff --git a/plugin/fop/doc/README b/jlatexmath-fop/doc/README
similarity index 100%
rename from plugin/fop/doc/README
rename to jlatexmath-fop/doc/README
diff --git a/plugin/fop/doc/equations/chimie.xml b/jlatexmath-fop/doc/equations/chimie.xml
similarity index 100%
rename from plugin/fop/doc/equations/chimie.xml
rename to jlatexmath-fop/doc/equations/chimie.xml
diff --git a/plugin/fop/doc/equations/eq-2dim.xml b/jlatexmath-fop/doc/equations/eq-2dim.xml
similarity index 100%
rename from plugin/fop/doc/equations/eq-2dim.xml
rename to jlatexmath-fop/doc/equations/eq-2dim.xml
diff --git a/plugin/fop/doc/equations/eq-tres-compliquee-2.xml b/jlatexmath-fop/doc/equations/eq-tres-compliquee-2.xml
similarity index 100%
rename from plugin/fop/doc/equations/eq-tres-compliquee-2.xml
rename to jlatexmath-fop/doc/equations/eq-tres-compliquee-2.xml
diff --git a/plugin/fop/doc/equations/eq-tres-compliquee.xml b/jlatexmath-fop/doc/equations/eq-tres-compliquee.xml
similarity index 100%
rename from plugin/fop/doc/equations/eq-tres-compliquee.xml
rename to jlatexmath-fop/doc/equations/eq-tres-compliquee.xml
diff --git a/plugin/fop/doc/imprimables/doc-jlatexmath.pdf b/jlatexmath-fop/doc/imprimables/doc-jlatexmath.pdf
similarity index 100%
rename from plugin/fop/doc/imprimables/doc-jlatexmath.pdf
rename to jlatexmath-fop/doc/imprimables/doc-jlatexmath.pdf
diff --git a/plugin/fop/doc/programmes/fibo.e b/jlatexmath-fop/doc/programmes/fibo.e
similarity index 100%
rename from plugin/fop/doc/programmes/fibo.e
rename to jlatexmath-fop/doc/programmes/fibo.e
diff --git a/plugin/fop/doc/programmes/fibonacci.e b/jlatexmath-fop/doc/programmes/fibonacci.e
similarity index 100%
rename from plugin/fop/doc/programmes/fibonacci.e
rename to jlatexmath-fop/doc/programmes/fibonacci.e
diff --git a/plugin/fop/doc/xml/doc-jlatexmath.xml b/jlatexmath-fop/doc/xml/doc-jlatexmath.xml
similarity index 100%
rename from plugin/fop/doc/xml/doc-jlatexmath.xml
rename to jlatexmath-fop/doc/xml/doc-jlatexmath.xml
diff --git a/plugin/fop/doc/xml/gpl-3.0.xml b/jlatexmath-fop/doc/xml/gpl-3.0.xml
similarity index 100%
rename from plugin/fop/doc/xml/gpl-3.0.xml
rename to jlatexmath-fop/doc/xml/gpl-3.0.xml
diff --git a/plugin/fop/examples/README b/jlatexmath-fop/examples/README
similarity index 100%
rename from plugin/fop/examples/README
rename to jlatexmath-fop/examples/README
diff --git a/plugin/fop/examples/conf.xml b/jlatexmath-fop/examples/conf.xml
similarity index 100%
rename from plugin/fop/examples/conf.xml
rename to jlatexmath-fop/examples/conf.xml
diff --git a/plugin/fop/examples/latex.fo b/jlatexmath-fop/examples/latex.fo
similarity index 100%
rename from plugin/fop/examples/latex.fo
rename to jlatexmath-fop/examples/latex.fo
diff --git a/plugin/fop/examples/latex.pdf b/jlatexmath-fop/examples/latex.pdf
similarity index 100%
rename from plugin/fop/examples/latex.pdf
rename to jlatexmath-fop/examples/latex.pdf
diff --git a/plugin/fop/examples/latex.xsl b/jlatexmath-fop/examples/latex.xsl
similarity index 100%
rename from plugin/fop/examples/latex.xsl
rename to jlatexmath-fop/examples/latex.xsl
diff --git a/plugin/fop/examples/latex_docbook.pdf b/jlatexmath-fop/examples/latex_docbook.pdf
similarity index 100%
rename from plugin/fop/examples/latex_docbook.pdf
rename to jlatexmath-fop/examples/latex_docbook.pdf
diff --git a/plugin/fop/examples/latex_docbook.xml b/jlatexmath-fop/examples/latex_docbook.xml
similarity index 100%
rename from plugin/fop/examples/latex_docbook.xml
rename to jlatexmath-fop/examples/latex_docbook.xml
diff --git a/plugin/fop/examples/times.pdf b/jlatexmath-fop/examples/times.pdf
similarity index 100%
rename from plugin/fop/examples/times.pdf
rename to jlatexmath-fop/examples/times.pdf
diff --git a/jlatexmath-fop/pom.xml b/jlatexmath-fop/pom.xml
new file mode 100644
index 00000000..19b0b99a
--- /dev/null
+++ b/jlatexmath-fop/pom.xml
@@ -0,0 +1,64 @@
+
+ 4.0.0
+
+
+ org.scilab.forge
+ jlatexmath-parent
+ 1.0.7-SNAPSHOT
+
+ jlatexmath-fop
+ jar
+
+ ${project.artifactId}
+ A Java API to render LaTeX
+
+
+
+ ${project.parent.groupId}
+ jlatexmath
+ ${project.parent.version}
+
+
+ org.apache.xmlgraphics
+ fop
+ ${fop.version}
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build.helper.plugin.version}
+
+
+ add-resource
+ generate-resources
+
+ add-resource
+
+
+
+
+ ${project.basedir}
+ META-INF
+
+ LICENSE
+ COPYING
+
+
+
+
+
+
+
+
+
+
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathElement.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathElement.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathElement.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathElement.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathElementMapping.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathElementMapping.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathElementMapping.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathElementMapping.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathObj.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathObj.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathObj.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathObj.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathXMLHandler.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathXMLHandler.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/JLaTeXMathXMLHandler.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/JLaTeXMathXMLHandler.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/ImageJLaTeXMath.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/ImageJLaTeXMath.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/ImageJLaTeXMath.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/ImageJLaTeXMath.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/Graphics2DImagePainterJLaTeXMath.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/Graphics2DImagePainterJLaTeXMath.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/Graphics2DImagePainterJLaTeXMath.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/Graphics2DImagePainterJLaTeXMath.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/ImageConverterJLaTeXMathToG2D.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/ImageConverterJLaTeXMathToG2D.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/ImageConverterJLaTeXMathToG2D.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/ImageConverterJLaTeXMathToG2D.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderFactoryJLaTeXMath.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderFactoryJLaTeXMath.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderFactoryJLaTeXMath.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderFactoryJLaTeXMath.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderJLaTeXMath.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderJLaTeXMath.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderJLaTeXMath.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/ImageLoaderJLaTeXMath.java
diff --git a/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/PreloaderJLaTeXMath.java b/jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/PreloaderJLaTeXMath.java
similarity index 100%
rename from plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader/PreloaderJLaTeXMath.java
rename to jlatexmath-fop/src/main/java/org/scilab/forge/jlatexmath/fop/image/loader/PreloaderJLaTeXMath.java
diff --git a/plugin/fop/src/META-INF/services/org.apache.fop.fo.ElementMapping b/jlatexmath-fop/src/main/resources/META-INF/services/org.apache.fop.fo.ElementMapping
similarity index 100%
rename from plugin/fop/src/META-INF/services/org.apache.fop.fo.ElementMapping
rename to jlatexmath-fop/src/main/resources/META-INF/services/org.apache.fop.fo.ElementMapping
diff --git a/plugin/fop/src/META-INF/services/org.apache.fop.render.XMLHandler b/jlatexmath-fop/src/main/resources/META-INF/services/org.apache.fop.render.XMLHandler
similarity index 100%
rename from plugin/fop/src/META-INF/services/org.apache.fop.render.XMLHandler
rename to jlatexmath-fop/src/main/resources/META-INF/services/org.apache.fop.render.XMLHandler
diff --git a/plugin/fop/src/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter b/jlatexmath-fop/src/main/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
similarity index 100%
rename from plugin/fop/src/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
rename to jlatexmath-fop/src/main/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter
diff --git a/plugin/fop/src/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory b/jlatexmath-fop/src/main/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
similarity index 100%
rename from plugin/fop/src/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
rename to jlatexmath-fop/src/main/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
diff --git a/plugin/fop/src/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader b/jlatexmath-fop/src/main/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
similarity index 100%
rename from plugin/fop/src/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
rename to jlatexmath-fop/src/main/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader
diff --git a/jlatexmath/COPYING b/jlatexmath/COPYING
new file mode 100644
index 00000000..e37680cf
--- /dev/null
+++ b/jlatexmath/COPYING
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/jlatexmath/LICENSE b/jlatexmath/LICENSE
new file mode 100644
index 00000000..cb67505f
--- /dev/null
+++ b/jlatexmath/LICENSE
@@ -0,0 +1,60 @@
+JLaTeXMath Library - Displays LaTeX commands
+JLateXMath is an fork of JMathTeX with a lot of modifications to support
+many more LaTeX commands, drop of the jdom dependency and easy evolution
+capabilities.
+
+Copyright (C) 2009-2011 DENIZET Calixte
+Copyright (C) Kris Coolsaet
+Copyright (C) Nico Van Cleemput
+Copyright (C) Kurt Vermeulen
+Copyright 2004-2007 Universiteit Gent
+
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+MA 02110-1301, USA.
+
+Linking this library statically or dynamically with other modules
+is making a combined work based on this library. Thus, the terms
+and conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce
+an executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under terms
+of your choice, provided that you also meet, for each linked independent
+module, the terms and conditions of the license of that module.
+An independent module is a module which is not derived from or based
+on this library. If you modify this library, you may extend this exception
+to your version of the library, but you are not obliged to do so.
+If you do not wish to do so, delete this exception statement from your
+version.
+
+
+
+The archive contains several fonts :
+1) the fonts eufb10.ttf, eufm10.ttf, msam10.ttf and msbm10.ttf are under OFL (Open Font License);
+
+2) the font dsrom10.ttf is under a free license;
+
+3) the font stmary10.ttf and rsfs10.ttf are in PD (Public Domain);
+
+4) the fonts cmbsy10.ttf, cmbx10.ttf, cmbxti10.ttf, cmex10.ttf, cmmi10.ttf, cmr10.ttf, cmss10.ttf, cmssbx10.ttf, cmsy10.ttf and cmtt10.ttf are under Knuth License.
+
+5) the greek fonts fcmbipg.ttf, fcmripg.tff, fcmrpg.ttf, fcsropg.ttf, fcmbpg.ttf, fcsbpg.ttf, fctrpg.ttf, fcsrpg.ttf are under GNU GPL version 2.
+
+6) the cyrillic fonts wnbx10.ttf, wnss10.ttf, wnti10.ttf, wnr10.ttf, wnssi10.ttf, wnbxti10.ttf, wnssbx10.ttf, wntt10.ttf are under Knuth License.
+
+You can find a copy of these licenses in org/scilab/forge/jlatexmath/fonts/licences.
diff --git a/jlatexmath/pom.xml b/jlatexmath/pom.xml
new file mode 100644
index 00000000..77a029bd
--- /dev/null
+++ b/jlatexmath/pom.xml
@@ -0,0 +1,73 @@
+
+ 4.0.0
+
+
+ org.scilab.forge
+ jlatexmath-parent
+ 1.0.7-SNAPSHOT
+
+ jlatexmath
+ jar
+ ${project.artifactId}
+ A Java API to render LaTeX
+
+
+
+ ${project.parent.groupId}
+ jlatexmath-font-greek
+ ${project.parent.version}
+
+
+ ${project.parent.groupId}
+ jlatexmath-font-cyrillic
+ ${project.parent.version}
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${jar.plugin.version}
+
+
+ src/main/resources/META-INF/MANIFEST.MF
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build.helper.plugin.version}
+
+
+ add-resource
+ generate-resources
+
+ add-resource
+
+
+
+
+ ${project.basedir}
+ META-INF
+
+ LICENSE
+ COPYING
+
+
+
+
+
+
+
+
+
+
diff --git a/src/org/scilab/forge/jlatexmath/AccentedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/AccentedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/AccentedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/AccentedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/AlphabetRegistration.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/AlphabetRegistration.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/AlphabetRegistration.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/AlphabetRegistration.java
diff --git a/src/org/scilab/forge/jlatexmath/AlphabetRegistrationException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/AlphabetRegistrationException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/AlphabetRegistrationException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/AlphabetRegistrationException.java
diff --git a/src/org/scilab/forge/jlatexmath/ArrayOfAtoms.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ArrayOfAtoms.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ArrayOfAtoms.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ArrayOfAtoms.java
diff --git a/src/org/scilab/forge/jlatexmath/Atom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Atom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Atom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Atom.java
diff --git a/src/org/scilab/forge/jlatexmath/BigDelimiterAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BigDelimiterAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/BigDelimiterAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BigDelimiterAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/BigOperatorAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BigOperatorAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/BigOperatorAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BigOperatorAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/BoldAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BoldAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/BoldAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BoldAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/Box.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Box.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Box.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Box.java
diff --git a/src/org/scilab/forge/jlatexmath/BreakFormula.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BreakFormula.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/BreakFormula.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BreakFormula.java
diff --git a/src/org/scilab/forge/jlatexmath/BreakMarkAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BreakMarkAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/BreakMarkAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/BreakMarkAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/CedillaAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CedillaAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/CedillaAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CedillaAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/Char.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Char.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Char.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Char.java
diff --git a/src/org/scilab/forge/jlatexmath/CharAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/CharAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/CharBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/CharBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharBox.java
diff --git a/src/org/scilab/forge/jlatexmath/CharFont.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharFont.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/CharFont.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharFont.java
diff --git a/src/org/scilab/forge/jlatexmath/CharSymbol.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharSymbol.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/CharSymbol.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CharSymbol.java
diff --git a/src/org/scilab/forge/jlatexmath/ColorAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ColorAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ColorAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ColorAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/CumulativeScriptsAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CumulativeScriptsAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/CumulativeScriptsAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/CumulativeScriptsAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/DdotsAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DdotsAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/DdotsAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DdotsAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/DefaultTeXFont.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DefaultTeXFont.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/DefaultTeXFont.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DefaultTeXFont.java
diff --git a/src/org/scilab/forge/jlatexmath/DefaultTeXFontParser.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DefaultTeXFontParser.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/DefaultTeXFontParser.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DefaultTeXFontParser.java
diff --git a/src/org/scilab/forge/jlatexmath/DelimiterFactory.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DelimiterFactory.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/DelimiterFactory.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DelimiterFactory.java
diff --git a/src/org/scilab/forge/jlatexmath/DelimiterMappingNotFoundException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DelimiterMappingNotFoundException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/DelimiterMappingNotFoundException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DelimiterMappingNotFoundException.java
diff --git a/src/org/scilab/forge/jlatexmath/DoubleFramedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DoubleFramedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/DoubleFramedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/DoubleFramedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/Dummy.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Dummy.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Dummy.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Dummy.java
diff --git a/src/org/scilab/forge/jlatexmath/EmptyAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/EmptyAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/EmptyAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/EmptyAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/EmptyFormulaException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/EmptyFormulaException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/EmptyFormulaException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/EmptyFormulaException.java
diff --git a/src/org/scilab/forge/jlatexmath/Extension.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Extension.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Extension.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Extension.java
diff --git a/src/org/scilab/forge/jlatexmath/FBoxAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FBoxAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FBoxAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FBoxAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/FcscoreAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FcscoreAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FcscoreAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FcscoreAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/FcscoreBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FcscoreBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FcscoreBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FcscoreBox.java
diff --git a/src/org/scilab/forge/jlatexmath/FencedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FencedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FencedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FencedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/FixedCharAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FixedCharAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FixedCharAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FixedCharAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/FontAlreadyLoadedException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FontAlreadyLoadedException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FontAlreadyLoadedException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FontAlreadyLoadedException.java
diff --git a/src/org/scilab/forge/jlatexmath/FontInfo.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FontInfo.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FontInfo.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FontInfo.java
diff --git a/src/org/scilab/forge/jlatexmath/FormulaNotFoundException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FormulaNotFoundException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FormulaNotFoundException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FormulaNotFoundException.java
diff --git a/src/org/scilab/forge/jlatexmath/FractionAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FractionAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FractionAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FractionAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/FramedBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FramedBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/FramedBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/FramedBox.java
diff --git a/src/org/scilab/forge/jlatexmath/GeoGebraLogoAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GeoGebraLogoAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/GeoGebraLogoAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GeoGebraLogoAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/GeoGebraLogoBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GeoGebraLogoBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/GeoGebraLogoBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GeoGebraLogoBox.java
diff --git a/src/org/scilab/forge/jlatexmath/Glue.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Glue.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Glue.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Glue.java
diff --git a/src/org/scilab/forge/jlatexmath/GlueBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GlueBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/GlueBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GlueBox.java
diff --git a/src/org/scilab/forge/jlatexmath/GlueSettingsParser.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GlueSettingsParser.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/GlueSettingsParser.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GlueSettingsParser.java
diff --git a/src/org/scilab/forge/jlatexmath/GraphicsAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GraphicsAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/GraphicsAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GraphicsAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/GraphicsBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GraphicsBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/GraphicsBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/GraphicsBox.java
diff --git a/src/org/scilab/forge/jlatexmath/HdotsforAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HdotsforAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/HdotsforAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HdotsforAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/HlineAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HlineAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/HlineAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HlineAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/HorizontalBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HorizontalBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/HorizontalBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HorizontalBox.java
diff --git a/src/org/scilab/forge/jlatexmath/HorizontalRule.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HorizontalRule.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/HorizontalRule.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/HorizontalRule.java
diff --git a/src/org/scilab/forge/jlatexmath/IJAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/IJAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/IJAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/IJAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/IddotsAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/IddotsAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/IddotsAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/IddotsAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/InvalidAtomTypeException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidAtomTypeException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/InvalidAtomTypeException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidAtomTypeException.java
diff --git a/src/org/scilab/forge/jlatexmath/InvalidDelimiterException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidDelimiterException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/InvalidDelimiterException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidDelimiterException.java
diff --git a/src/org/scilab/forge/jlatexmath/InvalidDelimiterTypeException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidDelimiterTypeException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/InvalidDelimiterTypeException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidDelimiterTypeException.java
diff --git a/src/org/scilab/forge/jlatexmath/InvalidMatrixException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidMatrixException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/InvalidMatrixException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidMatrixException.java
diff --git a/src/org/scilab/forge/jlatexmath/InvalidSymbolTypeException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidSymbolTypeException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/InvalidSymbolTypeException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidSymbolTypeException.java
diff --git a/src/org/scilab/forge/jlatexmath/InvalidTeXFormulaException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidTeXFormulaException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/InvalidTeXFormulaException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidTeXFormulaException.java
diff --git a/src/org/scilab/forge/jlatexmath/InvalidUnitException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidUnitException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/InvalidUnitException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/InvalidUnitException.java
diff --git a/src/org/scilab/forge/jlatexmath/ItAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ItAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ItAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ItAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/JMathTeXException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/JMathTeXException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/JMathTeXException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/JMathTeXException.java
diff --git a/src/org/scilab/forge/jlatexmath/JavaFontRenderingAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/JavaFontRenderingAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/JavaFontRenderingAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/JavaFontRenderingAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/JavaFontRenderingBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/JavaFontRenderingBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/JavaFontRenderingBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/JavaFontRenderingBox.java
diff --git a/src/org/scilab/forge/jlatexmath/LCaronAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/LCaronAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/LCaronAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/LCaronAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/LaTeXAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/LaTeXAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/LaTeXAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/LaTeXAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/LapedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/LapedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/LapedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/LapedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/MacroInfo.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MacroInfo.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/MacroInfo.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MacroInfo.java
diff --git a/src/org/scilab/forge/jlatexmath/MathAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MathAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/MathAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MathAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/MatrixAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MatrixAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/MatrixAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MatrixAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/Metrics.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Metrics.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Metrics.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Metrics.java
diff --git a/src/org/scilab/forge/jlatexmath/MiddleAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MiddleAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/MiddleAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MiddleAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/MonoScaleAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MonoScaleAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/MonoScaleAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MonoScaleAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/MulticolumnAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MulticolumnAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/MulticolumnAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MulticolumnAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/MultlineAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MultlineAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/MultlineAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/MultlineAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/NewCommandMacro.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/NewCommandMacro.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/NewCommandMacro.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/NewCommandMacro.java
diff --git a/src/org/scilab/forge/jlatexmath/NewEnvironmentMacro.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/NewEnvironmentMacro.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/NewEnvironmentMacro.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/NewEnvironmentMacro.java
diff --git a/src/org/scilab/forge/jlatexmath/NthRoot.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/NthRoot.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/NthRoot.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/NthRoot.java
diff --git a/src/org/scilab/forge/jlatexmath/OgonekAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OgonekAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/OgonekAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OgonekAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/OvalAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OvalAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/OvalAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OvalAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/OvalBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OvalBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/OvalBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OvalBox.java
diff --git a/src/org/scilab/forge/jlatexmath/OverBar.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverBar.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/OverBar.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverBar.java
diff --git a/src/org/scilab/forge/jlatexmath/OverUnderBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverUnderBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/OverUnderBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverUnderBox.java
diff --git a/src/org/scilab/forge/jlatexmath/OverUnderDelimiter.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverUnderDelimiter.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/OverUnderDelimiter.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverUnderDelimiter.java
diff --git a/src/org/scilab/forge/jlatexmath/OverlinedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverlinedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/OverlinedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/OverlinedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ParseException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ParseException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ParseException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ParseException.java
diff --git a/src/org/scilab/forge/jlatexmath/ParseOption.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ParseOption.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ParseOption.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ParseOption.java
diff --git a/src/org/scilab/forge/jlatexmath/PhantomAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PhantomAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/PhantomAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PhantomAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/PredefMacroInfo.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefMacroInfo.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/PredefMacroInfo.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefMacroInfo.java
diff --git a/src/org/scilab/forge/jlatexmath/PredefMacros.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefMacros.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/PredefMacros.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefMacros.java
diff --git a/src/org/scilab/forge/jlatexmath/PredefinedCommands.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefinedCommands.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/PredefinedCommands.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefinedCommands.java
diff --git a/src/org/scilab/forge/jlatexmath/PredefinedTeXFormulaParser.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefinedTeXFormulaParser.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/PredefinedTeXFormulaParser.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefinedTeXFormulaParser.java
diff --git a/src/org/scilab/forge/jlatexmath/PredefinedTeXFormulas.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefinedTeXFormulas.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/PredefinedTeXFormulas.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/PredefinedTeXFormulas.java
diff --git a/src/org/scilab/forge/jlatexmath/RaiseAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RaiseAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/RaiseAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RaiseAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ReflectAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ReflectAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ReflectAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ReflectAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ReflectBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ReflectBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ReflectBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ReflectBox.java
diff --git a/src/org/scilab/forge/jlatexmath/ResizeAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ResizeAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ResizeAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ResizeAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ResourceParseException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ResourceParseException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ResourceParseException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ResourceParseException.java
diff --git a/src/org/scilab/forge/jlatexmath/RomanAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RomanAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/RomanAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RomanAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/RotateAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RotateAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/RotateAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RotateAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/RotateBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RotateBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/RotateBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RotateBox.java
diff --git a/src/org/scilab/forge/jlatexmath/Row.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Row.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/Row.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/Row.java
diff --git a/src/org/scilab/forge/jlatexmath/RowAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RowAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/RowAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RowAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/RuleAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RuleAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/RuleAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/RuleAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ScaleAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ScaleAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ScaleAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ScaleAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ScaleBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ScaleBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ScaleBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ScaleBox.java
diff --git a/src/org/scilab/forge/jlatexmath/ScriptsAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ScriptsAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ScriptsAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ScriptsAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ShadowAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ShadowAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ShadowAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ShadowAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/ShadowBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ShadowBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/ShadowBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/ShadowBox.java
diff --git a/src/org/scilab/forge/jlatexmath/SmallCapAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SmallCapAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/SmallCapAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SmallCapAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/SmashedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SmashedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/SmashedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SmashedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/SpaceAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SpaceAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/SpaceAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SpaceAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/SsAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SsAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/SsAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SsAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/StrikeThroughAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/StrikeThroughAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/StrikeThroughAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/StrikeThroughAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/StrutBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/StrutBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/StrutBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/StrutBox.java
diff --git a/src/org/scilab/forge/jlatexmath/StyleAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/StyleAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/StyleAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/StyleAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/SymbolAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SymbolAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/SymbolAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SymbolAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/SymbolMappingNotFoundException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SymbolMappingNotFoundException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/SymbolMappingNotFoundException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SymbolMappingNotFoundException.java
diff --git a/src/org/scilab/forge/jlatexmath/SymbolNotFoundException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SymbolNotFoundException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/SymbolNotFoundException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/SymbolNotFoundException.java
diff --git a/src/org/scilab/forge/jlatexmath/TStrokeAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TStrokeAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TStrokeAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TStrokeAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXConstants.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXConstants.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXConstants.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXConstants.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXEnvironment.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXEnvironment.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXEnvironment.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXEnvironment.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXFont.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFont.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXFont.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFont.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXFormula.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFormula.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXFormula.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFormula.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXFormulaParser.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFormulaParser.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXFormulaParser.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFormulaParser.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXFormulaSettingsParser.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFormulaSettingsParser.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXFormulaSettingsParser.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXFormulaSettingsParser.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXIcon.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXIcon.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXIcon.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXIcon.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXParser.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXParser.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXParser.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXParser.java
diff --git a/src/org/scilab/forge/jlatexmath/TeXSymbolParser.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXSymbolParser.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXSymbolParser.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TeXSymbolParser.java
diff --git a/src/org/scilab/forge/jlatexmath/TextCircledAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TextCircledAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TextCircledAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TextCircledAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/TextStyleAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TextStyleAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TextStyleAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TextStyleAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/TextStyleMappingNotFoundException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TextStyleMappingNotFoundException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TextStyleMappingNotFoundException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TextStyleMappingNotFoundException.java
diff --git a/src/org/scilab/forge/jlatexmath/TtAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TtAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TtAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TtAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/TypedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TypedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TypedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/TypedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/URLAlphabetRegistration.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/URLAlphabetRegistration.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/URLAlphabetRegistration.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/URLAlphabetRegistration.java
diff --git a/src/org/scilab/forge/jlatexmath/UnderOverArrowAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderOverArrowAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/UnderOverArrowAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderOverArrowAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/UnderOverAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderOverAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/UnderOverAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderOverAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/UnderlinedAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderlinedAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/UnderlinedAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderlinedAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/UnderscoreAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderscoreAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/UnderscoreAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/UnderscoreAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/VCenteredAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VCenteredAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/VCenteredAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VCenteredAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/VRowAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VRowAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/VRowAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VRowAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/VdotsAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VdotsAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/VdotsAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VdotsAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/VerticalBox.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VerticalBox.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/VerticalBox.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VerticalBox.java
diff --git a/src/org/scilab/forge/jlatexmath/VlineAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VlineAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/VlineAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/VlineAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/WebStartAlphabetRegistration.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/WebStartAlphabetRegistration.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/WebStartAlphabetRegistration.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/WebStartAlphabetRegistration.java
diff --git a/src/org/scilab/forge/jlatexmath/XArrowAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/XArrowAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/XArrowAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/XArrowAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/XLeftRightArrowFactory.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/XLeftRightArrowFactory.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/XLeftRightArrowFactory.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/XLeftRightArrowFactory.java
diff --git a/src/org/scilab/forge/jlatexmath/XMLResourceParseException.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/XMLResourceParseException.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/XMLResourceParseException.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/XMLResourceParseException.java
diff --git a/src/org/scilab/forge/jlatexmath/cache/JLaTeXMathCache.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/cache/JLaTeXMathCache.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cache/JLaTeXMathCache.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/cache/JLaTeXMathCache.java
diff --git a/src/org/scilab/forge/jlatexmath/cyrillic/CyrillicRegistration.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/cyrillic/CyrillicRegistration.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/cyrillic/CyrillicRegistration.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/cyrillic/CyrillicRegistration.java
diff --git a/src/org/scilab/forge/jlatexmath/dynamic/DynamicAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/dynamic/DynamicAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/dynamic/DynamicAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/dynamic/DynamicAtom.java
diff --git a/src/org/scilab/forge/jlatexmath/dynamic/ExternalConverter.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/dynamic/ExternalConverter.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/dynamic/ExternalConverter.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/dynamic/ExternalConverter.java
diff --git a/src/org/scilab/forge/jlatexmath/dynamic/ExternalConverterFactory.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/dynamic/ExternalConverterFactory.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/dynamic/ExternalConverterFactory.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/dynamic/ExternalConverterFactory.java
diff --git a/src/org/scilab/forge/jlatexmath/greek/GreekRegistration.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/greek/GreekRegistration.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/greek/GreekRegistration.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/greek/GreekRegistration.java
diff --git a/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/internal/util/Images.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/internal/util/Images.java
new file mode 100644
index 00000000..2786c381
--- /dev/null
+++ b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/internal/util/Images.java
@@ -0,0 +1,44 @@
+package org.scilab.forge.jlatexmath.internal.util;
+
+import java.awt.Color;
+import java.awt.image.BufferedImage;
+
+public final class Images {
+
+ private Images() {
+ //prevent instantiation
+ }
+
+ public static double DISTANCE_THRESHOLD=40;
+
+ public static double distance(BufferedImage imgA, BufferedImage imgB) {
+ // The images must be the same size.
+ if (imgA.getWidth() == imgB.getWidth() && imgA.getHeight() == imgB.getHeight()) {
+ int width = imgA.getWidth();
+ int height = imgA.getHeight();
+
+ double mse = 0;
+ // Loop over every pixel.
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ Color ca = new Color(imgA.getRGB(x, y));
+ Color cb = new Color(imgB.getRGB(x, y));
+ double variance = sqr(ca.getRed() - cb.getRed()) //
+ + sqr(ca.getBlue() - cb.getBlue()) //
+ + sqr(ca.getGreen() - cb.getGreen()) //
+ + sqr(ca.getAlpha() - cb.getAlpha());
+ mse += variance;
+ }
+ }
+ return Math.sqrt(mse / height / width);
+ } else {
+ return -1;
+ }
+ }
+
+ private static double sqr(double x) {
+ return x * x;
+ }
+
+
+}
diff --git a/src/org/scilab/forge/jlatexmath/tcaronAtom.java b/jlatexmath/src/main/java/org/scilab/forge/jlatexmath/tcaronAtom.java
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/tcaronAtom.java
rename to jlatexmath/src/main/java/org/scilab/forge/jlatexmath/tcaronAtom.java
diff --git a/MANIFEST.MF b/jlatexmath/src/main/resources/META-INF/MANIFEST.MF
similarity index 99%
rename from MANIFEST.MF
rename to jlatexmath/src/main/resources/META-INF/MANIFEST.MF
index 94499f0f..87a0bbe9 100644
--- a/MANIFEST.MF
+++ b/jlatexmath/src/main/resources/META-INF/MANIFEST.MF
@@ -132,5 +132,4 @@ Name: org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.ttf
Content-Type: application/x-font
Name: org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.ttf
-Content-Type: application/x-font
-
+Content-Type: application/x-font
\ No newline at end of file
diff --git a/src/org/scilab/forge/jlatexmath/DefaultTeXFont.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/DefaultTeXFont.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/DefaultTeXFont.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/DefaultTeXFont.xml
diff --git a/src/org/scilab/forge/jlatexmath/GlueSettings.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/GlueSettings.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/GlueSettings.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/GlueSettings.xml
diff --git a/src/org/scilab/forge/jlatexmath/TeXFormulaSettings.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/TeXFormulaSettings.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXFormulaSettings.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/TeXFormulaSettings.xml
diff --git a/src/org/scilab/forge/jlatexmath/TeXSymbols.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/TeXSymbols.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/TeXSymbols.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/TeXSymbols.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_amsfonts.map.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_amsfonts.map.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_amsfonts.map.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_amsfonts.map.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_amssymb.map.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_amssymb.map.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_amssymb.map.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_amssymb.map.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_base.map.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_base.map.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_base.map.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_base.map.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmex10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10_unchanged.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10_unchanged.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10_unchanged.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmi10_unchanged.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10_unchanged.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10_unchanged.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10_unchanged.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_cmmib10_unchanged.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/base/jlm_moustache.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_moustache.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/base/jlm_moustache.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/base/jlm_moustache.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufb10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/euler/jlm_eufm10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbi10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmbx10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmi10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10_unchanged.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10_unchanged.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10_unchanged.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmr10_unchanged.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsb10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsbi10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmsi10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmss10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/jlm_jlmtt10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbx10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmbxti10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmss10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssbx10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmssi10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10_unchanged.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10_unchanged.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10_unchanged.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmti10_unchanged.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/latin/optional/jlm_cmtt10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/licences/Knuth_License.txt b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/licences/Knuth_License.txt
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/licences/Knuth_License.txt
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/licences/Knuth_License.txt
diff --git a/src/org/scilab/forge/jlatexmath/fonts/licences/License_for_dsrom.txt b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/licences/License_for_dsrom.txt
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/licences/License_for_dsrom.txt
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/licences/License_for_dsrom.txt
diff --git a/src/org/scilab/forge/jlatexmath/fonts/licences/OFL.txt b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/licences/OFL.txt
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/licences/OFL.txt
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/licences/OFL.txt
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmbsy10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_cmsy10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msam10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_msbm10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_rsfs10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.map.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.map.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.map.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.map.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_special.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmary10.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmaryrd.map.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmaryrd.map.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmaryrd.map.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/jlm_stmaryrd.map.xml
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.ttf b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.ttf
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.ttf
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.ttf
diff --git a/src/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.xml b/jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.xml
similarity index 100%
rename from src/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.xml
rename to jlatexmath/src/main/resources/org/scilab/forge/jlatexmath/fonts/maths/optional/jlm_dsrom10.xml
diff --git a/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example1.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example1.java
new file mode 100644
index 00000000..ecc5b25c
--- /dev/null
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example1.java
@@ -0,0 +1,107 @@
+/* Example1.java
+ * =========================================================================
+ * This file is part of the JLaTeXMath Library - http://jlatexmath.sourceforge.net
+ *
+ * Copyright (C) 2009 DENIZET Calixte
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * A copy of the GNU General Public License can be found in the file
+ * LICENSE.txt provided with the source distribution of this program (see
+ * the META-INF directory in the source jar). This license can also be
+ * found on the GNU website at http://www.gnu.org/licenses/gpl.html.
+ *
+ * If you did not receive a copy of the GNU General Public License along
+ * with this program, contact the lead developer, or write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ *
+ * Linking this library statically or dynamically with other modules
+ * is making a combined work based on this library. Thus, the terms
+ * and conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce
+ * an executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under terms
+ * of your choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from or based
+ * on this library. If you modify this library, you may extend this exception
+ * to your version of the library, but you are not obliged to do so.
+ * If you do not wish to do so, delete this exception statement from your
+ * version.
+ *
+ */
+package org.scilab.forge.jlatexmath.examples.basic;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Insets;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.swing.JLabel;
+
+import org.scilab.forge.jlatexmath.TeXConstants;
+import org.scilab.forge.jlatexmath.TeXFormula;
+import org.scilab.forge.jlatexmath.TeXIcon;
+
+/**
+ * A class to test LaTeX rendering.
+ **/
+public class Example1 {
+ public static void main(String[] args) throws IOException {
+
+ String latex = "\\begin{array}{lr}\\mbox{\\textcolor{Blue}{Russian}}&\\mbox{\\textcolor{Melon}{Greek}}\\\\";
+ latex += "\\mbox{" + "привет мир".toUpperCase() + "}&\\mbox{" + "γειά κόσμο".toUpperCase()
+ + "}\\\\";
+ latex += "\\mbox{привет мир}&\\mbox{γειά κόσμο}\\\\";
+ latex += "\\mathbf{\\mbox{привет мир}}&\\mathbf{\\mbox{γειά κόσμο}}\\\\";
+ latex += "\\mathit{\\mbox{привет мир}}&\\mathit{\\mbox{γειά κόσμο}}\\\\";
+ latex += "\\mathsf{\\mbox{привет мир}}&\\mathsf{\\mbox{γειά κόσμο}}\\\\";
+ latex += "\\mathtt{\\mbox{привет мир}}&\\mathtt{\\mbox{γειά κόσμο}}\\\\";
+ latex += "\\mathbf{\\mathit{\\mbox{привет мир}}}&\\mathbf{\\mathit{\\mbox{γειά κόσμο}}}\\\\";
+ latex += "\\mathbf{\\mathsf{\\mbox{привет мир}}}&\\mathbf{\\mathsf{\\mbox{γειά κόσμο}}}\\\\";
+ latex += "\\mathsf{\\mathit{\\mbox{привет мир}}}&\\mathsf{\\mathit{\\mbox{γειά κόσμο}}}\\\\";
+ latex += "&\\\\";
+ latex += "\\mbox{\\textcolor{Salmon}{Bulgarian}}&\\mbox{\\textcolor{Tan}{Serbian}}\\\\";
+ latex += "\\mbox{здравей свят}&\\mbox{Хелло уорлд}\\\\";
+ latex += "&\\\\";
+ latex += "\\mbox{\\textcolor{Turquoise}{Bielorussian}}&\\mbox{\\textcolor{LimeGreen}{Ukrainian}}\\\\";
+ latex += "\\mbox{прывітаньне Свет}&\\mbox{привіт світ}\\\\";
+ latex += "\\end{array}";
+
+ TeXFormula formula = new TeXFormula(latex);
+
+ // Note: Old interface for creating icons:
+ // TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
+ // Note: New interface using builder pattern (inner class):
+ TeXIcon icon = formula.new TeXIconBuilder().setStyle(TeXConstants.STYLE_DISPLAY).setSize(20)
+ .build();
+
+ icon.setInsets(new Insets(5, 5, 5, 5));
+
+ BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(),
+ BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2 = image.createGraphics();
+ g2.setColor(Color.white);
+ g2.fillRect(0, 0, icon.getIconWidth(), icon.getIconHeight());
+ JLabel jl = new JLabel();
+ jl.setForeground(new Color(0, 0, 0));
+ icon.paintIcon(jl, g2, 0, 0);
+ File file = new File("target/Example1.png");
+ ImageIO.write(image, "png", file.getAbsoluteFile());
+ }
+}
diff --git a/examples/Basic/Example2.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example2.java
similarity index 94%
rename from examples/Basic/Example2.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example2.java
index c9fcc6aa..ac0f3ff4 100644
--- a/examples/Basic/Example2.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example2.java
@@ -42,22 +42,21 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.basic;
-import java.awt.Font;
+import java.io.IOException;
+
+import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Insets;
-import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import javax.imageio.ImageIO;
-import javax.swing.Icon;
import javax.swing.JLabel;
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;
@@ -65,7 +64,7 @@
* A class to test LaTeX rendering.
**/
public class Example2 {
- public static void main(String[] args) {
+ public static void main(String[] args) throws IOException {
String latex = "\\begin{array}{l}";
latex += "\\forall\\varepsilon\\in\\mathbb{R}_+^*\\ \\exists\\eta>0\\ |x-x_0|\\leq\\eta\\Longrightarrow|f(x)-f(x_0)|\\leq\\varepsilon\\\\";
@@ -92,9 +91,7 @@ public static void main(String[] args) {
JLabel jl = new JLabel();
jl.setForeground(new Color(0, 0, 0));
icon.paintIcon(jl, g2, 0, 0);
- File file = new File("Example2.png");
- try {
+ File file = new File("target/Example2.png");
ImageIO.write(image, "png", file.getAbsoluteFile());
- } catch (IOException ex) {}
- }
+ }
}
diff --git a/examples/Basic/Example3.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example3.java
similarity index 86%
rename from examples/Basic/Example3.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example3.java
index 3cdaccc3..dcdbabe8 100644
--- a/examples/Basic/Example3.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example3.java
@@ -42,32 +42,28 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.basic;
-import java.awt.Font;
+import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Insets;
-import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import javax.imageio.ImageIO;
-import javax.swing.Icon;
import javax.swing.JLabel;
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;
-import org.scilab.forge.jlatexmath.TeXFormula.TeXIconBuilder;
/**
* A class to test LaTeX rendering.
**/
public class Example3 {
- public static void main(String[] args) {
-
+ public static void main(String[] args) throws IOException {
+
String latex = "\\definecolor{gris}{gray}{0.9}";
latex += "\\definecolor{noir}{rgb}{0,0,0}";
latex += "\\definecolor{bleu}{rgb}{0,0,1}\\newcommand{\\pa}{\\left|}";
@@ -90,23 +86,23 @@ public static void main(String[] args) {
latex += "\\end{array}";
TeXFormula formula = new TeXFormula(latex);
- // Note: Old interface for creating icons:
- //TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
- // Note: New interface using builder pattern (inner class):
- TeXIcon icon = formula.new TeXIconBuilder().setStyle(TeXConstants.STYLE_DISPLAY).setSize(20).build();
-
+ // Note: Old interface for creating icons:
+ // TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
+ // Note: New interface using builder pattern (inner class):
+ TeXIcon icon = formula.new TeXIconBuilder().setStyle(TeXConstants.STYLE_DISPLAY).setSize(20)
+ .build();
+
icon.setInsets(new Insets(5, 5, 5, 5));
-
- BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
+
+ BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(),
+ BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
g2.setColor(Color.white);
- g2.fillRect(0,0,icon.getIconWidth(),icon.getIconHeight());
+ g2.fillRect(0, 0, icon.getIconWidth(), icon.getIconHeight());
JLabel jl = new JLabel();
jl.setForeground(new Color(0, 0, 0));
icon.paintIcon(jl, g2, 0, 0);
- File file = new File("Example3.png");
- try {
- ImageIO.write(image, "png", file.getAbsoluteFile());
- } catch (IOException ex) {}
- }
+ File file = new File("target/Example3.png");
+ ImageIO.write(image, "png", file.getAbsoluteFile());
+ }
}
diff --git a/examples/Basic/Example4.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example4.java
similarity index 79%
rename from examples/Basic/Example4.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example4.java
index 65413b23..bb07944c 100644
--- a/examples/Basic/Example4.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example4.java
@@ -42,38 +42,34 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.basic;
-import java.awt.Font;
+import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Insets;
-import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import javax.imageio.ImageIO;
-import javax.swing.Icon;
import javax.swing.JLabel;
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;
-import org.scilab.forge.jlatexmath.TeXFormula.TeXIconBuilder;
/**
* A class to test LaTeX rendering.
**/
public class Example4 {
- public static void main(String[] args) {
+ public static void main(String[] args) throws IOException {
String latex = "\\begin{array}{|c|c|c|c|}\n";
latex += "\\multicolumn{4}{c}{\\shadowbox{\\text{\\Huge An image from the \\LaTeX3 project}}}\\cr\n";
latex += "\\hline\n";
- latex += "\\text{Left}\\includegraphics{lion.png}\\text{Right} & \\text{Left}\\includegraphics[width=3cm,interpolation=bicubic]{lion.png}\\text{Right} & \\text{Left}\\includegraphics[angle=45,width=3cm]{lion.png}\\text{Right} & \\text{Left}\\includegraphics[angle=160]{lion.png}\\text{Right} \\cr\n";
+ latex += "\\text{Left}\\includegraphics{src/test/resources/lion.png}\\text{Right} & \\text{Left}\\includegraphics[width=3cm,interpolation=bicubic]{src/test/resources/lion.png}\\text{Right} & \\text{Left}\\includegraphics[angle=45,width=3cm]{src/test/resources/lion.png}\\text{Right} & \\text{Left}\\includegraphics[angle=160]{src/test/resources/lion.png}\\text{Right} \\cr\n";
latex += "\\hline\n";
- latex += "\\text{\\backslash includegraphics\\{lion.png\\}} & \\text{\\backslash includegraphics[width=3cm,interpolation=bicubic]\\{lion.png\\}} & \\text{\\backslash includegraphics[angle=45,width=3cm]\\{lion.png\\}} & \\text{\\backslash includegraphics[angle=160]\\{lion.png\\}}\\cr\n";
+ latex += "\\text{\\backslash includegraphics\\{src/test/resources/lion.png\\}} & \\text{\\backslash includegraphics[width=3cm,interpolation=bicubic]\\{lion.png\\}} & \\text{\\backslash includegraphics[angle=45,width=3cm]\\{lion.png\\}} & \\text{\\backslash includegraphics[angle=160]\\{lion.png\\}}\\cr\n";
latex += "\\hline\n";
latex += "\\end{array}\n";
@@ -92,9 +88,7 @@ public static void main(String[] args) {
JLabel jl = new JLabel();
jl.setForeground(new Color(0, 0, 0));
icon.paintIcon(jl, g2, 0, 0);
- File file = new File("Example4.png");
- try {
+ File file = new File("target/Example4.png");
ImageIO.write(image, "png", file.getAbsoluteFile());
- } catch (IOException ex) {}
- }
+ }
}
diff --git a/examples/Basic/Example5.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example5.java
similarity index 87%
rename from examples/Basic/Example5.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example5.java
index 45336df0..04e23ca1 100644
--- a/examples/Basic/Example5.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example5.java
@@ -42,22 +42,12 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.basic;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Color;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
+import java.awt.Color;
-import javax.imageio.ImageIO;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
/**
@@ -78,6 +68,6 @@ public static void main(String[] args) {
latex += "\\end{array}";
TeXFormula formula = new TeXFormula(latex);
- formula.createPNG(TeXConstants.STYLE_DISPLAY, 20, "Example5.png", Color.white, Color.black);
+ formula.createPNG(TeXConstants.STYLE_DISPLAY, 20, "target/Example5.png", Color.white, Color.black);
}
}
diff --git a/examples/Basic/Example6.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example6.java
similarity index 92%
rename from examples/Basic/Example6.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example6.java
index 0fc1e841..5cb9351e 100644
--- a/examples/Basic/Example6.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example6.java
@@ -42,22 +42,19 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.basic;
-import java.awt.Font;
+import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Insets;
-import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import javax.imageio.ImageIO;
-import javax.swing.Icon;
import javax.swing.JLabel;
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;
@@ -65,7 +62,7 @@
* A class to test LaTeX rendering.
**/
public class Example6 {
- public static void main(String[] args) {
+ public static void main(String[] args) throws IOException {
String latex = "\\begin{array}{cc}";
latex += "\\fbox{\\text{A framed box with \\textdbend}}&\\shadowbox{\\text{A shadowed box}}\\cr";
@@ -86,9 +83,7 @@ public static void main(String[] args) {
JLabel jl = new JLabel();
jl.setForeground(new Color(0, 0, 0));
icon.paintIcon(jl, g2, 0, 0);
- File file = new File("Example6.png");
- try {
+ File file = new File("target/Example6.png");
ImageIO.write(image, "png", file.getAbsoluteFile());
- } catch (IOException ex) {}
}
}
diff --git a/examples/Basic/Example7.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example7.java
similarity index 93%
rename from examples/Basic/Example7.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example7.java
index 4fd6f3b4..417dc36f 100644
--- a/examples/Basic/Example7.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/Example7.java
@@ -42,22 +42,19 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.basic;
-import java.awt.Font;
+import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Insets;
-import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import javax.imageio.ImageIO;
-import javax.swing.Icon;
import javax.swing.JLabel;
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;
@@ -65,7 +62,7 @@
* A class to test LaTeX rendering.
**/
public class Example7 {
- public static void main(String[] args) {
+ public static void main(String[] args) throws IOException {
String latex = "\\mbox{abc abc abc abc abc abc abc abc abc abc abc abc abc abc\\\\abc abc abc abc abc abc abc\\\\abc abc abc abc abc abc abc}\\\\1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1";
TeXFormula formula = new TeXFormula(latex);
@@ -91,9 +88,7 @@ public static void main(String[] args) {
JLabel jl = new JLabel();
jl.setForeground(new Color(0, 0, 0));
icon.paintIcon(jl, g2, 0, 0);
- File file = new File("Example7.png");
- try {
+ File file = new File("target/Example7.png");
ImageIO.write(image, "png", file.getAbsoluteFile());
- } catch (IOException ex) {}
}
}
diff --git a/examples/Basic/ExampleSwing2.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/ExampleSwing2.java
similarity index 95%
rename from examples/Basic/ExampleSwing2.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/ExampleSwing2.java
index de109c60..d1f68421 100644
--- a/examples/Basic/ExampleSwing2.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/ExampleSwing2.java
@@ -1,3 +1,4 @@
+package org.scilab.forge.jlatexmath.examples.basic;
import java.awt.Dimension;
import javax.swing.BorderFactory;
diff --git a/examples/Basic/Main.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/ExamplesTest.java
similarity index 55%
rename from examples/Basic/Main.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/ExamplesTest.java
index 503d2f57..2c704b5e 100644
--- a/examples/Basic/Main.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/basic/ExamplesTest.java
@@ -42,14 +42,76 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.basic;
-public class Main {
- public static void main(String[] args) {
+import static org.junit.Assert.assertTrue;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import org.junit.Test;
+import org.scilab.forge.jlatexmath.internal.util.Images;
+
+public class ExamplesTest {
+
+ @Test
+ public void testExample1() throws IOException {
Example1.main(new String[0]);
+ check("Example1.png");
+ }
+
+ @Test
+ public void testExample2() throws IOException {
Example2.main(new String[0]);
+ check("Example2.png");
+ }
+
+ @Test
+ public void testExample3() throws IOException {
Example3.main(new String[0]);
+ check("Example3.png");
+ }
+
+ @Test
+ public void testExample4() throws IOException {
Example4.main(new String[0]);
+ check("Example4.png");
+ }
+
+ @Test
+ public void testExample5() {
Example5.main(new String[0]);
+ check("Example5.png");
+ }
+
+ @Test
+ public void testExample6() throws IOException {
Example6.main(new String[0]);
+ check("Example6.png");
+ }
+
+ private static void check(String filename) {
+ try {
+ System.out.println("checking image " + filename);
+ BufferedImage a = ImageIO.read(new File("src/test/resources/expected/" + filename));
+ BufferedImage b = ImageIO.read(new File("target/" + filename));
+ double distance = Images.distance(a, b);
+ System.out.println("distance=" + distance);
+ // TODO establish a reasonable threshold after running the tests on
+ // different platforms (windows, osx, linux, others?) and different
+ // jdks
+ double THRESHOLD = Images.DISTANCE_THRESHOLD;
+ assertTrue("actual and expected images for " + filename + " are different sizes!", distance >= 0);
+ assertTrue(
+ "distance=" + distance + " is above threshold=" + THRESHOLD
+ + ", images are probably significantly different, distance=" + distance,
+ distance <= THRESHOLD);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
}
-}
+
+}
\ No newline at end of file
diff --git a/examples/Macros/FooPackage.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/FooPackage.java
similarity index 98%
rename from examples/Macros/FooPackage.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/FooPackage.java
index 620eeee9..efffc716 100644
--- a/examples/Macros/FooPackage.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/FooPackage.java
@@ -43,7 +43,7 @@
*
*/
-package Foo;
+package org.scilab.forge.jlatexmath.examples.macros;
import org.scilab.forge.jlatexmath.Atom;
import org.scilab.forge.jlatexmath.TeXParser;
diff --git a/examples/Macros/Main.java b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/FooPackageTest.java
similarity index 67%
rename from examples/Macros/Main.java
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/FooPackageTest.java
index d26564e4..a7070f43 100644
--- a/examples/Macros/Main.java
+++ b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/FooPackageTest.java
@@ -42,54 +42,61 @@
* version.
*
*/
+package org.scilab.forge.jlatexmath.examples.macros;
-import java.awt.Font;
+import static org.junit.Assert.assertNotNull;
+
+import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Insets;
-import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.io.InputStream;
import javax.imageio.ImageIO;
-import javax.swing.Icon;
import javax.swing.JLabel;
-import org.scilab.forge.jlatexmath.TeXConstants;
+import org.junit.Test;
+import org.scilab.forge.jlatexmath.ResourceParseException;
+import org.scilab.forge.jlatexmath.TeXConstants;
import org.scilab.forge.jlatexmath.TeXFormula;
import org.scilab.forge.jlatexmath.TeXIcon;
/**
* A class to test LaTeX rendering.
**/
-public class Main {
+public class FooPackageTest {
- public static void main(String[] args) throws FileNotFoundException {
-
- TeXFormula.addPredefinedCommands(new FileInputStream("Package_Foo.xml"));
- String latex = "\\begin{array}{l}";
+ @Test
+ public void testUseCustomPackage() throws ResourceParseException, FileNotFoundException {
+ InputStream is = FooPackageTest.class.getResourceAsStream("/Package_Foo.xml");
+ assertNotNull(is);
+ TeXFormula.addPredefinedCommands(is);
+ String latex = "\\begin{array}{l}";
latex += "\\fooA{\\pi}{C}\\\\";
latex += "\\mbox{A red circle }\\fooB{75.3}\\\\";
latex += "\\mbox{A red disk }\\fooC[abc]{126.7}\\\\";
latex += "\\mbox{An other red circle }\\fooD{159.81}[ab]";
latex += "\\end{array}";
-
- TeXFormula formula = new TeXFormula(latex);
- TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
- icon.setInsets(new Insets(5, 5, 5, 5));
-
- BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2 = image.createGraphics();
- g2.setColor(Color.white);
- g2.fillRect(0,0,icon.getIconWidth(),icon.getIconHeight());
- JLabel jl = new JLabel();
- jl.setForeground(new Color(0, 0, 0));
- icon.paintIcon(jl, g2, 0, 0);
- File file = new File("Example.png");
- try {
- ImageIO.write(image, "png", file.getAbsoluteFile());
- } catch (IOException ex) { }
- }
+
+ TeXFormula formula = new TeXFormula(latex);
+ TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
+ icon.setInsets(new Insets(5, 5, 5, 5));
+
+ BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(),
+ BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2 = image.createGraphics();
+ g2.setColor(Color.white);
+ g2.fillRect(0, 0, icon.getIconWidth(), icon.getIconHeight());
+ JLabel jl = new JLabel();
+ jl.setForeground(new Color(0, 0, 0));
+ icon.paintIcon(jl, g2, 0, 0);
+ File file = new File("target/ExampleMacros.png");
+ try {
+ ImageIO.write(image, "png", file.getAbsoluteFile());
+ } catch (IOException ex) {
+ }
+ }
}
diff --git a/examples/Macros/README b/jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/README
similarity index 100%
rename from examples/Macros/README
rename to jlatexmath/src/test/java/org/scilab/forge/jlatexmath/examples/macros/README
diff --git a/examples/Macros/Package_Foo.xml b/jlatexmath/src/test/resources/Package_Foo.xml
similarity index 78%
rename from examples/Macros/Package_Foo.xml
rename to jlatexmath/src/test/resources/Package_Foo.xml
index 6d49b10c..839d7788 100644
--- a/examples/Macros/Package_Foo.xml
+++ b/jlatexmath/src/test/resources/Package_Foo.xml
@@ -2,7 +2,7 @@
-
+
@@ -12,7 +12,7 @@
-
+
@@ -22,7 +22,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
diff --git a/jlatexmath/src/test/resources/expected/Example1.png b/jlatexmath/src/test/resources/expected/Example1.png
new file mode 100644
index 00000000..cba6e21d
Binary files /dev/null and b/jlatexmath/src/test/resources/expected/Example1.png differ
diff --git a/jlatexmath/src/test/resources/expected/Example2.png b/jlatexmath/src/test/resources/expected/Example2.png
new file mode 100644
index 00000000..0f7ceb46
Binary files /dev/null and b/jlatexmath/src/test/resources/expected/Example2.png differ
diff --git a/jlatexmath/src/test/resources/expected/Example3.png b/jlatexmath/src/test/resources/expected/Example3.png
new file mode 100644
index 00000000..effdf5e3
Binary files /dev/null and b/jlatexmath/src/test/resources/expected/Example3.png differ
diff --git a/jlatexmath/src/test/resources/expected/Example4.png b/jlatexmath/src/test/resources/expected/Example4.png
new file mode 100644
index 00000000..2e91a3d4
Binary files /dev/null and b/jlatexmath/src/test/resources/expected/Example4.png differ
diff --git a/jlatexmath/src/test/resources/expected/Example5.png b/jlatexmath/src/test/resources/expected/Example5.png
new file mode 100644
index 00000000..c28ade0b
Binary files /dev/null and b/jlatexmath/src/test/resources/expected/Example5.png differ
diff --git a/jlatexmath/src/test/resources/expected/Example6.png b/jlatexmath/src/test/resources/expected/Example6.png
new file mode 100644
index 00000000..10073f63
Binary files /dev/null and b/jlatexmath/src/test/resources/expected/Example6.png differ
diff --git a/jlatexmath/src/test/resources/expected/ExampleMacros.png b/jlatexmath/src/test/resources/expected/ExampleMacros.png
new file mode 100644
index 00000000..b66fc392
Binary files /dev/null and b/jlatexmath/src/test/resources/expected/ExampleMacros.png differ
diff --git a/examples/Export/lion.png b/jlatexmath/src/test/resources/lion.png
similarity index 100%
rename from examples/Export/lion.png
rename to jlatexmath/src/test/resources/lion.png
diff --git a/plugin/fop/MANIFEST.MF b/plugin/fop/MANIFEST.MF
deleted file mode 100644
index 80af173d..00000000
--- a/plugin/fop/MANIFEST.MF
+++ /dev/null
@@ -1 +0,0 @@
-Class-Path: jlatexmath.jar
diff --git a/plugin/fop/build.xml b/plugin/fop/build.xml
deleted file mode 100644
index f78f76ac..00000000
--- a/plugin/fop/build.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index 8d8bde6e..83f15f62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,115 +1,106 @@
- 4.0.0
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+
+ com.github.davidmoten
+ sonatype-parent
+ 0.1
+
+
+ org.scilab.forge
+ jlatexmath-parent
+ 1.0.7-SNAPSHOT
+ ${project.artifactId}
+ pom
+ http://forge.scilab.org/index.php/p/jlatexmath
- org.scilab.forge
- jlatexmath
- 1.0.5
- jar
+
+
+ GPLv2 with Classpath Exception
+ http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
+ repo
+
+
- JLaTeXMath
- A Java API to render LaTeX
- http://forge.scilab.org/index.php/p/jlatexmath
+
+
+ ledru
+ Sylvestre Ledru
+
+
+ denizet
+ Calixte Denizet
+
+
-
-
- GPLv2 with Classpath Exception
- http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- repo
-
-
+
+ ${scm.url}
+ ${scm.url}
+ ${scm.url}
+
-
-
- ledru
- Sylvestre Ledru
-
-
- denizet
- Calixte Denizet
-
-
+
+ UTF-8
+ 1.7
+ 1.0
+ 4.12
+ 3.0.2
+ 1.12
+ scm:git:https://github.com/opencollabnet/jlatexmath.git
+
-
- git://git.forge.scilab.org/jlatexmath.git
-
+
+ jlatexmath-font-cyrillic
+ jlatexmath-font-greek
+ jlatexmath
+ jlatexmath-fop
+ jlatexmath-example-giws
+ jlatexmath-example-export
+
-
- UTF-8
-
-
-
- src
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 3.0.2
-
-
- MANIFEST.MF
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 3.0.1
-
-
- MANIFEST.MF
-
-
-
-
- attach-sources
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.4
-
- -Xdoclint:none
-
-
-
- attach-javadocs
-
- jar
-
-
-
-
-
-
-
-
- src
- false
-
- **/*.xml
- **/*.ttf
- **/*.txt
- **/COPYING
- **/LICENSE
- **/MANIFEST.MF
-
-
-
- ${basedir}
- META-INF
- false
-
- COPYING
- LICENSE
-
-
-
-
+
+
+
+ true
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.5.1
+
+ true
+ true
+
+ ${java.version}
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.0.1
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.10.4
+
+ -Xdoclint:none
+
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+
diff --git a/release.sh b/release.sh
new file mode 100755
index 00000000..c430b025
--- /dev/null
+++ b/release.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+RELEASE_VERSION=$1
+GPG_PASSPHRASE=$2
+mvn --batch-mode release:prepare \
+ -Dtag=$RELEASE_VERSION \
+ -DreleaseVersion=$RELEASE_VERSION \
+ -DdevelopmentVersion=$RELEASE_VERSION.1 \
+ -DautoVersionSubmodules=true \
+ -s ~/.m2/settings-external.xml \
+ -Darguments=-Dgpg.passphrase=$GPG_PASSPHRASE && \
+mvn --batch-mode release:perform \
+ -s ~/.m2/settings-external.xml \
+ -Darguments=-Dgpg.passphrase=$GPG_PASSPHRASE
+
diff --git a/version.xml b/version.xml
deleted file mode 100644
index 43062aac..00000000
--- a/version.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-