On 10-5-2010 9:00, Taco Hoekwater wrote:
Rogutės Sparnuotos wrote:
Taco Hoekwater (2010-05-09 08:15):
Rogutės Sparnuotos wrote:
But would it let me place such a list of publications:

Books
1. Author (year). Title.
2. Author (year). Title.

Internet resources
3. URL

Movies
4. Author (year). Title.

It seems that I could easily use \setuppublicationlayout to define a
'movies' type, but is listing references by type implemented

Not in mkii.

But I am running MKIV, look one line below. So, is printing a list of
publications grouped by publication type possible or easily done with
MKIV?

I know it is not supported out of the box, but only Hans knows how
hard it would be to write an extension (it should be considerably
easier to do in lua than in TeX, but even so ...).

a more mkiv-ish approach is:

\starttext

% <bibtex>
%   <entry tag="hagen:tb19-3-311" category="article">
%     <field name="number">3</field>
%     <field name="bibdate">Fri Jul 13 10:24:20 MDT 2007</field>
%     <field name="author">Hans Hagen</field>
%     <field name="journal">TUGboat</field>
% <field name="title">{Visual Debugging in \TeX, Part 1: The Story}</field>
%     <field name="ISSN">0896-3207</field>
%     <field name="year">1998</field>
%     <field name="pages">311--317</field>
%     <field name="volume">19</field>
%   </entry>
% </bibtex>


\def\MF  {MF}
\def\MP  {MP}
\def\TUB {TUGboat}
\def\Mc  {Mac}
\def\sltt{\tt}
\let\acro\firstofoneargument

\usemodule[abr-01]

\definebibtexsession [somebibtex]

\registerbibtexfile [somebibtex] [tugboat.bib]
\registerbibtexfile [somebibtex] [komoedie.bib]

\preparebibtexsession [somebibtex] % [convert]

\startxmlsetups bibtex:one
  \starttabulate[|Bl|p|]
  \NC tag   \NC \xmlatt{#1}{tag} \NC\NR
  \NC author\NC \xmlfilter{#1}{/fie...@name='author']/context()} \NC\NR
  \NC title \NC \xmlfilter{#1}{/fie...@name='title' ]/context()} \NC\NR
  \stoptabulate
\stopxmlsetups

\startxmlsetups bibtex:bibtex
    \xmlfilter{#1}{
        /ent...@category='article']
        /fie...@name='author' and (find(text(),'Hans Hagen')
            or find(text(),'Taco Hoekwater'))]
        /../command(bibtex:one)
    }
\stopxmlsetups

\applytobibtexsession[somebibtex][bibtex]

\page

\startxmlsetups bibtex:entry:getkeys
    \xmladdsortentry{bibtex}{#1}
        {\xmlfilter{#1}{/fie...@name='author']/text()}}
    \xmladdsortentry{bibtex}{#1}
        {\xmlfilter{#1}{/fie...@name='year'  ]/text()}}
    \xmladdsortentry{bibtex}{#1}
        {\xmlatt{#1}{tag}}
\stopxmlsetups

\startxmlsetups xml:bibtex:sorter
    \xmlresetsorter{bibtex}
  % \xmlfilter{#1}{entry/command(bibtex:entry:getkeys)}
    \xmlfilter{#1}{
        bibtex
        /ent...@category='article']
        /fie...@name='author' and find(text(),'Knuth')]
        /../command(bibtex:entry:getkeys)}
    \xmlsortentries{bibtex}
    \xmlflushsorter{bibtex}{bibtex:entry:flush}
\stopxmlsetups

\startxmlsetups bibtex:entry:flush
    \xmlfilter{#1}{/fie...@name='author']/context()} / %
    \xmlfilter{#1}{/fie...@name='year'  ]/context()} / %
    \xmlatt{#1}{tag}\par
\stopxmlsetups

\xmlsetup{bibtex:somebibtex}{xml:bibtex:sorter}

\stoptext


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to