diff options
author | Hans Hagen <pragma@wxs.nl> | 2006-01-27 13:58:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2006-01-27 13:58:00 +0100 |
commit | 94d0527506ced512de9c2ee13e160d81414191e7 (patch) | |
tree | 70eb926e70bef9c892856f2fd44bd11e08088cee /scripts/context/perl | |
parent | dcc773eed69f48d0f2d2df6801dc8c99c2690883 (diff) | |
download | context-94d0527506ced512de9c2ee13e160d81414191e7.tar.gz |
stable 2006.01.27 13:58
Diffstat (limited to 'scripts/context/perl')
-rw-r--r-- | scripts/context/perl/texexec.pl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/context/perl/texexec.pl b/scripts/context/perl/texexec.pl index e939df78e..7da7ff28b 100644 --- a/scripts/context/perl/texexec.pl +++ b/scripts/context/perl/texexec.pl @@ -151,6 +151,7 @@ my $PdfCombine = 0; my $PdfOpen = 0; my $PdfClose = 0; my $AutoPdf = 0; +my $UseXPdf = 0; my $PrintFormat = 'standard'; my $ProducePdfT = 0; my $ProducePdfM = 0; @@ -312,6 +313,7 @@ my $MakeMpy = ''; "pdfclose" => \$PdfClose, "pdfopen" => \$PdfOpen, "autopdf" => \$AutoPdf, + "xpdf" => \$UseXPdf, "modefile=s" => \$ModeFile, # additional modes file "globalfile" => \$GlobalFile, "nomapfiles" => \$NoMapFiles, @@ -408,6 +410,16 @@ if ($AutoPdf) { $PdfOpen = $PdfClose = 1 ; } +my $PdfOpenCall = "" ; + +if ($PdfOpen) { + $PdfOpenCall = "pdfopen --file" ; +} + +if ($UseXPdf && !$dosish) { + $PdfOpenCall = "xpdfopen" ; +} + # this is our hook into paranoid path extensions, assumes that # these three vars are part of path specs in texmf.cnf @@ -1953,11 +1965,11 @@ sub RunConTeXtFile { { unlink "$JobName.$JobSuffix"; } - if ((!$Problems) && ($PdfOpen)) { + if ((!$Problems) && ($PdfOpen) && ($PdfOpenCall)) { if ($Result ne '') { - System("pdfopen --file $Result.pdf") if -f "$Result.pdf" + System("$PdfOpenCall $Result.pdf") if -f "$Result.pdf" } else { - System("pdfopen --file $JobName.pdf") if -f "$JobName.pdf" + System("$PdfOpenCall $JobName.pdf") if -f "$JobName.pdf" } } } |