summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-11-02 18:15:04 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-11-02 18:15:04 +0100
commita03b5b6d486d1e6d1935d028949edb67d8ec0f92 (patch)
treec9a4d54176f2a572c95f30a46a3486584599bc98 /tex/context/base
parent251de4727f03f142fdcbdd354a4a58dfffea877c (diff)
downloadcontext-a03b5b6d486d1e6d1935d028949edb67d8ec0f92.tar.gz
2014-11-02 17:29:00
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/buff-ver.mkiv13
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4390 -> 4381 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/mult-def.mkiv1
-rw-r--r--tex/context/base/publ-dat.lua2
-rw-r--r--tex/context/base/publ-imp-apa.lua4
-rw-r--r--tex/context/base/publ-ini.lua35
-rw-r--r--tex/context/base/publ-ini.mkiv1
-rw-r--r--tex/context/base/sort-ini.lua36
-rw-r--r--tex/context/base/status-files.pdfbin24698 -> 24692 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin333912 -> 333913 bytes
12 files changed, 63 insertions, 33 deletions
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv
index 4da74d421..707c235ff 100644
--- a/tex/context/base/buff-ver.mkiv
+++ b/tex/context/base/buff-ver.mkiv
@@ -181,6 +181,7 @@
\fi
\to \everydefinetyping
+
\appendtoks
\buff_verbatim_initialize_visualizer{\typingparameter\c!option}% we can check at the tex end
\to \everysetuptyping
@@ -391,7 +392,7 @@
\unexpanded\def\obeyhyphens
{\let\obeyedspace \specialobeyedspace % maybe \specialstretchedspace
\let\controlspace\specialcontrolspace
- \spaceskip.25em\relax} % hm a bit of stretch !
+ \spaceskip.25\emwidth\relax} % hm a bit of stretch !
\unexpanded\def\obeybreakpoints
{\ignorehyphens
@@ -444,9 +445,15 @@
\let\normaltextmat\mat
\let\normaltextdis\dis
-\unexpanded\def\astype{\bgroup\usetypestyleandcolor\c!style\c!color\let\nexttoken}
+\unexpanded\def\astype
+ {\bgroup\usetypestyleandcolor\c!style\c!color\let\nexttoken}
-\unexpanded\def\asciistr#1{\dontleavehmode{\verbatimfont\detokenize{#1}}} % use in some old styles
+\unexpanded\def\asciistr#1% used in some old styles
+ {\dontleavehmode\begingroup
+ \dostarttagged\t!verbatim\empty
+ \usetypestyleandcolor\c!style\c!color\detokenize{#1}%
+ \dostoptagged
+ \endgroup}
%D The basic display verbatim commands are defined in an indirect way. As we
%D will see, they are a specific case of a more general mechanism.
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index e19cfac44..bbf30e64a 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{2014.11.02 13:44}
+\newcontextversion{2014.11.02 17:27}
%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
index 55ed5ed5e..8b4897abc 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 8eae3bd00..3e42a97e7 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -28,7 +28,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2014.11.02 13:44}
+\edef\contextversion{2014.11.02 17:27}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mult-def.mkiv b/tex/context/base/mult-def.mkiv
index 7bd692fea..3d86df7a7 100644
--- a/tex/context/base/mult-def.mkiv
+++ b/tex/context/base/mult-def.mkiv
@@ -77,6 +77,7 @@
\def\c!journalconversion {journalconversion}
\def\c!register {register}
\def\c!field {field}
+\def\c!ignore {ignore}
\def\c!referencemethod {referencemethod} % forward both
diff --git a/tex/context/base/publ-dat.lua b/tex/context/base/publ-dat.lua
index 90346111a..dbd48f7f8 100644
--- a/tex/context/base/publ-dat.lua
+++ b/tex/context/base/publ-dat.lua
@@ -183,7 +183,7 @@ local specifications = setmetatableindex(function(t,name)
local di = d[i]
if type(di) == "table" then
for i=1,#di do
- list[di] = di[i]
+ list[di[i]] = t
end
else
list[di] = t
diff --git a/tex/context/base/publ-imp-apa.lua b/tex/context/base/publ-imp-apa.lua
index 8ec46b76c..6d2bfdea4 100644
--- a/tex/context/base/publ-imp-apa.lua
+++ b/tex/context/base/publ-imp-apa.lua
@@ -11,7 +11,7 @@ return {
copyright = "ConTeXt development team",
categories = {
article = {
- required = { { "author", "editor" }, "title"},
+ required = { { "author", "editor" }, "title" },
optional = { "year", "type", "journal", "volume", "number", "pages", "url", "note", "doi" },
virtual = virtual,
author = authors,
@@ -30,7 +30,7 @@ return {
},
book = {
virtual = { "authoryear" },
- required = { { "author", "editor", "publisher" }, "title"},
+ required = { { "author", "editor", "publisher" }, "title" },
optional = { "year", "month", "day", "title", "type", "edition", "series", "volume", "number", "pages", "address", "publisher", "url", "note", "ISBN" },
virtual = virtual,
author = authors,
diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua
index ad36aa4e3..5902fc36e 100644
--- a/tex/context/base/publ-ini.lua
+++ b/tex/context/base/publ-ini.lua
@@ -144,6 +144,8 @@ local currentspecification = specifications[false]
local currentspecificationfields = currentspecification.fields
local currentspecificationcategories = currentspecification.categories
+local ignoredfields = { }
+
local function setspecification(name)
currentspecification = specifications[name]
currentspecificationfields = currentspecification.fields
@@ -863,13 +865,22 @@ end
-- rendering of fields
+local function found(category,field)
+ local fieldspec = currentspecificationfields[category][field]
+ if ignoredfields and fieldspec == "optional" and ignoredfields[field] then
+ return false
+ else
+ return true
+ end
+end
+
function commands.btxflush(name,tag,field)
local dataset = rawget(datasets,name)
if dataset then
local fields = dataset.luadata[tag]
if fields then
local category = fields.category
- if currentspecificationfields[category][field] then
+ if found(category,field) then
local manipulator, field = splitmanipulation(field)
local value = fields[field]
if type(value) == "string" then
@@ -900,7 +911,7 @@ function commands.btxdetail(name,tag,field)
local details = dataset.details[tag]
if details then
local category = fields.category
- if currentspecificationfields[category][field] then
+ if found(category,field) then
local manipulator, field = splitmanipulation(field)
local value = details[field]
if type(value) == "string" then
@@ -923,7 +934,7 @@ function commands.btxfield(name,tag,field)
local fields = dataset.luadata[tag]
if fields then
local category = fields.category
- if currentspecificationfields[category][field] then
+ if found(category,field) then
local manipulator, field = splitmanipulation(field)
local value = fields[field]
if type(value) == "string" then
@@ -947,8 +958,12 @@ local function found(name,tag,field,yes)
if dataset then
local data = dataset.luadata[tag]
if data then
- local category = data.category
- if currentspecificationfields[category][field] then
+ local category = data.category
+ local fieldspec = currentspecificationfields[category][field]
+ if ignoredfields and fieldspec == "optional" and ignoredfields[field] then
+ fieldspec = false
+ end
+ if fieldspec then
local value = data[field]
if value then
if value ~= "" then
@@ -1228,7 +1243,9 @@ function lists.collectentries(specification)
return
end
local method = specification.method or v_none
+ local ignored = specification.ignored or ""
rendering.method = method
+ rendering.ignored = ignored ~= "" and settings_to_set(ignored) or nil
rendering.list = { }
rendering.done = { }
rendering.sorttype = specification.sorttype or v_default
@@ -1467,6 +1484,8 @@ function lists.flushentries(dataset,textmode)
local list = rendering.list
local luadata = datasets[dataset].luadata
-- maybe a startflushing here
+ ignoredfields = rendering.ignored or { }
+ --
for i=1,#list do
local li = list[i]
local tag = li[1]
@@ -1512,7 +1531,11 @@ function lists.flushentries(dataset,textmode)
ctx_btxhandlelistentry()
end
end
- setspecification(false)
+ context(function()
+ -- wrapup
+ ignoredfields = nil
+ setspecification(false)
+ end)
end
local function getuserdata(dataset,key)
diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv
index 15541dc18..6f9a06f97 100644
--- a/tex/context/base/publ-ini.mkiv
+++ b/tex/context/base/publ-ini.mkiv
@@ -705,6 +705,7 @@
keyword = "\btxrenderingparameter\c!keyword",
sorttype = "\btxrenderingparameter\c!sorttype",
repeated = "\btxrenderingparameter\c!repeat",
+ ignored = "\btxrenderingparameter\c!ignore",
}}%
% sorting and so
\ctxcommand{btxpreparelistentries("\currentbtxdataset")}%
diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua
index a13517a98..b8a617ad5 100644
--- a/tex/context/base/sort-ini.lua
+++ b/tex/context/base/sort-ini.lua
@@ -168,6 +168,7 @@ local mte = { -- todo: assign to t
}
local noorder = false
+local nothing = { 0 }
local function preparetables(data)
local orders, lower, m_mappings, z_mappings, p_mappings = data.orders, data.lower, { }, { }, { }
@@ -241,29 +242,26 @@ local function preparetables(data)
-- this is a kind of last resort branch that we might want to revise
-- one day
--
- -- s = fschars[k] -- returns a single char
- -- if s and s ~= k then
- -- if trace_orders then
- -- report_sorters(" 6 split: %s",s)
- -- end
- -- local ml = rawget(t,s)
- -- if ml then
- -- n = { }
- -- nn = 0
- -- for i=1,#ml do
- -- nn = nn + 1
- -- n[nn] = ml[i]
- -- end
- -- end
- -- end
+ -- local b = utfbyte(k)
+ -- n = decomposed[b] or { b }
+ -- if trace_tests then
+ -- report_sorters(" 6 split: %s",utf.tostring(b)) -- todo
+ -- end
--
-- we need to move way above valid order (new per 2014-10-16) .. maybe we
-- need to move it even more up to get numbers right (not all have orders)
--
- local b = 2 * #orders + utfbyte(k)
- n = decomposed[b] or { b }
- if trace_orders then
- report_sorters(" 6 split: %s",utf.tostring(b)) -- todo
+ if k == "\000" then
+ n = nothing -- shared
+ if trace_orders then
+ report_sorters(" 6 split: space") -- todo
+ end
+ else
+ local b = 2 * #orders + utfbyte(k)
+ n = decomposed[b] or { b } -- could be shared tables
+ if trace_orders then
+ report_sorters(" 6 split: %s",utf.tostring(b)) -- todo
+ end
end
end
if n then
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index c9e7b112f..02c569a6c 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 34b2bcba3..1da6867c2 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ