--- loncom/xml/lonplot.pm 2007/07/30 21:50:29 1.120 +++ loncom/xml/lonplot.pm 2007/08/03 06:00:18 1.123 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.120 2007/07/30 21:50:29 albertel Exp $ +# $Id: lonplot.pm,v 1.123 2007/08/03 06:00:18 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -127,8 +127,9 @@ my $words_test = sub {$_[0]=~s/\s+/ ## ## ################################################################### my @gnuplot_edit_order = - qw/alttag bgcolor fgcolor height width fontface font transparent grid samples - border align texwidth texfont plotcolor plottype gridtype lmargin rmargin + qw/alttag bgcolor fgcolor height width texwidth fontface font texfont + transparent grid samples + border align plotcolor plottype gridtype lmargin rmargin tmargin bmargin major_ticscale minor_ticscale boxwidth gridlayer fillstyle pattern solid/; @@ -687,6 +688,7 @@ my %font_properties = face => 'classic', file => 'DejaVuSansMono-Bold', printname => 'Helvetica', + tex_no_file => 1, }, 'sans-serif' => { face => 'sans-serif', @@ -715,6 +717,7 @@ sub get_font { $size = '9'; } } else { + $size = $Apache::lonplot::plot{'font'}; $selected_font = $font_properties{$Apache::lonplot::plot{'fontface'}}; } return ($size, $selected_font); @@ -1159,9 +1162,11 @@ sub write_gnuplot_file { $gnuplot_input .= "set output\n"; } elsif ($target eq 'tex') { $gnuplot_input .= "set term postscript eps enhanced $Apache::lonplot::plot{'plotcolor'} solid "; - $gnuplot_input .= - 'fontfile "'.$Apache::lonnet::perlvar{'lonFontsDir'}. - '/'.$font_properties->{'file'}.'.pfb" '; + if (!$font_properties->{'tex_no_file'}) { + $gnuplot_input .= + 'fontfile "'.$Apache::lonnet::perlvar{'lonFontsDir'}. + '/'.$font_properties->{'file'}.'.pfb" '; + } $gnuplot_input .= ' "'.$font_properties->{'printname'}.'" '; $gnuplot_input .= $fontsize; $gnuplot_input .= "\nset output \"/home/httpd/perl/tmp/".