Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- startbuffer[ref]
- @article{solo,
- author = {MyLast, MyFirst},
- title = {Solo work},
- journal = {Journal},
- year = {2000},
- month = {1},
- volume = {1}
- }
- @article{co,
- author = {MyLast, MyFirst and CoLast, CoFirst},
- title = {Joint work},
- journal = {Journal},
- month = {1},
- year = {2000},
- volume = {1}
- }
- stopbuffer
- usebtxdataset[ref][ref.buffer]
- setupbtx[dataset=ref]
- definebtxrendering[ref][dataset=ref]
- setupbtx[default:cite]
- [alternative=authoryear,
- etallimit=1]
- define[1]formatname{
- % Placeholder formatting
- ctxlua{tex.sprint('{\bf ' .. '#1' .. '}')}
- }
- starttexdefinition btx:test
- formatname{btxflush{author}}
- stoptexdefinition
- startsetups btx:default:list:article
- texdefinition{btx:test}
- texdefinition{btx:default:title}
- texdefinition{btx:default:journal}
- texdefinition{btx:default:year}
- removeunwantedspaces
- removepunctuation
- btxperiod
- stopsetups
- starttext
- Citations: cite[solo], cite[co]
- startsubject[title=Bibliography]
- placelistofpublications[ref][method=dataset]
- stopsection
- stoptext
- startbuffer[ref]
- @article{solo,
- author = {MyLast, MyFirst},
- title = {Solo work},
- journal = {Journal},
- year = {2000},
- month = {1},
- volume = {1}
- }
- @article{co,
- author = {MyLast, MyFirst and CoLast, CoFirst},
- title = {Joint work},
- journal = {Journal},
- month = {1},
- year = {2000},
- volume = {1}
- }
- stopbuffer
- usebtxdataset[ref][ref.buffer]
- setupbtx[dataset=ref]
- definebtxrendering[ref][dataset=ref]
- setupbtx[default:cite]
- [alternative=authoryear,
- etallimit=1]
- startluacode
- local dataset = publications.datasets.ref
- for tag, entry in pairs(dataset.luadata) do
- -- Do complex formatting in lua... the following is a placeholder
- dataset.luadata[tag].myauthor = '{\bf ' .. entry.author ..' }'
- end
- stopluacode
- starttexdefinition btx:test
- btxdirect{myauthor}
- stoptexdefinition
- startsetups btx:default:list:article
- texdefinition{btx:test}
- texdefinition{btx:default:title}
- texdefinition{btx:default:journal}
- texdefinition{btx:default:year}
- removeunwantedspaces
- removepunctuation
- btxperiod
- stopsetups
- starttext
- Citations: cite[solo], cite[co]
- startsubject[title=Bibliography]
- placelistofpublications[ref][method=dataset]
- stopsection
- stoptext
Add Comment
Please, Sign In to add comment