From b961771c7114a8181029ad495bded7872687307e Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 28 May 2006 13:28:00 +0200 Subject: stable 2006.05.28 13:28 --- scripts/context/ruby/base/kpsefast.rb | 10 +++++++--- scripts/context/ruby/base/tex.rb | 8 +++++--- scripts/context/ruby/texexec.rb | 5 +++-- scripts/context/ruby/texmfstart.rb | 10 +++++++--- 4 files changed, 22 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/context/ruby/base/kpsefast.rb b/scripts/context/ruby/base/kpsefast.rb index 49f58ae30..20c07c70a 100644 --- a/scripts/context/ruby/base/kpsefast.rb +++ b/scripts/context/ruby/base/kpsefast.rb @@ -97,9 +97,13 @@ module KpseUtil loop do busy = false filenames.collect! do |f| - f.gsub(/\$([a-zA-Z0-9\_\-]*)/o) do - busy = true - ENV[$1] || ("$#{$1}") + f.gsub(/\$([a-zA-Z0-9\_\-]+)/o) do + if (! ENV[$1]) || (ENV[$1] == $1) then + "$#{$1}" + else + busy = true + ENV[$1] + end end end break unless busy diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb index dc1362e90..61d857d19 100644 --- a/scripts/context/ruby/base/tex.rb +++ b/scripts/context/ruby/base/tex.rb @@ -142,7 +142,7 @@ class TEX # @@runoptions['xetex'] = ['--output-driver \\\"-d 4 -V 5\\\"'] # we need the pos pass @@runoptions['xetex'] = ['--no-pdf'] # from now on we assume (x)dvipdfmx to be used - @@runoptions['luatex'] = ['--progname=pdftex'] + # @@runoptions['luatex'] = ['--progname=pdftex'] @@booleanvars = [ 'batchmode', 'nonstopmode', 'fast', 'fastdisabled', 'silentmode', 'final', @@ -236,7 +236,7 @@ class TEX setvariable('engine', 'standard') # replaced by tex/mpsengine setvariable('backend', 'pdftex') setvariable('runs', '8') - setvariable('randomseed', rand(1440).to_s) + setvariable('randomseed', rand(1440).to_s) # we want the same seed for one run # files setvariable('files', []) # defaults @@ -710,6 +710,7 @@ class TEX @@preamblekeys = [ ['tex','texengine'], + ['engine','texengine'], ['program','texengine'], ['translate','tcxfilter'], ['tcx','tcxfilter'], @@ -1086,6 +1087,7 @@ class TEX opt << "\\setupenv[#{str}]\n" end if (str = getvariable('randomseed')) && ! str.empty? then + report("using randomseed #{str}") opt << "\\setupsystem[\\c!random=#{str}]\n" end if (str = getvariable('input')) && ! str.empty? then @@ -1110,7 +1112,7 @@ class TEX pagelist << page end end - opt << "\\def\\pagestoshipout\{pagelist.join(',')\}\n"; + opt << "\\def\\pagestoshipout\{#{pagelist.join(',')}\}\n"; end end opt << "\\protect\n"; diff --git a/scripts/context/ruby/texexec.rb b/scripts/context/ruby/texexec.rb index 4194874e9..b74b6c793 100644 --- a/scripts/context/ruby/texexec.rb +++ b/scripts/context/ruby/texexec.rb @@ -473,10 +473,10 @@ class Commands job.setvariable(k,@commandline.option(k)) end job.stringvars.each do |k| - job.setvariable(k,@commandline.option(k)) + job.setvariable(k,@commandline.option(k)) unless @commandline.option(k).empty? end job.standardvars.each do |k| - job.setvariable(k,@commandline.option(k)) + job.setvariable(k,@commandline.option(k)) unless @commandline.option(k).empty? end job.knownvars.each do |k| job.setvariable(k,@commandline.option(k)) unless @commandline.option(k).empty? @@ -649,6 +649,7 @@ end commandline.registerflag('pdf') commandline.registerflag('pdftex') commandline.registerflag('pdfetex') +commandline.registerflag('luatex') commandline.registerflag('dvipdfmx') commandline.registerflag('dvipdfm') diff --git a/scripts/context/ruby/texmfstart.rb b/scripts/context/ruby/texmfstart.rb index 6cb5d5ccb..e1d688f67 100644 --- a/scripts/context/ruby/texmfstart.rb +++ b/scripts/context/ruby/texmfstart.rb @@ -262,9 +262,13 @@ module KpseUtil loop do busy = false filenames.collect! do |f| - f.gsub(/\$([a-zA-Z0-9\_\-]*)/o) do - busy = true - ENV[$1] || ("$#{$1}") + f.gsub(/\$([a-zA-Z0-9\_\-]+)/o) do + if (! ENV[$1]) || (ENV[$1] == $1) then + "$#{$1}" + else + busy = true + ENV[$1] + end end end break unless busy -- cgit v1.2.3