Subversion Repositories wimsdev

Rev

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

Rev 5556 Rev 5578
Line 15... Line 15...
15
 *  along with this program; if not, write to the Free Software
15
 *  along with this program; if not, write to the Free Software
16
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
 */
17
 */
18
 
18
 
19
int mathml(char *p, int option ){
19
int mathml(char *p, int option ){
20
          if (strlen(p)==0) return 1 ;
20
    if (strlen(p)==0) return 1 ;
21
    if( mathalign_base <= 1){
21
    if( mathalign_base <= 1){
22
      internal_error(" why is wims trying mathml()?\n");
22
      internal_error(" why is wims trying mathml()?\n");
23
      return 0; // got to insmath with gifs
23
      return 0; // got to insmath with gifs
24
    }
24
    }
25
    if(strlen(p) > MAX_LINELEN ){ // too big ? probably too big for gifs as well ; but error signalling is better in gif-methods
25
    if(strlen(p) > MAX_LINELEN ){ // too big ? probably too big for gifs as well ; but error signalling is better in gif-methods
Line 73... Line 73...
73
          }
73
          }
74
          else
74
          else
75
          { // we take the default setting from adm/management config
75
          { // we take the default setting from adm/management config
76
            idx = atoi(getvar("wims_texbasesize")) ;
76
            idx = atoi(getvar("wims_texbasesize")) ;
77
            if(idx < 0 || idx > 11){ idx = 6; } // the default value 120%
77
            if(idx < 0 || idx > 11){ idx = 6; } // the default value 120%
-
 
78
          }
-
 
79
          // check is a module wants to disable zooming (eg drag&drop or others )
-
 
80
          // !set disable_zoom=yes
-
 
81
          // if not set: disable_zoom="no"; see config.c
-
 
82
          if( strcmp( getvar("disable_zoom") , "yes" ) == 0 ){
-
 
83
            use_js_zoom = 0;
78
          }
84
          }
79
          // now write the "char" 200% into variable "mathml_tex_size"
85
          // now write the "char" 200% into variable "mathml_tex_size"
80
          snprintf(mathml_tex_size,sizeof(mathml_tex_size),"%d%%",texsize_list[idx]);
86
          snprintf(mathml_tex_size,sizeof(mathml_tex_size),"%d%%",texsize_list[idx]);
81
          // int --> char : added % sign (needed for mathml) [%% = escaped %]
87
          // int --> char : added % sign (needed for mathml) [%% = escaped %]
82
          if(mathml_tex_size == NULL || strlen(mathml_tex_size) == 0 ){ // this should not happen
88
          if(mathml_tex_size == NULL || strlen(mathml_tex_size) == 0 ){ // this should not happen