summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-09-04 21:15:04 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-09-04 21:15:04 +0200
commita9a3e739a2a67244145cfa108200a46a8e9ef277 (patch)
tree6ee9a28b21a0e5bd96d09d928716f2c47fb4687a /tex
parentc85cd9a2757a03dabd62f2281dfd267969f860f3 (diff)
downloadcontext-a9a3e739a2a67244145cfa108200a46a8e9ef277.tar.gz
2014-09-04 20:33:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4433 -> 4432 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/publ-ini.lua39
-rw-r--r--tex/context/base/publ-ini.mkiv64
-rw-r--r--tex/context/base/status-files.pdfbin25007 -> 25005 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin327144 -> 327119 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
8 files changed, 79 insertions, 30 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 7740f8a79..4d7bcdd36 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.09.04 18:33}
+\newcontextversion{2014.09.04 20:30}
%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 a50aec7d1..64baada13 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 770d92143..b6d117303 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.09.04 18:33}
+\edef\contextversion{2014.09.04 20:30}
\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 755c78273..63da84576 100644
--- a/tex/context/base/publ-ini.lua
+++ b/tex/context/base/publ-ini.lua
@@ -1420,10 +1420,10 @@ function lists.flushentries(dataset)
else
-- nothing
end
- local u = li[4]
- if u then
- local l = u.btxltx
- local r = u.btxrtx
+ local userdata = li[4]
+ if userdata then
+ local l = userdata.btxltx
+ local r = userdata.btxrtx
if l then
ctx_btxsetlefttext (l)
end
@@ -1431,10 +1431,41 @@ function lists.flushentries(dataset)
ctx_btxsetrighttext(r)
end
end
+ rendering.userdata = userdata
ctx_btxhandlelistentry()
end
end
+local function getuserdata(dataset,key)
+ local rendering = renderings[dataset]
+ if rendering then
+ local userdata = rendering.userdata
+ if userdata then
+ local value = userdata[key]
+ if value and value ~= "" then
+ return value
+ end
+ end
+ end
+end
+
+lists.uservariable = getuserdata
+
+function commands.btxuservariable(dataset,key)
+ local value = getuserdata(dataset,key)
+ if value then
+ context(value)
+ end
+end
+
+function commands.btxdoifelseuservariable(dataset,key)
+ if getuserdata(dataset,key) then
+ ctx_firstoftwoarguments()
+ else
+ ctx_secondoftwoarguments()
+ end
+end
+
function lists.filterall(dataset)
local r = renderings[dataset]
local list = r.list
diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv
index 6e680e790..515b80652 100644
--- a/tex/context/base/publ-ini.mkiv
+++ b/tex/context/base/publ-ini.mkiv
@@ -318,6 +318,11 @@
% \let\btxsetdataset\setbtxdataset
% \let\btxsetentry \setbtxentry
+% todo: no need for the currents as we can keep them at the lua end so we will haqve
+%
+% \btxfield : current
+% \btxspecificfield : dataset,tag,key
+
\def\btxfield #1{\ctxcommand{btxfield("\currentbtxdataset","\currentbtxtag","#1")}}
\def\btxdetail #1{\ctxcommand{btxdetail("\currentbtxdataset","\currentbtxtag","#1")}}
\def\btxauthorfield#1{\ctxcommand{btxauthorfield(\number\currentbtxauthorindex,"#1")}}
@@ -326,7 +331,6 @@
\def\btxdoif #1{\ctxcommand{btxdoif("\currentbtxdataset","\currentbtxtag","#1")}}
\def\btxdoifnot #1{\ctxcommand{btxdoifnot("\currentbtxdataset","\currentbtxtag","#1")}}
-
\let\btxsetup\fastsetup
%D How complex will we go? Can we assume that e.g. an apa style will not be mixed
@@ -509,7 +513,7 @@
\fi
\ifx\currentbtxrighttext\empty\else
\fastsetup{\s!btx:\currentbtxalternative:righttext}%
- \fi}%
+ \fi}
\def\btx_entry_inject_nop
{\tttf \getmessage\m!publications{12}{\currentbtxsetup}}
@@ -697,13 +701,17 @@
\def\btx_cite_reference_inject_indeed
{\btx_trace_list_cross\currentbtxbacklink\empty
- \normalexpanded{\writedatatolist%
+ \normalexpanded{\writedatatolist
[\s!btx]%
[\s!btxset=\currentbtxdataset,%
\s!btxref=\currentbtxtag,%
\ifx\p_publ_cite_lefttext \empty\else\s!btxltx={\p_publ_cite_lefttext },\fi%
\ifx\p_publ_cite_righttext\empty\else\s!btxrtx={\p_publ_cite_righttext},\fi%
- \s!btxint=\number\currentbtxbacklink]}}% % \c!location=\v!here
+ \s!btxint=\number\currentbtxbacklink
+ \ifx\currentbtxciteuservariables\empty\else,\currentbtxciteuservariables\fi]}}
+
+\def\currentbtxuservariable #1{\ctxcommand{btxuservariable("\currentbtxdataset","#1")}}
+\def\btxdoifelseuservariable#1{\ctxcommand{btxdoifelseuservariable("\currentbtxdataset","#1")}}
\let\btxcitereference\btx_cite_reference_inject
@@ -878,8 +886,8 @@
% these need to be sort of protected:
-\let\p_publ_cite_before \empty
-\let\p_publ_cite_after \empty
+%let\p_publ_cite_before \empty
+%let\p_publ_cite_after \empty
\let\p_publ_cite_lefttext \empty
\let\p_publ_cite_righttext\empty
@@ -898,23 +906,32 @@
\let\publ_citation_tags_indeed\publ_cite_tags_indeed
+\let\currentbtxciteuservariables\empty
+
\unexpanded\def\publ_cite_tags_options[#1]%
{\strictdoifnextoptionalelse{\publ_cite_tags_options_indeed{#1}}{\publ_cite_tags_indeed{#1}}}
-\unexpanded\def\publ_cite_tags_options_indeed#1[#2]%
- {\edef\currentbtxcitetag{#2}%
- \doifassignmentelse{#1}\publ_cite_tags_settings_indeed\publ_cite_tags_variants_indeed{#1}}
+\unexpanded\def\publ_cite_tags_options_indeed#1%
+ {\doifassignmentelse{#1}\publ_cite_tags_settings_indeed\publ_cite_tags_variants_indeed{#1}}
-\def\publ_cite_tags_settings_indeed#1%
+\def\publ_cite_tags_settings_indeed#1[#2]%
{\letinteractionparameter\c!style\empty
%\letinteractionparameter\c!color\empty
- \letdummyparameter\c!before \empty
- \letdummyparameter\c!after \empty
+ \letdummyparameter\c!reference \empty
\letdummyparameter\c!extras \empty
\letdummyparameter\c!alternative\empty
+ %letdummyparameter\c!before \empty
+ %letdummyparameter\c!after \empty
\letdummyparameter\c!lefttext \empty
\letdummyparameter\c!righttext \empty
\getdummyparameters[#1]%
+ \edef\p_reference{\dummyparameter\c!reference}%
+ \ifx\p_reference\empty
+ \edef\currentbtxcitetag{#2}%
+ \else
+ \let\currentbtxcitetag\p_reference
+ \edef\currentbtxciteuservariables{#2}%
+ \fi
\edef\p_alternative{\dummyparameter\c!alternative}%
\ifx\p_alternative\empty
\edef\currentbtxcitevariant{\btxcitevariantparameter\c!alternative}%
@@ -929,25 +946,26 @@
\setexpandedbtxcitevariantparameter\p_right{\p_extras\p_right}%
\fi
\fi
- \edef\p_publ_cite_before {\dummyparameter\c!before}%
- \edef\p_publ_cite_after {\dummyparameter\c!after}%
+ %edef\p_publ_cite_before {\dummyparameter\c!before}%
+ %edef\p_publ_cite_after {\dummyparameter\c!after}%
\edef\p_publ_cite_lefttext {\dummyparameter\c!lefttext}%
\edef\p_publ_cite_righttext{\dummyparameter\c!righttext}%
\the\everysetupbtxciteplacement
- \ifx\p_publ_cite_before\empty \else
- \p_publ_cite_before
- \space
- \fi
+ %ifx\p_publ_cite_before\empty \else
+ % \p_publ_cite_before
+ % \space
+ %fi
\publ_cite_variant
- \ifx\p_publ_cite_after\empty \else
- \optionalspace
- \p_publ_cite_after
- \fi
+ %ifx\p_publ_cite_after\empty \else
+ % \optionalspace
+ % \p_publ_cite_after
+ %fi
\endgroup}
-\def\publ_cite_tags_variants_indeed#1%
+\def\publ_cite_tags_variants_indeed#1[#2]%
{\letinteractionparameter\c!style\empty
\edef\currentbtxcitevariant{#1}%
+ \edef\currentbtxcitetag{#2}%
\the\everysetupbtxciteplacement
\publ_cite_variant
\endgroup}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 48f57559e..add1bea9d 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 91bd797c9..0785cf051 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 00917b2cd..dd58ecbd9 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 : 09/04/14 18:33:25
+-- merge date : 09/04/14 20:30:55
do -- begin closure to overcome local limits and interference