diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-05-28 19:03:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-05-28 19:03:00 +0200 |
commit | 64fa8007415f14472d59bdeaa4745815f13318f3 (patch) | |
tree | e576761841c09de4db4feef701d74c63ed9dd7ad /tex/context/base | |
parent | 61b984d4eeb8c8c18d002f4677a91e663786cf2d (diff) | |
download | context-64fa8007415f14472d59bdeaa4745815f13318f3.tar.gz |
beta 2012.05.28 19:03
Diffstat (limited to 'tex/context/base')
24 files changed, 93 insertions, 48 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index ad5bf64cd..6ae7bd6ad 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.05.26 16:40} +\newcontextversion{2012.05.28 19:03} %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 ecb1e2210..621ed0d0f 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.05.26 16:40} +\newcontextversion{2012.05.28 19:03} %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-version.pdf b/tex/context/base/context-version.pdf Binary files differindex bf6d22796..eb6467324 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 04cf48f56..8e975bac9 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 3a8e0ad0a..2b42c1771 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.05.26 16:40} +\edef\contextversion{2012.05.28 19:03} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index ddad74ad6..8148fb698 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.05.26 16:40} +\edef\contextversion{2012.05.28 19:03} %D For those who want to use this: diff --git a/tex/context/base/data-sch.lua b/tex/context/base/data-sch.lua index 6c905942a..253adb9f6 100644 --- a/tex/context/base/data-sch.lua +++ b/tex/context/base/data-sch.lua @@ -32,7 +32,7 @@ function cleaners.none(specification) end function cleaners.strip(specification) - return (gsub(specification.original,"[^%a%d%.]+","-")) + return (gsub(specification.original,"[^%a%d%.]+","-")) -- so we keep periods end function cleaners.md5(specification) diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua index 13c9985fa..33dd0766d 100644 --- a/tex/context/base/grph-inc.lua +++ b/tex/context/base/grph-inc.lua @@ -471,7 +471,16 @@ local function register(askedname,specification) local oldname = specification.fullname local newpath = file.dirname(oldname) local oldbase = file.basename(oldname) - local newbase = file.removesuffix(oldbase) + -- + -- problem: we can have weird filenames, like a.b.c (no suffix) and a.b.c.gif + -- so we cannot safely remove a suffix (unless we do that for known suffixes) + -- + -- local newbase = file.removesuffix(oldbase) -- assumes a known suffix + -- + -- so we now have (also see *): + -- + local newbase = oldbase + -- local fc = specification.cache or figures.cachepaths.path if fc and fc ~= "" and fc ~= "." then newpath = fc @@ -495,7 +504,19 @@ local function register(askedname,specification) if resolution and resolution ~= "" then -- the order might change newbase = newbase .. "_" .. resolution end - local newbase = file.addsuffix(newbase,newformat) + -- + -- see *, we had: + -- + -- local newbase = file.addsuffix(newbase,newformat) + -- + -- but now have (result of Aditya's web image testing): + -- + -- as a side effect we can now have multiple fetches with different + -- original formats, not that it matters much (apart from older conversions + -- sticking around) + -- + local newbase = newbase .. "." .. newformat + -- local newname = file.join(newpath,newbase) dir.makedirs(newpath) oldname = file.collapsepath(oldname) @@ -1100,8 +1121,13 @@ includers.buffers = includers.nongeneric -- -- -- auto -- -- -- function existers.auto(askedname) - local name = file.nameonly(askedname) + local name = gsub(askedname, ".auto$", "") local format = figures.guess(name) + if format then + report_inclusion("format guess for %q: %s",name,format) + else + report_inclusion("format guess for %q is not possible",name) + end return format and name, true, format end diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua index 48f6a39fe..edfbc0f92 100644 --- a/tex/context/base/l-file.lua +++ b/tex/context/base/l-file.lua @@ -26,8 +26,12 @@ local function basename(name) return match(name,"^.+[/\\](.-)$") or name end +-- local function nameonly(name) +-- return (gsub(match(name,"^.+[/\\](.-)$") or name,"%..*$","")) +-- end + local function nameonly(name) - return (gsub(match(name,"^.+[/\\](.-)$") or name,"%..*$","")) + return (gsub(match(name,"^.+[/\\](.-)$") or name,"%.[%a%d]+$","")) end local function extname(name,default) diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua index 25d48ee75..13294ab0d 100644 --- a/tex/context/base/l-lpeg.lua +++ b/tex/context/base/l-lpeg.lua @@ -15,39 +15,39 @@ local lpeg = require("lpeg") local report = texio and texio.write_nl or print ---~ local lpmatch = lpeg.match ---~ local lpprint = lpeg.print ---~ local lpp = lpeg.P ---~ local lpr = lpeg.R ---~ local lps = lpeg.S ---~ local lpc = lpeg.C ---~ local lpb = lpeg.B ---~ local lpv = lpeg.V ---~ local lpcf = lpeg.Cf ---~ local lpcb = lpeg.Cb ---~ local lpcg = lpeg.Cg ---~ local lpct = lpeg.Ct ---~ local lpcs = lpeg.Cs ---~ local lpcc = lpeg.Cc ---~ local lpcmt = lpeg.Cmt ---~ local lpcarg = lpeg.Carg - ---~ function lpeg.match(l,...) report("LPEG MATCH") lpprint(l) return lpmatch(l,...) end - ---~ function lpeg.P (l) local p = lpp (l) report("LPEG P =") lpprint(l) return p end ---~ function lpeg.R (l) local p = lpr (l) report("LPEG R =") lpprint(l) return p end ---~ function lpeg.S (l) local p = lps (l) report("LPEG S =") lpprint(l) return p end ---~ function lpeg.C (l) local p = lpc (l) report("LPEG C =") lpprint(l) return p end ---~ function lpeg.B (l) local p = lpb (l) report("LPEG B =") lpprint(l) return p end ---~ function lpeg.V (l) local p = lpv (l) report("LPEG V =") lpprint(l) return p end ---~ function lpeg.Cf (l) local p = lpcf (l) report("LPEG Cf =") lpprint(l) return p end ---~ function lpeg.Cb (l) local p = lpcb (l) report("LPEG Cb =") lpprint(l) return p end ---~ function lpeg.Cg (l) local p = lpcg (l) report("LPEG Cg =") lpprint(l) return p end ---~ function lpeg.Ct (l) local p = lpct (l) report("LPEG Ct =") lpprint(l) return p end ---~ function lpeg.Cs (l) local p = lpcs (l) report("LPEG Cs =") lpprint(l) return p end ---~ function lpeg.Cc (l) local p = lpcc (l) report("LPEG Cc =") lpprint(l) return p end ---~ function lpeg.Cmt (l) local p = lpcmt (l) report("LPEG Cmt =") lpprint(l) return p end ---~ function lpeg.Carg (l) local p = lpcarg(l) report("LPEG Carg =") lpprint(l) return p end +-- local lpmatch = lpeg.match +-- local lpprint = lpeg.print +-- local lpp = lpeg.P +-- local lpr = lpeg.R +-- local lps = lpeg.S +-- local lpc = lpeg.C +-- local lpb = lpeg.B +-- local lpv = lpeg.V +-- local lpcf = lpeg.Cf +-- local lpcb = lpeg.Cb +-- local lpcg = lpeg.Cg +-- local lpct = lpeg.Ct +-- local lpcs = lpeg.Cs +-- local lpcc = lpeg.Cc +-- local lpcmt = lpeg.Cmt +-- local lpcarg = lpeg.Carg + +-- function lpeg.match(l,...) report("LPEG MATCH") lpprint(l) return lpmatch(l,...) end + +-- function lpeg.P (l) local p = lpp (l) report("LPEG P =") lpprint(l) return p end +-- function lpeg.R (l) local p = lpr (l) report("LPEG R =") lpprint(l) return p end +-- function lpeg.S (l) local p = lps (l) report("LPEG S =") lpprint(l) return p end +-- function lpeg.C (l) local p = lpc (l) report("LPEG C =") lpprint(l) return p end +-- function lpeg.B (l) local p = lpb (l) report("LPEG B =") lpprint(l) return p end +-- function lpeg.V (l) local p = lpv (l) report("LPEG V =") lpprint(l) return p end +-- function lpeg.Cf (l) local p = lpcf (l) report("LPEG Cf =") lpprint(l) return p end +-- function lpeg.Cb (l) local p = lpcb (l) report("LPEG Cb =") lpprint(l) return p end +-- function lpeg.Cg (l) local p = lpcg (l) report("LPEG Cg =") lpprint(l) return p end +-- function lpeg.Ct (l) local p = lpct (l) report("LPEG Ct =") lpprint(l) return p end +-- function lpeg.Cs (l) local p = lpcs (l) report("LPEG Cs =") lpprint(l) return p end +-- function lpeg.Cc (l) local p = lpcc (l) report("LPEG Cc =") lpprint(l) return p end +-- function lpeg.Cmt (l) local p = lpcmt (l) report("LPEG Cmt =") lpprint(l) return p end +-- function lpeg.Carg (l) local p = lpcarg(l) report("LPEG Carg =") lpprint(l) return p end local type = type local byte, char, gmatch = string.byte, string.char, string.gmatch diff --git a/tex/context/base/math-dim.lua b/tex/context/base/math-dim.lua index d245bfb3a..a5d7c3963 100644 --- a/tex/context/base/math-dim.lua +++ b/tex/context/base/math-dim.lua @@ -227,6 +227,10 @@ function mathematics.dimensions(dimens) -- beware, dimens get spoiled UpperLimitBaselineRiseMin = t . limit_above_bgap . text_style, UpperLimitGapMin = t . limit_above_vgap . text_style, } + + -- too fragile for tx/px ... even the same values give different results + d.DisplayOperatorMinHeight = nil + -- d.AccentBaseHeight = 0 -- here? still? return d, t -- t only for diagnostics else diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua index c3f234166..21b101894 100644 --- a/tex/context/base/math-vfu.lua +++ b/tex/context/base/math-vfu.lua @@ -799,7 +799,7 @@ function vfmath.define(specification,set,goodies) fonts.constructors.assignmathparameters(main,main) -- main.MathConstants = main.mathparameters -- we directly pass it to TeX (bypasses the scaler) so this is needed ---~ inspect(main.MathConstants) +-- inspect(main.MathConstants) -- if trace_virtual or trace_timings then report_virtual("loading and virtualizing font %s at size %s took %0.3f seconds",name,size,os.clock()-start) diff --git a/tex/context/base/mult-de.mkii b/tex/context/base/mult-de.mkii index ecc77ea82..006b4838d 100644 --- a/tex/context/base/mult-de.mkii +++ b/tex/context/base/mult-de.mkii @@ -493,6 +493,7 @@ \setinterfacevariable{text}{text} \setinterfacevariable{three}{drei} \setinterfacevariable{thursday}{donnerstag} +\setinterfacevariable{tight}{tight} \setinterfacevariable{title}{titel} \setinterfacevariable{toggle}{toggle} \setinterfacevariable{tolerant}{tolerant} diff --git a/tex/context/base/mult-def.lua b/tex/context/base/mult-def.lua index 4ca05c328..41b46494d 100644 --- a/tex/context/base/mult-def.lua +++ b/tex/context/base/mult-def.lua @@ -16098,6 +16098,10 @@ return { ["pe"]="پنجشنبه", ["ro"]="joi", }, + ["tight"]={ + ["en"]="tight", + ["nl"]="krap", + }, ["title"]={ ["cs"]="titul", ["de"]="titel", diff --git a/tex/context/base/mult-en.mkii b/tex/context/base/mult-en.mkii index 1aab52a26..b8af5c307 100644 --- a/tex/context/base/mult-en.mkii +++ b/tex/context/base/mult-en.mkii @@ -493,6 +493,7 @@ \setinterfacevariable{text}{text} \setinterfacevariable{three}{three} \setinterfacevariable{thursday}{thursday} +\setinterfacevariable{tight}{tight} \setinterfacevariable{title}{title} \setinterfacevariable{toggle}{wissel} \setinterfacevariable{tolerant}{tolerant} diff --git a/tex/context/base/mult-fr.mkii b/tex/context/base/mult-fr.mkii index fd36c4f8b..e0dec8509 100644 --- a/tex/context/base/mult-fr.mkii +++ b/tex/context/base/mult-fr.mkii @@ -493,6 +493,7 @@ \setinterfacevariable{text}{texte} \setinterfacevariable{three}{trois} \setinterfacevariable{thursday}{jeudi} +\setinterfacevariable{tight}{tight} \setinterfacevariable{title}{titre} \setinterfacevariable{toggle}{toggle} \setinterfacevariable{tolerant}{tolerant} diff --git a/tex/context/base/mult-it.mkii b/tex/context/base/mult-it.mkii index a8f1ff7b6..e2c88951b 100644 --- a/tex/context/base/mult-it.mkii +++ b/tex/context/base/mult-it.mkii @@ -493,6 +493,7 @@ \setinterfacevariable{text}{testo} \setinterfacevariable{three}{tre} \setinterfacevariable{thursday}{giovedi} +\setinterfacevariable{tight}{tight} \setinterfacevariable{title}{titolo} \setinterfacevariable{toggle}{toggle} \setinterfacevariable{tolerant}{tollerante} diff --git a/tex/context/base/mult-nl.mkii b/tex/context/base/mult-nl.mkii index b199039dd..c2f07ce55 100644 --- a/tex/context/base/mult-nl.mkii +++ b/tex/context/base/mult-nl.mkii @@ -493,6 +493,7 @@ \setinterfacevariable{text}{tekst} \setinterfacevariable{three}{drie} \setinterfacevariable{thursday}{donderdag} +\setinterfacevariable{tight}{krap} \setinterfacevariable{title}{titel} \setinterfacevariable{toggle}{toggle} \setinterfacevariable{tolerant}{soepel} diff --git a/tex/context/base/mult-pe.mkii b/tex/context/base/mult-pe.mkii index 5f38eb928..da84e08a3 100644 --- a/tex/context/base/mult-pe.mkii +++ b/tex/context/base/mult-pe.mkii @@ -493,6 +493,7 @@ \setinterfacevariable{text}{متن} \setinterfacevariable{three}{سه} \setinterfacevariable{thursday}{پنجشنبه} +\setinterfacevariable{tight}{tight} \setinterfacevariable{title}{عنوان} \setinterfacevariable{toggle}{تغییر} \setinterfacevariable{tolerant}{بردبار} diff --git a/tex/context/base/mult-ro.mkii b/tex/context/base/mult-ro.mkii index 4b05da390..c348b64d9 100644 --- a/tex/context/base/mult-ro.mkii +++ b/tex/context/base/mult-ro.mkii @@ -493,6 +493,7 @@ \setinterfacevariable{text}{text} \setinterfacevariable{three}{trei} \setinterfacevariable{thursday}{joi} +\setinterfacevariable{tight}{tight} \setinterfacevariable{title}{titlu} \setinterfacevariable{toggle}{toggle} \setinterfacevariable{tolerant}{tolerant} diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv index 1f4ddbfc9..480997919 100644 --- a/tex/context/base/pack-rul.mkiv +++ b/tex/context/base/pack-rul.mkiv @@ -1208,9 +1208,9 @@ \let\pack_framed_forgetall\relax \forgetall \fi - \edef\framedwidth {\ifdim\d_framed_width >\zeropoint\the\d_framed_width \else\!!zeropoint\fi}% a new feature, visible for user - \edef\framedheight{\ifdim\d_framed_height>\zeropoint\the\d_framed_height\else\!!zeropoint\fi}% a new feature, visible for user - \edef\framedoffset{\the\dimexpr\ifconditional\c_framed_has_offset\localoffset\else\zeropoint\fi}% + \edef\framedwidth {\the\ifdim\d_framed_width >\zeropoint \d_framed_width \else\zeropoint\fi}% public + \edef\framedheight{\the\ifdim\d_framed_height>\zeropoint \d_framed_height\else\zeropoint\fi}% public + \edef\framedoffset{\the\dimexpr\ifconditional\c_framed_has_offset\localoffset \else\zeropoint\fi}% public \ifx\p_framed_orientation\empty \let\pack_framed_stop_orientation\relax \else diff --git a/tex/context/base/s-mat-11.mkiv b/tex/context/base/s-mat-11.mkiv index 3939e9f22..88bfad8ef 100644 --- a/tex/context/base/s-mat-11.mkiv +++ b/tex/context/base/s-mat-11.mkiv @@ -96,11 +96,11 @@ % \setupbodyfont[lmvirtual,12pt] \showmathfontcharacters % \setupbodyfont[pxvirtual,12pt] \showmathfontcharacters % \setupbodyfont[txvirtual,12pt] \showmathfontcharacters -% \setupbodyfont[palatino, 10pt] \showmathfontcharacters + \setupbodyfont[palatino, 12pt] \showmathfontcharacters % \setupbodyfont[mathtimes,12pt] \showmathfontcharacters % \setupbodyfont[stix, 12pt] \showmathfontcharacters % \setupbodyfont[xits, 12pt] \showmathfontcharacters % \setupbodyfont[lucida, 12pt] \showmathfontcharacters - \setupbodyfont[lucidanova, 12pt] \showmathfontcharacters +% \setupbodyfont[lucidanova, 12pt] \showmathfontcharacters \stoptext diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 6fd8cf78d..72d255ffb 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 b6509bee6..0d07213e9 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf |