From bfb9867b1e778691f01de03b5b55fcb1598f314c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 23 Nov 2006 14:46:00 +0100 Subject: stable 2006.11.23 14:46 --- scripts/context/ruby/base/tex.rb | 47 +++++++++++----------- tex/context/base/cont-new.tex | 2 +- tex/context/base/context.tex | 2 +- tex/context/base/core-spa.tex | 83 ++++++++++++++++++++------------------- tex/context/base/page-mul.tex | 22 +++++++---- tex/context/base/s-map-10.tex | 2 + tex/context/base/supp-mps.tex | 2 + tex/context/interface/cont-cz.xml | 3 ++ tex/context/interface/cont-de.xml | 3 ++ tex/context/interface/cont-en.xml | 3 ++ tex/context/interface/cont-fr.xml | 3 ++ tex/context/interface/cont-it.xml | 3 ++ tex/context/interface/cont-nl.xml | 3 ++ tex/context/interface/cont-ro.xml | 3 ++ tex/context/interface/keys-cz.xml | 2 +- tex/context/interface/keys-de.xml | 2 +- tex/context/interface/keys-en.xml | 2 +- tex/context/interface/keys-fr.xml | 2 +- tex/context/interface/keys-it.xml | 2 +- tex/context/interface/keys-nl.xml | 2 +- tex/context/interface/keys-ro.xml | 2 +- 21 files changed, 113 insertions(+), 82 deletions(-) diff --git a/scripts/context/ruby/base/tex.rb b/scripts/context/ruby/base/tex.rb index d7b4fb392..25e7ba5d7 100644 --- a/scripts/context/ruby/base/tex.rb +++ b/scripts/context/ruby/base/tex.rb @@ -145,6 +145,8 @@ class TEX ['plain','mpost'] .each do |f| @@mpsformats[f] = 'plain' end ['metafun','context','standard'] .each do |f| @@mpsformats[f] = 'metafun' end + # no 'standard' progname ! / beware, when using texexec we always use the context/metafun values + ['pdftex','pdfetex','aleph','omega', 'xetex','luatex'] .each do |p| @@prognames[p] = 'context' end ['mpost'] .each do |p| @@prognames[p] = 'metafun' end @@ -281,7 +283,7 @@ class TEX setvariable('distribution', Kpse.distribution) setvariable('texformats', defaulttexformats) setvariable('mpsformats', defaultmpsformats) - setvariable('progname', 'context') + setvariable('progname', 'standard') # or '' setvariable('interface', 'standard') setvariable('engine', 'standard') # replaced by tex/mpsengine setvariable('backend', 'pdftex') @@ -456,13 +458,13 @@ class TEX end end - def validprogname(str,engine='standard') - if str && @@prognames.key?(str) then - @@prognames[str] - elsif (engine != 'standard') && @@prognames.key?(engine) then - @@prognames[engine] + def validprogname(str) + if str then + [str].flatten.each do |s| + return @@prognames[s] if @@prognames.key?(s) + end else - str + return nil end end @@ -507,12 +509,8 @@ class TEX when /miktex/io then prefix = "-alias" else return "" end - if progname then - if progname = validprogname(progname) then - "#{prefix}=#{progname}" - else - "" - end + if progname and not progname.empty? then + "#{prefix}=#{progname}" else prefix end @@ -612,7 +610,7 @@ class TEX unless texformats || mpsformats then report('provide valid format (name.tex, name.mp, ...) or format id (metafun, en, nl, ...)') end - if texformats && texengine && (progname = validprogname(getvariable('progname'),texengine)) then + if texformats && texengine then report("using tex engine #{texengine}") texformatpath = if getvariable('local') then '.' else Kpse.formatpath(texengine,true) end # can be empty, to do @@ -627,12 +625,13 @@ class TEX cleanupluafiles texformats.each do |texformat| report("generating tex format #{texformat}") -run_luatools("--ini --compile #{texformat}") + run_luatools("--ini --compile #{texformat}") end compileluafiles else texformats.each do |texformat| report("generating tex format #{texformat}") + progname = validprogname([getvariable('progname'),texformat,texengine]) runcommand([quoted(texengine),prognameflag(progname),iniflag,tcxflag,prefixed(texformat,texengine),texmakeextras(texformat)]) end end @@ -644,7 +643,7 @@ run_luatools("--ini --compile #{texformat}") texformatpath = '' end # generate mps formats - if mpsformats && mpsengine && (progname = validprogname(getvariable('progname'),mpsengine)) then + if mpsformats && mpsengine then report("using mp engine #{mpsengine}") mpsformatpath = if getvariable('local') then '.' else Kpse.formatpath(mpsengine,false) end report("using mps format path #{mpsformatpath}") @@ -652,8 +651,8 @@ run_luatools("--ini --compile #{texformat}") if FileTest.writable?(mpsformatpath) then mpsformats.each do |mpsformat| report("generating mps format #{mpsformat}") + progname = validprogname([getvariable('progname'),mpsformat,mpsengine]) runcommand([quoted(mpsengine),prognameflag(progname),iniflag,tcxflag,runoptions(mpsengine),mpsformat,mpsmakeextras(mpsformat)]) - # runcommand([quoted(mpsengine),iniflag,tcxflag,mpsformat,mpsmakeextras(mpsformat)]) end else report("unable to make format due to lack of permissions") @@ -1285,7 +1284,8 @@ class TEX opt << "\\enableregime[utf]" end opt << "\\setupsystem[\\c!n=#{kindofrun},\\c!m=#{currentrun}]\n" - opt << "\\def\\MPOSTformatswitch\{#{prognameflag('metafun')} #{formatflag('mpost')}=\}\n" + progname = validprogname(['metafun']) # [getvariable('progname'),mpsformat,mpsengine] + opt << "\\def\\MPOSTformatswitch\{#{prognameflag(progname)} #{formatflag('mpost')}=\}\n" if getvariable('batchmode') then opt << "\\batchmode\n" end @@ -1495,15 +1495,14 @@ class TEX checktestversion texengine = validtexengine(getvariable('texengine')) texformat = validtexformat(getarrayvariable('texformats').first) - progname = validprogname(getvariable('progname')) report("tex engine: #{texengine}") report("tex format: #{texformat}") - report("progname: #{progname}") - if texengine && texformat && progname then + if texengine && texformat then fixbackendvars(@@mappaths[texengine]) if texengine == "luatex" then run_luatools("--fmt=#{texformat} #{filename}") else + progname = validprogname([getvariable('progname'),texformat,texengine]) runcommand([quoted(texengine),prognameflag(progname),formatflag(texengine,texformat),tcxflag,runoptions(texengine),filename,texprocextras(texformat)]) end # true @@ -1516,10 +1515,10 @@ end checktestversion mpsengine = validmpsengine(getvariable('mpsengine')) mpsformat = validmpsformat(getarrayvariable('mpsformats').first) - progname = validprogname(getvariable('progname')) - if mpsengine && mpsformat && progname then + if mpsengine && mpsformat then ENV["MPXCOMMAND"] = "0" unless mpx - runcommand([quoted(mpsengine),prognameflag(progname),formatflag(mpsengine,mpsformat),tcxflag,runoptions(mpsengine),filename,mpsprocextras(mpsformat)]) + progname = validprogname([getvariable('progname'),mpsformat,mpsengine]) + runcommand([quoted(mpsengine),prognameflag(progname),formatflag(mpsengine,mpsformat),tcxflag,runoptions(mpsengine),mpname,mpsprocextras(mpsformat)]) # runcommand([quoted(mpsengine),formatflag(mpsengine,mpsformat),tcxflag,runoptions(mpsengine),mpname,mpsprocextras(mpsformat)]) true else diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index f78a4b41d..806d17386 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -13,7 +13,7 @@ % it's about time to clean up this file ... -\newcontextversion{2006.11.20 09:49} +\newcontextversion{2006.11.23 14:46} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index eb1bb26ac..d3f5362bf 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -42,7 +42,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2006.11.22 11:02} +\edef\contextversion{2006.11.23 14:46} %D For those who want to use this: diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex index c498ee015..e41f19215 100644 --- a/tex/context/base/core-spa.tex +++ b/tex/context/base/core-spa.tex @@ -3823,51 +3823,52 @@ % \setupalign[reset,new,right,old] - \def\@@align@@rl{\if!!donea\veryraggedleft \else\raggedleft \fi} \def\@@align@@rr{\if!!donea\veryraggedright \else\raggedright \fi} \def\@@align@@rc{\if!!donea\veryraggedcenter\else\raggedcenter\fi} -\setvalue{@@align@@\v!new }{\@@asraggedfalse} -\setvalue{@@align@@\v!old }{\@@asraggedtrue} -\setvalue{@@align@@ }{} - -\setvalue{@@align@@\v!line }{\baselinebottom} -\setvalue{@@align@@\v!bottom }{\raggedbottom} -\setvalue{@@align@@\v!height }{\normalbottom} -\setvalue{@@align@@\v!width }{\notragged} -\setvalue{@@align@@\v!normal }{\notragged} -\setvalue{@@align@@\v!yes }{\notragged} -\setvalue{@@align@@\v!no }{\raggedright} -\setvalue{@@align@@\v!inner }{\if@@asragged \setraggedparagraphmode\@@align@@rl\@@align@@rr \else - \setraggedparagraphmode\@@align@@rr\@@align@@rl \fi} -\setvalue{@@align@@\v!outer }{\if@@asragged \setraggedparagraphmode\@@align@@rr\@@align@@rl \else - \setraggedparagraphmode\@@align@@rl\@@align@@rr \fi} -\setvalue{@@align@@\v!left }{\if@@asragged\@@align@@rl\else\@@align@@rr\fi} -\setvalue{@@align@@\v!right }{\if@@asragged\@@align@@rr\else\@@align@@rl\fi} -\setvalue{@@align@@\v!middle }{\if!!doneb\raggedwidecenter\else\@@align@@rc\fi} -\setvalue{@@align@@\v!flushleft }{\if!!donea\veryraggedright \else\raggedright\fi} -\setvalue{@@align@@\v!flushright }{\if!!donea\veryraggedleft \else\raggedleft \fi} -\setvalue{@@align@@\v!flushouter }{\setraggedparagraphmode\raggedleft\raggedright} -\setvalue{@@align@@\v!flushinner }{\setraggedparagraphmode\raggedright\raggedleft} -\setvalue{@@align@@\v!center }{\if!!doneb\raggedwidecenter\else\@@align@@rc\fi} -\setvalue{@@align@@\v!hanging }{\enableprotruding} -\setvalue{@@align@@\v!nothanging }{\disableprotruding} -\setvalue{@@align@@\v!hz }{\enableadjusting} -\setvalue{@@align@@\v!nohz }{\disableadjusting} -\setvalue{@@align@@\v!spacing }{\enablespacehandling \enablekernhandling} -\setvalue{@@align@@\v!nospacing }{\disablespacehandling\disablekernhandling} -\setvalue{@@align@@\v!hyphenated }{\dohyphens} -\setvalue{@@align@@\v!nothyphenated}{\nohyphens} -\setvalue{@@align@@\v!new }{\@@asraggedfalse} % so new will give you consistency -\setvalue{@@align@@\v!reset }{\notragged\normalbottom} - -\setvalue{@@align@@\v!tolerant }{\tolerance3000 \relax} -\setvalue{@@align@@\v!verytolerant}{\tolerance4500 \relax} -\setvalue{@@align@@\v!stretch }{\emergencystretch\bodyfontsize} - -\setvalue{@@ngila@@\v!broad }{\!!doneatrue} -\setvalue{@@ngila@@\v!wide }{\!!donebtrue} +\setvalue{@@ngila@@\v!broad }{\!!doneatrue} +\setvalue{@@ngila@@\v!wide }{\!!donebtrue} + +\def\installalign#1#2{\setvalue{@@align@@#1}{#2}} % can be used for overloads + +\installalign \v!new {\@@asraggedfalse} +\installalign \v!old {\@@asraggedtrue} +\installalign \empty {} + +\installalign \v!line {\baselinebottom} +\installalign \v!bottom {\raggedbottom} +\installalign \v!height {\normalbottom} +\installalign \v!width {\notragged} +\installalign \v!normal {\notragged} +\installalign \v!yes {\notragged} +\installalign \v!no {\raggedright} +\installalign \v!inner {\if@@asragged \setraggedparagraphmode\@@align@@rl\@@align@@rr \else + \setraggedparagraphmode\@@align@@rr\@@align@@rl \fi} +\installalign \v!outer {\if@@asragged \setraggedparagraphmode\@@align@@rr\@@align@@rl \else + \setraggedparagraphmode\@@align@@rl\@@align@@rr \fi} +\installalign \v!left {\if@@asragged\@@align@@rl\else\@@align@@rr\fi} +\installalign \v!right {\if@@asragged\@@align@@rr\else\@@align@@rl\fi} +\installalign \v!middle {\if!!doneb\raggedwidecenter\else\@@align@@rc\fi} +\installalign \v!flushleft {\if!!donea\veryraggedright \else\raggedright\fi} +\installalign \v!flushright {\if!!donea\veryraggedleft \else\raggedleft \fi} +\installalign \v!flushouter {\setraggedparagraphmode\raggedleft\raggedright} +\installalign \v!flushinner {\setraggedparagraphmode\raggedright\raggedleft} +\installalign \v!center {\if!!doneb\raggedwidecenter\else\@@align@@rc\fi} +\installalign \v!hanging {\enableprotruding} +\installalign \v!nothanging {\disableprotruding} +\installalign \v!hz {\enableadjusting} +\installalign \v!nohz {\disableadjusting} +\installalign \v!spacing {\enablespacehandling \enablekernhandling} +\installalign \v!nospacing {\disablespacehandling\disablekernhandling} +\installalign \v!hyphenated {\dohyphens} +\installalign \v!nothyphenated {\nohyphens} +\installalign \v!new {\@@asraggedfalse} % so new will give you consistency +\installalign \v!reset {\notragged\normalbottom} + +\installalign \v!tolerant {\tolerance3000 \relax} +\installalign \v!verytolerant {\tolerance4500 \relax} +\installalign \v!stretch {\emergencystretch\bodyfontsize} \def\dodosetupalign#1{\csname @@align@@#1\endcsname} \def\dodosetupngila#1{\csname @@ngila@@#1\endcsname} diff --git a/tex/context/base/page-mul.tex b/tex/context/base/page-mul.tex index 4fd0979f8..edbf6206e 100644 --- a/tex/context/base/page-mul.tex +++ b/tex/context/base/page-mul.tex @@ -1654,14 +1654,20 @@ \doifelse\@@klbalance\v!yes \balancecolumnstrue \balancecolumnsfalse - \processaction % ook nog: laatsteuitlijnen - [\@@klalign] - [ \v!yes=>\stretchcolumnstrue - \inheritcolumnsfalse, - \v!no=>\stretchcolumnsfalse - \inheritcolumnsfalse, - \v!text=>\stretchcolumnsfalse - \inheritcolumnstrue]% +\installalign\v!yes {\stretchcolumnstrue \inheritcolumnsfalse}% todo: new key +\installalign\v!no {\stretchcolumnsfalse\inheritcolumnsfalse}% todo: new key +\installalign\v!text{\stretchcolumnsfalse\inheritcolumnstrue }% +\stretchcolumnsfalse +\inheritcolumnstrue +\doifsomething\@@klalign{\expanded{\setupalign[\@@klalign]}}% +% \processaction +% [\@@klalign] +% [ \v!yes=>\stretchcolumnstrue +% \inheritcolumnsfalse, +% \v!no=>\stretchcolumnsfalse +% \inheritcolumnsfalse, +% \v!text=>\stretchcolumnsfalse +% \inheritcolumnstrue]% \nofcolumns=\@@kln % % probably more is needed, and how about nesting save's diff --git a/tex/context/base/s-map-10.tex b/tex/context/base/s-map-10.tex index 800eb5c15..ec7ef6128 100644 --- a/tex/context/base/s-map-10.tex +++ b/tex/context/base/s-map-10.tex @@ -36,6 +36,8 @@ \doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn \doifnotmode{onecolumn}{\MapsInColumnstrue} +\enablemode[realfonts] + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% fonts diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex index e03ef826c..d6e015372 100644 --- a/tex/context/base/supp-mps.tex +++ b/tex/context/base/supp-mps.tex @@ -388,6 +388,8 @@ \fi \next} +\appendtoks \obeyMPlines \to \everyMPgraphic % more efficient than in each following grouped write + \long\def\writeMPgraphiclongR#1% fast, no scanning {\bgroup \let\par\space diff --git a/tex/context/interface/cont-cz.xml b/tex/context/interface/cont-cz.xml index 8ec1415b9..62d966373 100644 --- a/tex/context/interface/cont-cz.xml +++ b/tex/context/interface/cont-cz.xml @@ -3226,6 +3226,9 @@ + + + diff --git a/tex/context/interface/cont-de.xml b/tex/context/interface/cont-de.xml index 2268f5418..65040942f 100644 --- a/tex/context/interface/cont-de.xml +++ b/tex/context/interface/cont-de.xml @@ -3226,6 +3226,9 @@ + + + diff --git a/tex/context/interface/cont-en.xml b/tex/context/interface/cont-en.xml index 45ddc5718..6a730113a 100644 --- a/tex/context/interface/cont-en.xml +++ b/tex/context/interface/cont-en.xml @@ -3226,6 +3226,9 @@ + + + diff --git a/tex/context/interface/cont-fr.xml b/tex/context/interface/cont-fr.xml index 04c9b4692..e78ea5126 100644 --- a/tex/context/interface/cont-fr.xml +++ b/tex/context/interface/cont-fr.xml @@ -3226,6 +3226,9 @@ + + + diff --git a/tex/context/interface/cont-it.xml b/tex/context/interface/cont-it.xml index 25a2c0356..04fdcdb59 100644 --- a/tex/context/interface/cont-it.xml +++ b/tex/context/interface/cont-it.xml @@ -3226,6 +3226,9 @@ + + + diff --git a/tex/context/interface/cont-nl.xml b/tex/context/interface/cont-nl.xml index e8e3f067b..8f7fc5816 100644 --- a/tex/context/interface/cont-nl.xml +++ b/tex/context/interface/cont-nl.xml @@ -3226,6 +3226,9 @@ + + + diff --git a/tex/context/interface/cont-ro.xml b/tex/context/interface/cont-ro.xml index e8df14520..bab6f0fbf 100644 --- a/tex/context/interface/cont-ro.xml +++ b/tex/context/interface/cont-ro.xml @@ -3226,6 +3226,9 @@ + + + diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml index e91d53373..41dd16b5a 100644 --- a/tex/context/interface/keys-cz.xml +++ b/tex/context/interface/keys-cz.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index e17db3f37..b1d783864 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index ebba9e5e7..7b79bf38f 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index f2ecd90ae..5fabbce7d 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index d221d91fa..a001ef65f 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index 82380fd1a..fb4ce4d4d 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -1,6 +1,6 @@ - + diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index 6c817d52d..c4c87b96e 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -1,6 +1,6 @@ - + -- cgit v1.2.3