## WeBWorK Main Forum

by Zak Zarychta -
Number of replies: 2
Is it possible to include htmlLinks in hints and solutions? I've tried this without success with the following:

Context()->normalStrings;
SOLUTION(EV3(<<'END_SOLUTION'));
$BR SOLUTION:$BR
Take a look at this image of the Lennard-Jones potential
END_SOLUTION
Context()->normalStrings;

the following warning are given
•  ERROR in old_safe_ev, PGbasicmacros.pl:
•  ## There is an error occuring inside evaluation brackets \{ ...code... \}
•  ## somewhere in an EV2 or EV3 or BEGIN_TEXT block.
•  ## Code evaluated:
•  ## htmlLink(http://commons.wikimedia.org/wiki/File:12-6-Lennard-Jones-Potential.png,"Lennard-Jones Potential")
•  ##syntax error at line 2 of (eval 60002), near "http:"
•  ##
•  at (eval 544) line 1453
Any help is greatly appreciated,
Zak

### Re: htmlLink(s), hints and solutions

by Michael Gage -

Your code above works fine for me. You can also start the section
with

BEGIN_SOLUTION

if you prefer -- which is clearer and more foolproof than
TEXT(EV3.....). It is translated to the code you have entered above.

It looks like the contents of the "http://...." quote is being evaluated before the contents of the \{ ..... \} clause. I've tried a couple of variants but haven't been able to reproduce the error you describe above.

If you can reproduce this error, let us know what system (flavor of linux) you are running under.

Take care,
Mike