diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4174 -> 4183 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/publ-dat.lua | 24 | ||||
-rw-r--r-- | tex/context/base/publ-imp-apa.mkvi | 76 | ||||
-rw-r--r-- | tex/context/base/publ-imp-aps.mkvi | 43 | ||||
-rw-r--r-- | tex/context/base/publ-ini.lua | 107 | ||||
-rw-r--r-- | tex/context/base/publ-ini.mkiv | 1 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24469 -> 24456 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 251107 -> 251109 bytes | |||
-rw-r--r-- | tex/context/base/strc-lst.mkvi | 2 | ||||
-rw-r--r-- | tex/context/base/tabl-xtb.mkvi | 3 | ||||
-rw-r--r-- | tex/context/base/x-asciimath.lua | 19 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
14 files changed, 142 insertions, 139 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 7aaabd8b0..9adba1a84 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{2015.05.10 20:08} +\newcontextversion{2015.05.11 14:01} %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 2c9b4c63e..9560e74e9 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 3b70cecc2..4e9bf74ef 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.05.10 20:08} +\edef\contextversion{2015.05.11 14:01} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/publ-dat.lua b/tex/context/base/publ-dat.lua index 1e651c45b..5d19003ce 100644 --- a/tex/context/base/publ-dat.lua +++ b/tex/context/base/publ-dat.lua @@ -327,30 +327,33 @@ function publications.parenttag(dataset,tag) local parent = tags[1] local current = datasets[dataset] local luadata = current.luadata + local details = current.details local first = luadata[parent] if first then - local combined = first.combined - if not combined then - combined = { } - first.combined = combined + local detail = details[parent] + local children = detail.children + if not children then + children = { } + detail.children = children end -- add new ones but only once for i=2,#tags do local tag = tags[i] - for j=1,#combined do - if combined[j] == tag then + for j=1,#children do + if children[j] == tag then tag = false end end if tag then local entry = luadata[tag] if entry then - combined[#combined+1] = tag - if combined[tag] then - report("error in combination, dataset %a, tag %a, parent %a, ignored %a",dataset,tag,combined[tag],parent) + local detail = details[tag] + children[#children+1] = tag + if detail.parent then + report("error in combination, dataset %a, tag %a, parent %a, ignored %a",dataset,tag,detail.parent,parent) else report("combining, dataset %a, tag %a, parent %a",dataset,tag,parent) - current.combined[tag] = parent + detail.parent = parent end end end @@ -388,7 +391,6 @@ function publications.new(name) -- used specifications }, suffixed = false, - combined = { }, } -- we delay details till we need it (maybe we just delay the -- individual fields but that is tricky as there can be some diff --git a/tex/context/base/publ-imp-apa.mkvi b/tex/context/base/publ-imp-apa.mkvi index d2eae8e9b..6bca46204 100644 --- a/tex/context/base/publ-imp-apa.mkvi +++ b/tex/context/base/publ-imp-apa.mkvi @@ -124,11 +124,18 @@ \definebtx [apa:\s!list:journal] + [apa:\s!list] [\c!style=\v!italic] %command=\btxexpandedjournal] % btxabbreviatedjournal \definebtx + [apa:\s!list:volume] + [apa:\s!list] + [\c!style=\v!italic] + +\definebtx [apa:\s!list:title] + [apa:\s!list] [\c!style=\v!italic, \c!command=\Word, \c!translate=\v!yes] @@ -717,7 +724,7 @@ \begingroup \language[\mainbtxlanguage] \btxleftbracket - \btxusecommand [apa:list:title:\currentbtxcategory] { + \btxusecommand [apa:\s!list:title:\currentbtxcategory] { \btxflush{#title:\mainbtxlanguage} } \btxrightbracket @@ -727,20 +734,22 @@ \stoptexdefinition \starttexdefinition btx:apa:composed-title #title - \begingroup - \language[\currentbtxlanguage] - \btxusecommand [apa:list:title:\currentbtxcategory] { - \btxflush{#title} - \btxdoif {sub#title} { - \btxcolon - \btxflush{sub#title} + \btxstartstyleandcolor [apa:\s!list:title:\currentbtxcategory] + \begingroup + \language[\currentbtxlanguage] + \btxusecommand [apa:\s!list:title:\currentbtxcategory] { + \btxflush{#title} + \btxdoif {sub#title} { + \btxcolon + \btxflush{sub#title} + } } - } - \endgroup - % which namespace? - %\doif{\btxparameter{translate}}\v!yes { - \texdefinition{btx:apa:translated-title}{#title} - %} + \endgroup + % which namespace? + %\doif{\btxparameter{translate}}\v!yes { + \texdefinition{btx:apa:translated-title}{#title} + %} + \btxstopstyleandcolor \stoptexdefinition \starttexdefinition btx:apa:title @@ -750,14 +759,10 @@ \texdefinition{btx:format:inject} {url(file:\btxflush{file})} { - \btxstartstyleandcolor [apa:list:title:\currentbtxcategory] - \texdefinition{btx:apa:composed-title}{title} - \btxstopstyleandcolor + \texdefinition{btx:apa:composed-title}{title} } } { - \btxstartstyleandcolor [apa:list:title:\currentbtxcategory] - \texdefinition{btx:apa:composed-title}{title} - \btxstopstyleandcolor + \texdefinition{btx:apa:composed-title}{title} } \btxdoif {title} { \btxperiod @@ -869,9 +874,7 @@ \texdefinition{btx:apa:author-or-editor} {editor} } \btxspace - \btxstartstyleandcolor[apa:list:title] - \texdefinition{btx:apa:composed-title} {booktitle} - \btxstopstyleandcolor + \texdefinition{btx:apa:composed-title} {booktitle} \btxperiod } \stoptexdefinition @@ -893,7 +896,7 @@ \doif {\currentbtxcategory} {techreport} { \texdefinition{btx:apa:leftparenthesis-or-comma} \btxdoifelse {type} { - \btxusecommand [apa:list:type] { + \btxusecommand [apa:\s!list:type] { \btxflush{type} } } { @@ -937,26 +940,35 @@ } \stoptexdefinition +\starttexdefinition btx:apa:journal + \btxstartstyleandcolor[apa:\s!list:journal] + \btxusecommand [apa:\s!list:journal] { + \btxflush{journal} + } + \btxstopstyleandcolor +\stoptexdefinition + +\starttexdefinition btx:apa:volume + \btxstartstyleandcolor[apa:\s!list:volume] + \btxflush{volume} + \btxstopstyleandcolor +\stoptexdefinition + % this could be simplified! \starttexdefinition btx:apa:journal-volume-number-pages \btxdoif {journal} { \btxspace - \btxstartstyleandcolor[apa:list:journal] - \btxusecommand [apa:list:journal] { - \btxflush{journal} - } + \texdefinition{btx:apa:journal} \btxdoifelse {volume} { \btxcomma - \btxflush{volume} - \btxstopstyleandcolor + \texdefinition{btx:apa:volume} \btxdoif {number} { %\btxleftparenthesis (\btxflush{number} \btxrightparenthesis } } { - \btxstopstyleandcolor \btxdoif {number} { \btxcomma \btxleftparenthesis @@ -1219,7 +1231,7 @@ \texdefinition{btx:apa:title-if-not-placed} \btxleftparenthesis \btxdoifelse {type} { - \btxusecommand [apa:list:type] { + \btxusecommand [apa:\s!list:type] { \btxflush{type} } } { diff --git a/tex/context/base/publ-imp-aps.mkvi b/tex/context/base/publ-imp-aps.mkvi index 11104a7eb..948cca8bc 100644 --- a/tex/context/base/publ-imp-aps.mkvi +++ b/tex/context/base/publ-imp-aps.mkvi @@ -114,15 +114,18 @@ \definebtx [aps:\s!list:journal] + [aps:\s!list] [\c!style=\v!italic] %command=\btxexpandedjournal] % btxabbreviatedjournal \definebtx [aps:\s!list:volume] + [aps:\s!list] [\c!style=\v!bold] \definebtx [aps:\s!list:title] + [aps:\s!list] [\c!style=\v!italic, \c!command=\Word] @@ -610,16 +613,18 @@ %D author or editor or publisher or title or "" \starttexdefinition btx:aps:composed-title #title - \begingroup - \language[\currentbtxlanguage] - \btxusecommand [aps:list:title:\currentbtxcategory] { - \btxflush{#title} - \btxdoif {sub#title} { - \btxcolon - \btxflush{sub#title} + \btxstartstyleandcolor [aps:\s!list:title:\currentbtxcategory] + \begingroup + \language[\currentbtxlanguage] + \btxusecommand [aps:\s!list:title:\currentbtxcategory] { + \btxflush{#title} + \btxdoif {sub#title} { + \btxcolon + \btxflush{sub#title} + } } - } - \endgroup + \endgroup + \btxstopstyleandcolor \stoptexdefinition \starttexdefinition btx:aps:title @@ -629,14 +634,10 @@ \texdefinition{btx:format:inject} {url(file:\btxflush{file})} { - \btxstartstyleandcolor [aps:list:title:\currentbtxcategory] - \texdefinition{btx:aps:composed-title}{title} - \btxstopstyleandcolor + \texdefinition{btx:aps:composed-title}{title} } } { - \btxstartstyleandcolor [aps:list:title:\currentbtxcategory] - \texdefinition{btx:aps:composed-title}{title} - \btxstopstyleandcolor + \texdefinition{btx:aps:composed-title}{title} } \btxcomma } @@ -692,9 +693,7 @@ \texdefinition{btx:aps:author-or-editor} {editor} } \btxspace - \btxstartstyleandcolor[aps:list:title] - \texdefinition{btx:aps:composed-title} {booktitle} - \btxstopstyleandcolor + \texdefinition{btx:aps:composed-title} {booktitle} \btxcomma } \stoptexdefinition @@ -746,11 +745,13 @@ \starttexdefinition btx:aps:journal-volume-year \btxdoif {journal} { - % expandedjournal abbreviatedjournal - \btxflush{expandedjournal -> journal} + \btxstartstyleandcolor [aps:\s!list:journal] + % expandedjournal abbreviatedjournal + \btxflush{expandedjournal -> journal} + \btxstopstyleandcolor \btxdoifelse {volume} { \btxspace - \btxstartstyleandcolor [aps:list:volume] + \btxstartstyleandcolor [aps:\s!list:volume] \btxflush{volume} \btxstopstyleandcolor \btxdoif {number} { diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua index 04a3f1cc1..2921fd334 100644 --- a/tex/context/base/publ-ini.lua +++ b/tex/context/base/publ-ini.lua @@ -486,29 +486,27 @@ local findallused do local tags = not find and settings_to_array(reference) local todo = { } local okay = { } -- only if mark - local set = usedentries[dataset] - local valid = current.luadata + local allused = usedentries[dataset] + local luadata = current.luadata + local details = current.details local ordered = current.ordered - local combined = current.combined if set then local registered = { } local function register(tag) - if registered[tag] then - return - else - registered[tag] = true - end - local entry = set[tag] + local entry = allused[tag] if not entry then - local parent = combined[tag] + local parent = details[tag].parent if parent then - entry = set[parent] + entry = allused[parent] end if entry then report("using reference of parent %a for %a",parent,tag) tag = parent end end + if registered[tag] then + return + end if entry then -- only once in a list but at some point we can have more (if we -- decide to duplicate) @@ -547,6 +545,7 @@ local findallused do okay[#okay+1] = entry end todo[tag] = true + registered[tag] = true return tag end if reference == "*" then @@ -573,7 +572,7 @@ local findallused do else for i=1,#tags do local tag = tags[i] - if valid[tag] then + if luadata[tag] then tag = register(tag) tags[i] = tag elseif not reported[tag] then @@ -589,7 +588,7 @@ local findallused do local entry = ordered[i] if find(entry) then local tag = entry.tag - local parent = combined[tag] + local parent = details[tag].parent if parent then tag = parent end @@ -604,12 +603,12 @@ local findallused do else for i=1,#tags do local tag = tags[i] - local parent = combined[tag] + local parent = details[tag].parent if parent then tag = parent tags[i] = tag end - if valid[tag] then + if luadata[tag] then todo[tag] = true elseif not reported[tag] then reported[tag] = true @@ -1825,7 +1824,6 @@ do local current = datasets[dataset] local luadata = current.luadata local details = current.details - local combined = current.combined local newlist = { } local lastreferencenumber = groups[group] -- current.lastreferencenumber or 0 for i=1,#list do @@ -1847,51 +1845,36 @@ do else list = newlist end --- local combined = { } - local newlist = { } --- for i=1,#list do --- local userdata = list[i][4] --- if userdata then --- local com = userdata.btxcom --- if com then --- com = settings_to_array(com) --- for i=1,#com do --- local c = com[i] --- if not combined[c] then --- report("ignoring list entry for tag %a due to combined usage in %a ",c,tag) --- combined[c] = true --- end --- end --- end --- end --- end - local tagtolistindex = { } + local newlist = { } + local tagtolistindex = { } rendering.tagtolistindex = tagtolistindex for i=1,#list do local li = list[i] local tag = li[1] - if not combined[tag] then - local entry = luadata[tag] - if entry then - local detail = details[tag] - if detail then - local referencenumber = detail.referencenumber - if not referencenumber then - lastreferencenumber = lastreferencenumber + 1 - referencenumber = lastreferencenumber - detail.referencenumber = lastreferencenumber - end - li[3] = referencenumber - else - report("missing details for tag %a in dataset %a (enhanced: %s)",tag,dataset,current.enhanced and "yes" or "no") - -- weird, this shouldn't happen .. all have a detail - lastreferencenumber = lastreferencenumber + 1 - details[tag] = { referencenumber = lastreferencenumber } - li[3] = lastreferencenumber + local entry = luadata[tag] + if entry then + local detail = details[tag] + if not detail then + -- fatal error + report("fatal error, missing details for tag %a in dataset %a (enhanced: %s)",tag,dataset,current.enhanced and "yes" or "no") + -- lastreferencenumber = lastreferencenumber + 1 + -- details[tag] = { referencenumber = lastreferencenumber } + -- li[3] = lastreferencenumber + -- tagtolistindex[tag] = i + -- newlist[#newlist+1] = li + elseif detail.parent then + -- skip this one + else + local referencenumber = detail.referencenumber + if not referencenumber then + lastreferencenumber = lastreferencenumber + 1 + referencenumber = lastreferencenumber + detail.referencenumber = lastreferencenumber end + li[3] = referencenumber tagtolistindex[tag] = i + newlist[#newlist+1] = li end - newlist[#newlist+1] = li end end groups[group] = lastreferencenumber @@ -2108,10 +2091,10 @@ do ctx_btxstartlistentry() ctx_btxsetcurrentlistentry(i) -- redundant ctx_btxsetcurrentlistindex(listindex or 0) - local combined = entry.combined + local children = detail.children local language = entry.language - if combined then - ctx_btxsetcombis(concat(combined,",")) + if children then + ctx_btxsetcombis(concat(children,",")) end ctx_btxsetcategory(entry.category or "unknown") ctx_btxsettag(tag) @@ -2513,7 +2496,7 @@ do language = ldata.language, dataset = dataset, tag = tag, - combis = entry.userdata.btxcom, + -- combis = entry.userdata.btxcom, -- luadata = ldata, } setter(data,dataset,tag,entry) @@ -2560,10 +2543,10 @@ do if language then ctx_btxsetlanguage(language) end -local combis = entry.combis -if combis then - ctx_btxsetcombis(combis) -end + -- local combis = entry.combis + -- if combis then + -- ctx_btxsetcombis(combis) + -- end if not getter(entry,last,nil,specification) then ctx_btxsetfirst("") -- (f_missing(tag)) end diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv index 6d57a233d..0b12d97ed 100644 --- a/tex/context/base/publ-ini.mkiv +++ b/tex/context/base/publ-ini.mkiv @@ -655,6 +655,7 @@ \unexpanded\def\btx_entry_inject {\begingroup + \redoconvertfont % see (**) in strc-lst, this will become an configuration option \edef\currentbtxcategory{\btxfield{category}}% \ignorespaces \ifconditional\c_btx_list_texts diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex a1f5582c4..bc29a27bd 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 7903adbdc..3ab1027a7 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-lst.mkvi b/tex/context/base/strc-lst.mkvi index 803e6b813..c8bcb0ed3 100644 --- a/tex/context/base/strc-lst.mkvi +++ b/tex/context/base/strc-lst.mkvi @@ -773,7 +773,7 @@ % better is to use a special list entry but we keep this for compatibility \let\\=\space % so expanding this token register has to come *after* the font switch - \dontconvertfont + \dontconvertfont % (**) this has to become an option (see publ) \to \t_lists_every_renderingtext \appendtoks diff --git a/tex/context/base/tabl-xtb.mkvi b/tex/context/base/tabl-xtb.mkvi index 876abef8c..a8f205f4a 100644 --- a/tex/context/base/tabl-xtb.mkvi +++ b/tex/context/base/tabl-xtb.mkvi @@ -351,7 +351,8 @@ % in text flow: headers and footers only once \setvalue{\??xtableflushsplit\v!no}% - {\noindent % \dontleavehmode % else no leftskip etc + {\noindentation % better than \noindent (no \dontleavehmode here) % else no leftskip etc + %\ignorespaces \clf_x_table_flush method {\v!normal}% \relax diff --git a/tex/context/base/x-asciimath.lua b/tex/context/base/x-asciimath.lua index 932c9a1b4..71d08f499 100644 --- a/tex/context/base/x-asciimath.lua +++ b/tex/context/base/x-asciimath.lua @@ -714,16 +714,19 @@ for k, v in next, characters.data do reserved[name] = { true, utfchar(k) } end local spec = v.mathspec --- if spec then --- for i=1,#spec do --- local name = spec[i].name --- if name and not reserved[name] then --- reserved[name] = { true, utfchar(k) } --- end --- end --- end + -- if spec then + -- for i=1,#spec do + -- local name = spec[i].name + -- if name and not reserved[name] then + -- reserved[name] = { true, utfchar(k) } + -- end + -- end + -- end end +reserved.P = nil +reserved.S = nil + local isbinary = { ["\\frac"] = true, ["\\root"] = true, diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 191f3f7b9..68b3fc5b1 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 : 05/10/15 20:08:09 +-- merge date : 05/11/15 14:01:41 do -- begin closure to overcome local limits and interference |