From 94e8563927cb29baf940ea15f9f48c9e06e1f95c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 18 Jan 2011 19:34:00 +0100 Subject: beta 2011.01.18 19:34 --- scripts/context/lua/mtx-context.lua | 14 +++++++------- scripts/context/lua/mtx-patterns.lua | 1 - scripts/context/lua/mtxrun.lua | 10 +++++----- scripts/context/perl/mptopdf.pl | 19 ++++++++++++------- scripts/context/stubs/mswin/mtxrun.lua | 10 +++++----- scripts/context/stubs/unix/mtxrun | 10 +++++----- 6 files changed, 34 insertions(+), 30 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index 6e4eea39f..12ab2ecd8 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -1215,6 +1215,8 @@ local function touch(name,pattern) end end +local touchables = { "cont-new.mkii", "cont-new.mkiv" } + function scripts.context.touch() if environment.argument("expert") then local done, oldversion, newversion, foundname = touch("context.tex", "(\\edef\\contextversion{)(.-)(})") @@ -1222,13 +1224,11 @@ function scripts.context.touch() logs.simple("old version : %s", oldversion) logs.simple("new version : %s", newversion) logs.simple("touched file: %s", foundname) - local ok, _, _, foundname = touch("cont-new.tex", "(\\newcontextversion{)(.-)(})") - if ok then - logs.simple("touched file: %s", foundname) - end - local ok, _, _, foundname = touch("cont-xp.tex", "(\\edef\\contextversion{)(.-)(})") - if ok then - logs.simple("touched file: %s", foundname) + for i=1,#touchables do + local ok, _, _, foundname = touch(touchables[i], "(\\newcontextversion{)(.-)(})") + if ok then + logs.simple("touched file: %s", foundname) + end end end end diff --git a/scripts/context/lua/mtx-patterns.lua b/scripts/context/lua/mtx-patterns.lua index 0ea5d808d..cb5717c58 100644 --- a/scripts/context/lua/mtx-patterns.lua +++ b/scripts/context/lua/mtx-patterns.lua @@ -481,7 +481,6 @@ mtxrun --script pattern --check hyph-*.tex mtxrun --script pattern --check --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/tex --destination=e:/tmp/patterns mtxrun --script pattern --convert --path=c:/data/develop/svn-hyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/txt --destination=e:/tmp/patterns - ]] if environment.argument("check") then diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 75a527188..1944436f5 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -93,9 +93,9 @@ function string.count(str,pattern) -- variant 3 return n end -function string.limit(str,n,sentinel) +function string.limit(str,n,sentinel) -- not utf proof if #str > n then - sentinel = sentinel or " ..." + sentinel = sentinel or "..." return sub(str,1,(n-#sentinel)) .. sentinel else return str @@ -9766,12 +9766,12 @@ local suffixmap = allocate() resolvers.suffixmap = suffixmap local relations = allocate { -- todo: handlers also here core = { - ofm = { + ofm = { -- will become obsolete names = { "ofm", "omega font metric", "omega font metrics" }, variable = 'OFMFONTS', suffixes = { 'ofm', 'tfm' }, }, - ovf = { + ovf = { -- will become obsolete names = { "ovf", "omega virtual font", "omega virtual fonts" }, variable = 'OVFFONTS', suffixes = { 'ovf', 'vf' }, @@ -9821,7 +9821,7 @@ local relations = allocate { -- todo: handlers also here variable = 'TEXFORMATS', suffixes = { 'fmt' }, }, - mem = { + mem = { -- will become obsolete names = { 'mem', "metapost format" }, variable = 'MPMEMS', suffixes = { 'mem' }, diff --git a/scripts/context/perl/mptopdf.pl b/scripts/context/perl/mptopdf.pl index ec08c5306..374d8912a 100644 --- a/scripts/context/perl/mptopdf.pl +++ b/scripts/context/perl/mptopdf.pl @@ -38,14 +38,16 @@ my $PassOn = '' ; "rawmp" => \$RawMP, # option is now default, but keep for compat "metafun" => \$MetaFun, "passon" => \$PassOn, # option is ignored, but keep for compat - "latex" => \$Latex ) ; - -my $program = "MPtoPDF 1.4.0" ; -my $pattern = "@ARGV" ; # was $ARGV[0] -my $miktex = 0 ; -my $done = 0 ; -my $report = '' ; + "latex" => \$Latex, + "texexec" => \$TeXexec) ; + +my $program = "MPtoPDF 1.4.1" ; +my $pattern = "@ARGV" ; # was $ARGV[0] +my $miktex = 0 ; +my $done = 0 ; +my $report = '' ; my $mplatexswitch = " --tex=latex " ; +my $texexecswitch = " --tex=\"texexec --batch --once --nomp --mptex\" " # untested my $dosish = ($Config{'osname'} =~/^(ms)?dos|^os\/2|^mswin/i) ; my $escapeshell = (($ENV{'SHELL'}) && ($ENV{'SHELL'} =~ m/sh/i )); @@ -88,6 +90,9 @@ if (($pattern eq '')||($Help)) { if ($Latex) { $rest .= " $mplatexswitch" ; } + if ($TeXexec) { + $rest .= " $texexecswitch" ; + } if ($MetaFun) { $mpbin = "mpost --progname=mpost --mem=metafun" ; } else { diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 75a527188..1944436f5 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -93,9 +93,9 @@ function string.count(str,pattern) -- variant 3 return n end -function string.limit(str,n,sentinel) +function string.limit(str,n,sentinel) -- not utf proof if #str > n then - sentinel = sentinel or " ..." + sentinel = sentinel or "..." return sub(str,1,(n-#sentinel)) .. sentinel else return str @@ -9766,12 +9766,12 @@ local suffixmap = allocate() resolvers.suffixmap = suffixmap local relations = allocate { -- todo: handlers also here core = { - ofm = { + ofm = { -- will become obsolete names = { "ofm", "omega font metric", "omega font metrics" }, variable = 'OFMFONTS', suffixes = { 'ofm', 'tfm' }, }, - ovf = { + ovf = { -- will become obsolete names = { "ovf", "omega virtual font", "omega virtual fonts" }, variable = 'OVFFONTS', suffixes = { 'ovf', 'vf' }, @@ -9821,7 +9821,7 @@ local relations = allocate { -- todo: handlers also here variable = 'TEXFORMATS', suffixes = { 'fmt' }, }, - mem = { + mem = { -- will become obsolete names = { 'mem', "metapost format" }, variable = 'MPMEMS', suffixes = { 'mem' }, diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 75a527188..1944436f5 100755 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -93,9 +93,9 @@ function string.count(str,pattern) -- variant 3 return n end -function string.limit(str,n,sentinel) +function string.limit(str,n,sentinel) -- not utf proof if #str > n then - sentinel = sentinel or " ..." + sentinel = sentinel or "..." return sub(str,1,(n-#sentinel)) .. sentinel else return str @@ -9766,12 +9766,12 @@ local suffixmap = allocate() resolvers.suffixmap = suffixmap local relations = allocate { -- todo: handlers also here core = { - ofm = { + ofm = { -- will become obsolete names = { "ofm", "omega font metric", "omega font metrics" }, variable = 'OFMFONTS', suffixes = { 'ofm', 'tfm' }, }, - ovf = { + ovf = { -- will become obsolete names = { "ovf", "omega virtual font", "omega virtual fonts" }, variable = 'OVFFONTS', suffixes = { 'ovf', 'vf' }, @@ -9821,7 +9821,7 @@ local relations = allocate { -- todo: handlers also here variable = 'TEXFORMATS', suffixes = { 'fmt' }, }, - mem = { + mem = { -- will become obsolete names = { 'mem', "metapost format" }, variable = 'MPMEMS', suffixes = { 'mem' }, -- cgit v1.2.3