Retab 2-space some pending stuff. Fix missing semicolon. Cosmetic changes.

parent 7c69f916
......@@ -218,24 +218,24 @@ sub latex2e_defnam($) {
return ($defnam);
};
#
# Take the sgmlsasp output, and make something
# useful from it.
#
# ------------------------------------------------------------------
$latex2e->{postASP} = sub
# ------------------------------------------------------------------
# Take the sgmlsasp output, and make something useful from it.
# ------------------------------------------------------------------
{
my $infile = shift;
my $filename = $global->{filename};
my $tmplatexdir = $global->{tmpbase} . "-latex-" . $$ . ".dir";
my $tmplatexnam = $tmplatexdir . "/" . $filename;
my $msgheader = "fmt_latex2e::postASP";
my @epsfiles = ();
my @texlines = ();
my @urldefines = ();
my @urlnames = ();
my $urlnum = 0;
my @epsfiles = ();
my @texlines = ();
my @urldefines = ();
my @urlnames = ();
my $urlnum = 0;
my $tmpepsf;
my $saved_umask = umask;
my $saved_umask = umask;
$ENV{TEXINPUTS} .= ":$main::DataDir";
umask 0077;
......@@ -246,54 +246,54 @@ $latex2e->{postASP} = sub
# check nameurl specified in source file
#
{
my $epsf;
open SGMLFILE, "<$filename.sgml";
while (<SGMLFILE>)
{
my $epsf;
open SGMLFILE, "<$filename.sgml";
while (<SGMLFILE>)
{
# for epsfile
if ( s/^\s*<eps\s+file=(.*)>/$1/ )
{
s/\s+angle=.*//;
s/\s+height=.*//;
s/\"//g;
$epsf = $_;
chop ( $epsf );
push @epsfiles, $epsf;
}
if ($latex2e->{output} eq "pdf")
{
if ( s/^\s*<img\s+src=(.*)>/$1/ )
{
s/\"//g;
$epsf = $_;
chop ( $epsf );
push @epsfiles, $epsf;
}
}
}
close SGMLFILE;
if ( s/^\s*<eps\s+file=(.*)>/$1/ )
{
s/\s+angle=.*//;
s/\s+height=.*//;
s/\"//g;
$epsf = $_;
chop ( $epsf );
push @epsfiles, $epsf;
}
if ($latex2e->{output} eq "pdf")
{
if ( s/^\s*<img\s+src=(.*)>/$1/ )
{
s/\"//g;
$epsf = $_;
chop ( $epsf );
push @epsfiles, $epsf;
}
}
}
close SGMLFILE;
}
{
my $urlid;
my $urlnam;
my $urldef;
while (<$infile>)
{
push @texlines, $_;
my $urlid;
my $urlnam;
my $urldef;
while (<$infile>)
{
push @texlines, $_;
# for nameurl
if ( /\\nameurl/ )
{
($urlid, $urlnam) = ($_ =~ /\\nameurl{(.*)}{(.*)}/);
print $urlnum . ": " . $urlid . "\n" if ( $global->{debug} );
$urldef = latex2e_defnam($urlnum) . "url";
s/\\nameurl{.*}{.*}/{\\em $urlnam} {\\tt \\$urldef}/;
push @urlnames, $_;
push @urldefines, "\\urldef{\\$urldef} \\url{$urlid}\n";
$urlnum++;
}
}
close $infile;
if ( /\\nameurl/ )
{
($urlid, $urlnam) = ($_ =~ /\\nameurl{(.*)}{(.*)}/);
print $urlnum . ": " . $urlid . "\n" if ( $global->{debug} );
$urldef = latex2e_defnam($urlnum) . "url";
s/\\nameurl{.*}{.*}/{\\em $urlnam} {\\tt \\$urldef}/;
push @urlnames, $_;
push @urldefines, "\\urldef{\\$urldef} \\url{$urlid}\n";
$urlnum++;
}
}
close $infile;
}
open OUTFILE, ">$tmplatexnam.tex";
......@@ -349,8 +349,8 @@ $latex2e->{postASP} = sub
if (/^\\usepackage.epsfig/ && ($global->{charset} eq "euc-kr")) {
$hlatexopt = "[noautojosa]" if ($latex2e->{latex} eq "hlatexp");
$_ = $_ . "\\usepackage" . "$hlatexopt" . "{hangul}\n"
}
$_ = $_ . "\\usepackage" . "$hlatexopt" . "{hangul}\n";
}
# Deal with input encoding
if ( /\\usepackage\[\@CHARSET\@\]\{inputenc\}/ ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment