version 1.18, 2003/10/17 22:26:38
|
version 1.20, 2003/10/20 16:25:53
|
Line 208 sub start_organicstructure {
|
Line 208 sub start_organicstructure {
|
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); |
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); |
my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); |
my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); |
my $id=time.'_'.int(rand(1000)); |
my $id=time.'_'.int(rand(1000)); |
$result="<img src='/cgi-bin/convertjme.pl?$id' />"; |
$result="<img src='/cgi-bin/convertjme.pl?$id'"; |
|
if ($options =~ /border/) { $result.= ' border="1"'; } |
|
$result.=' />'; |
&Apache::lonnet::appenv( |
&Apache::lonnet::appenv( |
'cgi.'.$id.'.JME' => &Apache::lonnet::escape($molecule), |
'cgi.'.$id.'.JME' => &Apache::lonnet::escape($molecule), |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.PNG' => 1, |
Line 227 sub start_organicstructure {
|
Line 229 sub start_organicstructure {
|
'cgi.'.$id.'.WIDTH' => $texwidth ); |
'cgi.'.$id.'.WIDTH' => $texwidth ); |
$id=&Apache::lonnet::escape($id); |
$id=&Apache::lonnet::escape($id); |
&Apache::lonxml::register_ssi("/cgi-bin/convertjme.pl?$id"); |
&Apache::lonxml::register_ssi("/cgi-bin/convertjme.pl?$id"); |
$result = '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$texwidth.' mm]{'.$filename.'.eps}'; |
if ($options =~ /border/) { $result.= '\fbox{'; } |
|
$result .= '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$texwidth.' mm]{'.$filename.'.eps}'; |
|
if ($options =~ /border/) { $result.= '} '; } |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result .=&Apache::edit::tag_start($target,$token); |
$result .=&Apache::edit::tag_start($target,$token); |
$result .=&Apache::edit::text_arg('Width:','width',$token,5); |
$result .=&Apache::edit::text_arg('Width:','width',$token,5); |