From 1e6ac8e86fb8e91f4606fb1ae519024d6cb52b12 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Sun, 10 May 2015 20:15:06 +0200 Subject: 2015-05-10 20:10:00 --- tex/context/base/char-tex.lua | 10 + tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4181 -> 4174 bytes tex/context/base/context.mkiv | 4 +- tex/context/base/lxml-ini.lua | 6 +- tex/context/base/lxml-ini.mkiv | 6 +- tex/context/base/math-fen.mkiv | 12 + tex/context/base/math-ini.mkiv | 61 ++++- tex/context/base/publ-dat.lua | 7 + tex/context/base/publ-imp-apa.mkvi | 261 ++++++++++----------- tex/context/base/publ-imp-aps.mkvi | 257 ++++++++++---------- tex/context/base/publ-imp-author.mkvi | 6 +- tex/context/base/publ-imp-default.mkvi | 30 +-- tex/context/base/publ-ini.lua | 193 +++++++++++---- tex/context/base/publ-ini.mkiv | 42 +++- tex/context/base/publ-sor.lua | 4 + tex/context/base/status-files.pdf | Bin 24449 -> 24469 bytes tex/context/base/status-lua.pdf | Bin 250941 -> 251107 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 19 files changed, 550 insertions(+), 353 deletions(-) (limited to 'tex') diff --git a/tex/context/base/char-tex.lua b/tex/context/base/char-tex.lua index 62bb6a041..2093c6d6c 100644 --- a/tex/context/base/char-tex.lua +++ b/tex/context/base/char-tex.lua @@ -286,6 +286,13 @@ local commandmapping = allocate { texcharacters.commandmapping = commandmapping +local ligaturemapping = allocate { + ["''"] = "”", + ["``"] = "“", + ["--"] = "–", + ["---"] = "—", +} + -- local achar = R("az","AZ") + P("ı") + P("\\i") -- -- local spaces = P(" ")^0 @@ -355,6 +362,9 @@ local function toutfpattern() hash["{\\"..k.."}"] = v hash["{\\"..k.." }"] = v end + for k, v in next, ligaturemapping do + hash[k] = v + end untex = utfchartabletopattern(hash) / hash end return untex diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 6cb826614..7aaabd8b0 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.09 13:41} +\newcontextversion{2015.05.10 20:08} %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 39bde2fe6..2c9b4c63e 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 59e7faead..3b70cecc2 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.09 13:41} +\edef\contextversion{2015.05.10 20:08} \edef\contextkind {beta} %D For those who want to use this: @@ -464,7 +464,7 @@ \loadmarkfile{anch-bar} %loadmarkfile{anch-snc} % when needed this one will be redone -\loadmarkfile{math-ini} +\loadmarkfile{math-ini} % way after font-pre ! \loadmarkfile{math-pln} \loadmarkfile{math-for} \loadmarkfile{math-def} % also saves some meanings diff --git a/tex/context/base/lxml-ini.lua b/tex/context/base/lxml-ini.lua index 5879de3a4..115403395 100644 --- a/tex/context/base/lxml-ini.lua +++ b/tex/context/base/lxml-ini.lua @@ -93,7 +93,7 @@ implement { name = "xmlregisterns", actions = xml.registerns, implement { name = "xmlremapname", actions = xml.remapname, arguments = { "lxmlid", "string","string","string" } } implement { name = "xmlremapnamespace", actions = xml.renamespace, arguments = { "lxmlid", "string", "string" } } implement { name = "xmlsave", actions = lxml.save, arguments = { "string", "string" } } -implement { name = "xmlsetfunction", actions = lxml.setaction, arguments = { "string", "string", "string" } } +--------- { name = "xmlsetfunction", actions = lxml.setaction, arguments = { "string", "string", "string" } } implement { name = "xmlsetsetup", actions = lxml.setsetup, arguments = { "string", "string", "string" } } implement { name = "xmlsnippet", actions = lxml.snippet, arguments = { "string", "string" } } implement { name = "xmlstrip", actions = lxml.strip, arguments = { "string", "string" } } @@ -136,3 +136,7 @@ implement { name = "xmlsetcommandtonone", actions = lxml.setcommandtonone, implement { name = "xmlstarttiming", actions = function() statistics.starttiming(lxml) end } implement { name = "xmlstoptiming", actions = function() statistics.stoptiming (lxml) end } + +-- kind of special (3rd argument is a function) + +commands.xmlsetfunction = lxml.setaction diff --git a/tex/context/base/lxml-ini.mkiv b/tex/context/base/lxml-ini.mkiv index ac5a63f88..fab644fdb 100644 --- a/tex/context/base/lxml-ini.mkiv +++ b/tex/context/base/lxml-ini.mkiv @@ -158,7 +158,7 @@ \let\xmlremapname \clf_xmlremapname % element \let\xmlremapnamespace \clf_xmlremapnamespace % document \let\xmlsave \clf_xmlsave -\let\xmlsetfunction \clf_xmlsetfunction +%let\xmlsetfunction \clf_xmlsetfunction \let\xmlsetsetup \clf_xmlsetsetup \let\xmlsnippet \clf_xmlsnippet \let\xmlstrip \clf_xmlstrip @@ -177,6 +177,10 @@ \def\xmlinfo #1{\hbox{\ttxx[\clf_xmlinfo{#1}]}} \def\xmlshow #1{\startpacked\ttx\xmlverbatim{#1}\stoppacked} +% we need to pass the last argument as function, so + +\def\xmlsetfunction#1#2#3{\ctxcommand{xmlsetfunction("#1",\!!bs#2\!!es,#3)}} + % goodie: \unexpanded\def\xmlprettyprint#1#2% diff --git a/tex/context/base/math-fen.mkiv b/tex/context/base/math-fen.mkiv index 33afbf675..ee82d89d1 100644 --- a/tex/context/base/math-fen.mkiv +++ b/tex/context/base/math-fen.mkiv @@ -131,6 +131,9 @@ \definemathfence [angle] [\c!left="27E8,\c!right="27E9] \definemathfence [doubleangle] [\c!left="27EA,\c!right="27EB] \definemathfence [solidus] [\c!left="2044,\c!right="2044] +\definemathfence [ceil] [\c!left="2308,\c!right="2309] +\definemathfence [floor] [\c!left="230A,\c!right="230B] + \definemathfence [nothing] \definemathfence [mirrored] % \v!mirrored @@ -158,6 +161,8 @@ \unexpanded\def\Ltriplebar {\math_fenced_fenced_start{triplebar}} \unexpanded\def\Rtriplebar {\math_fenced_fenced_stop{triplebar}} \unexpanded\def\Lsolidus {\math_fenced_fenced_start{solidus}} \unexpanded\def\Rsolidus {\math_fenced_fenced_stop{solidus}} \unexpanded\def\Lnothing {\math_fenced_fenced_start{nothing}} \unexpanded\def\Rnothing {\math_fenced_fenced_stop{nothing}} +\unexpanded\def\Lfloor {\math_fenced_fenced_start{floor}} \unexpanded\def\Rfloor {\math_fenced_fenced_stop{floor}} +\unexpanded\def\Lceil {\math_fenced_fenced_start{ceil}} \unexpanded\def\Rceil {\math_fenced_fenced_stop{ceil}} \unexpanded\def\Lparentmirrored {\math_fenced_fenced_stop{mirroredparenthesis}} \unexpanded\def\Rparentmirrored {\math_fenced_fenced_start{mirroredparenthesis}} \unexpanded\def\Lbracketmirrored {\math_fenced_fenced_stop{mirroredbracket}} \unexpanded\def\Rbracketmirrored {\math_fenced_fenced_start{mirroredbracket}} @@ -264,6 +269,11 @@ \expandafter\let\csname\??mathleft \meaning /\endcsname\Rsolidusmirrored \expandafter\let\csname\??mathleft \meaning .\endcsname\Rnothingmirrored +\expandafter\let\csname\??mathleft \meaning ⌊\endcsname\Lfloor +\expandafter\let\csname\??mathright\meaning ⌋\endcsname\Rfloor +\expandafter\let\csname\??mathleft \meaning ⌈\endcsname\Lceil +\expandafter\let\csname\??mathright\meaning ⌉\endcsname\Rceil + % todo paren parent \let\lbrack\lbracket @@ -278,6 +288,8 @@ %installmathfencepair \lbar \Lbar \rbar \Rbar \installmathfencepair \vert \Lbar \vert \Rbar \installmathfencepair \solidus \Lsolidus \solidus \Rsolidus +\installmathfencepair \lfloor \Lfloor \rfloor \Rfloor +\installmathfencepair \lceil \Lceil \rceil \Rceil \unexpanded\def\{{\mathortext\lbrace \letterleftbrace } % or maybe a chardef \unexpanded\def\}{\mathortext\rbrace \letterrightbrace } % or maybe a chardef diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv index 0607f008d..d18c66812 100644 --- a/tex/context/base/math-ini.mkiv +++ b/tex/context/base/math-ini.mkiv @@ -567,13 +567,14 @@ \unexpanded\def\mathop {\normalmathop \bgroup - \let\rm\mf + % no: \let\rm\mf \let\nexttoken=} % this one too: \letvalue{\??mathcodecommand op}\mathop ? \unexpanded\def\normalmbox - {\normalhbox\bgroup\mf + {\normalhbox\bgroup + \usemathematicsstyleandcolor\c!textstyle\c!textcolor % new \dowithnextboxcs\math_mbox_finish\normalhbox} \def\math_mbox_finish @@ -619,19 +620,56 @@ % faster. Functions getnumbers >= 1000. \setupmathematics - [\c!functionstyle=\mr, + [\c!textstyle=, % rm ss etc i.e. known alternatives, otherwise math + \c!textcolor=, + \c!functionstyle=, % rm ss etc i.e. known alternatives, otherwise math \c!functioncolor=] +% \unexpanded\def\math_mfunction_styled +% {\edef\m_math_text_choice_face{\textstyleface\normalmathstyle}% +% \dowithnextbox +% {\mathop{\box\nextbox}}% +% \hbox\bgroup +% \usemathematicsstyleandcolor\c!functionstyle\c!functioncolor +% \m_math_text_choice_face +% \let\next} + +\unexpanded\def\math_mfunction_styled + {\begingroup + \usemathematicscolorparameter\c!functioncolor + \edef\p_functionstyle{\mathematicsparameter\c!functionstyle}% + \ifx\p_functionstyle\empty + \expandafter\math_mfunction_styled_none + \else\ifcsname\??alternativestyles\p_functionstyle\endcsname + \doubleexpandafter\math_mfunction_styled_text + \else + \doubleexpandafter\math_mfunction_styled_math + \fi\fi} + +\unexpanded\def\math_mfunction_styled_text#1% + {\mathoptext{\csname\??alternativestyles\p_functionstyle\endcsname#1}% + \endgroup} + +\unexpanded\def\math_mfunction_styled_math#1% + {\p_functionstyle + #1% + \endgroup} + +\unexpanded\def\math_mfunction_styled_none#1% + {\mathupright + #1% + \endgroup} + \unexpanded\def\mfunction#1% {\begingroup \math_tags_mfunctiontxt{#1}\c_apply_function - \mathoptext{\usemathematicsstyleandcolor\c!functionstyle\c!functioncolor#1}% + \math_mfunction_styled{#1}% \endgroup} \unexpanded\def\mfunctionlabeltext#1% {\begingroup \math_tags_mfunctionlab{#1}\c_apply_function - \mathoptext{\usemathematicsstyleandcolor\c!functionstyle\c!functioncolor\mathlabeltext{#1}}% + \math_mfunction_styled{\mathlabeltext{#1}}% \endgroup} \let\math_tags_mfunctiontxt\gobbletwoarguments @@ -1428,6 +1466,19 @@ \expandafter#3\else \expandafter#1\fi} +% \def\textstyleface#1% #1 is number (\normalmathstyle) +% {\ifcase\numexpr#1\relax +% \tf \or +% \tf \or +% \tf \or +% \tf \or +% \tfx \or +% \tfx \or +% \tfxx \or +% \tfxx \else +% \tf +% \fi} + \unexpanded\def\verbosemathstyle#1% #1 is number (\normalmathstyle) {{\normalexpanded{\relax\darkgray\ttxx[\number#1:\ifcase\numexpr#1\relax display\or % 0 diff --git a/tex/context/base/publ-dat.lua b/tex/context/base/publ-dat.lua index 494a13d3c..1e651c45b 100644 --- a/tex/context/base/publ-dat.lua +++ b/tex/context/base/publ-dat.lua @@ -346,6 +346,12 @@ function publications.parenttag(dataset,tag) 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) + else + report("combining, dataset %a, tag %a, parent %a",dataset,tag,parent) + current.combined[tag] = parent + end end end end @@ -382,6 +388,7 @@ 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 fce9361f3..d2eae8e9b 100644 --- a/tex/context/base/publ-imp-apa.mkvi +++ b/tex/context/base/publ-imp-apa.mkvi @@ -55,7 +55,7 @@ \c!margin=3.5\emwidth] \definebtx - [apa:list] + [apa:\s!list] [apa] [\c!otherstext={,\nobreakspace\textellipsis\space}, \c!etallimit=7, @@ -69,47 +69,48 @@ % First, we define a namespace for a few special fields \definebtx - [apa:list:author] - [apa:list] + [apa:\s!list:author] + [apa:\s!list] \definebtx - [apa:list:editor] - [apa:list:author] + [apa:\s!list:editor] + [apa:\s!list:author] \definebtx - [apa:list:suffix] - [apa:list] + [apa:\s!list:suffix] + [apa:\s!list] \definebtx - [apa:list:url] - [apa:list] + [apa:\s!list:url] + [apa:\s!list] \definebtx - [apa:list:doi] - [apa:list] + [apa:\s!list:doi] + [apa:\s!list] \definebtx - [apa:list:numbering] - [apa:list] + [apa:\s!list:\s!page] + [apa:\s!list] + [\c!pagecommand={\wordright}] \definebtx - [apa:list:numbering:num] - [apa:list:numbering] - [\c!stopper={.}, - \c!right={\space}] + [apa:\s!list:numbering] + [apa:\s!list] \definebtx - [apa:list:numbering:yes] - [apa:list:numbering:num] + [apa:\s!list:numbering:num] + [apa:\s!list:numbering] + [\c!stopper={.}, + \c!right={\space}] \definebtx - [apa:list:numbering:short] - [apa:list:numbering:num] + [apa:\s!list:numbering:short] + [apa:\s!list:numbering:num] [\c!stopper=] \definebtx - [apa:list:numbering:tag] - [apa:list:numbering:num] + [apa:\s!list:numbering:tag] + [apa:\s!list:numbering:num] [\c!stopper=] % Next, we define a namespace for each category @@ -121,143 +122,129 @@ %D \btxloadjournallist[journals.txt] % the jabref list %D \stoptyping - \definebtx - [apa:list:journal] + [apa:\s!list:journal] [\c!style=\v!italic] %command=\btxexpandedjournal] % btxabbreviatedjournal \definebtx - [apa:list:title] + [apa:\s!list:title] [\c!style=\v!italic, \c!command=\Word, \c!translate=\v!yes] \definebtx - [apa:list:title:article] - [apa:list:title] + [apa:\s!list:title:article] + [apa:\s!list:title] [\c!style=] % journal is set in italics \definebtx - [apa:list:title:magazine] - [apa:list:title] + [apa:\s!list:title:magazine] + [apa:\s!list:title] \definebtx - [apa:list:title:newspaper] - [apa:list:title] + [apa:\s!list:title:newspaper] + [apa:\s!list:title] \definebtx - [apa:list:title:periodical] - [apa:list:title] + [apa:\s!list:title:periodical] + [apa:\s!list:title] \definebtx - [apa:list:title:standard] - [apa:list:title] + [apa:\s!list:title:standard] + [apa:\s!list:title] \definebtx - [apa:list:title:book] - [apa:list:title] + [apa:\s!list:title:book] + [apa:\s!list:title] \definebtx - [apa:list:title:inbook] - [apa:list:title] + [apa:\s!list:title:inbook] + [apa:\s!list:title] \definebtx - [apa:list:title:incollection] - [apa:list:title] + [apa:\s!list:title:incollection] + [apa:\s!list:title] [\c!style=] % booktitle is set in italics \definebtx - [apa:list:title:proceedings] - [apa:list:title] + [apa:\s!list:title:proceedings] + [apa:\s!list:title] \definebtx - [apa:list:title:inproceedings] - [apa:list:title] + [apa:\s!list:title:inproceedings] + [apa:\s!list:title] [\c!style=] % booktitle is set in italics \definebtx - [apa:list:title:conference] - [apa:list:title] + [apa:\s!list:title:conference] + [apa:\s!list:title] [\c!style=] % booktitle is set in italics \definebtx - [apa:list:title:thesis] - [apa:list:title] + [apa:\s!list:title:thesis] + [apa:\s!list:title] \definebtx - [apa:list:title:phdthesis] - [apa:list:title] + [apa:\s!list:title:phdthesis] + [apa:\s!list:title] \definebtx - [apa:list:title:mastersthesis] - [apa:list:title] + [apa:\s!list:title:mastersthesis] + [apa:\s!list:title] \definebtx - [apa:list:title:booklet] - [apa:list:title] + [apa:\s!list:title:booklet] + [apa:\s!list:title] \definebtx - [apa:list:title:manual] - [apa:list:title] + [apa:\s!list:title:manual] + [apa:\s!list:title] \definebtx - [apa:list:title:techreport] - [apa:list:title] + [apa:\s!list:title:techreport] + [apa:\s!list:title] \definebtx - [apa:list:title:unpublished] - [apa:list:title] + [apa:\s!list:title:unpublished] + [apa:\s!list:title] \definebtx - [apa:list:title:patent] - [apa:list:title] + [apa:\s!list:title:patent] + [apa:\s!list:title] \definebtx - [apa:list:title:electronic] - [apa:list:title] + [apa:\s!list:title:electronic] + [apa:\s!list:title] \definebtx - [apa:list:title:music] - [apa:list:title] + [apa:\s!list:title:music] + [apa:\s!list:title] \definebtx - [apa:list:title:film] - [apa:list:title] + [apa:\s!list:title:film] + [apa:\s!list:title] \definebtx - [apa:list:title:other] - [apa:list:title] + [apa:\s!list:title:other] + [apa:\s!list:title] \definebtx - [apa:list:title:misc] - [apa:list:title] + [apa:\s!list:title:misc] + [apa:\s!list:title] \definebtx - [apa:list:title:literal] - [apa:list:title] + [apa:\s!list:title:literal] + [apa:\s!list:title] \definebtx - [apa:list:type] + [apa:\s!list:type] [\c!command=\Word] -% We define [page] settings in the apa namespace, inheriting the root -% settings, in order to eventually allow for modifications without touching -% root. - -\definebtx - [apa:\s!page] - [\s!page] - -\definebtx - [apa:\s!page:list] - [apa:\s!page] - [\c!pagecommand={\wordright}] - % Then define and set cite parameters. \definebtx - [apa:cite] + [apa:\s!cite] [apa] [\c!alternative=authoryear, \c!otherstext={,\space\btxlabeltext{apa:others}}, @@ -271,60 +258,60 @@ \c!separator:names:4={\space\btxlabeltext{apa:and}\space}] % not \textampersand \definebtx - [apa:cite:author] - [apa:cite] + [apa:\s!cite:author] + [apa:\s!cite] \definebtx - [apa:cite:authoryear] - [apa:cite:author] + [apa:\s!cite:authoryear] + [apa:\s!cite:author] [\c!left={(}, \c!right={)}, \c!inbetween={,\space}] \definebtx - [apa:cite:default] - [apa:cite:authoryear] + [apa:\s!cite:default] + [apa:\s!cite:authoryear] \definebtx - [apa:cite:authoryears] - [apa:cite:authoryear] + [apa:\s!cite:authoryears] + [apa:\s!cite:authoryear] [\c!left=, \c!right=, \c!inbetween={\space}] \definebtx - [apa:cite:authornum] - [apa:cite:author] + [apa:\s!cite:authornum] + [apa:\s!cite:author] [\c!left={(}, \c!right={)}] \definebtx - [apa:cite:author:num] % todo - [apa:cite:authornum] + [apa:\s!cite:author:num] % todo + [apa:\s!cite:authornum] [\c!left={\space[}, \c!right={]}] \definebtx - [apa:cite:author:year] % todo - [apa:cite] + [apa:\s!cite:author:year] % todo + [apa:\s!cite] \definebtx - [apa:cite:author:years] % todo - [apa:cite:authoryears] + [apa:\s!cite:author:years] % todo + [apa:\s!cite:authoryears] [\c!inbetween=, \c!left={\space(}, \c!right={)}] \definebtx - [apa:cite:year] - [apa:cite] + [apa:\s!cite:year] + [apa:\s!cite] [\c!separator:2={,\space}, % :0 and :1 - between items of a list \c!separator:3={,\space\btxlabeltext{apa:and}\space}, % not \textampersand \c!separator:4={\space\btxlabeltext{apa:and}\space}] % not \textampersand \definebtx - [apa:cite:title] - [apa:cite] + [apa:\s!cite:title] + [apa:\s!cite] [\c!separator:2={,\space}, % :0 and :1 - between items of a list \c!separator:3={,\space\btxlabeltext{apa:and}\space}, % not \textampersand \c!separator:4={\space\btxlabeltext{apa:and}\space}, % not \textampersand @@ -333,25 +320,25 @@ \c!style=\v!italic] \definebtx - [apa:cite:booktitle] - [apa:cite:title] + [apa:\s!cite:booktitle] + [apa:\s!cite:title] \definebtx - [apa:cite:tag] - [apa:cite] + [apa:\s!cite:tag] + [apa:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [apa:cite:index] - [apa:cite] + [apa:\s!cite:index] + [apa:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [apa:cite:page] - [apa:cite] + [apa:\s!cite:page] + [apa:\s!cite] [\c!left=, \c!right=, \c!separator:2={,\space}, % :0 and :1 - between items of a list @@ -359,36 +346,36 @@ \c!separator:4={\space\btxlabeltext{apa:and}\space}] % not \textampersand \definebtx - [apa:cite:pages] - [apa:cite:page] + [apa:\s!cite:pages] + [apa:\s!cite:page] \definebtx - [apa:cite:keywords] - [apa:cite] + [apa:\s!cite:keywords] + [apa:\s!cite] \definebtx - [apa:cite:short] - [apa:cite] + [apa:\s!cite:short] + [apa:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [apa:cite:category] - [apa:cite] + [apa:\s!cite:category] + [apa:\s!cite] \definebtx - [apa:cite:url] - [apa:cite] + [apa:\s!cite:url] + [apa:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [apa:cite:doi] - [apa:cite:url] + [apa:\s!cite:doi] + [apa:\s!cite:url] \definebtx - [apa:cite:num] - [apa:cite] + [apa:\s!cite:num] + [apa:\s!cite] [\c!left={[}, \c!right={]}, \c!separator:2={,}, % no space @@ -396,8 +383,8 @@ \c!separator:4=\btxparameter{\c!separator:2}] \definebtx - [apa:cite:textnum] - [apa:cite:num] + [apa:\s!cite:textnum] + [apa:\s!cite:num] [\c!left={Ref.\nbsp}, \c!right=, \c!separator:2={,\space}, @@ -405,8 +392,8 @@ \c!separator:4={\space\btxlabeltext{apa:and}\space}] \definebtx - [apa:cite:entry] - [apa:cite] + [apa:\s!cite:entry] + [apa:\s!cite] [\c!left=, \c!right=, \c!inbetween={\space}, diff --git a/tex/context/base/publ-imp-aps.mkvi b/tex/context/base/publ-imp-aps.mkvi index 80df2867a..11104a7eb 100644 --- a/tex/context/base/publ-imp-aps.mkvi +++ b/tex/context/base/publ-imp-aps.mkvi @@ -48,58 +48,60 @@ \definebtxrendering [aps] [\c!specification=aps, - \c!sorttype=\v!default] + \c!sorttype=\v!default, + \c!numbering=num] \setupbtxlist [aps] [\c!alternative=b] % spaces \definebtx - [aps:list] + [aps:\s!list] [aps] [\c!authorconversion=normalshort] \definebtx - [aps:list:author] - [aps:list] + [aps:\s!list:author] + [aps:\s!list] \definebtx - [aps:list:editor] - [aps:list:author] + [aps:\s!list:editor] + [aps:\s!list:author] \definebtx - [aps:list:suffix] - [aps:list] + [aps:\s!list:suffix] + [aps:\s!list] \definebtx - [aps:list:url] - [aps:list] + [aps:\s!list:url] + [aps:\s!list] \definebtx - [aps:list:doi] - [aps:list] + [aps:\s!list:doi] + [aps:\s!list] \definebtx - [aps:list:numbering] - [aps:list] + [aps:\s!list:\s!page] + [aps:\s!list] + [\c!left={\space}] \definebtx - [aps:list:numbering:num] - [aps:list:numbering] - [left={[}, - right={]}] + [aps:\s!list:numbering] + [aps:\s!list] \definebtx - [aps:list:numbering:yes] - [aps:list:numbering:num] + [aps:\s!list:numbering:num] + [aps:\s!list:numbering] + [left={[}, + right={]}] \definebtx - [aps:list:numbering:short] - [aps:list:numbering:num] + [aps:\s!list:numbering:short] + [aps:\s!list:numbering:num] \definebtx - [aps:list:numbering:tag] - [aps:list:numbering:num] + [aps:\s!list:numbering:tag] + [aps:\s!list:numbering:num] %D In order to be able to get journals expanded (or normalized or abbreviated) you need %D to load a list: @@ -111,214 +113,201 @@ % TODO \definebtx - [aps:list:journal] + [aps:\s!list:journal] [\c!style=\v!italic] %command=\btxexpandedjournal] % btxabbreviatedjournal \definebtx - [aps:list:volume] + [aps:\s!list:volume] [\c!style=\v!bold] \definebtx - [aps:list:title] + [aps:\s!list:title] [\c!style=\v!italic, \c!command=\Word] \definebtx - [aps:list:title:article] - [aps:list:title] + [aps:\s!list:title:article] + [aps:\s!list:title] [\c!style=] % journal is set in italics \definebtx - [aps:list:title:magazine] - [aps:list:title] + [aps:\s!list:title:magazine] + [aps:\s!list:title] \definebtx - [aps:list:title:newspaper] - [aps:list:title] + [aps:\s!list:title:newspaper] + [aps:\s!list:title] \definebtx - [aps:list:title:periodical] - [aps:list:title] + [aps:\s!list:title:periodical] + [aps:\s!list:title] \definebtx - [aps:list:title:standard] - [aps:list:title] + [aps:\s!list:title:standard] + [aps:\s!list:title] \definebtx - [aps:list:title:book] - [aps:list:title] + [aps:\s!list:title:book] + [aps:\s!list:title] \definebtx - [aps:list:title:inbook] - [aps:list:title] + [aps:\s!list:title:inbook] + [aps:\s!list:title] \definebtx - [aps:list:title:incollection] - [aps:list:title] + [aps:\s!list:title:incollection] + [aps:\s!list:title] [\c!style=] % booktitle is set in italics \definebtx - [aps:list:title:proceedings] - [aps:list:title] + [aps:\s!list:title:proceedings] + [aps:\s!list:title] \definebtx - [aps:list:title:inproceedings] - [aps:list:title] + [aps:\s!list:title:inproceedings] + [aps:\s!list:title] [\c!style=] % booktitle is set in italics \definebtx - [aps:list:title:conference] - [aps:list:title] + [aps:\s!list:title:conference] + [aps:\s!list:title] [\c!style=] % booktitle is set in italics \definebtx - [aps:list:title:thesis] - [aps:list:title] + [aps:\s!list:title:thesis] + [aps:\s!list:title] \definebtx - [aps:list:title:phdthesis] - [aps:list:title] + [aps:\s!list:title:phdthesis] + [aps:\s!list:title] \definebtx - [aps:list:title:mastersthesis] - [aps:list:title] + [aps:\s!list:title:mastersthesis] + [aps:\s!list:title] \definebtx - [aps:list:title:booklet] - [aps:list:title] + [aps:\s!list:title:booklet] + [aps:\s!list:title] \definebtx - [aps:list:title:manual] - [aps:list:title] + [aps:\s!list:title:manual] + [aps:\s!list:title] \definebtx - [aps:list:title:techreport] - [aps:list:title] + [aps:\s!list:title:techreport] + [aps:\s!list:title] \definebtx - [aps:list:title:unpublished] - [aps:list:title] + [aps:\s!list:title:unpublished] + [aps:\s!list:title] \definebtx - [aps:list:title:patent] - [aps:list:title] + [aps:\s!list:title:patent] + [aps:\s!list:title] \definebtx - [aps:list:title:electronic] - [aps:list:title] + [aps:\s!list:title:electronic] + [aps:\s!list:title] \definebtx - [aps:list:title:other] - [aps:list:title] + [aps:\s!list:title:other] + [aps:\s!list:title] \definebtx - [aps:list:title:misc] - [aps:list:title] + [aps:\s!list:title:misc] + [aps:\s!list:title] \definebtx - [aps:list:title:literal] - [aps:list:title] + [aps:\s!list:title:literal] + [aps:\s!list:title] \definebtx - [aps:list:type] + [aps:\s!list:type] [\c!command=\Word] -% We define [page] settings in the aps namespace, inheriting the root -% settings, in order to eventually allow for modifications without touching -% root. - -\definebtx - [aps:\s!page] - [\s!page] - -\definebtx - [aps:\s!page:list] - [aps:\s!page] - %[\c!pagecommand={\wordright}] - % Then define and set all cite parameters \definebtx - [aps:cite] + [aps:\s!cite] [aps] [\c!authorconversion=\v!name, \c!compress=\v!yes, \c!sorttype=normal] \definebtx - [aps:cite:author] - [aps:cite] + [aps:\s!cite:author] + [aps:\s!cite] \definebtx - [aps:cite:authoryear] - [aps:cite:author] + [aps:\s!cite:authoryear] + [aps:\s!cite:author] [\c!left={(}, \c!right={)}, \c!inbetween={,\space}] \definebtx - [aps:cite:authoryears] - [aps:cite:authoryear] + [aps:\s!cite:authoryears] + [aps:\s!cite:authoryear] [\c!left=, \c!right=, \c!inbetween={\space}] \definebtx - [aps:cite:authornum] - [aps:cite:author] + [aps:\s!cite:authornum] + [aps:\s!cite:author] [\c!left={(}, \c!right={)}] \definebtx - [aps:cite:author:num] % todo - [aps:cite:authornum] + [aps:\s!cite:author:num] % todo + [aps:\s!cite:authornum] [\c!left={\space[}, \c!right={]}] \definebtx - [aps:cite:author:year] % todo - [aps:cite:authoryear] + [aps:\s!cite:author:year] % todo + [aps:\s!cite:authoryear] [\c!left=, \c!right=] \definebtx - [aps:cite:author:years] % todo - [aps:cite:authoryears] + [aps:\s!cite:author:years] % todo + [aps:\s!cite:authoryears] [\c!inbetween=, \c!left={\space(}, \c!right={)}] \definebtx - [aps:cite:year] - [aps:cite] + [aps:\s!cite:year] + [aps:\s!cite] \definebtx - [aps:cite:title] - [aps:cite] + [aps:\s!cite:title] + [aps:\s!cite] [\c!command={\language[\currentbtxlanguage]}, % BAH \c!sorttype=none, \c!style=\v!italic] \definebtx - [aps:cite:booktitle] - [aps:cite:title] + [aps:\s!cite:booktitle] + [aps:\s!cite:title] \definebtx - [aps:cite:tag] - [aps:cite] + [aps:\s!cite:tag] + [aps:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [aps:cite:index] - [aps:cite] + [aps:\s!cite:index] + [aps:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [aps:cite:page] - [aps:cite] + [aps:\s!cite:page] + [aps:\s!cite] [\c!left=, \c!right=, \c!separator:2={,\space}, % :0 and :1 - between items of a list @@ -326,38 +315,38 @@ \c!separator:4= {\space\btxlabeltext{aps:and}\space}] % not \textampersand \definebtx - [aps:cite:pages] - [aps:cite:page] + [aps:\s!cite:pages] + [aps:\s!cite:page] \definebtx - [aps:cite:keywords] - [aps:cite] + [aps:\s!cite:keywords] + [aps:\s!cite] [\c!left={(}, \c!right={)}] \definebtx - [aps:cite:short] - [aps:cite] + [aps:\s!cite:short] + [aps:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [aps:cite:category] - [aps:cite] + [aps:\s!cite:category] + [aps:\s!cite] \definebtx - [aps:cite:url] - [aps:cite] + [aps:\s!cite:url] + [aps:\s!cite] [\c!left={[}, \c!right={]}] \definebtx - [aps:cite:doi] - [aps:cite:url] + [aps:\s!cite:doi] + [aps:\s!cite:url] \definebtx - [aps:cite:num] - [aps:cite] + [aps:\s!cite:num] + [aps:\s!cite] [\c!left={[}, \c!right={]}, %\c!left=, % TODO: PRB uses superscript references... @@ -368,12 +357,12 @@ \c!separator:4=\btxparameter{\c!separator:2}] \definebtx - [aps:cite:default] - [aps:cite:num] + [aps:\s!cite:default] + [aps:\s!cite:num] \definebtx - [aps:cite:textnum] - [aps:cite:num] + [aps:\s!cite:textnum] + [aps:\s!cite:num] [\c!left={Ref.\nbsp}, \c!command=, \c!separator:2={,\space}, @@ -381,8 +370,8 @@ \c!separator:4={\space\btxlabeltext{aps:and}\space}] \definebtx - [aps:cite:entry] - [aps:cite] + [aps:\s!cite:entry] + [aps:\s!cite] [\c!left=, \c!right=, \c!inbetween={\space}, diff --git a/tex/context/base/publ-imp-author.mkvi b/tex/context/base/publ-imp-author.mkvi index 7f2c35fdd..7529c7aa9 100644 --- a/tex/context/base/publ-imp-author.mkvi +++ b/tex/context/base/publ-imp-author.mkvi @@ -32,9 +32,9 @@ \startsetups \s!btx:\s!cite:\s!author:concat \ifcase\currentbtxoverflow \btxparameter{\c!separator:names:\number\currentbtxconcat} - \else - %\btxparameter{\c!separator:names:2} - \fi + \else\ifnum\currentbtxauthorindex>\plusone + \btxparameter{\c!separator:names:2} + \fi\fi \stopsetups \startsetups \s!btx:\s!cite:\s!author:others diff --git a/tex/context/base/publ-imp-default.mkvi b/tex/context/base/publ-imp-default.mkvi index eead8a324..2fc58ef99 100644 --- a/tex/context/base/publ-imp-default.mkvi +++ b/tex/context/base/publ-imp-default.mkvi @@ -17,15 +17,16 @@ \startbtxrenderingdefinitions[\s!default] -% \definebtx [\s!default:\s!page ] [\s!page] -% \definebtx [\s!default:\s!cite ] [\s!cite] -% \definebtx [\s!default:\s!list ] [\s!list] -% \definebtx [\s!default:\s!author] [\s!author] +%?? \definebtx [\s!default:\s!page ] [\s!page] +%?? \definebtx [\s!default:\s!cite ] [\s!cite] +%?? \definebtx [\s!default:\s!list ] [\s!list] +%?? \definebtx [\s!default:\s!author] [\s!author] \definebtxrendering [\s!default] [\c!specification=\s!default, - \c!sorttype=\v!default] + \c!sorttype=\v!default, + \c!numbering=num] \definebtx [\s!default] @@ -50,31 +51,20 @@ \c!sorttype=normal, \c!authorconversion=\v!name] -% We define [page] settings in the default namespace, inheriting the root -% settings, in order to eventually allow for modifications without touching -% root. - -\definebtx - [\s!default:\s!page] - [\s!page] - -\definebtx - [\s!default:\s!page:list] - [\s!default:\s!page] - % List variants, some having specific settings: \definebtx - [\s!default:\s!list:numbering] + [\s!default:\s!list:\s!page] [\s!default:\s!list] + [\c!left={\space}] \definebtx - [\s!default:\s!list:numbering:num] [\s!default:\s!list:numbering] + [\s!default:\s!list] \definebtx - [\s!default:\s!list:numbering:yes] [\s!default:\s!list:numbering:num] + [\s!default:\s!list:numbering] \definebtx [\s!default:\s!list:numbering:short] diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua index 5720c193a..04a3f1cc1 100644 --- a/tex/context/base/publ-ini.lua +++ b/tex/context/base/publ-ini.lua @@ -115,6 +115,7 @@ local ctx_gobbletwoarguments = context.gobbletwoarguments local ctx_btxdirectlink = context.btxdirectlink local ctx_btxhandlelistentry = context.btxhandlelistentry local ctx_btxhandlelisttextentry = context.btxhandlelisttextentry +local ctx_btxhandlecombientry = context.btxhandlecombientry local ctx_btxchecklistentry = context.btxchecklistentry local ctx_btxchecklistcombi = context.btxchecklistcombi @@ -154,6 +155,8 @@ local ctx_btxstartsubcite = context.btxstartsubcite local ctx_btxstopsubcite = context.btxstopsubcite local ctx_btxstartlistentry = context.btxstartlistentry local ctx_btxstoplistentry = context.btxstoplistentry +local ctx_btxstartcombientry = context.btxstartcombientry +local ctx_btxstopcombientry = context.btxstopcombientry local ctx_btxlistsetup = context.btxlistsetup local ctx_btxflushauthor = context.btxflushauthor local ctx_btxsetnoflistentries = context.btxsetnoflistentries @@ -340,10 +343,10 @@ do local initialize = nil initialize = function(t) - usedentries = allocate { } - citetolist = allocate { } - listtocite = allocate { } - listtolist = allocate { } + 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 @@ -477,15 +480,16 @@ local findallused do local finder = publications.finder findallused = function(dataset,reference,internal) - local current = datasets[dataset] - local finder = publications.finder -- for the moment, not yet in all betas - local find = finder and finder(current,reference) - 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 ordered = current.ordered + local current = datasets[dataset] + local finder = publications.finder -- for the moment, not yet in all betas + local find = finder and finder(current,reference) + 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 ordered = current.ordered + local combined = current.combined if set then local registered = { } local function register(tag) @@ -495,6 +499,16 @@ local findallused do registered[tag] = true end local entry = set[tag] + if not entry then + local parent = combined[tag] + if parent then + entry = set[parent] + end + if entry then + report("using reference of parent %a for %a",parent,tag) + tag = parent + end + end if entry then -- only once in a list but at some point we can have more (if we -- decide to duplicate) @@ -533,22 +547,22 @@ local findallused do okay[#okay+1] = entry end todo[tag] = true + return tag end if reference == "*" then tags = { } for i=1,#ordered do local tag = ordered[i].tag - register(tag) + tag = register(tag) tags[#tags+1] = tag end elseif find then --- print("case 1.1") tags = { } for i=1,#ordered do local entry = ordered[i] if find(entry) then local tag = entry.tag - register(tag) + tag = register(tag) tags[#tags+1] = tag end end @@ -557,11 +571,11 @@ local findallused do reported[reference] = true end else --- print("case 1.2") for i=1,#tags do - local tag = tags[i] + local tag = tags[i] if valid[tag] then - register(tag) + tag = register(tag) + tags[i] = tag elseif not reported[tag] then reported[tag] = true report_cite("non-existent entry %a in %a",tag,dataset) @@ -570,12 +584,15 @@ local findallused do end else if find then --- print("case 2.1") tags = { } for i=1,#ordered do local entry = ordered[i] if find(entry) then - local tag = entry.tag + local tag = entry.tag + local parent = combined[tag] + if parent then + tag = parent + end tags[#tags+1] = tag todo[tag] = true end @@ -585,9 +602,13 @@ local findallused do reported[reference] = true end else --- print("case 2.2") for i=1,#tags do - local tag = tags[i] + local tag = tags[i] + local parent = combined[tag] + if parent then + tag = parent + tags[i] = tag + end if valid[tag] then todo[tag] = true elseif not reported[tag] then @@ -1705,6 +1726,7 @@ do if u then -- better check on metadata.kind == "btx" local set = u.btxset or v_default if set == dataset then +-- inspect(structures.references.internals[tonumber(u.btxint)]) local tag = u.btxref if not tag then -- problem @@ -1803,6 +1825,7 @@ 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 @@ -1824,31 +1847,55 @@ 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 = { } + rendering.tagtolistindex = tagtolistindex for i=1,#list do local li = list[i] local tag = li[1] - 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 + 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 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 + tagtolistindex[tag] = i end + newlist[#newlist+1] = li end end groups[group] = lastreferencenumber - rendering.list = list + rendering.list = newlist end function lists.fetchentries(dataset) @@ -2002,14 +2049,56 @@ do end end + function lists.combiinlist(dataset,tag) + local rendering = renderings[dataset] + local list = rendering.list + local toindex = rendering.tagtolistindex + return toindex and toindex[tag] + end + + function lists.flushcombi(dataset,tag) + local rendering = renderings[dataset] + local list = rendering.list + local toindex = rendering.tagtolistindex + local listindex = toindex and toindex[tag] + if listindex then + local li = list[listindex] + if li then + local data = datasets[dataset] + local luadata = data.luadata + local details = data.details + local tag = li[1] + local listindex = li[2] + local n = li[3] + local entry = luadata[tag] + local detail = details[tag] + ctx_btxstartcombientry() + ctx_btxsetcurrentlistindex(listindex) + ctx_btxsetcategory(entry.category or "unknown") + ctx_btxsettag(tag) + ctx_btxsetnumber(n) + local language = entry.language + if language then + ctx_btxsetlanguage(language) + end + local authorsuffix = detail.authorsuffix + if authorsuffix then + ctx_btxsetsuffix(authorsuffix) + end + ctx_btxhandlecombientry() + ctx_btxstopcombientry() + end + end + end + function lists.flushentry(dataset,i,textmode) local rendering = renderings[dataset] local list = rendering.list - local data = datasets[dataset] - local luadata = data.luadata - local details = data.details local li = list[i] if li then + local data = datasets[dataset] + local luadata = data.luadata + local details = data.details local tag = li[1] local listindex = li[2] local n = li[3] @@ -2143,12 +2232,24 @@ do arguments = { "string", "integer" } } + implement { + name = "btxflushlistcombi", + actions = lists.flushcombi, + arguments = { "string", "string" } + } + implement { name = "btxdoifelsesameasprevious", actions = { lists.sameasprevious, ctx_doifelse }, arguments = { "string", "integer", "string", "integer", "string" } } + implement { + name = "btxdoifelsecombiinlist", + actions = { lists.combiinlist, ctx_doifelse }, + arguments = { "string", "string" } + } + end do @@ -2404,6 +2505,7 @@ do local luadata = datasets[dataset].luadata for i=1,#found do local entry = found[i] +-- inspect(entry) local tag = entry.userdata.btxref local ldata = luadata[tag] local data = { @@ -2411,6 +2513,7 @@ do language = ldata.language, dataset = dataset, tag = tag, + combis = entry.userdata.btxcom, -- luadata = ldata, } setter(data,dataset,tag,entry) @@ -2457,6 +2560,10 @@ do if language then ctx_btxsetlanguage(language) 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 a00712b10..6d57a233d 100644 --- a/tex/context/base/publ-ini.mkiv +++ b/tex/context/base/publ-ini.mkiv @@ -73,6 +73,7 @@ \def\s!btxbtx {btxbtx} \def\s!btxspc {btxspc} \def\s!btxlst {btxlst} +\def\s!btxcom {btxcom} \definelabelclass[btxlabel][2] @@ -622,7 +623,7 @@ \begingroup \setbtxlist % probably already set \btx_reset_page - \setbtxparameterset\s!page\s!list + \setbtxparameterset\s!list\s!page \btxparameter\c!pagecommand {\usebtxstyleandcolor\c!style\c!color \btxparameter\c!pageleft @@ -665,12 +666,15 @@ \publ_fast_setup\plusfour\s!list\currentbtxcategory \removeunwantedspaces \endgroup - \ifconditional\c_btx_list_pages - \btx_entry_inject_pages - \fi \ifx\currentbtxcombis\empty \else \btxrenderingparameter\c!separator - \processcommacommand[\currentbtxcombis]\btx_entry_inject_combi + % maybe move this loop to lua + \begingroup + \processcommacommand[\currentbtxcombis]\btx_entry_inject_combi + \endgroup + \fi + \ifconditional\c_btx_list_pages + \btx_entry_inject_pages \fi \ifconditional\c_btx_list_texts \currentbtxafter @@ -689,6 +693,15 @@ \ctxcommand{showbtxentry("\currentbtxdataset","\currentbtxtag")} \fi\fi} +\unexpanded\def\btxstartcombientry + {\begingroup} + +\unexpanded\def\btxstopcombientry + {\endgroup} + +\unexpanded\def\btxhandlecombientry + {\btx_reference_indeed} + \def\btx_entry_inject_combi#1% {\begingroup \def\currentbtxtag{#1}% @@ -697,6 +710,18 @@ \removeunwantedspaces \endgroup} +% uses reference when set + +% \def\btx_entry_inject_combi#1% +% {\begingroup +% \def\currentbtxtag{#1}% +% \ignorespaces +% \btxdoifelsecombiinlist\currentbtxdataset\currentbtxtag +% {\clf_btxflushlistcombi{\currentbtxdataset}{\currentbtxtag}} +% {\publ_fast_setup\plusfour\s!list\currentbtxcategory}% +% \removeunwantedspaces +% \endgroup} + \unexpanded\def\completebtxrendering{\dodoubleempty\publ_place_list_complete} \unexpanded\def\placebtxrendering {\dodoubleempty\publ_place_list_standard} @@ -741,8 +766,12 @@ \unexpanded\def\btxdoifelsesameasprevious {\btxdoifelsesameaspreviouschecked\v!doublesided} +\unexpanded\def\btxdoifelsecombiinlist#1#2% + {\clf_btxdoifelsecombiinlist{#1}{#2}} + \let\btxdoifsameaspreviouscheckedelse\btxdoifelsesameaspreviouschecked \let\btxdoifsameaspreviouselse \btxdoifelsesameasprevious +\let\btxdoifcombiinlistelse \btxdoifelsecombiinlist \def\publ_place_list_indeed#1[#2][#3]% {\begingroup @@ -952,6 +981,7 @@ \s!btxref=\currentbtxtag,% \s!btxspc=\currentbtxspecification,% \s!btxlst=\number\c_btx_list_reference,% check if needed + %\ifx\currentbtxcombis\empty\else\s!btxcom={\currentbtxcombis},\fi% \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}% @@ -984,6 +1014,7 @@ [\c!type=\s!btx]% \c!location=\v!none [\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi% \s!btxref=\currentbtxtag,% + %\ifx\currentbtxcombis\empty\else\s!btxcom={\currentbtxcombis},\fi% \ifx\currentbtxbefore\empty\else\s!btxbtx={\currentbtxbefore},\fi% \ifx\currentbtxafter \empty\else\s!btxatx={\currentbtxafter },\fi% \s!btxint=\number\currentbtxbacklink @@ -1003,6 +1034,7 @@ \ifx\currentbtxnumbering\v!yes \def\currentbtxnumbering{num}% convenient alias \letbtxrenderingparameter\c!numbering\currentbtxnumbering + \letlistparameter\c!headnumber\v!always \else\ifx\currentbtxnumbering\v!no \letlistparameter\c!headnumber\v!no \let\currentbtxnumbering\empty diff --git a/tex/context/base/publ-sor.lua b/tex/context/base/publ-sor.lua index e587d0ee9..ba353a9bc 100644 --- a/tex/context/base/publ-sor.lua +++ b/tex/context/base/publ-sor.lua @@ -27,6 +27,8 @@ local v_default = variables.default local v_reference = variables.reference local v_dataset = variables.dataset local v_list = variables.list +local v_index = variables.index +local v_cite = variables.cite local v_used = variables.used local report = logs.reporter("publications","sorters") @@ -344,6 +346,8 @@ end sorters[v_default] = sorters[v_list] sorters[""] = sorters[v_list] +sorters[v_cite] = sorters[v_list] +sorters[v_index] = sorters[v_dataset] local function anything(dataset,rendering,list,sorttype) local valid = sortsequence(dataset,list,sorttype) -- field order diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 31873fcff..a1f5582c4 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 3eee87cb2..7903adbdc 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 006db5ad7..191f3f7b9 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/09/15 13:41:44 +-- merge date : 05/10/15 20:08:09 do -- begin closure to overcome local limits and interference -- cgit v1.2.3