diff options
author | Marius <mariausol@gmail.com> | 2012-12-06 20:00:13 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-12-06 20:00:13 +0200 |
commit | 7490fa4d0750f6f5769e53f84aba9c263479a48e (patch) | |
tree | c8d1e8f0f816009cb79238a636d9db3d4954f7ea | |
parent | c5eeba726820e576380fadff494ce494b625b6ae (diff) | |
download | context-7490fa4d0750f6f5769e53f84aba9c263479a48e.tar.gz |
beta 2012.12.06 18:39
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 39 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 39 | ||||
-rw-r--r-- | scripts/context/stubs/unix/mtxrun | 39 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4142 -> 4146 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 40036 -> 40551 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/l-file.lua | 61 | ||||
-rw-r--r-- | tex/context/base/spac-ver.mkiv | 68 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24519 -> 24533 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 199334 -> 199336 bytes | |||
-rw-r--r-- | tex/context/base/type-imp-texgyre.mkiv | 4 | ||||
-rw-r--r-- | tex/context/fonts/texgyre.lfg | 8 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 63 |
16 files changed, 237 insertions, 92 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 3a1972640..be3acb7da 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -3143,7 +3143,6 @@ function file.replacesuffix(filename, suffix) return (gsub(filename,"%.[%a%d]+$","")) .. "." .. suffix end - local trick_1 = char(1) local trick_2 = "^" .. trick_1 .. "/+" @@ -3170,6 +3169,44 @@ function file.join(...) -- rather dirty return (gsub(pth,"//+","/")) end +-- local slash = P("/") +-- local colon = P(":") + +-- local replacer = lpeg.replacer(S("\\/")^1,"/") +-- local stripper = Cs(P(slash)^0/"" * replacer) +-- local isnetwork = slash * slash * (1-slash) + (1-slash-colon)^1 * colon +-- local isroot = slash^1 * -1 +-- local hasroot = slash^1 + +-- function file.newjoin(...) -- rather dirty +-- local lst = { ... } +-- local one = lst[1] +-- if lpegmatch(isnetwork,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- return one .. two +-- elseif lpegmatch(isroot,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- if lpegmatch(hasroot,two) then +-- return two +-- else +-- return "/" .. two +-- end +-- elseif one == "" then +-- return lpegmatch(stripper,concat(lst,"/",2)) +-- else +-- return lpegmatch(replacer,concat(lst,"/")) +-- end +-- end + +-- print(file.join("//","/y")) +-- print(file.join("/","/y")) +-- print(file.join("","/y")) +-- print(file.join("/x/","/y")) +-- print(file.join("x/","/y")) +-- print(file.join("http://","/y")) +-- print(file.join("http://a","/y")) +-- print(file.join("http:///a","/y")) +-- print(file.join("//nas-1","/y")) -- We should be able to use: -- diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 3a1972640..be3acb7da 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -3143,7 +3143,6 @@ function file.replacesuffix(filename, suffix) return (gsub(filename,"%.[%a%d]+$","")) .. "." .. suffix end - local trick_1 = char(1) local trick_2 = "^" .. trick_1 .. "/+" @@ -3170,6 +3169,44 @@ function file.join(...) -- rather dirty return (gsub(pth,"//+","/")) end +-- local slash = P("/") +-- local colon = P(":") + +-- local replacer = lpeg.replacer(S("\\/")^1,"/") +-- local stripper = Cs(P(slash)^0/"" * replacer) +-- local isnetwork = slash * slash * (1-slash) + (1-slash-colon)^1 * colon +-- local isroot = slash^1 * -1 +-- local hasroot = slash^1 + +-- function file.newjoin(...) -- rather dirty +-- local lst = { ... } +-- local one = lst[1] +-- if lpegmatch(isnetwork,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- return one .. two +-- elseif lpegmatch(isroot,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- if lpegmatch(hasroot,two) then +-- return two +-- else +-- return "/" .. two +-- end +-- elseif one == "" then +-- return lpegmatch(stripper,concat(lst,"/",2)) +-- else +-- return lpegmatch(replacer,concat(lst,"/")) +-- end +-- end + +-- print(file.join("//","/y")) +-- print(file.join("/","/y")) +-- print(file.join("","/y")) +-- print(file.join("/x/","/y")) +-- print(file.join("x/","/y")) +-- print(file.join("http://","/y")) +-- print(file.join("http://a","/y")) +-- print(file.join("http:///a","/y")) +-- print(file.join("//nas-1","/y")) -- We should be able to use: -- diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 3a1972640..be3acb7da 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -3143,7 +3143,6 @@ function file.replacesuffix(filename, suffix) return (gsub(filename,"%.[%a%d]+$","")) .. "." .. suffix end - local trick_1 = char(1) local trick_2 = "^" .. trick_1 .. "/+" @@ -3170,6 +3169,44 @@ function file.join(...) -- rather dirty return (gsub(pth,"//+","/")) end +-- local slash = P("/") +-- local colon = P(":") + +-- local replacer = lpeg.replacer(S("\\/")^1,"/") +-- local stripper = Cs(P(slash)^0/"" * replacer) +-- local isnetwork = slash * slash * (1-slash) + (1-slash-colon)^1 * colon +-- local isroot = slash^1 * -1 +-- local hasroot = slash^1 + +-- function file.newjoin(...) -- rather dirty +-- local lst = { ... } +-- local one = lst[1] +-- if lpegmatch(isnetwork,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- return one .. two +-- elseif lpegmatch(isroot,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- if lpegmatch(hasroot,two) then +-- return two +-- else +-- return "/" .. two +-- end +-- elseif one == "" then +-- return lpegmatch(stripper,concat(lst,"/",2)) +-- else +-- return lpegmatch(replacer,concat(lst,"/")) +-- end +-- end + +-- print(file.join("//","/y")) +-- print(file.join("/","/y")) +-- print(file.join("","/y")) +-- print(file.join("/x/","/y")) +-- print(file.join("x/","/y")) +-- print(file.join("http://","/y")) +-- print(file.join("http://a","/y")) +-- print(file.join("http:///a","/y")) +-- print(file.join("//nas-1","/y")) -- We should be able to use: -- diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 057bc4ac9..7d9a14b94 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.12.06 15:01} +\newcontextversion{2012.12.06 18:39} %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/cont-new.mkiv b/tex/context/base/cont-new.mkiv index f248954ae..b42f5950a 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2012.12.06 15:01} +\newcontextversion{2012.12.06 18:39} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 320739877..1f24b3b44 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 77d607dea..3aabb7163 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 33a6922be..a7ac7da5e 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2012.12.06 15:01} +\edef\contextversion{2012.12.06 18:39} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index b630c9809..a4d349d30 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.12.06 15:01} +\edef\contextversion{2012.12.06 18:39} %D For those who want to use this: diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua index d47b13c30..03323d29e 100644 --- a/tex/context/base/l-file.lua +++ b/tex/context/base/l-file.lua @@ -105,20 +105,6 @@ function file.replacesuffix(filename, suffix) return (gsub(filename,"%.[%a%d]+$","")) .. "." .. suffix end ---~ function file.join(...) ---~ local pth = concat({...},"/") ---~ pth = gsub(pth,"\\","/") ---~ local a, b = match(pth,"^(.*://)(.*)$") ---~ if a and b then ---~ return a .. gsub(b,"//+","/") ---~ end ---~ a, b = match(pth,"^(//)(.*)$") ---~ if a and b then ---~ return a .. gsub(b,"//+","/") ---~ end ---~ return (gsub(pth,"//+","/")) ---~ end - local trick_1 = char(1) local trick_2 = "^" .. trick_1 .. "/+" @@ -145,15 +131,44 @@ function file.join(...) -- rather dirty return (gsub(pth,"//+","/")) end ---~ print(file.join("//","/y")) ---~ print(file.join("/","/y")) ---~ print(file.join("","/y")) ---~ print(file.join("/x/","/y")) ---~ print(file.join("x/","/y")) ---~ print(file.join("http://","/y")) ---~ print(file.join("http://a","/y")) ---~ print(file.join("http:///a","/y")) ---~ print(file.join("//nas-1","/y")) +-- local slash = P("/") +-- local colon = P(":") + +-- local replacer = lpeg.replacer(S("\\/")^1,"/") +-- local stripper = Cs(P(slash)^0/"" * replacer) +-- local isnetwork = slash * slash * (1-slash) + (1-slash-colon)^1 * colon +-- local isroot = slash^1 * -1 +-- local hasroot = slash^1 + +-- function file.newjoin(...) -- rather dirty +-- local lst = { ... } +-- local one = lst[1] +-- if lpegmatch(isnetwork,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- return one .. two +-- elseif lpegmatch(isroot,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- if lpegmatch(hasroot,two) then +-- return two +-- else +-- return "/" .. two +-- end +-- elseif one == "" then +-- return lpegmatch(stripper,concat(lst,"/",2)) +-- else +-- return lpegmatch(replacer,concat(lst,"/")) +-- end +-- end + +-- print(file.join("//","/y")) +-- print(file.join("/","/y")) +-- print(file.join("","/y")) +-- print(file.join("/x/","/y")) +-- print(file.join("x/","/y")) +-- print(file.join("http://","/y")) +-- print(file.join("http://a","/y")) +-- print(file.join("http:///a","/y")) +-- print(file.join("//nas-1","/y")) -- We should be able to use: -- diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv index 2dcc654e2..eb05f66dc 100644 --- a/tex/context/base/spac-ver.mkiv +++ b/tex/context/base/spac-ver.mkiv @@ -20,7 +20,6 @@ % todo: itemize : intro ... only when there is one or two lines preceding and then % keep these together i.e. \blank[intro] - % Isn't it about time to get rid of topskip i.e. make it equivalent to % \openstrutheight so that we can remove delta code. % @@ -1917,50 +1916,55 @@ \installdirectcommandhandler \??hanging {hanging} \setuphanging - [\c!distance=.5em] + [\c!distance=.5\emwidth, + \c!location=\v!left, + \c!n=\zerocount] \unexpanded\def\starthanging - {\noindent\bgroup - \dowithnextboxcs\spac_hanging_finish\hbox} - -\def\spac_hanging_finish - {\setbox\nextbox\hbox - {\box\nextbox - \hskip\directhangingparameter\c!distance}% - \hangindent\wd\nextbox - \hangafter\plusone - \box\nextbox - \ignorespaces} + {\dontleavehmode\bgroup + \dosingleempty\spac_hanging_start} \unexpanded\def\stophanging {\endgraf \egroup} -\unexpanded\def\starthangaround - {\noindent\bgroup - \dowithnextboxcs\spac_hanging_around_finish\hbox} +\let\m_spac_hanging_location\empty + +\def\spac_hanging_start[#1]% + {\doifassignmentelse{#1} + {\let\m_spac_hanging_location\empty + \setupcurrenthanging[#1]}% + {\edef\m_spac_hanging_location{#1}}% + \ifx\m_spac_hanging_location\empty + \edef\m_spac_hanging_location{\directhangingparameter\c!location}% + \fi + \dowithnextboxcs\spac_hanging_finish\hbox} -\def\spac_hanging_around_finish - {\ifdim\nextboxht>\strutht - \setbox\nextbox\tbox - {\box\nextbox}% +\def\spac_hanging_finish + {\scratchdistance\directhangingparameter\c!distance\relax + \ifdim\ht\nextbox>\strutht + \setbox\nextbox\tbox{\box\nextbox}% + \fi + \scratchcounter\directhangingparameter\c!n\relax + \ifnum\scratchcounter>\zerocount + \hangafter-\scratchcounter + \else + \getboxheight\scratchdimen\of\box\nextbox + \getnoflines\scratchdimen + \hangafter-\noflines \fi - \setbox\nextbox\hbox - {\box\nextbox - \hskip\directhangingparameter\c!distance}% - \getboxheight\scratchdimen\of\box\nextbox - \getnoflines\scratchdimen \ht\nextbox\strutht \dp\nextbox\strutdp - \hangindent\wd\nextbox - \hangafter-\noflines - \llap{\box\nextbox}% + \scratchwidth\dimexpr\wd\nextbox+\scratchdistance\relax + \ifx\m_spac_hanging_location\v!right + \hangindent-\scratchwidth + \rlap{\hskip\dimexpr\hsize-\wd\nextbox\relax\box\nextbox}% + \else + \hangindent\scratchwidth + \llap{\box\nextbox\hskip\scratchdistance}% + \fi \ignorespaces} -\unexpanded\def\stophangaround - {\endgraf - \egroup} - %D \macros %D {startfixed} %D diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 53850f889..da59bd28c 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 2cc31b488..d4b46d04b 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/type-imp-texgyre.mkiv b/tex/context/base/type-imp-texgyre.mkiv index f956f731f..c0fb7cec0 100644 --- a/tex/context/base/type-imp-texgyre.mkiv +++ b/tex/context/base/type-imp-texgyre.mkiv @@ -217,7 +217,7 @@ \starttypescript [\s!math][times,termes][\s!all] \loadfontgoodies[texgyre] - \definefontsynonym[\s!MathRoman][file:tgtermesmath-regular.otf][\s!features=\s!math\mathsizesuffix] + \definefontsynonym[\s!MathRoman][file:texgyretermesmath-regular.otf][\s!features=\s!math\mathsizesuffix] \stoptypescript \stoptypescriptcollection @@ -244,7 +244,7 @@ \starttypescript [\s!math][palatino,pagella][\s!all] \loadfontgoodies[texgyre] - \definefontsynonym[\s!MathRoman][file:tgpagellamath-regular.otf][\s!features=\s!math\mathsizesuffix] + \definefontsynonym[\s!MathRoman][file:texgyrepagellamath-regular.otf][\s!features=\s!math\mathsizesuffix] \stoptypescript \stoptypescriptcollection diff --git a/tex/context/fonts/texgyre.lfg b/tex/context/fonts/texgyre.lfg index df0313e48..a0f6d29b2 100644 --- a/tex/context/fonts/texgyre.lfg +++ b/tex/context/fonts/texgyre.lfg @@ -5,12 +5,12 @@ return { author = "Hans Hagen", copyright = "ConTeXt development team", filenames = { - ["tgpagellamath-regular.otf"] = { - "texgyrepagella-math.otf", + ["texgyrepagellamath-regular.otf"] = { + "tgpagellamath-regular.otf", "tgpagella-math.otf", }, - ["tgtermesmath-regular.otf"] = { - "texgyretermes-math.otf", + ["texgyretermesmath-regular.otf"] = { + "tgtermesmath-regular.otf", "tgtermes-math.otf", }, }, diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index e4c16421f..e29b47f55 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 12/06/12 15:01:05 +-- merge date : 12/06/12 18:39:21 do -- begin closure to overcome local limits and interference @@ -2252,20 +2252,6 @@ function file.replacesuffix(filename, suffix) return (gsub(filename,"%.[%a%d]+$","")) .. "." .. suffix end ---~ function file.join(...) ---~ local pth = concat({...},"/") ---~ pth = gsub(pth,"\\","/") ---~ local a, b = match(pth,"^(.*://)(.*)$") ---~ if a and b then ---~ return a .. gsub(b,"//+","/") ---~ end ---~ a, b = match(pth,"^(//)(.*)$") ---~ if a and b then ---~ return a .. gsub(b,"//+","/") ---~ end ---~ return (gsub(pth,"//+","/")) ---~ end - local trick_1 = char(1) local trick_2 = "^" .. trick_1 .. "/+" @@ -2292,15 +2278,44 @@ function file.join(...) -- rather dirty return (gsub(pth,"//+","/")) end ---~ print(file.join("//","/y")) ---~ print(file.join("/","/y")) ---~ print(file.join("","/y")) ---~ print(file.join("/x/","/y")) ---~ print(file.join("x/","/y")) ---~ print(file.join("http://","/y")) ---~ print(file.join("http://a","/y")) ---~ print(file.join("http:///a","/y")) ---~ print(file.join("//nas-1","/y")) +-- local slash = P("/") +-- local colon = P(":") + +-- local replacer = lpeg.replacer(S("\\/")^1,"/") +-- local stripper = Cs(P(slash)^0/"" * replacer) +-- local isnetwork = slash * slash * (1-slash) + (1-slash-colon)^1 * colon +-- local isroot = slash^1 * -1 +-- local hasroot = slash^1 + +-- function file.newjoin(...) -- rather dirty +-- local lst = { ... } +-- local one = lst[1] +-- if lpegmatch(isnetwork,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- return one .. two +-- elseif lpegmatch(isroot,one) then +-- local two = lpegmatch(replacer,concat(lst,"/",2)) +-- if lpegmatch(hasroot,two) then +-- return two +-- else +-- return "/" .. two +-- end +-- elseif one == "" then +-- return lpegmatch(stripper,concat(lst,"/",2)) +-- else +-- return lpegmatch(replacer,concat(lst,"/")) +-- end +-- end + +-- print(file.join("//","/y")) +-- print(file.join("/","/y")) +-- print(file.join("","/y")) +-- print(file.join("/x/","/y")) +-- print(file.join("x/","/y")) +-- print(file.join("http://","/y")) +-- print(file.join("http://a","/y")) +-- print(file.join("http:///a","/y")) +-- print(file.join("//nas-1","/y")) -- We should be able to use: -- |