summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4187 -> 4189 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/publ-ini.lua60
-rw-r--r--tex/context/base/publ-ini.mkiv26
-rw-r--r--tex/context/base/status-files.pdfbin24490 -> 24514 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin249902 -> 249907 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
8 files changed, 73 insertions, 19 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 5162e693e..6b601c87b 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.04.12 00:54}
+\newcontextversion{2015.04.12 15:41}
%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 9f040f8a0..cc3d19460 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 d9e0dcd3d..e6ea8f7c6 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.04.12 00:54}
+\edef\contextversion{2015.04.12 15:41}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua
index 9ac534c63..425ff20f8 100644
--- a/tex/context/base/publ-ini.lua
+++ b/tex/context/base/publ-ini.lua
@@ -66,9 +66,13 @@ local v_force = variables.force
local v_none = variables.none
local v_yes = variables.yes
local v_all = variables.all
+local v_always = variables.always
+local v_doublesided = variables.doublesided
local v_default = variables.default
local v_dataset = variables.dataset
+local conditionals = tex.conditionals
+
local numbertochar = converters.characters
local logsnewline = logs.newline
@@ -321,6 +325,7 @@ local nofcitations = 0
local usedentries = nil
local citetolist = nil
local listtocite = nil
+local listtolist = nil
do
@@ -330,6 +335,7 @@ do
usedentries = allocate { }
citetolist = allocate { }
listtocite = allocate { }
+ listtolist = allocate { }
local names = { }
local internals = structures.references.internals
local p_collect = (C(R("09")^1) * Carg(1) / function(s,entry) listtocite[tonumber(s)] = entry end + P(1))^0
@@ -365,6 +371,10 @@ do
local bck = userdata.btxbck
if bck then
lpegmatch(p_collect,bck,1,entry) -- for s in string.gmatch(bck,"[^ ]+") do listtocite[tonumber(s)] = entry end
+ local lst = tonumber(userdata.btxlst)
+ if lst then
+ listtolist[lst] = entry
+ end
else
local int = tonumber(userdata.btxint)
if int then
@@ -433,6 +443,7 @@ do
usedentries = setmetatableindex(function(_,k) if initialize then initialize() end return usedentries[k] end)
citetolist = setmetatableindex(function(_,k) if initialize then initialize() end return citetolist [k] end)
listtocite = setmetatableindex(function(_,k) if initialize then initialize() end return listtocite [k] end)
+ listtolist = setmetatableindex(function(_,k) if initialize then initialize() end return listtolist [k] end)
function publications.usedentries()
if initialize then
@@ -1874,18 +1885,47 @@ do
arguments = { "string", "string" }
}
- function lists.sameasprevious(dataset,i,name)
+ function lists.sameasprevious(dataset,i,name,order,method)
local rendering = renderings[dataset]
local list = rendering.list
local n = tonumber(i)
if n and n > 1 and n <= #list then
- local luadata = datasets[dataset].luadata
- local current = getdirect(dataset,luadata[list[n ][1]],name)
- local previous = getdirect(dataset,luadata[list[n-1][1]],name)
- if trace_detail then
- report("previous %a, current %a",tostring(previous),tostring(current))
+ local luadata = datasets[dataset].luadata
+ local current = getdirect(dataset,luadata[list[n ][1]],name)
+ local previous = getdirect(dataset,luadata[list[n-1][1]],name)
+ -- if not order then
+ -- order = gettexcounter("c_btx_list_reference")
+ -- end
+ if order and order > 0 and (method == v_always or method == v_doublesided) then
+ local clist = listtolist[order]
+ local plist = listtolist[order-1]
+ if clist and plist then
+ local crealpage = clist.references.realpage
+ local prealpage = plist.references.realpage
+ if crealpage ~= prealpage then
+ if method == v_always or not conditionals.layoutisdoublesided then
+ if trace_detail then
+ report("previous %a, current %a, different page",previous,current)
+ end
+ return false
+ elseif crealpage % 2 == 0 then
+ if trace_detail then
+ report("previous %a, current %a, different page",previous,current)
+ end
+ return false
+ end
+ end
+ end
end
- return current and current == previous
+ local sameentry = current and current == previous
+ if trace_detail then
+ if sameentry then
+ report("previous %a, current %a, same entry",previous,current)
+ else
+ report("previous %a, current %a, different entry",previous,current)
+ end
+ end
+ return sameentry
else
return false
end
@@ -2035,7 +2075,7 @@ do
implement {
name = "btxdoifelsesameasprevious",
actions = { lists.sameasprevious, ctx_doifelse },
- arguments = { "string", "integer", "string" }
+ arguments = { "string", "integer", "string", "integer", "string" }
}
end
@@ -2604,7 +2644,7 @@ do
local suffix = getdetail(dataset,tag,"suffix")
data.year = year
data.suffix = suffix
- data.sortkey = tonumber(year) or 0
+ data.sortkey = tonumber(year) or 9999
end
local function getter(first,last)
@@ -2921,7 +2961,7 @@ do
local suffix = getdetail(dataset,tag,"suffix")
data.year = year
data.suffix = suffix
- data.sortkey = tonumber(year) or 0
+ data.sortkey = tonumber(year) or 9999
end
local function getter(first,last)
diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv
index 4a754744b..b24da5985 100644
--- a/tex/context/base/publ-ini.mkiv
+++ b/tex/context/base/publ-ini.mkiv
@@ -71,6 +71,7 @@
\def\s!btxatx {btxatx}
\def\s!btxbtx {btxbtx}
\def\s!btxspc {btxspc}
+\def\s!btxlst {btxlst}
\definelabelclass[btxlabel][2]
@@ -674,10 +675,19 @@
\unexpanded\def\btxsetcurrentlistentry#1{\edef\currentbtxlistentry{#1}}
\unexpanded\def\btxsetcurrentlistindex#1{\edef\currentbtxlistindex{#1}}
-\unexpanded\def\btxdoifelsesameasprevious#1%
- {\clf_btxdoifelsesameasprevious{\currentbtxdataset}\currentbtxlistentry{#1}}
+\unexpanded\def\btxdoifelsesameaspreviouschecked#1#2% #1 == always | doublesided
+ {\clf_btxdoifelsesameasprevious
+ {\currentbtxdataset}%
+ \currentbtxlistentry%
+ {#2}%
+ \c_btx_list_reference
+ {#1}}
-\let\btxdoifsameaspreviouselse\btxdoifelsesameasprevious
+\unexpanded\def\btxdoifelsesameasprevious
+ {\btxdoifelsesameaspreviouschecked\v!doublesided}
+
+\let\btxdoifsameaspreviouscheckedelse\btxdoifelsesameaspreviouschecked
+\let\btxdoifsameaspreviouselse \btxdoifelsesameasprevious
\def\publ_place_list_indeed#1[#2][#3]%
{\begingroup
@@ -807,10 +817,14 @@
{\strc_lists_entry_process}
\unexpanded\def\btxstartlistentry % maybe pass i
- {\begingroup}
+ {\begingroup
+ \global\advance\c_btx_list_reference\plusone}
\unexpanded\def\btxstoplistentry
- {\endgroup}
+ {\iftrialtypesetting
+ \global\advance\c_btx_list_reference\minusone
+ \fi
+ \endgroup}
\newtoks\everybtxlistentry
@@ -879,11 +893,11 @@
\def\btx_list_reference_inject_now
{\btx_trace_list_cross\empty\currentbtxbacktrace
- \global\advance\c_btx_list_reference\plusone
\strc_references_direct_full_user
{\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi%
\s!btxref=\currentbtxtag,%
\s!btxspc=\currentbtxspecification,%
+ \s!btxlst=\number\c_btx_list_reference,% check if needed
\ifx\currentbtxbefore\empty\else\s!btxbtx={\currentbtxbefore},\fi%
\ifx\currentbtxafter \empty\else\s!btxatx={\currentbtxafter },\fi%
\ifx\currentbtxbacklink\currentbtxbacktrace\s!btxint=\currentbtxbacklink\else\s!btxbck=\currentbtxbacktrace\fi}%
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 66adaca55..db0b63cec 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 32948e8b2..54a798c4a 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index fe8704b19..448846b84 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 : 04/12/15 00:54:05
+-- merge date : 04/12/15 15:41:22
do -- begin closure to overcome local limits and interference