PREP 2014 Question Authoring - Archived

substitute j for i

Re: substitute j for i

by Davide Cervone -
Number of replies: 0
No, this is not the way you do it. As you point out, this would set the context to Complex, and if the problem set that again your changes would be lost. You want the problem to set the context, so this isn't the way to make the change.

I give the documentation for contextComplexJ.pl above, and you should look at the section called "SETTING THE ALTERNATE FORM AS THE DEFAULT". That tells you what you need to add to PGcourse.pl. (That section actually suggests using a different file, parserCustomization.pl, which is loaded whenever MathObjects.pl is loaded. So does not rely on PGcourse.pl, which is not included in all PG files.)

So I'd follow the examples in the documentation and use

    loadMacros("contextComplexJ.pl");
    context::ComplexJ->Default("j","j");
to force students to enter numbers using j-notion and print all results using j-notation (see the note at the end of the documentation above), or
    loadMacros("contextComplexJ.pl");
    context::ComplexJ->Default("either","j");
to allow students to enter either format, but show results using j-notation.