Re: [NTG-context] Modifying bibliography entries using lua

2018-07-24 Thread Hans Hagen
On 7/24/2018 4:41 PM, Stanislav Sokolenko wrote: I went with the following little extension to match and make bold multiple names: ok. (this document.CompareNames makes a good candidate for a 'how to improve your lua code' tutorial ... maybe something for the ctx meeting) I didn't check wha

Re: [NTG-context] Modifying bibliography entries using lua

2018-07-24 Thread Stanislav Sokolenko
That's perfect, thank you! On 2018-07-23 06:32 PM, Hans Hagen wrote: \startsetups btx:list:author:normalshort     \fastsetup{btx:list:author:concat}     \begingroup \ctxluacode{document.CheckMeB("\currentbtxdataset","\currentbtxtag",\number\currentbtxauthorindex)}     \ifx\currentbtxinitials

Re: [NTG-context] Modifying bibliography entries using lua

2018-07-23 Thread Hans Hagen
On 7/23/2018 10:17 PM, Stanislav Sokolenko wrote: Thanks Hans, that's really helpful! This is not for the fainthearted so here we go \startluacode     function document.MyBoldPub(set,tag) -- local a = publications.getfield(set,tag,"author") -- inspect(a) -- local c = publication

Re: [NTG-context] Modifying bibliography entries using lua

2018-07-23 Thread Stanislav Sokolenko
Thanks Hans, that's really helpful! This is not for the fainthearted so here we go \startluacode     function document.MyBoldPub(set,tag) -- local a = publications.getfield(set,tag,"author") -- inspect(a) -- local c = publications.getcasted(set,tag,"author") -- inspect(c)   

Re: [NTG-context] Modifying bibliography entries using lua

2018-07-23 Thread Hans Hagen
On 7/23/2018 6:42 PM, Stanislav Sokolenko wrote: Dear list, I'm struggling to output bibliography entries into lua for string modification (like making a particular author name bold). In effect, I just need something like the following: \starttexdefinition btx:customauthor     \startluacode

[NTG-context] Modifying bibliography entries using lua

2018-07-23 Thread Stanislav Sokolenko
Dear list, I'm struggling to output bibliography entries into lua for string modification (like making a particular author name bold). In effect, I just need something like the following: \starttexdefinition btx:customauthor     \startluacode     local text = context.btxflush('author')     --