WeBWorK Main Forum

Quirk: latex in PGML blocks

Quirk: latex in PGML blocks

by Andrew Dabrowski -
Number of replies: 2

We run WW 2.13, and some problems use only `,` to indicate latex in PGML blocks, rather than [`,`].  For example,

BEGIN_PGML


Let `A` and `B` be subsets of a universal set `U`.

rather than

BEGIN_PGML


Let [`A`] and [`B`] be subsets of a universal set [`U`].

Nevertheless this displays correctly.

However we're experimenting this semester with Edfinity, and the same code does not display properly there.

Edfinity is running WW 2.14.  Could the WW version be the difference?  Is the first form supposed to display correctly? I was surprised that it did.

In reply to Andrew Dabrowski

Re: Quirk: latex in PGML blocks

by Alex Jordan -

If you only use the backticks, then WW will not see that content as math at any stage. Ultimately the `A` will be displayed on your browser, and then MathJax running in the browser will intercept that and (if MathJax is using a common configuration) will process the inside stuff as AsciiMath. So something simple like "A" can appear with a math font. (But LaTeX expressions with backslashes won't work this way.)

Note that if you use WW's hardcopy generator to run these same problems to make a PDF, you will see the same thing you see in Edfinity: the backticks will be there with no math processing of the insides.

I think the right thing to do is change the problems to use the real PGML delimiters. You could ask Edfinity if they would want to reconfigure their MathJax to process stuff inside backticks as AsciiMath to mirror the behavior you had before, but since WW still won't perceive that content is math, it could cause other problems. For example is Edfinity would like to use some output format other than HTML some day.