Arnie,
Thanks for checking into this. There won't be an issue when
writing new problems, and I appreciate what you are saying about
writing a script to convert files wholesale, or use a suitable editor.
I've done that sort of stuff in the past and can do it again. But the
project is a little open ended, and of course error prone and time
consuming. When I first started writing ww problems I used LaTeX
Constructions outside of math mode freely because l2h conversion
handled it very well. By now I must have written probably close to a
thousand. Below is an example file. There is a \bf statement that
students need to get everything right, and the solution uses the LaTeX
\item construction. If you look at that problem through ww in png
mode you'll see the LaTeX control codes. In particular, look at the
solution and the hint. Compare it with l2h mode, where it looks just
fine. Thanks for posting the query. If it's a problem of general
interest, and we do come up with some sort of script here, we'd of
course be happy to make it generally available.
Peter
---------------------------------------------------------------------
##KEYWORDS('true-false')
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros( PG.pl, PGbasicmacros.pl, PGchoicemacros.pl, PGanswermacros.pl, PGauxiliaryFunctions.pl );
install_problem_grader(~~&std_problem_grader); TEXT(&beginproblem); $showPartialCorrectAnswers = 0; $showPartialCredit = 0;
TEXT(EV2(<<EOT)); Think about the following statements and indicate whether they are true (T) of false (F).
$BR {\bf You need to get all answers correct before obtaining credit.}
$BR \{ ans_rule(4) \} The graph of a linear polynomial is a straight line. $BR
EOT
&ANS(str_cmp("T"));
TEXT(EV2(<<EOT)); $BR \{ ans_rule(4) \} The degree of a trinomial is at least 2. $BR
EOT
&ANS(str_cmp("T"));
TEXT(EV2(<<EOT)); $BR \{ ans_rule(4) \} The product of two polynomials is always a polynomial. $BR
EOT
&ANS(str_cmp("T"));
TEXT(EV2(<<EOT)); $BR \{ ans_rule(4) \} The quotient of two polynomials is always a polynomial. $BR
EOT
&ANS(str_cmp("F"));
TEXT(EV2(<<EOT)); $BR \{ ans_rule(4) \} The sum of two polynomials is always a polynomial. $BR EOT &ANS(str_cmp("T"));
TEXT(EV2(<<EOT)); $BR \{ ans_rule(4) \} The difference of two polynomials is always a polynomial. $BR EOT &ANS(str_cmp("T"));
HINT(EV3(<<'EOT')); $BR {\large\bf Hint:} Look at an example. Try to prove the statement wrong by finding g an example where it does not hold. EOT
SOLUTION(EV3(<<'EOT')); $BR {\large\bf Solution:}
\begin{itemize} \item The graph of a linear polynomial is a straight line. { Yes! Home work 5 and the associated material discussed at great length the correspondence between linear functions and their graphs.}
\item The degree of a trinomial is at least 2. { Yes, because with a polynomial of degree less than 2 you can have at most 2 terms.}
\item The product of two polynomials is always a polynomial. { Yes.}
\item The quotient of two polynomials is always a polynomial. { No, for example not in the case \[f(x) = \frac{x+1}{x+2}.\]}
\item The sum of two polynomials is always a polynomial. { Yes.}
\item The difference of two polynomials is always a polynomial. { Yes. So you can add, subtract and multiply polynomials, and you'll still have a polynomial. You cannot always divided them and still have a polynomial.}
\end{itemize}
EOT
ENDDOCUMENT(); # This should be the last executable line in the problem.
<| Post or View Comments |> |