summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/context/perl/texexec.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/context/perl/texexec.pl')
-rw-r--r--Master/texmf-dist/scripts/context/perl/texexec.pl74
1 files changed, 58 insertions, 16 deletions
diff --git a/Master/texmf-dist/scripts/context/perl/texexec.pl b/Master/texmf-dist/scripts/context/perl/texexec.pl
index 2f3b89e0461..fb564bbd5ed 100644
--- a/Master/texmf-dist/scripts/context/perl/texexec.pl
+++ b/Master/texmf-dist/scripts/context/perl/texexec.pl
@@ -11,7 +11,7 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' && eval 'exec perl -w -
#D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
#C
#C This module is part of the \CONTEXT\ macro||package and is
-#C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+#C therefore copyrighted by \PRAGMA. See readme.pdf for
#C details.
# Thanks to Tobias Burnus for the german translations.
@@ -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;
@@ -255,6 +256,7 @@ my $MakeMpy = '';
"once" => \$RunOnce,
"output=s" => \$OutputFormat,
"pages=s" => \$Pages,
+ "paper=s" => \$PaperFormat,
"paperformat=s" => \$PaperFormat,
"passon=s" => \$PassOn,
"path=s" => \$InpPath,
@@ -275,6 +277,7 @@ my $MakeMpy = '';
"selection=s" => \$Selection,
"combination=s" => \$Combination,
"noduplex" => \$NoDuplex,
+ "offset=s" => \$PaperOffset,
"paperoffset=s" => \$PaperOffset,
"backspace=s" => \$BackSpace,
"topspace=s" => \$TopSpace,
@@ -310,6 +313,7 @@ my $MakeMpy = '';
"pdfclose" => \$PdfClose,
"pdfopen" => \$PdfOpen,
"autopdf" => \$AutoPdf,
+ "xpdf" => \$UseXPdf,
"modefile=s" => \$ModeFile, # additional modes file
"globalfile" => \$GlobalFile,
"nomapfiles" => \$NoMapFiles,
@@ -351,6 +355,12 @@ if ( $ARGV[0] && $ARGV[0] =~ /\.mpx$/io ) { # catch -tex=.... bug in mpost
####
+if ($Version) {
+ $Purge = 1 ;
+ }
+
+####
+
if ($Paranoid) {
$ENV{shell_escape} = 'f' ;
$ENV{openout_any} = 'p' ;
@@ -406,6 +416,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
@@ -900,7 +920,7 @@ $OutputFormats{dviwindo} = "dviwindo";
$OutputFormats{dviview} = "dviview";
-my @ConTeXtFormats = ( "nl", "en", "de", "cz", "uk", "it", "ro", "xx");
+my @ConTeXtFormats = ( "nl", "en", "de", "fr", "cz", "uk", "it", "ro", "xx");
sub SetInterfaces {
my ( $short, $long, $full ) = @_;
@@ -915,8 +935,9 @@ sub SetInterfaces {
SetInterfaces( "nl", "dutch", "dutch" );
SetInterfaces( "en", "english", "english" );
SetInterfaces( "de", "german", "german" );
+SetInterfaces( "fr", "french", "french" );
SetInterfaces( "cz", "czech", "czech" );
-SetInterfaces( "uk", "brittish", "english" );
+SetInterfaces( "uk", "british", "english" );
SetInterfaces( "it", "italian", "italian" );
SetInterfaces( "no", "norwegian", "norwegian" );
SetInterfaces( "ro", "romanian", "romanian" );
@@ -1203,6 +1224,11 @@ sub MakeOptionFile {
print OPT "\\setupcolors[\\c!split=$Separation]\n";
}
if ($SetupPath) { print OPT "\\setupsystem[\\c!directory=\{$SetupPath\}]\n" }
+ if ($dosish) {
+ print OPT "\\setupsystem[\\c!type=mswin]\n"
+ } else { # no darwin handling in old texexec
+ print OPT "\\setupsystem[\\c!type=unix]\n"
+ }
print OPT "\\setupsystem[\\c!n=$KindOfRun]\n";
$_ = $PaperFormat;
#unless (($PdfArrange)||($PdfSelect)||($PdfCombine)||($PdfCopy))
@@ -1945,11 +1971,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"
}
}
}
@@ -2008,7 +2034,11 @@ sub checktexformatpath {
if ($texformats eq '') {
if ($UseEnginePath) {
if ($dosish) {
- $texformats = `kpsewhich --engine=$TeXExecutable --expand-var=\$TEXFORMATS` ;
+ if ( $TeXShell =~ /MikTeX/io ) {
+ $texformats = `kpsewhich --alias=$TeXExecutable --expand-var=\$TEXFORMATS` ;
+ } else {
+ $texformats = `kpsewhich --engine=$TeXExecutable --expand-var=\$TEXFORMATS` ;
+ }
} else {
$texformats = `kpsewhich --engine=$TeXExecutable --expand-var=\\\$TEXFORMATS` ;
}
@@ -2363,7 +2393,11 @@ sub LocatedFormatPath { # watch out $engine is lowercase in kpse
# expanded paths
print " assuming engine : $EnginePath\n";
if (($UseEnginePath)&&($EngineDone)) {
- $FormatPath = `$kpsewhich --engine=$EnginePath --show-path=fmt` ;
+ if ( $TeXShell =~ /MikTeX/io ) {
+ $FormatPath = `$kpsewhich --alias=$EnginePath --show-path=fmt` ;
+ } else {
+ $FormatPath = `$kpsewhich --engine=$EnginePath --show-path=fmt` ;
+ }
} else {
$FormatPath = `$kpsewhich --show-path=fmt` ;
}
@@ -2375,7 +2409,11 @@ sub LocatedFormatPath { # watch out $engine is lowercase in kpse
if ($FormatPath eq '') {
if (($UseEnginePath)&&($EngineDone)) {
if ($dosish) {
- $FormatPath = `$kpsewhich --engine=$EnginePath --expand-path=\$TEXFORMATS` ;
+ if ( $TeXShell =~ /MikTeX/io ) {
+ $FormatPath = `$kpsewhich --alias=$EnginePath --expand-path=\$TEXFORMATS` ;
+ } else {
+ $FormatPath = `$kpsewhich --engine=$EnginePath --expand-path=\$TEXFORMATS` ;
+ }
} else {
$FormatPath = `$kpsewhich --engine=$EnginePath --expand-path=\\\$TEXFORMATS` ;
}
@@ -2998,7 +3036,7 @@ sub show_version_info {
$contextversion = <IN>;
close IN;
}
- $contextversion =~ s/.*contextversion\{([0-9.]+)\}.*/$1/s;
+ $contextversion =~ s/.*contextversion\{([0-9\.\:\s]+)\}.*/$1/s;
}
$EnterBatchMode = 1;
$Format = 'cont-en';
@@ -3007,7 +3045,7 @@ sub show_version_info {
print " tex : $texengine\n" ;
print " context : ver: $contextversion\n" ;
print " cont-en : $type\n" ;
- foreach my $a (qw(cz de it nl ro uk xx)) {
+ foreach my $a (qw(cz de fr it nl ro uk xx)) {
my $test = Pipe("$kpsewhich -format='fmt' cont-$a") ;
if (defined $test && $test) {
$Format = 'cont-' . $a;
@@ -3063,6 +3101,9 @@ $TotalTime = time - $TotalTime;
unless ($HelpAsked) { print "\n total run time : $TotalTime seconds\n" }
+print "\n" ;
+print " warning : use 'texmfstart texexec' instead\n" ;
+
if ($Problems) { exit 1 }
__DATA__
@@ -3108,8 +3149,9 @@ interface user interface
=en English
=nl Dutch
=de German
+=fr French
=cz Czech
-=uk Brittish
+=uk British
=it Italian
-----------
language main hyphenation language
@@ -3136,7 +3178,7 @@ module typeset tex/pl/mp module
-----------
mptex run an MetaPost plus btex-etex cycle
-----------
-mpxtex generatet an MetaPostmpx file
+mpxtex generate an MetaPost mpx file
-----------
noarrange process but ignore arrange
-----------
@@ -3149,8 +3191,8 @@ automprun MetaPost at runtime when needed
once run TeX only once (no TeXUtil either)
-----------
output specials to use
-=pdftex Han The Than's pdf backend
-=dvips Thomas Rokicky's dvi to ps converter
+=pdftex Han The Thanh's pdf backend
+=dvips Tomas Rokicky's dvi to ps converter
=dvipsone YandY's dvi to ps converter
=dviwindo YandY's windows previewer
=dvipdfm Mark Wicks' dvi to pdf converter
@@ -3243,7 +3285,7 @@ verbose shows some additional info
-----------
help show this or more, e.g. '--help interface'
-----------
-alone bypass utilities (e.g. fmtutil for non-standard fmt's)
+alone bypass utilities (e.g. fmtutil for non-standard fmts)
-----------
texutil force TeXUtil run
-----------