Subversion Repositories wimsdev

Compare Revisions

Ignore whitespace Rev 5152 → Rev 5153

/trunk/wims/src/Misc/authors/jm.evers/applets/MathView/src/MathView.java
69,6 → 69,7
* --> vlist(line1,line2,line3....)
* version 0.5
* 3/2011 correct carretposition if using buttons...updateJomeView() , via filer2() ,does correction anyway
* 2/2012 added ~ as approx symbol \u2248
*/
 
import fr.ove.openmath.jome.Jome;
255,15 → 256,15
private String filter1(String s1 , int k ){
int p;String r1;String r2;
String d1[] = new String[]{"of","et","en","*","cdot","times","div","N","Z","Q","R","\\",
"f^-1(x)","isin","and","or","notin","-->","=>","inf","->",
"f^-1(x)","isin","and","or","notin","-->","=>","inf","->","~",
"log[2]","log[3]","log[4]","log[5]","log[6]","log[7]","log[8]","log[9]"};
String d2[] = new String[]{"\u22C1","\u22C0","\u22C0","\u2027","\u2027","X","\u00F7","\u2115","\u2124","\u211A","\u211D","\u2216",
"f\u00AF\u00B9(x)","\u2208","\u22C0","\u22C1","\u2209","rightarrow","\u21D4","\u221E","\u2192",
"f\u00AF\u00B9(x)","\u2208","\u22C0","\u22C1","\u2209","rightarrow","\u21D4","\u221E","\u2192","\u2248",
"\u00B2log","\u00B3log","\u2074log","\u2075log","\u2076log","\u2077log","\u2078log","\u2079log"};
String d3[] = new String[]{" or "," and "," and ","*","*","*","/","N","Z","Q","R","\\",
"f^-1(x)"," isin "," and "," or "," notin "," -> "," -> "," inf "," -> ",
"f^-1(x)"," isin "," and "," or "," notin "," -> "," -> "," inf "," -> "," ~ ",
"log[2]","log[3]","log[4]","log[5]","log[6]","log[7]","log[8]","log[9]"};
int d=d1.length;
453,6 → 454,8
for (p=1;p<pos;p++){
P=results[p];
// converting wims-module syntax to panel buttons
if(P.equals("~")){PP="\u2248";}
else
if(P.equals("sqrt()")){PP="\u221A";}
else
if(P.equals("sqrt[2]()")){P="sqrt()";PP="<html><sup>2</sup>\u221A</html>";}
/trunk/wims/src/Misc/authors/jm.evers/applets/TexApp/CHANGELOG
1,3 → 1,6
8/3/2012
- corrected inputfield width ; a single value for param "inputfield_width" will become the default for all other inputfields
 
7/11/2011
- different inputfield widths may be declared:<param name="inputfield_width" value="120,340,120,30"> default width for all fields :60px
 
/trunk/wims/src/Misc/authors/jm.evers/applets/TexApp/src/TexApp.java
239,15 → 239,23
inputwidth = new int[inp];
String s1 = getParameter(s);
for(int i = 0; i < inp; i++){ inputwidth[i] = DEFAULT_WIDTH;}
// the param is set...is it a single value for all or individual widths?
if(s1 != null){
s1 = s1.replaceAll(":", ",");
s1 = s1.replaceAll(";", ",");
StringTokenizer stringtokenizer = new StringTokenizer(s1, ",");
int j = stringtokenizer.countTokens();
for(int k = 0; k < Math.min(inp,j); k++){
try{ inputwidth[k] = (int) Integer.parseInt(stringtokenizer.nextToken());}
catch(Exception e){ System.out.println(" can not parse inteter parameter "+s);}
if( j == 1 ){ // all fields will have this 'new' default width ...
DEFAULT_WIDTH = (int) Integer.parseInt(stringtokenizer.nextToken());
for(int i = 0; i < inp; i++){ inputwidth[i] = DEFAULT_WIDTH;}
}
else
{ // individual fields width
for(int k = 0; k < Math.min(inp,j); k++){
try{ inputwidth[k] = (int) Integer.parseInt(stringtokenizer.nextToken());}
catch(Exception e){ System.out.println(" can not parse inteter parameter "+s);}
}
}
}
return inputwidth;
}