Rev 17442 | Rev 17968 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17442 | Rev 17918 | ||
---|---|---|---|
Line 1164... | Line 1164... | ||
1164 | int grouped_ins=0; |
1164 | int grouped_ins=0; |
1165 | 1165 | ||
1166 | /* generic insertion */ |
1166 | /* generic insertion */ |
1167 | void _exec_ins(char *p, char *script_name,char *format) |
1167 | void _exec_ins(char *p, char *script_name,char *format) |
1168 | { |
1168 | { |
1169 | char *s, *b, *at, *tag, *tag2, *al, *fmt, *mh; |
1169 | char *s, *b, *at, *tag, *tag2, *al, *fmt, *mh, *buftex=NULL; |
1170 | char *p1, *pt; |
1170 | char *p1, *pt; |
1171 | char buf[1024],buf2[1024],url[MAX_LINELEN+1],altbuf[1024]; |
1171 | char buf[1024],buf2[1024],url[MAX_LINELEN+1],altbuf[1024]; |
1172 | char outbuf[1024]; |
1172 | char outbuf[1024]; |
1173 | int border, middle, vspace; |
1173 | int border, middle, vspace; |
1174 | long int tel; |
1174 | long int tel; |
Line 1243... | Line 1243... | ||
1243 | if(ins_alt[0] && strcmp(pt,"none")!=0) |
1243 | if(ins_alt[0] && strcmp(pt,"none")!=0) |
1244 | snprintf(altbuf,sizeof(altbuf)," alt=\"\""); |
1244 | snprintf(altbuf,sizeof(altbuf)," alt=\"\""); |
1245 | else |
1245 | else |
1246 | snprintf(altbuf,sizeof(altbuf)," alt=\"%s\"",ins_alt); |
1246 | snprintf(altbuf,sizeof(altbuf)," alt=\"%s\"",ins_alt); |
1247 | if(strcasecmp(tag,"form")!=0) { |
1247 | if(strcasecmp(tag,"form")!=0) { |
- | 1248 | if(strcasecmp(fmt,"tex")==0){ |
|
- | 1249 | snprintf(buf,sizeof(buf), "%s/insert%s-%d.%s",s2_prefix,mh,insert_no,fmt); |
|
- | 1250 | buftex=readfile(buf,NULL,MAX_LINELEN); |
|
- | 1251 | } |
|
- | 1252 | else |
|
1248 | snprintf(outbuf+strlen(outbuf),sizeof(outbuf)-strlen(outbuf), |
1253 | snprintf(outbuf+strlen(outbuf),sizeof(outbuf)-strlen(outbuf), |
1249 | "<img src=\"%s\" class=\"wims_mathimg\" style=\"border-width:%dpx;margin-bottom:%dpx;%s\" %s %s>", |
1254 | "<img src=\"%s\" class=\"wims_mathimg\" style=\"border-width:%dpx;margin-bottom:%dpx;%s\" %s %s>", |
1250 | url, border, vspace, buf2, at, altbuf); |
1255 | url, border, vspace, buf2, at, altbuf); |
1251 | } |
1256 | } |
1252 | else { |
1257 | else { |
1253 | char *n, *nend; |
1258 | char *n, *nend; |
Line 1264... | Line 1269... | ||
1264 | reset: |
1269 | reset: |
1265 | if(outputing) _output_(outbuf); |
1270 | if(outputing) _output_(outbuf); |
1266 | setvar("ins_out",outbuf); |
1271 | setvar("ins_out",outbuf); |
1267 | setvar("ins_attr",""); setvar("ins_tag",""); |
1272 | setvar("ins_attr",""); setvar("ins_tag",""); |
1268 | setvar("ins_url",url); |
1273 | setvar("ins_url",url); |
- | 1274 | setvar("ins_tikz",buftex); |
|
1269 | snprintf(buf2,sizeof(buf2),"insert%s-%d.%s",mh,insert_no,fmt); |
1275 | snprintf(buf2,sizeof(buf2),"insert%s-%d.%s",mh,insert_no,fmt); |
1270 | setvar("ins_filename",buf2); |
1276 | setvar("ins_filename",buf2); |
1271 | animated_ins=0; |
1277 | animated_ins=0; |
- | 1278 | if (buftex) free(buftex); |
|
1272 | } |
1279 | } |
1273 | 1280 | ||
1274 | /* instex: dynamically insert tex outputs */ |
1281 | /* instex: dynamically insert tex outputs */ |
1275 | void exec_instex(char *p) |
1282 | void exec_instex(char *p) |
1276 | { |
1283 | { |