Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions macros/PG.pl
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ sub DOCUMENT {

load_css();
load_js();

loadMacros('PGbasicmacros.pl', 'PGauxiliaryFunctions.pl');
}

$main::displayMode = $PG->{displayMode};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#: automatically loaded by the `PGML.pl` macro.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserMultiAnswer.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserMultiAnswer.pl', 'PGcourse.pl');

#:% section = setup
#: Define MathObject formulas `$num` and `$den` which are the correct numerator
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/AnswerBlankInExponent.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: Set the context to allow only the variables `a` and `b` and choose a random
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/AnswerUpToMultiple.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: The answer checker uses a local context with an adaptive parameter to check
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/DomainRange.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#: The PODLINK('contextInequalities.pl') macro is used for inequality answers.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'contextInequalities.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'contextInequalities.pl', 'PGcourse.pl');

#:% section = setup
#: In addition to showing how to use the PODLINK('contextInequalities.pl')
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/DynamicGraph.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#: The dynamic graph is generated with `PGtikz.pl`, so this is needed.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGtikz.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGtikz.pl', 'PGcourse.pl');

#:% section = setup
#: The code between `$graph->BEGIN_TIKZ` and `END_TIKZ` are TikZ commands.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#: The macro file PODLINK('parserAssignment.pl') needs to be included.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserAssignment.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserAssignment.pl', 'PGcourse.pl');

#:% section = setup
#: To allow assignments in the current context call `parser::Assignment->Allow`.
Expand Down
5 changes: 1 addition & 4 deletions tutorial/sample-problems/Algebra/EquationImplicitFunction.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
#: The macro PODLINK('parserImplicitEquation.pl') allows the entry of equations.
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'parserImplicitEquation.pl', 'PGcourse.pl'
);
loadMacros('PGML.pl', 'parserImplicitEquation.pl', 'PGcourse.pl');

#:% section = setup
#: Some error messages are prevented by redefining them to be a blank string ' '
Expand Down
5 changes: 1 addition & 4 deletions tutorial/sample-problems/Algebra/ExpandedPolynomial.pg
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
#: Load the PODLINK('contextLimitedPolynomial.pl') macro.
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'contextLimitedPolynomial.pl', 'PGcourse.pl'
);
loadMacros('PGML.pl', 'contextLimitedPolynomial.pl', 'PGcourse.pl');

#:% section = setup
#: The PODLINK('contextLimitedPolynomial.pl') macro provides two contexts:
Expand Down
5 changes: 2 additions & 3 deletions tutorial/sample-problems/Algebra/FactoredPolynomial.pg
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'contextPolynomialFactors.pl', 'contextLimitedPowers.pl',
'PGcourse.pl'
'PGML.pl', 'contextPolynomialFactors.pl',
'contextLimitedPowers.pl', 'PGcourse.pl'
);

#:% section = setup
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/FractionAnswer.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#: The macro `contextFraction.pl` must be loaded.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'contextFraction.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'contextFraction.pl', 'PGcourse.pl');

#:% section = setup
#: The PODLINK('contextFraction.pl') macro provides four contexts:
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/FunctionDecomposition.pg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#: is allowed to be the identity function.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'answerComposition.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'answerComposition.pl', 'PGcourse.pl');

#:% section = setup
#: This problem asks the students for functions `y = f(u)` and `u = g(x)` such
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/FunctionPlot.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'plots.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'plots.pl', 'PGcourse.pl');

#:% section = setup
#: For this problem, a plot of $y = ax^2$ for a random value of $a$ is
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/GraphToolCircle.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#: macro for this.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');

#:% section = setup
#: The variables `$h`, `$k` and `$r` randomly pick a center and radius of the
Expand Down
7 changes: 2 additions & 5 deletions tutorial/sample-problems/Algebra/GraphToolCubic.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
#: macro for this.
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'parserGraphTool.pl', 'contextFraction.pl',
'PGcourse.pl'
);
loadMacros('PGML.pl', 'parserGraphTool.pl', 'contextFraction.pl',
'PGcourse.pl');

#:% section = setup
#: A cubic is created with 3 random zeros and a random y-intercept.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/GraphToolCustomChecker.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#: checker. Load the PODLINK('parserGraphTool.pl') macro for this.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');

#:% section = setup
#: The variables `$h`, `$k` and `$r` randomly pick a center and radius of the
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/GraphToolLine.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#: macro for this.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');

#:% section = setup
#: A cubic is created with 3 random zeros and a random y-intercept.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/GraphToolNumberLine.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#: macro for this.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');

#:% section = setup
#: Two intervals are created with random endpoints. The first
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/GraphToolPoints.pg
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#: macro for this.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserGraphTool.pl', 'PGcourse.pl');

#:% section = setup
#: Two points are created at random.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/InequalityAnswer.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#: The PODLINK('contextInequalities.pl') macro must be loaded
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'contextInequalities.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'contextInequalities.pl', 'PGcourse.pl');

#:% section = setup
#: Require students to use inequalities by using `Context('Inequalities-Only')`.
Expand Down
3 changes: 1 addition & 2 deletions tutorial/sample-problems/Algebra/LinearInequality.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#: to use the LinearRelation object.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserLinearRelation.pl',
'PGcourse.pl');
loadMacros('PGML.pl', 'parserLinearRelation.pl', 'PGcourse.pl');

#:% section = setup
Context("LinearRelation");
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/Logarithms.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: Add the variables `x`, `y`, and `z` to the context and set their limits to be
Expand Down
5 changes: 1 addition & 4 deletions tutorial/sample-problems/Algebra/NoSolution.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
#: macros.
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'parserRadioMultiAnswer.pl', 'PGcourse.pl'
);
loadMacros('PGML.pl', 'parserRadioMultiAnswer.pl', 'PGcourse.pl');

#:% section = setup
#: A `RadioMultiAnswer` produces a set of radio buttons for each of the given
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/PointAnswers.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#: Load PODLINK('contextLimitedPoint.pl') to prevent operations between points.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'contextLimitedPoint.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'contextLimitedPoint.pl', 'PGcourse.pl');

#:% section = setup
#: `Context('Point')` could be used instead, which would allow mathematical
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/ScalingTranslating.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#: the context.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserFunction.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserFunction.pl', 'PGcourse.pl');

#:% section = setup
#: The `parserFunction` method allows the addition of a named function to the
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/SimpleFactoring.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');
#:% section = setup
#: First, create two random roots and then create the factors. Note that calling
#: `->reduce` will simplify `x-(-3)` to `x+3`. In addition, create the expanded
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/SolutionForEquation.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#: Load the macro PODLINK('parserSolutionFor.pl') for the `SolutionFor` method.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserSolutionFor.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'parserSolutionFor.pl', 'PGcourse.pl');

#:% section = setup
#: `SolutionFor(equation, point)` is used to define the MathObject answer. For
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/StringOrOtherType.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: There are several predefined strings, such as `NONE`, `DNE`, `INF`, and
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/TableOfValues.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#: automatically loaded by the `PGML.pl` macro.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: Create the array `@answer` filled with values via a map.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Algebra/UnorderedAnswers.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#: The macro PODLINK('unorderedAnswer.pl') must be loaded.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'unorderedAnswer.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'unorderedAnswer.pl', 'PGcourse.pl');

#:% section = setup
#: The answers use the variables `x`, `y`, and `z`. The variable `x` is already
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Arithmetic/UnitConversion.pg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#: We load `contextUnits.pl` in order to use the Units context.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'contextUnits.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'contextUnits.pl', 'PGcourse.pl');

#:% section = setup
#: The Units context is from the PODLINK('contextUnits.pl') macro.
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Complex/ComplexOperations.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: To use complex numbers, switch to the `Complex` context with
Expand Down
5 changes: 1 addition & 4 deletions tutorial/sample-problems/Complex/LimitedComplex.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
#: PODLINK('contextLimitedComplex.pl') macro, so it must be loaded.
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'contextLimitedComplex.pl', 'PGcourse.pl'
);
loadMacros('PGML.pl', 'contextLimitedComplex.pl', 'PGcourse.pl');

#:% section = setup
#: Often when students are asked to perform operations with complex numbers,
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/Complex/OtherOperations.pg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: To use complex numbers, switch to the `Complex` context with
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/DiffCalc/AnswerWithUnits.pg
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#: PODLINK('parserFormulaWithUnits.pl') macros.
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'contextUnits.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'contextUnits.pl', 'PGcourse.pl');

#:% section = setup
#: First select the "Units" context, allow units for "length" and "time" in the
Expand Down
5 changes: 1 addition & 4 deletions tutorial/sample-problems/DiffCalc/DifferenceQuotient.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
#: Include the macro file PODLINK('parserDifferenceQuotient.pl').
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'parserDifferenceQuotient.pl', 'PGcourse.pl'
);
loadMacros('PGML.pl', 'parserDifferenceQuotient.pl', 'PGcourse.pl');

#:% section = setup
#: The `DifferenceQuotient` method takes a simplified function for its first
Expand Down
2 changes: 1 addition & 1 deletion tutorial/sample-problems/DiffCalc/DifferentiateFunction.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#:% section = preamble
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
loadMacros('PGML.pl', 'PGcourse.pl');

#:% section = setup
#: The differentiation operator is `->D('x')`.
Expand Down
6 changes: 1 addition & 5 deletions tutorial/sample-problems/DiffCalc/LinearApprox.pg
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
#: slope of the line instead of the equation of the line.
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl',
'answerHints.pl', 'parserAssignment.pl',
'PGcourse.pl'
);
loadMacros('PGML.pl', 'answerHints.pl', 'parserAssignment.pl', 'PGcourse.pl');

#:% section = setup
#: Allow assignments in the context by calling `parser::Assignment->Allow`.
Expand Down
7 changes: 2 additions & 5 deletions tutorial/sample-problems/DiffCalcMV/ContourPlot.pg
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
#: PODLINK('parserPopUp.pl') macro is used for a drop down menu answer.
DOCUMENT();

loadMacros(
'PGstandard.pl', 'PGML.pl', 'parserPopUp.pl', 'PGtikz.pl',
'PGcourse.pl'
);
loadMacros('PGML.pl', 'parserPopUp.pl', 'PGtikz.pl', 'PGcourse.pl');

$showPartialCorrectAnswers = 0;

Expand Down Expand Up @@ -72,7 +69,7 @@ Determine if the following statement is true or false.

[_]{$popup} This could be a contour plot for [`f(x, y) = x^2 - y^2`].

>> [@ image($graph, width => 300, height => 300, tex_size => 450) @]* <<
>>[!contour plot!]{$graph}{300}{300}{ { tex_size => 450 } }<<
END_PGML

#:% section = solution
Expand Down
Loading