Package fi.celia.asciimath

Examples of fi.celia.asciimath.JAsciiMath.replaceAsciiMathBlocks()


        inputText = inputText.substring(ind);
     
      // tell which is input data
      m_strDtbookData = inputText;
      jAsciiMath.setInputData(inputText);
      jAsciiMath.replaceAsciiMathBlocks();
        // create collector of asciimath data blocks (calculus etc)
        CollectAsciiMathBlocks pamb = new CollectAsciiMathBlocks(jAsciiMath,
                                bCheckStrikeErrors,
                                p_bCorrectStrikeErrors);   
        //pamb.printAllAsciiMathBloks sb.toString();
View Full Code Here


      boolean success = true;
      String strInputData = "<span class=\"asciimath2\">dataa</span>";
      jAsciiMath.setInputData(strInputData);
      boolean bConvertAsciiMathDataWithSpaceRules = true;
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(bConvertAsciiMathDataWithSpaceRules);
      jAsciiMath.replaceAsciiMathBlocks();
      String srtOutPut = jAsciiMath.getOutputData();
      if (srtOutPut != null && !jAsciiMath.getOutputData().equals(strInputData))
      {
        success = false;
        System.err.println("Testi ajo 0 ei ok!!");
View Full Code Here

        System.out.println("Testi ajo ok 0.");
   
      strInputData = "<span class=\"asciimath\">`dataa �`</span>";
      jAsciiMath.setInputData(strInputData);
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(bConvertAsciiMathDataWithSpaceRules);
      jAsciiMath.replaceAsciiMathBlocks();
      if (!jAsciiMath.getOutputData().equals(strInputData))
      {
        success = false;
        System.err.println("Testi ajo 1 ei ok!!");
        System.err.println("strInputData='" +strInputData+"'");
View Full Code Here

      strInputData =
      "<span class=\"asciimath\">`dataa �`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      jAsciiMath.setInputData(strInputData);
     
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(bConvertAsciiMathDataWithSpaceRules);
      jAsciiMath.replaceAsciiMathBlocks();
      if (!jAsciiMath.getOutputData().equals(strInputData))
      {
        success = false;
        System.err.println("Testi ajo 2 ei ok!!");
        System.err.println("strInputData='" +strInputData+"'");
View Full Code Here

        + JAsciiMath.getChangeLTAndGTHtmlCharactersIntoNormalCharacters(JAsciiMath.getChangeNormalCharactersIntoLTAndGTHtmlCharacters(strInputDataAsciiMath))
        + "</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";

      jAsciiMath.setInputData(strInputData);     
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(bConvertAsciiMathDataWithSpaceRules);
      jAsciiMath.replaceAsciiMathBlocks();
      String strCompare = "<span class=\"asciimath\">`| > | > | > | < | < | <= | <= | >= | >= | sin | cos | tan | cot | sec | int |int_| ln | test_substring() |test_substring|`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";     
      if (!jAsciiMath.getOutputData().equals(strCompare))
      {
        success = false;
        System.err.println("Testi ajo 3 ei ok!!");
View Full Code Here

      strInputData =
        "<span class=\"asciimath\">`|)|(|>|-|+|=|!=|~~|*|(|test_substring| # |`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      jAsciiMath.setInputData(strInputData);
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(bConvertAsciiMathDataWithSpaceRules);
      jAsciiMath.replaceAsciiMathBlocks();
      strCompare = "<span class=\"asciimath\">`| )|( | > | -| +| =| !=| ~~| *|( |test_substring|#|`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      if (!jAsciiMath.getOutputData().equals(strCompare))
      {
        success = false;
        System.err.println("Testi ajo 4 ei ok!!");
View Full Code Here

      strInputData =
        "<span class=\"asciimath\">`test_substring| .202 |1.222/1..222 1999. 123.22 1000`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      jAsciiMath.setInputData(strInputData);
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(false);
      jAsciiMath.setConvertAsciiMathDataCommaRule(true);
      jAsciiMath.replaceAsciiMathBlocks();
      strCompare = "<span class=\"asciimath\">`test_substring| .202 |1,222/1..222 1999. 123,22 1000`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      if (!jAsciiMath.getOutputData().equals(strCompare))
      {
        success = false;
        System.err.println("Testi ajo 5 ei ok!!");
View Full Code Here

        "<span class=\"asciimath\">`test_substring| Iraq 11 > Ira>q 12 ,2 0,22 1222,2 11111 1.222,2 333.1222,2 444.1222,2 111111 32.22.222.22.222222.2,0 > Irqa Qrai IraQ`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      jAsciiMath.setInputData(strInputData);
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(false);
      jAsciiMath.setConvertAsciiMathDataCommaRule(false);
      jAsciiMath.setConvertAsciiMathDataThousndNumberRule(true);
      jAsciiMath.replaceAsciiMathBlocks();
      strCompare = "<span class=\"asciimath\">`test_substring| Iraq 11 > Ira>q 12 ,2 0,22 1.222,2 11.111 1.222,2 3.331.222,2 4.441.222,2 111.111 3.222.222.222.222.222,0 > Irqa Qrai IraQ`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      if (!jAsciiMath.getOutputData().equals(strCompare))
      {
        success = false;
        System.err.println("Testi ajo 6 ei ok!!");
View Full Code Here

        + JAsciiMath.getChangeLTAndGTHtmlCharactersIntoNormalCharacters(JAsciiMath.getChangeNormalCharactersIntoLTAndGTHtmlCharacters(strInputDataAsciiMath))
        + "`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";

      jAsciiMath.setInputData(strInputData);     
      jAsciiMath.setConvertAsciiMathDataWithSpaceRules(bConvertAsciiMathDataWithSpaceRules);
      jAsciiMath.replaceAsciiMathBlocks();
      strCompare = "<span class=\"asciimath\">`|\">\"|\">\"|\">\"|\"<\"|\"<\"|\"<=\"|\"<=\"|\">=\"|\">=\"|\"sin\"|\"cos\"|\"tan\"|\"cot\"|\"sec\"|\"int\"|\"int_\"|\"ln\"|\"test_substring()\"|\"test_substring\"|`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";     
      if (!jAsciiMath.getOutputData().equals(strCompare))
      {
        success = false;
        System.err.println("Testi ajo 7.1 ei ok!!");
View Full Code Here

      strInputData =
        "<span class=\"asciimath\">`|)|(\"|)|(\"|)|(\"|)|(\"`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      jAsciiMath2.setInputData(strInputData);
      jAsciiMath2.setConvertAsciiMathDataWithSpaceRules(true);
      jAsciiMath2.setConvertAsciiMathDataCommaRule(true);
      jAsciiMath2.replaceAsciiMathBlocks();
      strCompare = "<span class=\"asciimath\">`| )|( \"|)|(\"| )|( \"|)|(\" )`</span> <span class=\"asciimath2\">`dataa �2`</span> <span class=\"asciimath\">`dataa �3`</span> <b/>";
      if (!jAsciiMath2.getOutputData().equals(strCompare))
      {
        success = false;
        System.err.println("Testi ajo 8 ei ok!!");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.