diff options
Diffstat (limited to 'tex')
-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 | 4141 -> 4145 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 106045 -> 106428 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/data-zip.lua | 16 | ||||
-rw-r--r-- | tex/context/base/m-spreadsheet.lua | 31 | ||||
-rw-r--r-- | tex/context/base/m-spreadsheet.mkiv | 6 | ||||
-rw-r--r-- | tex/context/base/node-par.lua | 8 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24388 -> 24384 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 181164 -> 181170 bytes | |||
-rw-r--r-- | tex/context/base/strc-not.mkvi | 92 | ||||
-rw-r--r-- | tex/context/base/util-mrg.lua | 4 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
15 files changed, 112 insertions, 55 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 2aabcc1b2..484feffbc 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.06.11 00:21} +\newcontextversion{2012.06.12 09:56} %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 7e3dd671f..fcd31610c 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.06.11 00:21} +\newcontextversion{2012.06.12 09:56} %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 0e42029c0..0f949075a 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 5352a41ab..adf4b170f 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 f2c39eef0..a58242a24 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.06.11 00:21} +\edef\contextversion{2012.06.12 09:56} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 32ea1b198..dd1f6d058 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.06.11 00:21} +\edef\contextversion{2012.06.12 09:56} %D For those who want to use this: diff --git a/tex/context/base/data-zip.lua b/tex/context/base/data-zip.lua index 676a2df96..7e8ea3a39 100644 --- a/tex/context/base/data-zip.lua +++ b/tex/context/base/data-zip.lua @@ -14,11 +14,17 @@ local trace_locating = false trackers.register("resolvers.locating", function(v local report_zip = logs.reporter("resolvers","zip") --- zip:///oeps.zip?name=bla/bla.tex --- zip:///oeps.zip?tree=tex/texmf-local --- zip:///texmf.zip?tree=/tex/texmf --- zip:///texmf.zip?tree=/tex/texmf-local --- zip:///texmf-mine.zip?tree=/tex/texmf-projects +--[[ldx-- +<p>We use a url syntax for accessing the zip file itself and file in it:</p> + +<typing> +zip:///oeps.zip?name=bla/bla.tex +zip:///oeps.zip?tree=tex/texmf-local +zip:///texmf.zip?tree=/tex/texmf +zip:///texmf.zip?tree=/tex/texmf-local +zip:///texmf-mine.zip?tree=/tex/texmf-projects +</typing> +--ldx]]-- local resolvers = resolvers diff --git a/tex/context/base/m-spreadsheet.lua b/tex/context/base/m-spreadsheet.lua index 34bbdf433..04b87c879 100644 --- a/tex/context/base/m-spreadsheet.lua +++ b/tex/context/base/m-spreadsheet.lua @@ -70,6 +70,7 @@ function spreadsheets.reset(name) name = name, data = d, settings = s, + temp = { }, -- for local usage } end @@ -88,6 +89,7 @@ function spreadsheets.start(name,s) name = name, data = d, settings = s, + temp = { }, } end end @@ -104,7 +106,6 @@ local function assign(s,n) return format("moduledata.spreadsheets.data['%s'].data[%s]",n,byte(s)-offset) end --------- datacell(name,a,b,...) function datacell(a,b,...) local n = 0 if b then @@ -115,13 +116,11 @@ function datacell(a,b,...) else n = byte(a) - offset end - -- return format("dat['%s'][%s]",name,n) return format("dat[%s]",n) end ------ cell = (Carg(1) * C(R("AZ"))^1) / datacell * (Cc("[") * (R("09")^1) * Cc("]") + #P(1)) local cell = C(R("AZ"))^1 / datacell * (Cc("[") * (R("09")^1) * Cc("]") + #P(1)) -local pattern = Cs(Cc("return ") * (cell + P(1))^0) +local pattern = Cs((cell + P(1))^0) local functions = { } spreadsheets.functions = functions @@ -139,15 +138,21 @@ function functions.sum(c,f,t) end function functions.fmt(pattern,n) - return format("%"..pattern,n) + if find(pattern,"^%%") then + return format(pattern,n) + else + return format("%"..pattern,n) + end end local template = [[ - local spr = moduledata.spreadsheets.functions - local dat = moduledata.spreadsheets.data['%s'].data - local sum = spr.sum - local fmt = spr.fmt - %s + local _m_ = moduledata.spreadsheets + local dat = _m_.data['%s'].data + local tmp = _m_.temp + local fnc = _m_.functions + local sum = fnc.sum + local fmt = fnc.fmt + return %s ]] -- to be considered: a weak cache @@ -159,7 +164,11 @@ local function execute(name,r,c,str) local result = loadstring(str) result = result and result() or 0 data[name].data[c][r] = result - return result + if type(result) == "function" then + return result() + else + return result + end end function spreadsheets.set(name,r,c,str) diff --git a/tex/context/base/m-spreadsheet.mkiv b/tex/context/base/m-spreadsheet.mkiv index c0152562d..a4f567397 100644 --- a/tex/context/base/m-spreadsheet.mkiv +++ b/tex/context/base/m-spreadsheet.mkiv @@ -103,9 +103,9 @@ \unexpanded\def\dostartspreadsheettable[#1]% {\bgroup \dostartspreadsheet[#1]%% - \def\startrow{\bTR}% - \def\stoprow {\eTR}% - \def\startcell##1\stopcell{\bTD\getspr{##1}\eTD}% + \unexpanded\def\startrow{\bTR}% + \unexpanded\def\stoprow {\eTR}% + \unexpanded\def\startcell##1\stopcell{\bTD\getspr{##1}\eTD}% \bTABLE[\c!align=\v!flushright]} \unexpanded\def\stopspreadsheettable diff --git a/tex/context/base/node-par.lua b/tex/context/base/node-par.lua index 8eafd1f6e..423d69fc7 100644 --- a/tex/context/base/node-par.lua +++ b/tex/context/base/node-par.lua @@ -35,6 +35,8 @@ storage.register("builders/paragraphs/constructors/numbers", numbers, "builders. local report_parbuilders = logs.reporter("parbuilders") +local texnest = tex.nest + local mainconstructor = nil -- not stored in format function constructors.register(name,number) @@ -82,7 +84,11 @@ end -- also for testing (no surrounding spacing done) function constructors.methods.oneline(head,followed_by_display) - return node.hpack(head) + local h = node.hpack(head) + local p = texnest.ptr + texnest[p].prevgraf = 1 + texnest[p].prevdepth = h.depth + return h end -- It makes no sense to have a sequence here as we already have diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 6210d8e2f..6e6ab9c07 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 90f84ece6..9690b7ed0 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi index 0a57ed878..8b3887a81 100644 --- a/tex/context/base/strc-not.mkvi +++ b/tex/context/base/strc-not.mkvi @@ -869,50 +869,83 @@ \installcorenamespace{notelocationvariant} \installcorenamespace{notepositionvariant} -\installcorenamespace{notedelayed} +\installcorenamespace{notedelayedvariant} \installcorenamespace{notelocation} \newconditional\c_strc_notes_delayed -\setvalue{\??notelocation\v!page }{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_page} -\setvalue{\??notelocation\v!columns }{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_columns} -\setvalue{\??notelocation\v!lastcolumn }{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_lastcolumn} -\setvalue{\??notelocation\v!firstcolumn}{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_firstcolumn} -\setvalue{\??notelocation\v!none }{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_none} -\setvalue{\??notelocation\v!text }{\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_text} +\unexpanded\def\strc_notes_set_delayed_yes{\settrue \c_strc_notes_delayed} +\unexpanded\def\strc_notes_set_delayed_nop{\setfalse\c_strc_notes_delayed} + +\setvalue{\??notelocation\v!page }{\letvalue{\??notedelayedvariant \currentnote}\strc_notes_set_delayed_nop + \letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_page} +\setvalue{\??notelocation\v!columns }{\letvalue{\??notedelayedvariant \currentnote}\strc_notes_set_delayed_nop + \letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_columns} +\setvalue{\??notelocation\v!lastcolumn }{\letvalue{\??notedelayedvariant \currentnote}\strc_notes_set_delayed_nop + \letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_lastcolumn} +\setvalue{\??notelocation\v!firstcolumn}{\letvalue{\??notedelayedvariant \currentnote}\strc_notes_set_delayed_nop + \letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_firstcolumn} +\setvalue{\??notelocation\v!none }{\letvalue{\??notedelayedvariant \currentnote}\strc_notes_set_delayed_yes + \letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_none} +\setvalue{\??notelocation\v!text }{\letvalue{\??notedelayedvariant \currentnote}\strc_notes_set_delayed_yes + \letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_text} \setvalue{\??notelocation\v!high }{\letvalue{\??notepositionvariant\currentnote}\strc_notes_set_position_high} \setvalue{\??notelocation\v!bottom }{\letvalue{\??notepositionvariant\currentnote}\strc_notes_set_position_bottom} -\letvalue{\??notedelayed\v!page }\setfalse -\letvalue{\??notedelayed\v!columns }\setfalse -\letvalue{\??notedelayed\v!lastcolumn }\setfalse -\letvalue{\??notedelayed\v!firstcolumn }\setfalse -\letvalue{\??notedelayed\v!none }\settrue -\letvalue{\??notedelayed\v!text }\settrue +\setvalue{\??notedelayedvariant \??notedelayedvariant }{\strc_notes_set_delayed_nop} % not let +\setvalue{\??notepositionvariant\??notepositionvariant}{\strc_notes_set_position_bottom} % not let +\setvalue{\??notelocationvariant\??notelocationvariant}{\strc_notes_set_location_page} % not let \unexpanded\def\strc_notes_set_delayed - {\ifcsname\??notedelayed\currentnote\endcsname - \csname\??notedelayed\currentnote\endcsname\c_strc_notes_delayed - \else - \setfalse\c_strc_notes_delayed - \fi} + {\csname\??notedelayedvariant + \ifcsname\??notedelayedvariant\currentnote\endcsname + \currentnote + \else + \??notedelayedvariant + \fi + \endcsname} + +% \let\strc_notes_set_delayed_yes\truecondition +% \let\strc_notes_set_delayed_nop\falsecondition +% +% \def\c_strc_notes_delayed +% {\csname\??notedelayedvariant +% \ifcsname\??notedelayedvariant\currentnote\endcsname +% \currentnote +% \else +% \??notedelayedvariant +% \fi +% \endcsname} + +\unexpanded\def\strc_notes_set_position + {\csname\??notepositionvariant + \ifcsname\??notepositionvariant\currentnote\endcsname + \currentnote + \else + \??notepositionvariant + \fi + \endcsname} \unexpanded\def\strc_notes_set_location - {\letvalue{\??notelocationvariant\currentnote}\strc_notes_set_location_page - \letvalue{\??notepositionvariant\currentnote}\strc_notes_set_position_bottom - \setfalse\c_strc_notes_delayed - \normalexpanded{\rawprocesscommalist[\noteparameter\c!location]\strc_notes_set_location_step}} + {\csname\??notelocationvariant + \ifcsname\??notelocationvariant\currentnote\endcsname + \currentnote + \else + \??notelocationvariant + \fi + \endcsname} + +\unexpanded\def\strc_notes_set_variants + {\normalexpanded{\rawprocesscommalist[\noteparameter\c!location]\strc_notes_set_location_step}} \unexpanded\def\strc_notes_set_location_step#1% {\ifcsname\??notelocation#1\endcsname \csname\??notelocation#1\endcsname - \fi - \ifcsname\??notedelayed#1\endcsname - \csname\??notedelayed#1\endcsname\c_strc_notes_delayed \fi} \appendtoks - \strc_notes_set_location + \strc_notes_set_variants + \strc_notes_set_delayed \to \everysynchronizenote \newskip \s_strc_notes_distance % we need to implement stretch @@ -968,8 +1001,8 @@ \def\strc_notes_set_location_text % we don't use inserts anyway (e.g. endnotes) {\settrue\c_strc_notes_delayed \ctxlua{structures.notes.setstate("\currentnote","store")}% - \global\dimen\currentnoteins\maxdimen \global\count\currentnoteins\zerocount + \global\dimen\currentnoteins\maxdimen \global\skip \currentnoteins\zeropoint} \let\strc_notes_set_location_none\strc_notes_set_location_text @@ -977,7 +1010,8 @@ \def\strc_notes_set_properties {\strc_notes_set_columns \strc_notes_set_distance - \csname\??notelocationvariant\currentnote\endcsname} + \strc_notes_set_location + \strc_notes_set_delayed} \let\strc_notes_set_position_high\relax @@ -994,7 +1028,7 @@ \def\strc_notes_check_if_bottom_present_indeed % in otr ! {\ifvoid\currentnoteins\else - \csname\??notepositionvariant\currentnote\endcsname + \strc_notes_set_position \fi} \def\strc_notes_check_if_bottom_present_step diff --git a/tex/context/base/util-mrg.lua b/tex/context/base/util-mrg.lua index acf04fead..c924d30af 100644 --- a/tex/context/base/util-mrg.lua +++ b/tex/context/base/util-mrg.lua @@ -63,9 +63,11 @@ end local function self_save(name, data) if data ~= "" then if merger.strip_comment then - -- saves some 20K local n = #data + -- saves some 20K .. scite comments data = gsub(data,"%-%-~[^\n\r]*[\r\n]","") + -- saves some 20K .. ldx comments + data = gsub(data,"%-%-%[%[ldx%-%-.-%-%-ldx%]%]%-%-","") utilities.report("merge: %s bytes of comment stripped, %s bytes of code left",n-#data,#data) end io.savedata(name,data) diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 390612836..b4f6f63d0 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 : 06/09/12 01:22:26 +-- merge date : 06/12/12 09:56:51 do -- begin closure to overcome local limits and interference |