summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-05-27 00:31:00 +0200
committerHans Hagen <pragma@wxs.nl>2014-05-27 00:31:00 +0200
commit0c462e21bcf750999c3cb1caa656569ac83b6af9 (patch)
tree63bb8f9cb236ac2001e5c675e0c42c352df4283d
parentedf3b6a69ff7b618b51a056d31b71f842c24c198 (diff)
downloadcontext-0c462e21bcf750999c3cb1caa656569ac83b6af9.tar.gz
beta 2014.05.27 00:31
-rw-r--r--doc/context/manuals/allkind/mkiv-publications.pdfbin299800 -> 320676 bytes
-rw-r--r--doc/context/manuals/allkind/mkiv-publications.tex18
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4280 -> 4280 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/publ-ini.lua32
-rw-r--r--tex/context/base/publ-ini.mkiv114
-rw-r--r--tex/context/base/publ-tra.lua6
-rw-r--r--tex/context/base/status-files.pdfbin24630 -> 24609 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin244607 -> 244753 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
11 files changed, 133 insertions, 43 deletions
diff --git a/doc/context/manuals/allkind/mkiv-publications.pdf b/doc/context/manuals/allkind/mkiv-publications.pdf
index 93b389ada..a8cb74c57 100644
--- a/doc/context/manuals/allkind/mkiv-publications.pdf
+++ b/doc/context/manuals/allkind/mkiv-publications.pdf
Binary files differ
diff --git a/doc/context/manuals/allkind/mkiv-publications.tex b/doc/context/manuals/allkind/mkiv-publications.tex
index 87c1f863c..b399ae722 100644
--- a/doc/context/manuals/allkind/mkiv-publications.tex
+++ b/doc/context/manuals/allkind/mkiv-publications.tex
@@ -467,6 +467,24 @@ inherited.
\getbuffer
+You can see all (currently known) fields with:
+
+\starttyping
+\showbtxfields[rotation=...]
+\stoptyping
+
+The result is shown \in {table} [tab:fields]. Here we also added a few extra fields:
+
+\startbuffer
+\btxaddfields[one,two][extra one, extra two]
+\stopbuffer
+
+\typebuffer \getbuffer
+
+\startplacefigure[title={\type{\showbtxfields[rotation=90]}},reference=tab:fields]
+ \showbtxfields[rotation=90]
+\stopplacefigure
+
\stopchapter
\startchapter[title=Renderings]
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 67526a9aa..dfd35315d 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.05.26 22:08}
+\newcontextversion{2014.05.27 00:31}
%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 548571204..6f01102d3 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 c9efb4b9d..86ceb55fc 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.05.26 22:08}
+\edef\contextversion{2014.05.27 00:31}
\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 434728748..34c8a1236 100644
--- a/tex/context/base/publ-ini.lua
+++ b/tex/context/base/publ-ini.lua
@@ -99,6 +99,10 @@ local ctx_btxsetlistreference = context.btxsetlistreference
local ctx_btxmissing = context.btxmissing
local ctx_btxsettag = context.btxsettag
+local ctx_btxsetlanguage = context.btxsetlanguage
+local ctx_btxsetindex = context.btxsetindex
+local ctx_btxsetcombis = context.btxsetcombis
+local ctx_btxsetcategory = context.btxsetcategory
local ctx_btxcitesetup = context.btxcitesetup
local ctx_btxsetfirst = context.btxsetfirst
local ctx_btxsetsecond = context.btxsetsecond
@@ -962,15 +966,18 @@ function lists.flushentries(dataset,sortvariant)
local tag = list[i][1]
local entry = luadata[tag]
if entry then
- ctx_setvalue("currentbtxindex",i) -- todo: helper
+ ctx_btxsetindex(i)
local combined = entry.combined
if combined then
- ctx_setvalue("currentbtxcombis",concat(combined,","))
- else
- ctx_setvalue("currentbtxcombis","")
+ ctx_btxsetcombis(concat(combined,","))
+ end
+ ctx_btxsetcategory(entry.category or "unknown")
+ ctx_btxsettag(tag)
+ ctx_btxhandlelistentry()
+ local language = entry.language
+ if language then
+ ctx_btxsetlanguage(language)
end
- ctx_setvalue("currentbtxcategory",entry.category or "unknown")
- ctx_btxhandlelistentry(tag) -- pass i instead and also pass 'placed'
end
end
end
@@ -1060,7 +1067,6 @@ local function sortedtags(dataset,list,sorttype)
tag = tag,
split = sortsplitter(sortstripper(key))
}
- else
end
end
end
@@ -1285,6 +1291,10 @@ local function processcite(dataset,reference,mark,compress,setup,getter,setter,c
if internal then
ctx_btxsetinternal(internal)
end
+ local language = first.language
+ if language then
+ ctx_btxsetlanguage(language)
+ end
if not setter(first,entry.last) then
ctx_btxsetfirst(f_missing(first.tag))
end
@@ -1299,6 +1309,10 @@ local function processcite(dataset,reference,mark,compress,setup,getter,setter,c
if internal then
ctx_btxsetinternal(internal)
end
+ local language = entry.language
+ if language then
+ ctx_btxsetlanguage(language)
+ end
if not setter(entry) then
ctx_btxsetfirst(f_missing(tag))
end
@@ -1320,6 +1334,10 @@ local function processcite(dataset,reference,mark,compress,setup,getter,setter,c
if internal then
ctx_btxsetinternal(internal)
end
+ local language = entry.language
+ if language then
+ ctx_btxsetlanguage(language)
+ end
ctx_btxsetconcat(state)
if not setter(entry) then
ctx_btxsetfirst(f_missing(entry.tag))
diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv
index 61a84f496..d4479d1e9 100644
--- a/tex/context/base/publ-ini.mkiv
+++ b/tex/context/base/publ-ini.mkiv
@@ -51,11 +51,12 @@
\startcontextdefinitioncode
-\def\s!btx {btx}
-\def\s!cite {cite}
-\def\s!list {list}
-\def\v!btxcite {btxcite}
-\def\v!btxlist {btxlist}
+\def\s!btx {btx}
+\def\s!cite {cite}
+\def\s!list {list}
+\def\v!btxcite {btxcite}
+\def\v!btxlist {btxlist}
+\def\v!btxrendering {btxrendering}
\definelabelclass[btxlabel][2]
@@ -99,13 +100,38 @@
\unexpanded\setvalue{\??constructiontexthandler\v!btxlist}%
{\begingroup
+ \xdef\btxcurrentlistinternal{\the\numexpr\locationcount+\plusone)}% \nextinternalreference
+ \directsetup{\v!btxrendering:\v!number:\constructionparameter\c!number}%
+ \endgroup}
+
+\startsetups[\v!btxrendering:\v!number:\v!no]
+ % \btx_reference_checked % needs testing
+\stopsetups
+
+\startsetups[\v!btxrendering:\v!number:\v!yes]
\useconstructionstyleandcolor\c!headstyle\c!headcolor % move to \currentconstructiontext
\the\everyconstruction
- \goto
- {\strut\constructionparameter\c!text\btx_list_reference_inject}%
-% [\s!btx:list:\the\numexpr\locationcount+\plusone]% \nextinternalreference
- [internal(\the\numexpr\locationcount+\plusone)]% \nextinternalreference
- \endgroup}
+ \relax
+ \iflocation
+ \goto
+ {\publ_list_number_normal}%
+ [\s!internal(\btxcurrentlistinternal)]%
+ \else
+ \publ_list_number_normal
+ \fi
+\stopsetups
+
+\unexpanded\def\publ_list_number_normal
+ {\strut
+ \constructionparameter\c!text
+ \btx_list_reference_inject
+ \relax}
+
+\let\btxcurrentlistinternal\relax
+
+% todo: low level builder commands without using the constructor
+
+% construction
\unexpanded\def\strc_constructions_initialize#1% class instance
{\edef\currentconstruction{#1}%
@@ -167,6 +193,7 @@
%\s!catcodes=,
%\c!title=\v!yes,
%\c!text=,
+ \c!number=\v!yes,
]
% here starts the bib stuff
@@ -484,9 +511,32 @@
\def\publ_place_list_entry_register
{\ctxcommand{btxregisterlistentry("\currentbtxdataset","\currentbtxtag")}}
-\unexpanded\def\btxhandlelistentry#1% called at the lua end / todo: pass check state
+\unexpanded\def\btxlistreset
+ {\let\currentbtxindex \!!zerocount
+ \let\currentbtxcombis \empty
+ \let\currentbtxcategory\empty
+ \let\currentbtxinternal\empty
+ \let\currentbtxlanguage\empty
+ \let\currentbtxtag \empty}
+
+\unexpanded\def\btxsetindex {\def\currentbtxindex}
+\unexpanded\def\btxsetcombis {\def\currentbtxcombis}
+\unexpanded\def\btxsetcategory{\def\currentbtxcategory}
+\unexpanded\def\btxsetinternal{\def\currentbtxinternal}
+%unexpanded\def\btxsetlanguage{\def\currentbtxlanguage}
+\unexpanded\def\btxsettag {\def\currentbtxtag}
+
+\unexpanded\def\btxsetlanguage#1%
+ {\def\currentbtxlanguage{#1}%
+ \ifx\currentbtxlanguage\currentlanguage \else
+ \setcurrentlanguage\currentmainlanguage\currentbtxlanguage
+ \fi}
+
+\btxlistreset
+
+\unexpanded\def\btxhandlelistentry% called at the lua end / todo: pass check state
{\begingroup
- \edef\currentbtxtag{#1}%
+ %edef\currentbtxtag{#1}% set at the Lua end
\ifconditional\c_publ_place_all
\publ_place_list_entry
\else\ifconditional\c_publ_place_check
@@ -650,27 +700,18 @@
\fi
\to \everysetupbtxciteplacement
-% bib -> btx
+% these will go away or at least need to be checked:
-\unexpanded\def\btxgotolink#1[#2]{\doifreferencefoundelse{\bibrefprefix#2}{\goto{#1}[\bibrefprefix#2]}{#1}}
-\unexpanded\def\btxatlink [#1]{\doifreferencefoundelse{\bibrefprefix#1}{\at [\bibrefprefix#1]}{#1}}
-\unexpanded\def\btxinlink [#1]{\doifreferencefoundelse{\bibrefprefix#1}{\expanded{\goto{\currentreferencetext}}[\bibrefprefix#1]}{#1}}
+% \unexpanded\def\btxgotolink#1[#2]{\doifreferencefoundelse{\bibrefprefix#2}{\goto{#1}[\bibrefprefix#2]}{#1}}
+% \unexpanded\def\btxatlink [#1]{\doifreferencefoundelse{\bibrefprefix#1}{\at [\bibrefprefix#1]}{#1}}
+% \unexpanded\def\btxinlink [#1]{\doifreferencefoundelse{\bibrefprefix#1}{\expanded{\goto{\currentreferencetext}}[\bibrefprefix#1]}{#1}}
-\unexpanded\def\btxdirectlink#1#2{\goto{#2 {\tttf[#1]}}[#1]}
-\unexpanded\def\btxdirectlink#1#2{\goto{#2}[#1]}
+% \unexpanded\def\btxdirectlink#1#2{\goto{#2 {\tttf[#1]}}[#1]}
+% \unexpanded\def\btxdirectlink#1#2{\goto{#2}[#1]}
-\let\gotobiblink\btxgotolink
-\let\atbiblink \btxatlink
-\let\inbiblink \btxinlink
-
-\unexpanded\def\btxnumberedreference[#1]% \bibtexnumref (replaced by \cite[num])
- {\dontleavehmode
- \begingroup
- \btxcitevariantparameter\v!left
- \penalty\plustenthousand % todo
- \ctxcommand{btxresolvelistreference("\currentbtxdataset","#1")}% todo: split dataset from #1, so another call
- \btxcitevariantparameter\v!right
- \endgroup}
+% \let\gotobiblink\btxgotolink
+% \let\atbiblink \btxatlink
+% \let\inbiblink \btxinlink
\appendtoks
% for old times sake, for a while at least
@@ -684,6 +725,17 @@
\let\noopsort \gobbleoneargument
\to \everysetupbtxciteplacement
+% till here
+
+\unexpanded\def\btxnumberedreference[#1]% \bibtexnumref (replaced by \cite[num])
+ {\dontleavehmode
+ \begingroup
+ \btxcitevariantparameter\v!left
+ \penalty\plustenthousand % todo
+ \ctxcommand{btxresolvelistreference("\currentbtxdataset","#1")}% todo: split dataset from #1, so another call
+ \btxcitevariantparameter\v!right
+ \endgroup}
+
\appendtoks
\doifnot{\btxrenderingparameter\c!continue}\v!yes
{\global\btxlistcounter\zerocount}%
@@ -861,6 +913,7 @@
{\let\currentbtxfirst \empty
\let\currentbtxsecond \empty
\let\currentbtxinternal\empty
+ \let\currentbtxlanguage\empty
\let\currentbtxtag \empty
\setconstant\currentbtxconcat\zerocount}
@@ -874,6 +927,7 @@
\unexpanded\def\btxsetsecond {\def\currentbtxsecond}
\unexpanded\def\btxsettag {\def\currentbtxtag}
\unexpanded\def\btxsetinternal{\def\currentbtxinternal}
+%unexpanded\def\btxsetlanguage{\def\currentbtxlanguage}
\unexpanded\def\btxsetconcat#1{\setconstant\currentbtxconcat#1\relax}
\unexpanded\def\btxsetlistreference#1#2% #3#4%
diff --git a/tex/context/base/publ-tra.lua b/tex/context/base/publ-tra.lua
index c82d11950..4b75798bd 100644
--- a/tex/context/base/publ-tra.lua
+++ b/tex/context/base/publ-tra.lua
@@ -164,9 +164,9 @@ function tracers.showdatasetfields(dataset)
local luadata = datasets[dataset].luadata
if next(luadata) then
ctx_starttabulate { "|lT|lT|pT|" }
- ctx_NC() bold("tag")
- ctx_NC() bold("category")
- ctx_NC() bold("fields")
+ ctx_NC() ctx_bold("tag")
+ ctx_NC() ctx_bold("category")
+ ctx_NC() ctx_bold("fields")
ctx_NC() ctx_NR()
ctx_FL()
for k, v in sortedhash(luadata) do
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 9acd47e9a..55c2e37c8 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 c45ce760f..cc3a209ba 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 870091dc6..55cb098a6 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/26/14 22:08:18
+-- merge date : 05/27/14 00:31:03
do -- begin closure to overcome local limits and interference