<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>ul/li tags and \itemize \item</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>One problem can't seem to convert into pdf very easily and I'm not sure how to fix it.<BR>
<BR>
Below is a portion of the tex file, which looks like the <li> tags are getting entangled with the \ensuremath{} commands.<BR>
<BR>
 \strut \begin{itemize}<BR>
 \ensuremath{<}li\ensuremath{>}horizontal compression of a factor of \ensuremath{\backslash}ensuremath\{\ensuremath{\backslash}Large\ensuremath{\backslash}frac\{1\}\{10\}\}\ensuremath{<}/li\ensuremath{>}\ensuremath{<}li\ensuremath{>}horizontal translation of 80 units to the right\ensuremath{<}/li\ensuremath{>}\ensuremath{<}li\ensuremath{>}reflection along the line \ensuremath{<}m\ensuremath{>} = x501/m\ensuremath{>}\ensuremath{<}/li\ensuremath{>}\ensuremath{<}li\ensuremath{>}reflection along the x-axis \ensuremath{<}/li\ensuremath{>}<BR>
 \end{itemize}<BR>
<BR>
Below is the XML document, the <li></li> tags are generated through a script.<BR>
<BR>
<problem><BR>
<script type="loncapa/perl">#(a,b) is the original point<BR>
# c is the hz/vt compression/expansion factor<BR>
# d is the translation amount<BR>
<BR>
<BR>
#function obtained from <A HREF="http://perl.active-venture.com/pod/perlfaq4-dataarrays.html">http://perl.active-venture.com/pod/perlfaq4-dataarrays.html</A><BR>
   sub fisher_yates_shuffle {<BR>
        my $deck = shift;  # $deck is a reference to an array<BR>
        my $i = @$deck;<BR>
        while ($i--) {<BR>
            my $j = &random(0,$i);<BR>
            @$deck[$i,$j] = @$deck[$j,$i];<BR>
        }<BR>
    }<BR>
<BR>
$a = &random(2,6,1) * &random(-1,1,2);<BR>
do{<BR>
  $b = &random(2,6,1) * &random(-1,1,2);<BR>
}while($a==$b or $a==-1*$b);<BR>
<BR>
$c = &random(2,10,1);<BR>
#$d = &random(11,20,1);<BR>
$d = &random(7,10,1) * $c;<BR>
<BR>
#to ensure integral answers.  There is probably a better way but too tired to figure it out<BR>
$a = $a * $c;<BR>
$b = $b * $c;<BR>
<BR>
$index = &random(1,2,1);<BR>
$hvexpcomp = &choose($index, "horizontal ", "vertical ");<BR>
<BR>
$index = &random(1,2,1);<BR>
$hvexpcomp = $hvexpcomp.&choose($index, "expansion", "compression");<BR>
<BR>
$index = &random(1,2,1);<BR>
$reflectionAxis = &choose($index, "x", "y");<BR>
<BR>
$index = &random(1,2,1);<BR>
$hvtranslation = &choose($index, "horizontal", "vertical");<BR>
<BR>
if($hvtranslation eq "horizontal")<BR>
{<BR>
  $index = &random(1,2,1);<BR>
  $direction = &choose($index,"to the right", "to the left");<BR>
}<BR>
else<BR>
{<BR>
  $index = &random(1,2,1);<BR>
  $direction = &choose($index, "downward", "upward");<BR>
<BR>
}<BR>
<BR>
@transformations = ("compression" , "axis", "translation", "y equals x");<BR>
fisher_yates_shuffle( \@transformations );<BR>
<BR>
$answerX = $a;<BR>
$answerY = $b;<BR>
$steps = "";<BR>
<BR>
for($index=0; $index<4; $index++)<BR>
{<BR>
   if($transformations[$index] eq "compression")<BR>
   {<BR>
      if($hvexpcomp eq "horizontal compression")<BR>
      {<BR>
         #$answerX = $c * $answerX;  #not sure if this will work<BR>
         $answerX = $answerX * $c;<BR>
         $temp = $hvexpcomp.' of a factor of <m eval=\'on\'>$\Large\frac{1}{'.$c.'}$</m>';<BR>
         $temp = &xmlparse($temp);<BR>
         $steps .= "<li>$temp</li>";<BR>
<BR>
      }<BR>
      elsif($hvexpcomp eq "horizontal expansion")<BR>
      {<BR>
         #$a = $c * $answerX;<BR>
         $answerX = $answerX / $c;<BR>
         $steps .= "<li>$hvexpcomp of a factor of <m eval='on'>$ $c $</m></li>";<BR>
      }<BR>
      elsif($hvexpcomp eq "vertical compression")<BR>
      {<BR>
         #$b = $c * $answerY;<BR>
         $answerY = $answerY / $c;<BR>
         $temp = $hvexpcomp.' of a factor of <m eval=\'on\'>$\Large\frac{1}{'.$c.'}$</m>';<BR>
         $temp = &xmlparse($temp);<BR>
         $steps .= "<li>$temp</li>";<BR>
      }<BR>
      elsif($hvexpcomp eq "vertical expansion")<BR>
      {<BR>
         #$answerY = $c * $answerY;<BR>
         $answerY = $c * $answerY;<BR>
         $steps .= "<li>$hvexpcomp of a factor of <m eval='on'>$ $c $</m></li>";<BR>
      }<BR>
   }<BR>
   elsif($transformations[$index] eq "axis")<BR>
   {<BR>
      if($reflectionAxis eq "x")<BR>
      {<BR>
         $answerY = -1 * $answerY;<BR>
      }<BR>
      else<BR>
      {<BR>
         $answerX = -1 * $answerX;<BR>
      }<BR>
      $steps .= "<li>reflection along the $reflectionAxis-axis </li>";<BR>
   }<BR>
   elsif($transformations[$index] eq "translation")<BR>
   {<BR>
      if($hvtranslation eq "horizontal" and $direction eq "to the right")<BR>
      {<BR>
         $answerX = $answerX + $d;<BR>
      }<BR>
      elsif($hvtranslation eq "horizontal" and $direction eq "to the left")<BR>
      {<BR>
         $answerX = $answerX - $d;<BR>
      }<BR>
      elsif($hvtranslation eq "vertical" and $direction eq "upward")<BR>
      {<BR>
         $answerY = $answerY + $d;<BR>
      }<BR>
      else<BR>
      {<BR>
         $answerY = $answerY - $d;<BR>
      }<BR>
      $steps .= "<li>$hvtranslation translation of $d units $direction</li>";<BR>
   }<BR>
   else  #reflection along y=x<BR>
   {<BR>
      $temp    = $answerX;<BR>
      $answerX = $answerY;<BR>
      $answerY = $temp;<BR>
      $steps .= "<li>reflection along the line <m>$y = x$</m></li>";<BR>
<BR>
   }<BR>
<BR>
   #$steps .= "<li> <m eval='on'>$ ($answerX , $answerY)$</m></li>";<BR>
}</script><startouttext />The point <m eval='on'>$($a, $b)$</m> is on the graph of a function.  What will the co-ordinates of this point be after all of the following transformations are performed, in the order given?<BR>
<BR>
<ul><BR>
$steps<BR>
</ul><BR>
<br /><BR>
Answer: (<endouttext /><BR>
<numericalresponse answer="$answerX"><BR>
<responseparam type="tolerance" default="0%" name="tol" description="Numerical Tolerance" /><BR>
<responseparam name="sig" type="int_range,0-16" default="0,15" description="Significant Figures" /><BR>
    <textline readonly="no" /><BR>
   <BR>
</numericalresponse><startouttext />,<endouttext /><BR>
<numericalresponse answer="$answerY"><BR>
<responseparam type="tolerance" default="0%" name="tol" description="Numerical Tolerance" /><BR>
<responseparam name="sig" type="int_range,0-16" default="0,15" description="Significant Figures" /><BR>
    <textline readonly="no" /><BR>
   <BR>
</numericalresponse><startouttext />)<endouttext /><BR>
</problem><BR>
<BR>
<BR>
Thanks.</FONT>
</P>

</BODY>
</HTML>