summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2005-11-09 00:00:00 +0100
committerHans Hagen <pragma@wxs.nl>2005-11-09 00:00:00 +0100
commit0746528ff3a98ee6e70c2121526c07507f614df9 (patch)
treeddbf33ef5d5d3b6c7cc55670b60a1d6d942c2777 /scripts
parent28ba5960fc4486f4e667ee0cbd802335483e1c99 (diff)
downloadcontext-0746528ff3a98ee6e70c2121526c07507f614df9.tar.gz
stable 2005.11.09
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/perl/mptopdf.pl10
-rw-r--r--scripts/context/perl/texexec.pl2
-rw-r--r--scripts/context/ruby/base/ctx.rb2
-rw-r--r--scripts/context/ruby/base/tex.rb2
-rw-r--r--scripts/context/ruby/base/texutil.rb12
-rw-r--r--scripts/context/ruby/texmfstart.rb6
6 files changed, 19 insertions, 15 deletions
diff --git a/scripts/context/perl/mptopdf.pl b/scripts/context/perl/mptopdf.pl
index 7a4ac2f30..2ab90be06 100644
--- a/scripts/context/perl/mptopdf.pl
+++ b/scripts/context/perl/mptopdf.pl
@@ -99,14 +99,12 @@ foreach my $file (@files)
{ $_ = $file ;
if (s/\.(\d+|mps)$// && -e $file)
{ if ($miktex)
- { $command = "pdfetex -undump=mptopdf" }
+ { $command = "pdfetex -undump=mptopdf" }
else
- { $command = "pdfetex -progname=context -fmt=mptopdf" }
+ { $command = "pdfetex -fmt=mptopdf -progname=context" }
if ($dosish)
- { $command = "$command \\relax $file" }
- else
- { $command = "$command \\\\relax $file" }
- #~ print $command ;
+ { $command = "$command \\relax $file" }
+ else #~ print $command ;
system($command) ;
rename ("$_.pdf", "$_-$1.pdf") ;
if (-e "$_.pdf") { CopyFile ("$_.pdf", "$_-$1.pdf") }
diff --git a/scripts/context/perl/texexec.pl b/scripts/context/perl/texexec.pl
index 2f3b89e04..a020727df 100644
--- a/scripts/context/perl/texexec.pl
+++ b/scripts/context/perl/texexec.pl
@@ -255,6 +255,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 +276,7 @@ my $MakeMpy = '';
"selection=s" => \$Selection,
"combination=s" => \$Combination,
"noduplex" => \$NoDuplex,
+ "offset=s" => \$PaperOffset,
"paperoffset=s" => \$PaperOffset,
"backspace=s" => \$BackSpace,
"topspace=s" => \$TopSpace,
diff --git a/scripts/context/ruby/base/ctx.rb b/scripts/context/ruby/base/ctx.rb
index 852c3f704..b1fda3c3a 100644
--- a/scripts/context/ruby/base/ctx.rb
+++ b/scripts/context/ruby/base/ctx.rb
@@ -101,7 +101,7 @@ class CtxRunner
@modules << justtext(mod)
end
REXML::XPath.each(@xmldata.root,"/ctx:job/ctx:process/ctx:resources/ctx:filter") do |fil|
- @filters << justtext(mod)
+ @filters << justtext(fil)
end
REXML::XPath.each(@xmldata.root,"/ctx:job/ctx:preprocess/ctx:files") do |files|
REXML::XPath.each(files,"ctx:file") do |pattern|
diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb
index 2cc9d2542..6132e5a26 100644
--- a/scripts/context/ruby/base/tex.rb
+++ b/scripts/context/ruby/base/tex.rb
@@ -1136,7 +1136,7 @@ class TEX
system("dvipdfmx -d 4 #{File.unsuffixed(rawname)}")
when 'xetex' then
fixbackendvars('xetex')
- system("xdv2pdf #{File.suffixed(jrawname,'xdv')}")
+ system("xdv2pdf #{File.suffixed(rawname,'xdv')}")
when 'dvips' then
fixbackendvars('dvips')
mapfiles = ''
diff --git a/scripts/context/ruby/base/texutil.rb b/scripts/context/ruby/base/texutil.rb
index c279bcc97..4c9bf6139 100644
--- a/scripts/context/ruby/base/texutil.rb
+++ b/scripts/context/ruby/base/texutil.rb
@@ -213,6 +213,7 @@ class TeXUtil
def preset(shortcuts=[],expansions=[],reductions=[],divisions=[])
# maybe we should move this to sort-def.tex
'a'.upto('z') do |c| expander(c) ; division(c) end
+ 'A'.upto('Z') do |c| expander(c) ; division(c) end
expander('1','b') ; expander('2','c') ; expander('3','e') ; expander('4','f')
expander('5','g') ; expander('6','h') ; expander('7','i') ; expander('8','i')
expander('9','j') ; expander('0','a') ; expander('-','-') ;
@@ -240,7 +241,7 @@ class TeXUtil
# what to do with xml and utf-8
# \"e etc
# unknown \cs
- s.gsub!(/\\[a-z][a-z]+\s*\{(.*?)\}/o) do $1 end
+ s.gsub!(/\\[a-zA-Z][a-zA-Z]+\s*\{(.*?)\}/o) do $1 end
return s
end
@@ -384,7 +385,7 @@ class TeXUtil
class Synonym
@@debug = false
- @@debug = true
+ # @@debug = true
def initialize(t, c, k, d)
@type, @command, @key, @sortkey, @data = t, c, k, k, d
@@ -463,7 +464,7 @@ class TeXUtil
class Register
@@debug = false
- @@debug = true
+ # @@debug = true
@@howto = /^(.*?)\:\:(.*)$/o
@@split = ' && '
@@ -505,7 +506,7 @@ class TeXUtil
@sortkey,
@texthowto.ljust(10,' '),
@state,
- @realpage.rjust(6,' '),
+ (@realpage ||'').rjust(6,' '),
@pagehowto
].join(@@split)
end
@@ -555,7 +556,7 @@ class TeXUtil
else
testalpha = entry.sortkey[0,1].downcase
end
- if testalpha != alpha.downcase or alphaclass != entry.class then
+ if testalpha != alpha.downcase || alphaclass != entry.class then
alpha = testalpha
alphaclass = entry.class
if alpha != ' ' then
@@ -614,6 +615,7 @@ class TeXUtil
Register.flushsavedline(handle)
handle << "\\registersee{#{entry.type}}{#{entry.pagehowto},#{entry.texthowto}}{#{entry.seetoo}}{#{entry.page}}\n" ;
lastpage, lastrealpage = entry.page, entry.realpage
+ copied = false # no page !
elsif @@savedhowto != entry.pagehowto and ! entry.pagehowto.empty? then
@@savedhowto = entry.pagehowto
end
diff --git a/scripts/context/ruby/texmfstart.rb b/scripts/context/ruby/texmfstart.rb
index dc166bf92..0dfd14263 100644
--- a/scripts/context/ruby/texmfstart.rb
+++ b/scripts/context/ruby/texmfstart.rb
@@ -36,7 +36,7 @@ require "rbconfig"
$mswindows = Config::CONFIG['host_os'] =~ /mswin/
$separator = File::PATH_SEPARATOR
-$version = "1.6.2"
+$version = "1.7.0"
if $mswindows then
@@ -71,6 +71,7 @@ $predefined['pstopdf'] = 'pstopdf.rb'
$predefined['examplex'] = 'examplex.rb'
$predefined['concheck'] = 'concheck.rb'
+$predefined['runtools'] = 'runtools.rb'
$predefined['textools'] = 'textools.rb'
$predefined['tmftools'] = 'tmftools.rb'
$predefined['ctxtools'] = 'ctxtools.rb'
@@ -384,6 +385,7 @@ def usage
print("switches : --verbose --report --browser --direct --execute --locate --iftouched\n")
print(" --program --file --page --arguments --batch --edit --report --clear\n")
print(" --make --lmake --wmake --path --stubpath --indirect --before --after\n")
+ print(" --tree\n")
print("\n")
print("example : texmfstart pstopdf.rb cow.eps\n")
print(" texmfstart --locate examplex.rb\n")
@@ -562,7 +564,7 @@ def find(filename,program)
fullname = result[0]
end
rescue
- report("locating '#{filename}.#{suffix}' in tree '#{texroot}' aborted")
+ report("locating '#{filename}.#{suffixlist.join('|')}' in tree '#{texroot}' aborted")
end
end
return shortpathname(fullname) if register(filename,fullname)