WeBWorK Problems

Answer boxes in TeX mode

Answer boxes in TeX mode

by David Covert -
Number of replies: 4
Hi.

I am wondering if there is a way in which I could put an answer box in TeX mode.  To be specific, I am writing problems for an algebra course, and I would like the students to be able to enter answers underneath a radical symbol (square root, cube root, etc.).

I found a feature called tex_ans_rule, though I have not been able to implement this (a document describing tex_ans_rule states that "C<tex_ans_rule> works inside math equations in C<HTML_tth> mode. It does not work in C<Latex2HTML> since this mode produces gif pictures").

Is there any way to have answer boxes underneath radical signs, or in TeX mode in general?

Thank you.
In reply to David Covert

Re: Answer boxes in TeX mode

by Michael Gage -
I think you can use the same technique used to put answer blanks in integral limits.


see also putting answer blanks in exponents, also in the 
"problem techniques" subsection of the wiki (in the Author section).
In reply to Michael Gage

Re: Answer boxes in TeX mode

by David Covert -
Michael,

     Thank you for your reply.  I tried playing around with both the "LimitsOfIntegration" and "Answer in Exponent" problems, and I did not succeed in producing the desired result.  I believe the problem is that the code \( \sqrt{ \hspace{3em} }\) produces an image of a square root, and no answer box can be placed on an image.  I think that I will just have to more creative in the way I ask the homework problems.

Thanks again for your time,

David Covert
In reply to David Covert

Re: Answer boxes in TeX mode

by Arnold Pizer -
Hi,

The main problem is that in images mode (the default display mode) equations are displayed as png images and you can not put an answer box in a png image. I'm not sure if there is a way to get something working using MathJax.  tex_ans_rule worked with a mode (tth) that way outdated and no longer used. Actually all the code is still in WeBWorK to use tth but I would not reccomend using it.

I think the best you can do is something like 
\(\sqrt{\hspace{.5em}}\)\{ans_rule(5)\} 
which is similar to what Mike is referring to.  You probably want the answer box under the radical sign, but since in images mode the radical sign is a png image, I think that is impossible.

Arnie

In reply to Arnold Pizer

Re: Answer boxes in TeX mode

by David Covert -
Arnie,

    I was afraid that since I had never heard of "tth" that it was outdated.  I was indeed hoping to get the answer box underneath the radical sign, but I think I will just have more carefully craft the homework questions.

Thanks,

David Covert