tag
sub start_q {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "{ \\emph ";
}
return $currentstring;
}
sub end_q {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= "}";
}
return $currentstring;
}
#----------------------------------------------------------------------------- tag
sub start_p {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "{\\par ";
}
return $currentstring;
}
sub end_p {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }";
}
return $currentstring;
}
#----------------------------------------------------------------------------
tag
sub start_br {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "\\\\";
}
return $currentstring;
}
sub end_br {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
}
return $currentstring;
}
#--------------------------------------------------------------------------- tag
sub start_big {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "{\\large ";
}
return $currentstring;
}
sub end_big {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }";
}
return $currentstring;
}
#------------------------------------------------------------------------- tag
sub start_small {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "{\\footnotesize ";
}
return $currentstring;
}
sub end_small {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }";
}
return $currentstring;
}
#---------------------------------------------------------------------- tag
sub start_basefont {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[4];
}
return $currentstring;
}
#-------------------------------------------------------------------------- tag
sub start_font {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[4];
}
return $currentstring;
}
sub end_font {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[2];
}
return $currentstring;
}
#------------------------------------------------------------------------ tag
sub start_strike {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "{\\underline ";
}
return $currentstring;
}
sub end_strike {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }";
}
return $currentstring;
}
#----------------------------------------------------------------------------- tag
sub start_s {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "{\\underline ";
}
return $currentstring;
}
sub end_s {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }";
}
return $currentstring;
}
#--------------------------------------------------------------------------- tag
sub start_sub {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "\$_{ ";
}
return $currentstring;
}
sub end_sub {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }\$";
}
return $currentstring;
}
#--------------------------------------------------------------------------- tag
sub start_sup {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "\$^{ ";
}
return $currentstring;
}
sub end_sup {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }\$";
}
return $currentstring;
}
#----------------------------------------------------------------------------
tag
sub start_hr {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "\\hline ";
}
return $currentstring;
}
#----------------------------------------------------------------------------- tag
sub start_a {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
}
return $currentstring;
}
sub end_a {
my ($target,$token,$stackref) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
my $tempor_var = $stackref->[$#$stackref];
if (index($tempor_var,'name') != -1 ) {
$tempor_var =~ s/name=([^,]*),/$1/g;
$currentstring .= " \\label{$tempor_var}";
} elsif (index($tempor_var,'href') != -1 ) {
$tempor_var =~ s/href=([^,]*),/$1/g;
$currentstring .= " \\ref{$tempor_var}";
}
}
return $currentstring;
}
#---------------------------------------------------------------------------- tag
sub start_li {
my ($target,$token,$stackref) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[4];
} elsif ($target eq 'tex') {
my $tempor_var = $stackref->[$#$stackref-1];
if (index($tempor_var,'circle') != -1 ) {
$currentstring .= " \\item[o] ";
} elsif (index($tempor_var,'square') != -1 ) {
$currentstring .= " \\item[$\Box$] ";
} else {
$currentstring .= " \\item ";
}
}
return $currentstring;
}
sub end_li {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[2];
}
return $currentstring;
}
#----------------------------------------------------------------------------- tag
sub start_u {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= "{\\underline ";
}
return $currentstring;
}
sub end_u {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= " }";
}
return $currentstring;
}
#---------------------------------------------------------------------------- tag
sub start_ul {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[4];
} elsif ($target eq 'tex') {
$currentstring = " \\begin{itemize} ";
}
return $currentstring;
}
sub end_ul {
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
$currentstring = $token->[2];
} elsif ($target eq 'tex') {
$currentstring = " \\end{itemize}";
}
return $currentstring;
}
#--------------------------------------------------------------------------