[ww-bugs] Bug 3460: New: another (different?) PGML empty string issue

bugzilla-daemon at webwork.maa.org bugzilla-daemon at webwork.maa.org
Tue Sep 22 19:00:13 EDT 2015


http://bugs.webwork.maa.org/show_bug.cgi?id=3460

           Summary: another (different?) PGML empty string issue
           Product: PG
           Version: develop
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: macros
        AssignedTo: gage at math.rochester.edu
        ReportedBy: alex.jordan at pcc.edu
                CC: dpvc at union.edu
        Web browser ---
           version:


This is possibly related to http://bugs.webwork.maa.org/show_bug.cgi?id=3409.

Consider macros that use MODES, and in one mode, there is an empty string. For
example, from PCCgraphMacros.pl:

sub EnlargeImageStatementPGML{MODES(TeX => '', Latex2HTML => '', HTML => 'If
you would like to enlarge the graph or make numbers and letters easier to read,
you may click on it to open it in a new window. You may then enlarge that
window with your mouse. To further enlarge the image, use your browser\'s zoom
capabilities. On a PC this is usually *ctrl shift +* (and zooming out is *ctrl
-*). On an Apple computer this is usually *apple shift +* (and zooming out is
*apple -*).');};

I am finding that problems fail if they use a macro like this, called using
[@@]**, using whichever output mode has the empty string.   The PCC library
uses this image statement macro a lot, and because the TeX mode string is
empty, we can't get hard copies right now for many sets. If I change that
string to just about any other string, it works. (However if I change it to '
', it still fails, which is why I think this is a separate issue from
http://bugs.webwork.maa.org/show_bug.cgi?id=3409.)

Not too long ago, this particular macro was simply the output string you see
above for the HTML mode, without invoking MODES. We realized it was silly to
have it output anything for a hard copy, so we changed it to be as it is above.
Most likely we failed to test if it worked for hard copies. So I can't say if
this is a new PGML issue, an old PGML issue, or if we never should have been
using PGML this way in the first place, with [@@]** like this.

To see this issue first hand, try the following in a hard copy:



DOCUMENT();

loadMacros(
  "PGstandard.pl",
  "PGML.pl",
  "PCCgraphMacros.pl",
);

TEXT(beginproblem());

BEGIN_PGML

Some text.

[@EnlargeImageStatementPGML()@]**

Some text.

END_PGML




One last strange thing. I have to put some text both above and below the
offending [@@]** command. When I tried making a MWE, the issue disappeared if
there was just the [@@]** statement all by itself.

-- 
Configure bugmail: http://bugs.webwork.maa.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the webwork-bugs mailing list