[LON-CAPA-cvs] cvs: loncom(settable) /interface lonprintout.pm
foxr
foxr@source.lon-capa.org
Mon, 22 Jun 2009 09:26:01 -0000
foxr Mon Jun 22 09:26:01 2009 EDT
Modified files: (Branch: settable)
/loncom/interface lonprintout.pm
Log:
Finalize version that can adjust latex font size globally for a printout.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.554.2.1 loncom/interface/lonprintout.pm:1.554.2.2
--- loncom/interface/lonprintout.pm:1.554.2.1 Wed Jun 17 10:21:33 2009
+++ loncom/interface/lonprintout.pm Mon Jun 22 09:26:01 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.554.2.1 2009/06/17 10:21:33 foxr Exp $
+# $Id: lonprintout.pm,v 1.554.2.2 2009/06/22 09:26:01 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1519,6 +1519,7 @@
my %parmhash = %$rparmhash;
$ssi_error = 0; # This will be set nonzero by failing ssi's.
$resources_printed = '';
+ $font_size = $helper->{'VARS'}->{'fontsize'};
my $do_postprocessing = 1;
my $js = <<ENDPART;
<script type="text/javascript">
@@ -3260,9 +3261,6 @@
&addMessage('<br />'
.'<h3>'.&mt('Print Options').'</h3>'
.&Apache::lonhtmlcommon::start_pick_box()
-# .&Apache::lonhtmlcommon::row_headline()
-# .'<h3>'.&mt('Print Options').'</h3>'
-# .&Apache::lonhtmlcommon::row_closure()
.&Apache::lonhtmlcommon::row_title(
'<label for="ANSWER_TYPE_forminput">'
.&mt('Print Answers')
@@ -3280,6 +3278,34 @@
Apache::lonhelper::dropdown->new();
&addMessage(&Apache::lonhtmlcommon::row_closure());
$startedTable = 1;
+
+#
+# Select font size.
+#
+
+ $helper->declareVar('fontsize');
+ &addMessage(&Apache::lonhtmlcommon::row_title(&mt('Font Size')));
+ my $xmlfrag = << "FONT_SELECTION";
+
+
+ <dropdown variable='fontsize' multichoice='0', allowempty='0'>
+ <defaultvalue>
+ return 'normalsize';
+ </defaultvalue>
+ <choice computer='tiny'>Tiny</choice>
+ <choice computer='sub/superscriptsize'>Script Size</choice>
+ <choice computer='footnotesize'>Footnote Size</choice>
+ <choice computer='small'>Small</choice>
+ <choice computer='normalsize'>Normal (default)</choice>
+ <choice computer='large'>larger than normal</choice>
+ <choice computer='Large'>Even larger than normal</choice>
+ <choice computer='LARGE'>Still larger than normal</choice>
+ <choice computer='huge'>huge font size</choice>
+ <choice computer='Huge'>Largest possible size</choice>
+ </dropdown>
+FONT_SELECTION
+ &Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
+ &addMessage(&Apache::lonhtmlcommon::row_closure(1));
}
if ($perm{'pav'}) {
@@ -3445,9 +3471,10 @@
</dropdown>
PROBTYPE
&Apache::lonxml::xmlparse($r, 'helper', $xmlfrag);
-
&addMessage(&Apache::lonhtmlcommon::row_closure(1));
+
+
}
}
@@ -3557,6 +3584,8 @@
my $pdfFormLabel=&mt('PDF-Formfields');
my $with=&mt('with Formfields');
my $without=&mt('without Formfields');
+
+
$result.='<h3>'.&mt('Layout Options').'</h3>'
.&Apache::loncommon::start_data_table()
.&Apache::loncommon::start_data_table_header_row()