diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-24 16:15:14 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-24 16:15:14 +0200 |
commit | 1d2f8360f233e00f3bf036ac01458bca1bbaedc0 (patch) | |
tree | 28bb1c567c9844dedb33ebab550c56e51e06d209 /tex | |
parent | 5ab52ddd294de212566b7cc9d453e127ffcbd2e8 (diff) | |
download | context-1d2f8360f233e00f3bf036ac01458bca1bbaedc0.tar.gz |
2014-05-24 15:16:00
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4281 -> 4280 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/publ-aut.lua | 21 | ||||
-rw-r--r-- | tex/context/base/publ-ini.lua | 76 | ||||
-rw-r--r-- | tex/context/base/publ-ini.mkiv | 37 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24583 -> 24583 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 244428 -> 244467 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
9 files changed, 66 insertions, 74 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 799d14cb6..d4be2d713 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.23 23:24} +\newcontextversion{2014.05.24 15:14} %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 e6179748e..d6a93c511 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 10228ee73..03ef02652 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.23 23:24} +\edef\contextversion{2014.05.24 15:14} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/publ-aut.lua b/tex/context/base/publ-aut.lua index c549b2d16..f30902ae6 100644 --- a/tex/context/base/publ-aut.lua +++ b/tex/context/base/publ-aut.lua @@ -321,8 +321,6 @@ function authors.normalshort(author,settings) return concat(result) end --- vons surnames juniors, firstnames - -- [vons] [vonsep] [surnames] [surnamejuniorsep] [juniors] [surnamefirstnamesep] [firstnames] (von Hoekwater jr, Taco) function authors.inverted(author,settings) @@ -373,7 +371,24 @@ function authors.invertedshort(author,settings) return concat(result) end -authors.short = authors.normalshort +-- [vons] [vonsep] [surnames] + +function authors.name(author,settings) + local vons, surnames = author.vons, author.surnames + local result, settings = { }, settings or defaultsettings + if vons and #vons > 0 then + result[#result+1] = concat(vons," ") + result[#result+1] = settings.vonsep or defaultsettings.vonsep + end + if surnames and #surnames > 0 then + result[#result+1] = concat(surnames," ") + if juniors and #juniors > 0 then + result[#result+1] = settings.surnamejuniorsep or defaultsettings.surnamejuniorsep + result[#result+1] = concat(juniors," ") + end + end + return concat(result) +end local lastconcatsize = 1 diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua index a73450ab3..054ed94ea 100644 --- a/tex/context/base/publ-ini.lua +++ b/tex/context/base/publ-ini.lua @@ -65,8 +65,17 @@ local sortcomparer = sorters.comparers.basic -- (a,b) local sortstripper = sorters.strip local sortsplitter = sorters.splitters.utf -local splitmanipulation = typesetters.manipulators.splitspecification -local applymanipulation = typesetters.manipulators.applyspecification +local manipulators = typesetters.manipulators +local splitmanipulation = manipulators.splitspecification +local applymanipulation = manipulators.applyspecification +local manipulatormethods = manipulators.methods + +-- this might move elsewhere + +manipulatormethods.Word = converters.Word +manipulatormethods.WORD = converters.WORD +manipulatormethods.Words = converters.Words +manipulatormethods.WORDS = converters.WORDS local context = context @@ -946,10 +955,12 @@ function lists.flushentries(dataset,sortvariant) if type(sort) == "function" then list = sort(dataset,rendering,list) or list end + local luadata = datasets[dataset].luadata + -- local details = datasets[dataset].details for i=1,#list do -- we can pass i here too ... more efficient to avoid the setvalue local tag = list[i][1] - local entry = datasets[dataset].luadata[tag] + local entry = luadata[tag] if entry then ctx_setvalue("currentbtxindex",i) -- todo: helper local combined = entry.combined @@ -958,7 +969,7 @@ function lists.flushentries(dataset,sortvariant) else ctx_setvalue("currentbtxcombis","") end - ctx_btxhandlelistentry(tag) -- pas i instead + ctx_btxhandlelistentry(tag) -- pass i instead and also pass 'placed' end end end @@ -991,68 +1002,11 @@ function lists.doifalreadyplaced(dataset,tag) commands.doifelse(renderings[dataset].used[tag]) end --- we ask for <n>:tag but when we can't find it we go back --- to look for previous definitions, and when not found again --- we look forward - local function compare(a,b) local aa, bb = a and a[3], b and b[3] return aa and bb and aa < bb end --- rendering ? - --- todo: nicer refs - --- local f_citereference = formatters["btx:%s:%s"] -- dataset, instance (block), tag, order --- local f_listreference = formatters["btx:%s:%s:%s:%s"] -- dataset, instance (block), tag, order --- --- -- local done = { } --- local last = 0 --- --- function commands.btxcitereference(internal) --- last = last + 1 --- local ref = f_citereference(internal,last) -- we just need a unique key --- -- local don = done[ref] --- -- if don == nil then --- if trace_references then --- report_reference("cite: %s",ref) --- end --- -- done[ref] = true --- ctx_btxsetcitereference(ref,internal) --- -- elseif don then --- -- report_reference("duplicate cite: %s, skipped",ref) --- -- done[ref] = false --- -- -- else --- -- -- no more messages --- -- end --- end --- --- -- we just need a unique key, so we could also use btx:<number> but this --- -- way we have a bit of a check for duplicates --- --- -- local done = { } --- local last = 0 --- --- function commands.btxlistreference(dataset,block,tag,data) --- last = last + 1 --- local ref = f_listreference(dataset,block,tag,last) --- -- local don = done[ref] --- -- if don == nil then --- if trace_references then --- report_reference("list: %s",ref) --- end --- -- done[ref] = true --- ctx_btxsetlistreference(dataset,tag,ref,data) --- -- elseif don then --- -- report_reference("duplicate link: %s, skipped",ref) --- -- done[ref] = false --- -- -- else --- -- -- no more messages --- -- end --- end - - local f_citereference = formatters["btx:cite:%s"] local f_listreference = formatters["btx:list:%s"] diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv index b175b614d..00eb445b1 100644 --- a/tex/context/base/publ-ini.mkiv +++ b/tex/context/base/publ-ini.mkiv @@ -478,7 +478,7 @@ \def\publ_place_list_entry_register {\ctxcommand{btxregisterlistentry("\currentbtxdataset","\currentbtxtag")}} -\unexpanded\def\btxhandlelistentry#1% called at the lua end +\unexpanded\def\btxhandlelistentry#1% called at the lua end / todo: pass check state {\begingroup \edef\currentbtxtag{#1}% \ifconditional\c_publ_place_all @@ -583,6 +583,7 @@ etaldisplay = \number\btxlistvariantparameter\c!etaldisplay, })}} +\unexpanded\def\btxflushauthorname {\btx_flush_author{name}} % #1 \unexpanded\def\btxflushauthornormal {\btx_flush_author{normal}} % #1 \unexpanded\def\btxflushauthornormalshort {\btx_flush_author{normalshort}} % #1 \unexpanded\def\btxflushauthorinverted {\btx_flush_author{inverted}} % #1 @@ -599,6 +600,7 @@ % \btxflushauthor{artauthor} % \btxflushauthor{editor} % +% \btxflushauthor[name]{author} % \btxflushauthor[normal]{author} % \btxflushauthor[normalshort]{author} % \btxflushauthor[inverted]{author} @@ -913,10 +915,27 @@ \stopcontextdefinitioncode +%D Special: + +\def\publ_check_repeat + {\doifelse{\btxrenderingparameter\c!repeat}\v!yes + {\setfalse\c_publ_place_check\setfalse\c_publ_place_register} + {\settrue \c_publ_place_check\settrue \c_publ_place_register}} + +\appendtoks + \publ_check_repeat +\to \everysetupbtxrendering + +\appendtoks + \globallet\publ_check_repeat\relax +\to \everystarttext + %D Defaults: \setupbtxrendering [\c!dataset=\v!standard, + \c!repeat=\v!no, + \c!continue=\v!no, \c!method=\v!global, \c!setups=btx:rendering:\btxrenderingparameter\c!alternative, \c!alternative=apa, @@ -984,14 +1003,18 @@ \definebtxcitevariant [author:year] [authoryear] - [\c!left={(}, - \c!right={)}] + [\c!left=, + \c!right=] + +% \definebtxcitevariant +% [author:years] +% [authoryears] +% [\c!left=, +% \c!right=] \definebtxcitevariant [author:years] - [authoryears] - [\c!left=, - \c!right=] + [author:year] \definebtxcitevariant [year] @@ -1092,7 +1115,7 @@ [author] \setupbtxcitevariant - [\c!authorconversion=\btxlistvariantparameter\c!authorconversion, + [\c!authorconversion=name, % \btxlistvariantparameter\c!authorconversion, \c!etallimit =\btxlistvariantparameter\c!etallimit, \c!etaldisplay =\btxlistvariantparameter\c!etaldisplay] diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 2c166a863..8bb640e26 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 edb25cc89..48fa93f78 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 4c1063bbb..c72eb4439 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/23/14 23:24:48 +-- merge date : 05/24/14 15:14:04 do -- begin closure to overcome local limits and interference |