[PVFS2-CVS] commit by robl in pvfs2-1/maint: pvfs2latexwrapper.pl
CVS commit program
cvs at parl.clemson.edu
Mon May 3 19:23:48 EDT 2004
Update of /projects/cvsroot/pvfs2-1/maint
In directory acid:/tmp/cvs-serv27363/maint
Modified Files:
pvfs2latexwrapper.pl
Log Message:
while we're at it, generate html versions as well
Index: pvfs2latexwrapper.pl
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/maint/pvfs2latexwrapper.pl,v
diff -u -w -p -u -r1.3 -r1.4
--- pvfs2latexwrapper.pl 29 Mar 2004 20:23:35 -0000 1.3
+++ pvfs2latexwrapper.pl 3 May 2004 22:23:47 -0000 1.4
@@ -26,7 +26,28 @@ use Cwd;
use Getopt::Long;
use File::Basename;
-GetOptions("o=s" => \$outputpath, "i=s" => \$inputpath) || die "GetOptions: $!";
+
+sub process_latex
+{
+ my($input,$do_html);
+ $input = $_[0];
+ $do_html = $_[1];
+ my $latex2html_cmd = "latex2html -split 0 -show_section_numbers -nonavigation";
+
+ if ($do_html)
+ {
+ system "latex $input"; # latex2html needs the .aux file
+ system "$latex2html_cmd $input";
+ } else {
+ system "latex $infile";
+ system "latex $infile"; # once more to get figures correct
+ system "latex $infile"; # sometimes it takes a third pass
+ }
+}
+
+GetOptions("o=s" => \$outputpath,
+ "i=s" => \$inputpath,
+ "html" => \$make_html) || die "GetOptions: $!";
if (!defined($outputpath) || !defined($inputpath)) {
die "usage: pvfs2latexwrapper.pl -o <outputfile> -i <inputfile>\n";
@@ -47,6 +68,7 @@ chdir "$startdir";
chdir "$outdir";
$outdir = cwd();
+print "outdir = $outdir indir = $indir\n";
if ($outdir ne $indir) {
my @info = ();
@@ -70,10 +92,7 @@ if ($outdir ne $indir) {
}
close FILE;
-
- system "latex $infile";
- system "latex $infile"; # once more to get figures correct
- system "latex $infile"; # and sometimes it takes a *third* pass
+ process_latex($infile, $make_html);
# Note: leaving the "figs" link there; helps in ps/pdf build.
# unlink $infile, "figs";
@@ -84,7 +103,5 @@ if ($outdir ne $indir) {
}
}
else {
- system "latex $infile";
- system "latex $infile"; # once more to get figures correct
- system "latex $infile"; # and sometimes it takes a *third* pass
+ process_latex($infile, $make_html);
}
More information about the PVFS2-CVS
mailing list