--- loncom/xml/londefdef.pm 2001/01/12 20:38:05 1.16 +++ loncom/xml/londefdef.pm 2001/01/17 17:41:48 1.18 @@ -237,13 +237,10 @@ sub BEGIN { sub start_meta { my ($target,$token) = @_; my $currentstring = ''; - &Apache::lonxml::debug("In meta"); if ($target eq 'web') { - &Apache::lonxml::debug("In meta2"); $currentstring = $token->[4]; } if ($target eq 'meta') { - &Apache::lonxml::debug("In meta3"); unless ($token->[2]->{'http-equiv'}) { my $name=$token->[2]->{'name'}; $name=~tr/A-Z/a-z/; @@ -255,7 +252,6 @@ sub BEGIN { } } } - &Apache::lonxml::debug("send back $currentstring"); return $currentstring; } sub end_meta { @@ -295,6 +291,8 @@ sub BEGIN { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $currentstring = " \\begin{center} "; + } elsif ($target eq 'latexsource') { + $currentstring = " \\begin{center} "; } return $currentstring; } @@ -305,6 +303,8 @@ sub BEGIN { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = " \\end{center}"; + } elsif ($target eq 'latexsource') { + $currentstring = " \\end{center}"; } return $currentstring; } @@ -315,7 +315,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { - $currentstring = " {\\bf "; + $currentstring = " \\textbf{"; + } elsif ($target eq 'latexsource') { + $currentstring = " \\textbf{"; } return $currentstring; } @@ -326,6 +328,8 @@ sub BEGIN { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = "}"; + } elsif ($target eq 'latexsource') { + $currentstring = "}"; } return $currentstring; } @@ -336,7 +340,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring = $token->[4]; } elsif ($target eq 'tex') { - $currentstring = " {\\bf "; + $currentstring = " \\textbf{"; + } elsif ($target eq 'latexsource') { + $currentstring = " \\textbf{"; } return $currentstring; } @@ -348,6 +354,8 @@ sub BEGIN { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = "}"; + } elsif ($target eq 'latexsource') { + $currentstring = "}"; } return $currentstring; } @@ -490,7 +498,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= "{ \\it "; + $currentstring .= "\\textit{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\textit{"; } return $currentstring; } @@ -501,6 +511,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -511,7 +523,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= "{ \\it "; + $currentstring .= "\\textit{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\textit{"; } return $currentstring; } @@ -522,6 +536,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -532,7 +548,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= "{ \\it "; + $currentstring .= "\\textit{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\textit{"; } return $currentstring; } @@ -543,6 +561,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -553,7 +573,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= "{ \\it "; + $currentstring .= "\\textit{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\textit{"; } return $currentstring; } @@ -564,6 +586,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -574,7 +598,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= "{ \\tt "; + $currentstring .= "\\texttt{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\texttt{"; } return $currentstring; } @@ -585,7 +611,9 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; - } + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; + } return $currentstring; } #---------------------------------------------------------------------------- tag @@ -595,7 +623,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= "{ \\tt "; + $currentstring .= "\\texttt"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\texttt{"; } return $currentstring; } @@ -606,6 +636,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -638,6 +670,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "\\emph{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\emph{"; } return $currentstring; } @@ -648,7 +682,9 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; - } + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; + } return $currentstring; } #----------------------------------------------------------------------------- tag @@ -658,8 +694,10 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { - $currentstring .= "{ \\emph "; - } + $currentstring .= "\\emph{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\emph{"; + } return $currentstring; } sub end_q { @@ -669,7 +707,9 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; - } + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; + } return $currentstring; } #-----------------------------------------------------------------------------

tag @@ -680,6 +720,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "{\\par "; + } elsif ($target eq 'latexsource') { + $currentstring .= "{\\par "; } return $currentstring; } @@ -689,7 +731,9 @@ sub BEGIN { if ($target eq 'web') { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { - $currentstring .= " }"; + $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -701,6 +745,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "\\\\"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\\\"; } return $currentstring; } @@ -720,7 +766,9 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "{\\large "; - } + } elsif ($target eq 'latexsource') { + $currentstring .= "{\\large "; + } return $currentstring; } sub end_big { @@ -730,6 +778,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= " }"; + } elsif ($target eq 'latexsource') { + $currentstring .= " }"; } return $currentstring; } @@ -741,6 +791,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "{\\footnotesize "; + } elsif ($target eq 'latexsource') { + $currentstring .= "{\\footnotesize "; } return $currentstring; } @@ -751,6 +803,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= " }"; + } elsif ($target eq 'latexsource') { + $currentstring .= " }"; } return $currentstring; }