WeBWorK Problems

Link to a Webpage in PGML

Re: Link to a Webpage in PGML

by Paul Pearson -
Number of replies: 0
Hi all,

You will need to use protect_underbar() since your URL has underscores in it.  The hyperlinks are apparently not working properly in the pdf hardcopy, but this is a minor issue since most people will not click the links in the pdf hardcopy (they will print a paper copy instead).

Best regards,

Paul Pearson

##########################

DOCUMENT();

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

TEXT(beginproblem());

BEGIN_PGML

Use [| protect_underbar() |] whenever underscore appears in a string outside of math mode.

a. [@ htmlLink( protect_underbar("http://webwork.maa.org/wiki/Available_Functions"), protect_underbar("http://webwork.maa.org/wiki/Available_Functions") ); @]*

    - hyperlink works in HTML mode
    - link text displays properly in HTML mode
    - hyperlink does not work properly in pdf hardcopy: it directs to [| http://webwork.maa.org/wiki/Available |] instead of where it's supposed to go
    - link text displays properly in pdf hardcopy

b. [@ htmlLink( protect_underbar("http://webwork.maa.org/wiki/Available_Functions"), "functions webwork understands" ); @]*

    - hyperlink works in HTML mode
    - link text displays properly in HTML mode
    - hyperlink does not work properly in pdf hardcopy: when the mouse hovers over it, there no link
    - link text displays properly in pdf hardcopy


END_PGML

ENDDOCUMENT;