diff options
author | Hans Hagen <pragma@wxs.nl> | 2004-11-06 00:00:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2004-11-06 00:00:00 +0100 |
commit | 3fccc675f2b68a25c508bf217f97b1d54ca765af (patch) | |
tree | b0b9f929a586cf52975a02b1368f980d9374278b /scripts | |
parent | 0d505a4ff77ee18822e9ad84fe51a535c1c1b86d (diff) | |
download | context-3fccc675f2b68a25c508bf217f97b1d54ca765af.tar.gz |
stable 2004.11.06
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/perl/texexec.pl | 57 | ||||
-rw-r--r-- | scripts/context/perl/texfont.pl | 2 | ||||
-rw-r--r-- | scripts/context/perl/texutil.pl | 2 |
3 files changed, 55 insertions, 6 deletions
diff --git a/scripts/context/perl/texexec.pl b/scripts/context/perl/texexec.pl index 3d01f3011..523c2b1be 100644 --- a/scripts/context/perl/texexec.pl +++ b/scripts/context/perl/texexec.pl @@ -188,6 +188,7 @@ my $Filters = ''; my $NoMapFiles = 0 ; my $Foxet = 0 ; my $TheEnginePath = 0 ; +my $Paranoid = 0 ; my $StartLine = 0 ; my $StartColumn = 0 ; @@ -292,7 +293,8 @@ my $MakeMpy = ''; "nomapfiles" => \$NoMapFiles, "foxet" => \$Foxet, "engine" => \$TheEnginePath, - #### exxperiment + "paranoid" => \$Paranoid, + #### experiment "startline=s" => \$StartLine, "startcolumn=s" => \$StartColumn, "endline=s" => \$EndLine, @@ -320,6 +322,22 @@ if ( $ARGV[0] && $ARGV[0] =~ /\.mpx$/io ) { # catch -tex=.... bug in mpost $NoMPMode = 1; } +#### + +if ($Paranoid) { + $ENV{shell_escape} = 'f' ; + $ENV{openout_any} = 'p' ; + $ENV{openin_any} = 'p' ; +} + +if (($ENV{openout_any} eq 'p') || ($ENV{openin_any} eq 'p')) { + $Paranoid = 1 ; # extra test in order to set readlevel +} + +if (($ENV{shell_escape} eq 'f') || ($ENV{SHELL_ESCAPE} eq 'f')) { + $AutoMPRun = 1 ; +} + if ($ScreenSaver) { $ForceFullScreen = 1; $TypesetFigures = 'c'; @@ -347,6 +365,21 @@ if ($AutoPdf) { $PdfOpen = $PdfClose = 1 ; } +# this is our hook into paranoid path extensions, assumes that +# these three vars are part of path specs in texmf.cnf + +foreach my $i ('TXRESOURCES','MPRESOURCES','MFRESOURCES') { + foreach my $j ($RunPath,$InpPath) { + if ($j ne '') { + if ($ENV{$i} ne '') { + $ENV{$i} = $ENV{$i} . ',' . $j ; + } else { + $ENV{$i} = $j ; + } + } + } +} + if ( $RunOnce || $Pages || $TypesetFigures || $TypesetListing ) { $NOfRuns = 1 } if ( ( $LogFile ne '' ) && ( $LogFile =~ /\w+\.log$/io ) ) { @@ -355,7 +388,7 @@ if ( ( $LogFile ne '' ) && ( $LogFile =~ /\w+\.log$/io ) ) { *STDERR = *LOGFILE; } -my $Program = " TeXExec 5.0 - ConTeXt / PRAGMA ADE 1997-2004"; +my $Program = " TeXExec 5.2.2 - ConTeXt / PRAGMA ADE 1997-2004"; print "\n$Program\n\n"; @@ -1058,6 +1091,12 @@ sub MakeOptionFile { open( OPT, ">$JobName.top" ); print OPT "\% $JobName.top\n"; print OPT "\\unprotect\n"; + if ($EnterBatchMode) { print OPT "\\batchmode\n" } + if ($EnterNonStopMode) { print OPT "\\nonstopmode\n" } + if ($Paranoid) { + print " paranoid file mode : very true\n"; + print OPT "\\def\\maxreadlevel{1}\n" ; + } $ModeFile =~ s/\\/\//gio ; # do this at top of file $Result =~ s/\\/\//gio ; # do this at top of file if ( $ModeFile ne '' ) { print OPT "\\readlocfile{$ModeFile}{}{}" } @@ -1082,8 +1121,6 @@ sub MakeOptionFile { if ( $FullFormat ne 'standard' ) { print OPT "\\setupoutput[$FullFormat]\n"; } - if ($EnterBatchMode) { print OPT "\\batchmode\n" } - if ($EnterNonStopMode) { print OPT "\\nonstopmode\n" } if ($UseColor) { print OPT "\\setupcolors[\\c!state=\\v!start]\n" } if ( $NoMPMode || $NoMPRun || $AutoMPRun ) { print OPT "\\runMPgraphicsfalse\n"; @@ -2814,6 +2851,18 @@ if ($HelpAsked) { check_texmf_tree; @ARGV = <@ARGV>; RunFiles; +#~ } else { + #~ if ($Modules ne "") { # kind of fall back: texexec --use=set-02 --pdf + #~ my @tmp = split(',', $Modules) ; + #~ @ARGV[0] = @tmp[0] ; + #~ } + #~ if (@ARGV) { + #~ check_texmf_root; + #~ check_texmf_tree; + #~ RunFiles; + #~ } elsif ( !$HelpAsked ) { + #~ show_help_options; +#~ } } } elsif ( !$HelpAsked ) { show_help_options; } diff --git a/scripts/context/perl/texfont.pl b/scripts/context/perl/texfont.pl index bebb636f5..2b80a87d5 100644 --- a/scripts/context/perl/texfont.pl +++ b/scripts/context/perl/texfont.pl @@ -249,7 +249,7 @@ sub error { # The banner. print "\n" ; -report ("TeXFont 2.2 - ConTeXt / PRAGMA ADE 2000-2004") ; +report ("TeXFont 2.2.0 - ConTeXt / PRAGMA ADE 2000-2004") ; print "\n" ; # Handy for scripts: one can provide a preferred path, if it diff --git a/scripts/context/perl/texutil.pl b/scripts/context/perl/texutil.pl index e7f13ee3e..bcee7dbdb 100644 --- a/scripts/context/perl/texutil.pl +++ b/scripts/context/perl/texutil.pl @@ -40,7 +40,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $ #D binary version, like scanning illustrations other than \EPS. #D I would suggest to keep an eye on the version number: -$Program = "TeXUtil 9.0 - ConTeXt / PRAGMA ADE 1992-2004" ; +$Program = "TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004" ; #D By the way, this is my first \PERL\ script, which means #D that it will be improved as soon as I find new and/or more |