Subversion Repositories wimsdev

Rev

Rev 9147 | Rev 11132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9147 Rev 11125
Line 57... Line 57...
57
void _tex_sums(char *p, char *name, int type)
57
void _tex_sums(char *p, char *name, int type)
58
{
58
{
59
    char *p1,*p2,*p3;
59
    char *p1,*p2,*p3;
60
    p1=find_item_end(p); if(*p1) *(p1++)=0;
60
    p1=find_item_end(p); if(*p1) *(p1++)=0;
61
    p2=find_item_end(p1); p3=strparstr(p1,"=");
61
    p2=find_item_end(p1); p3=strparstr(p1,"=");
-
 
62
    if(p3<p2) p2=p3;
62
    if(p3<p2) p2=p3; if(*p2) *(p2++)=0;
63
    if(*p2) *(p2++)=0;
63
    p3=find_item_end(p2);
64
    p3=find_item_end(p2);
64
    if(*p3) *(p3++)=0;
65
    if(*p3) *(p3++)=0;
65
    tprint("\\%s ",name);
66
    tprint("\\%s ",name);
66
    if(type) {
67
    if(type) {
67
      if(*p2) {
68
      if(*p2) {
Line 333... Line 334...
333
    struct afactor *t1, *t2;
334
    struct afactor *t1, *t2;
334
    int i1,i2;
335
    int i1,i2;
335
 
336
 
336
    t1=*(struct afactor **) p1; t2=*(struct afactor **) p2;
337
    t1=*(struct afactor **) p1; t2=*(struct afactor **) p2;
337
    i1=t1->type; i2=t2->type;
338
    i1=t1->type; i2=t2->type;
-
 
339
    if(i1>type_var) i1=type_var;
338
    if(i1>type_var) i1=type_var; if(i2>type_var) i2=type_var;
340
    if(i2>type_var) i2=type_var;
339
    return i1-i2;
341
    return i1-i2;
340
}
342
}
341
 
343
 
342
void t_oneterm(char *p, int num)
344
void t_oneterm(char *p, int num)
343
{
345
{
Line 356... Line 358...
356
        if(*p!='>') {tprint("\\le ");break;} // <= , <===
358
        if(*p!='>') {tprint("\\le ");break;} // <= , <===
357
        else {tprint("\\iff ");p++; break;} // <==>
359
        else {tprint("\\iff ");p++; break;} // <==>
358
      }
360
      }
359
      case '>': {
361
      case '>': {
360
        rel++; p++; if(*p!='=') {tprint(" > "); rel=1; break;} // >
362
        rel++; p++; if(*p!='=') {tprint(" > "); rel=1; break;} // >
361
        while(*p=='=') p++; tprint("\\ge "); // >=
363
        while(*p=='=') p++;
-
 
364
        tprint("\\ge "); // >=
362
        break;
365
        break;
363
      }
366
      }
364
      case '-': {
367
      case '-': {
365
        for(pp=p;*pp=='-';pp++);
368
        for(pp=p;*pp=='-';pp++);
366
        if(*pp!='>') break;
369
        if(*pp!='>') break;
Line 505... Line 508...
505
    }
508
    }
506
    if(strlen(pp)==1 && t==0) tprint("^%s ",pp);
509
    if(strlen(pp)==1 && t==0) tprint("^%s ",pp);
507
    else {
510
    else {
508
      tprint(" ^{"); if(t) tprint("(");
511
      tprint(" ^{"); if(t) tprint("(");
509
      t_onestring(pp);
512
      t_onestring(pp);
510
      if(t) tprint(")"); tprint("} ");
513
      if(t) tprint(")");
-
 
514
      tprint("} ");
511
    }
515
    }
512
}
516
}
513
 
517
 
514
void t_onefactor(struct afactor *fb, int num)
518
void t_onefactor(struct afactor *fb, int num)
515
{
519
{