diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/back-pdf.mkiv | 10 | ||||
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/lpdf-ini.lua | 35 | ||||
-rw-r--r-- | tex/context/base/sort-ini.lua | 2 | ||||
-rw-r--r-- | tex/context/base/strc-not.mkiv | 6 | ||||
-rw-r--r-- | tex/context/base/strc-reg.lua | 29 | ||||
-rw-r--r-- | tex/context/base/strc-reg.mkii | 3 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
10 files changed, 59 insertions, 34 deletions
diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv index 93aff94ce..0a5bbb163 100644 --- a/tex/context/base/back-pdf.mkiv +++ b/tex/context/base/back-pdf.mkiv @@ -61,11 +61,11 @@ %D An example of usage is: -\appendtoks % will change ... not here the () - \pdfbackendsetinfo{ConTeXt.Version}{(\contextversion)}% - \pdfbackendsetinfo{ConTeXt.Time} {(\number\normalyear.\twodigits\normalmonth.\twodigits\normalday\space \twodigits\currenthour:\twodigits\currentminute)}% - \pdfbackendsetinfo{ConTeXt.Jobname}{(\jobname)}% - \pdfbackendsetinfo{ConTeXt.Url} {(www.pragma-ade.com)}% +\appendtoks + \pdfbackendsetinfo{ConTeXt.Version}{\contextversion}% + \pdfbackendsetinfo{ConTeXt.Time} {\number\normalyear.\twodigits\normalmonth.\twodigits\normalday\space \twodigits\currenthour:\twodigits\currentminute}% + \pdfbackendsetinfo{ConTeXt.Jobname}{\jobname}% + \pdfbackendsetinfo{ConTeXt.Url} {www.pragma-ade.com}% \to \everylastbackendshipout %D Unfortunately this is still needed (also for \METAPOST\ to diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 2824ce6c4..67d2d13ac 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2009.11.30 23:27} +\newcontextversion{2009.12.01 17:09} %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.mkiv b/tex/context/base/context.mkiv index 23d578469..347beb0b3 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,6 +25,8 @@ \expandafter\end \fi +\newtoks\contextversiontoks \contextversiontoks\expandafter{\contextversion} % at the lua end + \loadcorefile{norm-ctx} \loadcorefile{syst-pln} diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index e0af24721..9c9b58f83 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2009.11.30 23:27} +\edef\contextversion{2009.12.01 17:09} %D For those who want to use this: diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua index 6d1936c2f..f5cab00c2 100644 --- a/tex/context/base/lpdf-ini.lua +++ b/tex/context/base/lpdf-ini.lua @@ -377,6 +377,8 @@ end local pdfreference = lpdf.reference local pdfdictionary = lpdf.dictionary +local pdfarray = lpdf.array +local pdfverbose = lpdf.verbose local pdfreserveobj = pdf.reserveobj local pdfimmediateobj = pdf.immediateobj @@ -469,13 +471,25 @@ function lpdf.finalizedocument() end end -local c_template = "\\normalpdfcatalog{/%s %s}" -local i_template = "\\normalpdfinfo{/%s %s}" -local n_template = "\\normalpdfnames{/%s %s}" +local catalog, info, names = pdfdictionary(), pdfdictionary(), pdfdictionary() -function lpdf.addtocatalog(k,v) if not environment.initex then texsprint(ctxcatcodes,format(c_template,k,tostring(v))) end end -function lpdf.addtoinfo (k,v) if not environment.initex then texsprint(ctxcatcodes,format(i_template,k,tostring(v))) end end -function lpdf.addtonames (k,v) if not environment.initex then texsprint(ctxcatcodes,format(n_template,k,tostring(v))) end end +local function flushcatalog() if not environment.initex then pdf.pdfcatalog = catalog() end end +local function flushinfo () if not environment.initex then pdf.pdfinfo = info () end end +local function flushnames () if not environment.initex then pdf.pdfnames = names () end end + +if not pdf.pdfcatalog then + + local c_template, i_template, n_template = "\\normalpdfcatalog{%s}", "\\normalpdfinfo{%s}", "\\normalpdfnames{%s}" + + flushcatalog = function() if not environment.initex then texsprint(ctxcatcodes,format(c_template,catalog())) end end + flushinfo = function() if not environment.initex then texsprint(ctxcatcodes,format(i_template,info ())) end end + flushnames = function() if not environment.initex then texsprint(ctxcatcodes,format(n_template,names ())) end end + +end + +function lpdf.addtocatalog(k,v) catalog[k] = v end +function lpdf.addtoinfo (k,v) info [k] = v end +function lpdf.addtonames (k,v) names [k] = v end local r_extgstates, d_extgstates = pdfreserveobj(), pdfdictionary() local p_extgstates = pdfreference(r_extgstates) local r_colorspaces, d_colorspaces = pdfreserveobj(), pdfdictionary() local p_colorspaces = pdfreference(r_colorspaces) @@ -513,6 +527,10 @@ lpdf.registerdocumentfinalizer(flushcolorspaces,3) lpdf.registerdocumentfinalizer(flushpatterns,3) lpdf.registerdocumentfinalizer(flushshades,3) +lpdf.registerdocumentfinalizer(flushcatalog,3) +lpdf.registerdocumentfinalizer(flushinfo,3) +lpdf.registerdocumentfinalizer(flushnames,3) + lpdf.registerpagefinalizer(checkextgstates,3) lpdf.registerpagefinalizer(checkcolorspaces,3) lpdf.registerpagefinalizer(checkpatterns,3) @@ -524,3 +542,8 @@ function lpdf.rotationcm(a) local s, c = sind(a), cosd(a) texwrite(format("%s %s %s %s 0 0 cm",c,s,-s,c)) end + +-- lpdf.addtoinfo("ConTeXt.Version", tex.contextversiontoks) +-- lpdf.addtoinfo("ConTeXt.Time", os.date("%Y.%m.%d %H:%M")) -- :%S +-- lpdf.addtoinfo("ConTeXt.Jobname", tex.jobname) +-- lpdf.addtoinfo("ConTeXt.Url", "www.pragma-ade.com") diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua index 4167eb2f8..80607f9ca 100644 --- a/tex/context/base/sort-ini.lua +++ b/tex/context/base/sort-ini.lua @@ -125,7 +125,7 @@ sorters.defaultlanguage = 'en' function sorters.splitters.utf(str) -- brrr, todo: language local r = sorters.replacements[sorters.language] or sorters.replacements[sorters.defaultlanguage] or { } ---~ local m = sorters.mappings [sorters.language] or sorters.mappings [sorters.defaultlanguage] or { } + -- local m = sorters.mappings [sorters.language] or sorters.mappings [sorters.defaultlanguage] or { } local u = characters.uncompose local b = utf.byte local t = { } diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv index 917ba1894..4c3fd2f22 100644 --- a/tex/context/base/strc-not.mkiv +++ b/tex/context/base/strc-not.mkiv @@ -185,9 +185,9 @@ \c!interaction=\v!yes, %\c!factor=, %\c!scope=, % \v!text \v!page -\c!prefixconnector=., -\c!prefix=\v!no, - \c!next=\autoinsertnextspace, % new, experimental with startnotes + \c!prefixconnector=., + %\c!next=\autoinsertnextspace + \c!prefix=\v!no, \c!n=1] \setupnotes diff --git a/tex/context/base/strc-reg.lua b/tex/context/base/strc-reg.lua index 721d4300b..ba9c239c0 100644 --- a/tex/context/base/strc-reg.lua +++ b/tex/context/base/strc-reg.lua @@ -221,13 +221,13 @@ local function preprocessentries(rawdata) for k=1,#et do entries[k] = { et[k] or "", kt[k] or "" } end -for k=#et,1,-1 do - if entries[k][1] ~= "" then - break - else - entries[k] = nil - end -end + for k=#et,1,-1 do + if entries[k][1] ~= "" then + break + else + entries[k] = nil + end + end rawdata.list = entries rawdata.entries = nil else @@ -307,7 +307,6 @@ function jobregisters.compare(a,b) elseif a.metadata.kind == 'entry' then -- e/f/t local page_a, page_b = a.references.realpage, b.references.realpage if not page_a or not page_b then ---~ print(table.serialize(a),table.serialize(b)) return 0 elseif page_a < page_b then return -1 @@ -473,13 +472,13 @@ function jobregisters.flush(data,options,prefixspec,pagespec) texsprint(ctxcatcodes,format("\\startregisterentries{%s}",n)) end end -if metadata then - texsprint(ctxcatcodes,"\\registerentry{") - helpers.title(e[i],metadata) - texsprint(ctxcatcodes,"}") -else - texsprint(ctxcatcodes,format("\\registerentry{%s}",e[i])) -end + if metadata then + texsprint(ctxcatcodes,"\\registerentry{") + helpers.title(e[i],metadata) + texsprint(ctxcatcodes,"}") + else + texsprint(ctxcatcodes,format("\\registerentry{%s}",e[i])) + end else done[i] = false end diff --git a/tex/context/base/strc-reg.mkii b/tex/context/base/strc-reg.mkii index 8d824bd9d..b088246d3 100644 --- a/tex/context/base/strc-reg.mkii +++ b/tex/context/base/strc-reg.mkii @@ -98,7 +98,8 @@ \doifelse{\registerparameter\c!ownnumber}\v!yes \donetrue\donefalse \expanded{\writeutility{r % spaces are essential - {\ifcase\registerpagestatus\space\or e\or f\or t\fi} {\currentregister} % + \ifcase\registerpagestatus\space\or e\or f\or t\fi\space + {\currentregister} % {\nextinternalreference} % {\asciiregisterentryA} % {\asciiregisterentryB} % diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 09587b4bd..e9a57d93b 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 11/30/09 23:32:01 +-- merge date : 12/01/09 17:16:42 do -- begin closure to overcome local limits and interference |