--- loncom/xml/londefdef.pm 2001/01/12 20:39:49 1.17 +++ loncom/xml/londefdef.pm 2001/01/17 17:41:48 1.18 @@ -291,6 +291,8 @@ sub BEGIN { $currentstring = $token->[4]; } elsif ($target eq 'tex') { $currentstring = " \\begin{center} "; + } elsif ($target eq 'latexsource') { + $currentstring = " \\begin{center} "; } return $currentstring; } @@ -301,6 +303,8 @@ sub BEGIN { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = " \\end{center}"; + } elsif ($target eq 'latexsource') { + $currentstring = " \\end{center}"; } return $currentstring; } @@ -311,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; } @@ -322,6 +328,8 @@ sub BEGIN { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = "}"; + } elsif ($target eq 'latexsource') { + $currentstring = "}"; } return $currentstring; } @@ -332,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; } @@ -344,6 +354,8 @@ sub BEGIN { $currentstring = $token->[2]; } elsif ($target eq 'tex') { $currentstring = "}"; + } elsif ($target eq 'latexsource') { + $currentstring = "}"; } return $currentstring; } @@ -486,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; } @@ -497,6 +511,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -507,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; } @@ -518,6 +536,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -528,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; } @@ -539,6 +561,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -549,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; } @@ -560,6 +586,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -570,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; } @@ -581,7 +611,9 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; - } + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; + } return $currentstring; } #---------------------------------------------------------------------------- tag @@ -591,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; } @@ -602,6 +636,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; } return $currentstring; } @@ -634,6 +670,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "\\emph{"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\emph{"; } return $currentstring; } @@ -644,7 +682,9 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; - } + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; + } return $currentstring; } #----------------------------------------------------------------------------- tag @@ -654,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 { @@ -665,7 +707,9 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= "}"; - } + } elsif ($target eq 'latexsource') { + $currentstring .= "}"; + } return $currentstring; } #-----------------------------------------------------------------------------

tag @@ -676,6 +720,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "{\\par "; + } elsif ($target eq 'latexsource') { + $currentstring .= "{\\par "; } return $currentstring; } @@ -685,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; } @@ -697,6 +745,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "\\\\"; + } elsif ($target eq 'latexsource') { + $currentstring .= "\\\\"; } return $currentstring; } @@ -716,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 { @@ -726,6 +778,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= " }"; + } elsif ($target eq 'latexsource') { + $currentstring .= " }"; } return $currentstring; } @@ -737,6 +791,8 @@ sub BEGIN { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { $currentstring .= "{\\footnotesize "; + } elsif ($target eq 'latexsource') { + $currentstring .= "{\\footnotesize "; } return $currentstring; } @@ -747,6 +803,8 @@ sub BEGIN { $currentstring .= $token->[2]; } elsif ($target eq 'tex') { $currentstring .= " }"; + } elsif ($target eq 'latexsource') { + $currentstring .= " }"; } return $currentstring; }