Forum archive 2000-2006

Zbigniew Fiedorowicz - problem text formatting question

Zbigniew Fiedorowicz - problem text formatting question

by Arnold Pizer -
Number of replies: 0
inactiveTopicproblem text formatting question topic started 2/2/2001; 3:24:14 PM
last post 2/2/2001; 10:11:39 PM
userZbigniew Fiedorowicz - problem text formatting question  blueArrow
2/2/2001; 3:24:14 PM (reads: 1062, responses: 1)
It seems in the various PG TEXT constructs, expressions like + -2 get simplified to -2. Does this mean I never have to worry about the signs of PERL variables interpolated into mathematical expressions in the problem text? Eg.

x - $a y^2

will never come out looking like

x - -5 y^2?

This behavior doesn't seem to be documented in the PG documentation.

Zig

<| Post or View Comments |>


userMichael Gage - Re: problem text formatting question  blueArrow
2/2/2001; 10:11:39 PM (reads: 1318, responses: 0)
A function called FEQ (for Format EQuations) performs these operations. This subroutine is always called to cleanup the formulas within math mode \( ... \) and display mode \[ ... \] portions of the text. It is not called outside these regions of the BEGIN_TEXT ...END_TEXT construction.

So,


$a = -4;
BEGIN_TEXT
- $a becomes - -4 but \( - $a \) will become 4
END_TEXT

I've updated the page

http://webhost.math.rochester.edu/webworkdocs/docs/pglanguage/tutorial/problemtext

to make some of this information more explicit.

Thanks.

-- Mike

<| Post or View Comments |>