11
22=head1 NAME
33
4- C< Context("AlternateDecimal") > - Provides a context that allows the
4+ contextAlternateDecimal.pl - Provides a context that allows the
55entry of decimal numbers using a comma for the decimal indicator
66rather than a dot (e.g., C<3,14159 > rather than C<3.14159 > ).
77
@@ -13,11 +13,7 @@ =head1 DESCRIPTION
1313the other form produces an error message when used. You can also
1414force the display of numbers to use one or the other form.
1515
16- =head1 USAGE
17-
18- To use this file, first load it into your problem, then select the
19- context that you wish to use. There are three pre-defined contexts,
20- C<AlternateDecimal > , C<AlternateDecimal-Only > , and
16+ There are three pre-defined contexts, C<AlternateDecimal > , C<AlternateDecimal-Only > , and
2117C<AlternateDecimal-Warning > . The first allows both the standard and
2218alternate forms to be used, the second allows only the alternate form,
2319and the third allows only the standard form, but recognizes the
@@ -82,7 +78,7 @@ =head1 USAGE
8278numebrs would be displayed in standard form.
8379
8480
85- =head1 LISTS IN ALTERNATE FORMAT
81+ =head2 LISTS IN ALTERNATE FORMAT
8682
8783Because the alternate format allows numbers to be entered using commas
8884rather than periods, this makes the formation of lists harder. For
@@ -107,16 +103,16 @@ =head1 LISTS IN ALTERNATE FORMAT
107103must be a list separator.
108104
109105
110- =head1 SETTING THE ALTERNATE FORM AS THE DEFAULT
106+ =head2 SETTING THE ALTERNATE FORM AS THE DEFAULT
111107
112108If you want to force existing problems to allow (or force, or warn about)
113109the alternate format instead, then create a file named
114110C<parserCustomization.pl > in your course's C<templates/macros >
115111directory, and enter the following in it:
116112
117113 loadMacros("contextAlternateDecimal.pl");
118- context::AlternateDecimal->Default("either","either");
119- Context("Numeric");
114+ context::AlternateDecimal->Default("either","either");
115+ Context("Numeric");
120116
121117This will alter all the standard contexts to allow students to enter
122118numbers in either format, and will display them using the form that
@@ -125,17 +121,17 @@ =head1 SETTING THE ALTERNATE FORM AS THE DEFAULT
125121You could also do
126122
127123 loadMacros("contextAlternateDecimal.pl");
128- context::AlternateDecimal->Default(".",".");
129- Context("Numeric");
124+ context::AlternateDecimal->Default(".",".");
125+ Context("Numeric");
130126
131127to cause a warning message to appear when students enter the alternate
132128format.
133129
134130If you want to force students to enter the alternate format, use
135131
136132 loadMacros("contextAlternateDecimal.pl");
137- context::AlternateDecimal->Default(",",",");
138- Context("Numeric");
133+ context::AlternateDecimal->Default(",",",");
134+ Context("Numeric");
139135
140136This will force the display of all numbers into the alternate form (so
141137even the ones created in the problem using standard form will show
0 commit comments