Editing Specialized contexts

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 6: Line 6:
 
name starting with "context" -- e.g. <code>contextYourContextHere.pl</code>.
 
name starting with "context" -- e.g. <code>contextYourContextHere.pl</code>.
   
* [[ModifyingContexts(Advanced)]] contains information on the techniques and commands for tweaking the contexts for your task.
+
The page [[ModifyingContexts(Advanced)]] contains information on the techniques and commands for doing this.
 
* [[SpecializedParsers]] covers the other advanced method for modifying the behavior of MathObjects. These files modify the parser which translates "TI calculator" formulae into MathObjects.
 
   
* Examples are provided in the files listed below.
+
Examples are provided in the files listed below.
   
=== Specialized Context Macro files ===
 
  +
The other advanced method for customizing MathObjects is to modify the parser which
Here is a partial list of contexts.
 
  +
translates "TI calculator" formulae into MathObjects. See [[SpecializedParsers]]
 
Check the [http://webwork.maa.org/pod/pg_TRUNK/ POD documentation for more examples.]
 
   
  +
=== Specialized Context Macro files ===
  +
Here is a partial list of contexts.
  +
Check the [http://webwork.maa.org/doc/cvs/pg_CURRENT/ POD documentation for more examples.]
 
Use <code>loadMacros("contextABCD.pl");</code> to make the context available for a WeBWorK question.
 
Use <code>loadMacros("contextABCD.pl");</code> to make the context available for a WeBWorK question.
   
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextABCD.pl.html contextABCD.pl]
+
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextABCD.pl.html contextABCD.pl]
 
** <code>Context("ABCD");</code>
 
** <code>Context("ABCD");</code>
 
** <code>Context("ABCD-List");</code>
 
** <code>Context("ABCD-List");</code>
 
** Contexts for matching problems. Adds strings A, B, C, D as allowable entries.
 
** Contexts for matching problems. Adds strings A, B, C, D as allowable entries.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextCurrency.pl contextCurrency.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextCurrency.pl.html contextCurrency.pl]
 
 
** <code>Context("Currency");</code>
 
** <code>Context("Currency");</code>
 
** Context for entering numbers with currency symbols and commas.
 
** Context for entering numbers with currency symbols and commas.
** <code>$m = Currency(10.99);</code> or <code>$m2 = Compute('$10,000.00'); </code>
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextInequalities.pl contextInequalities.pl]
 
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextFraction.pl.html contextFraction.pl]
 
** <code>Context("Fraction");</code>
 
** <code>Context("Fraction-NoDecimals");</code>
 
** <code>Context("LimitedFraction");</code>
 
** <code>Context("LimitedProperFraction");</code>
 
** Implements a MathObject class for Fractions.
 
 
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextInequalities.pl.html contextInequalities.pl]
 
 
** <code>Context(`Inequalities');</code>
 
** <code>Context(`Inequalities');</code>
 
** <code>Context(`Inequalities-Only');</code>
 
** <code>Context(`Inequalities-Only');</code>
 
** Provides contexts that allow intervals to be specified as inequalities.
 
** Provides contexts that allow intervals to be specified as inequalities.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextIntegerFunctions.pl contextIntegerFunctions.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextIntegerFunctions.pl.html contextIntegerFunctions.pl]
 
 
** <code>Context("IntegerFunctions");</code>
 
** <code>Context("IntegerFunctions");</code>
** adds integer related functions C(n,r) and P(n,r). Note that <code>PGauxiliaryFunctions.pl</code>must be loaded to access these functions.
+
** adds integer related functions C(n,r) and P(n,r).
+
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextLimitedComplex.pl contextLimitedComplex.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextLimitedComplex.pl.html contextLimitedComplex.pl]
 
 
** <code>Context("LimitedComplex");</code>
 
** <code>Context("LimitedComplex");</code>
 
** Allow complex numbers but not complex operations.
 
** Allow complex numbers but not complex operations.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextLimitedNumeric.pl contextLimitedNumeric.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextLimitedNumeric.pl.html contextLimitedNumeric.pl]
 
  +
** ( [DEPRECATED] -- loadMacros("contextLimitedNumeric.pl") is not needed, these contexts are now standard.
** <code>Context("LimitedNumeric-List");</code> -- allows lists -- (need contextLimiteNumeric.pl for this)
+
** <code>Context("LimitedNumeric-List");</code>
** ( [DEPRECATED] -- loadMacros("contextLimitedNumeric.pl") is not needed for the these remaining contexts which are now standard and defined in <code>pg/lib/Parser/Legacy/LimitedNumeric.pm</code>
+
** <code>Context("LimiteNumeric");</code>
** <code>Context("LimitedNumeric");</code>
 
** <code>Context("LimitedNumeric-Fraction")</code>
 
** <code>Context("LimitedNumeric-StrictFraction");</code> -- no decimals
 
 
** Allows numeric entry but no operations.
 
** Allows numeric entry but no operations.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextLimitedPoint.pl contextLimitedPoint.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextLimitedPoint.pl.html contextLimitedPoint.pl]
 
 
** <code>Context("LimitedPoint")</code>
 
** <code>Context("LimitedPoint")</code>
 
** Allow point entry but no point operations.
 
** Allow point entry but no point operations.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextLimitedPolynomial.pl contextLimitedPolynomial.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextLimitedPolynomial.pl.html contextLimitedPolynomial.pl]
 
 
** <code>Context("LimitedPolynomial");</code>
 
** <code>Context("LimitedPolynomial");</code>
 
** Allow only entry of expanded polynomials.
 
** Allow only entry of expanded polynomials.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextLimitedPowers.pl contextLimitedPowers.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextLimitedPowers.pl.html contextLimitedPowers.pl]
 
 
** <code>LimitedPowers::NoBaseE();</code>
 
** <code>LimitedPowers::NoBaseE();</code>
 
** <code>LimitedPowers::OnlyIntegers();</code>
 
** <code>LimitedPowers::OnlyIntegers();</code>
Line 65: Line 52:
 
** <code>LimitedPowers::OnlyNonNegativeIntegers();</code>
 
** <code>LimitedPowers::OnlyNonNegativeIntegers();</code>
 
** Restrict the base or power allowed in exponentials.
 
** Restrict the base or power allowed in exponentials.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextLimitedVector.pl contextLimitedVector.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextLimitedVector.pl.html contextLimitedVector.pl]
 
 
** <code>Context("LimitedVector-coordinate");</code>
 
** <code>Context("LimitedVector-coordinate");</code>
 
** <code>Context("LimitedVector-ijk");</code>
 
** <code>Context("LimitedVector-ijk");</code>
 
** <code>Context("LimitedVector");</code> # either one
 
** <code>Context("LimitedVector");</code> # either one
 
** Allow vector entry but no vector operations.
 
** Allow vector entry but no vector operations.
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextOrdering.pl.html contextOrdering.pl]
+
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextPeriodic.pl contextPeriodic.pl]
** <code>Context("Ordering")</code>
+
** [DEPRECATED] Features added to Real and Complex MathObjects classes.
** <code>Context("Ordering-List")</code>
+
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextPiecewiseFunction.pl contextPiecewiseFunction.pl]
** Create objects which parse answers such as <code> $ans = Ordering("B > A = D > C");</code>
+
** <code>Context("PiecewiseFuntion");</code>
 
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextPeriodic.pl.html contextPeriodic.pl]
 
** [DEPRECATED] The features in this file are now standard features of the Real and Complex MathObjects classes.
 
 
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextPiecewiseFunction.pl.html contextPiecewiseFunction.pl]
 
** <code>Context("PiecewiseFunction");</code>
 
 
** Allow usage of piecewise functions.
 
** Allow usage of piecewise functions.
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextScientificNotation.pl contextScientificNotation.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextReaction.pl.html contextReaction.pl]
 
** <code>Context("Reaction");</code>
 
** Implements the specification and comparison of chemical reactions formulas.
 
** <code>$R = Formula("4P + 5O_2 --> 2P_2O_5");</code>
 
 
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextScientificNotation.pl.html contextScientificNotation.pl]
 
 
** <code>Context("ScientificNotation");</code>
 
** <code>Context("ScientificNotation");</code>
 
** Allows entry of scientific notation. Tries hard to report useful error messages when student's answer is not in the proper format.
 
** Allows entry of scientific notation. Tries hard to report useful error messages when student's answer is not in the proper format.
 
** Experimental: may be renamed to LimitedScientifcNotation
 
** Experimental: may be renamed to LimitedScientifcNotation
 
  +
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextString.pl contextString.pl]
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextString.pl.html contextString.pl]
 
 
** Use this context to allow restricted short answer (no mathematical symbols) questions.
 
** Use this context to allow restricted short answer (no mathematical symbols) questions.
 
** Feedback is provided if the response contains strings that are not allowed.
 
** Feedback is provided if the response contains strings that are not allowed.
** See also [http://webwork.maa.org/pod/pg_TRUNK/macros/parserAutoStrings.pl.html parserAutoStrings.pl]
+
* [http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/contextTF.pl contextTF.pl]
 
* [http://webwork.maa.org/pod/pg_TRUNK/macros/contextTF.pl.html contextTF.pl]
 
 
** <code>Context("TF");</code>
 
** <code>Context("TF");</code>
   
 
[[Category:Contexts]]
 
[[Category:Contexts]]
[[Category:MathObjects]]
 
[[Category:Reference Tables]]
 

Please note that all contributions to WeBWorK_wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see The WeBWorK Project wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)