From: Taco Hoekwater <taco@elvenkind.com>
To: Hans Hagen <pragma@wxs.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: simple bibliography and dots after section numbering
Date: Tue, 11 May 2010 10:43:27 +0200 [thread overview]
Message-ID: <4BE918AF.4@elvenkind.com> (raw)
In-Reply-To: <4BE91749.8090600@wxs.nl>
Hans Hagen wrote:
>
> a more mkiv-ish approach is:
As even I don't quite understand this: could you or someone else
perhaps illuminate this code with explanations? It would make
an interesting article/wiki page, I think.
Best wishes,
Taco
> \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}{/field[@name='author']/context()} \NC\NR
> \NC title \NC \xmlfilter{#1}{/field[@name='title' ]/context()} \NC\NR
> \stoptabulate
> \stopxmlsetups
>
> \startxmlsetups bibtex:bibtex
> \xmlfilter{#1}{
> /entry[@category='article']
> /field[@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}{/field[@name='author']/text()}}
> \xmladdsortentry{bibtex}{#1}
> {\xmlfilter{#1}{/field[@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
> /entry[@category='article']
> /field[@name='author' and find(text(),'Knuth')]
> /../command(bibtex:entry:getkeys)}
> \xmlsortentries{bibtex}
> \xmlflushsorter{bibtex}{bibtex:entry:flush}
> \stopxmlsetups
>
> \startxmlsetups bibtex:entry:flush
> \xmlfilter{#1}{/field[@name='author']/context()} / %
> \xmlfilter{#1}{/field[@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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-05-11 8:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 2:12 rogutes
2010-05-05 7:25 ` Marius
2010-05-05 7:39 ` Otared Kavian
2010-05-06 21:31 ` Rogutės Sparnuotos
2010-05-06 22:52 ` rogutes
2010-05-07 6:32 ` Marius
2010-05-09 0:21 ` Rogutės Sparnuotos
2010-05-09 6:15 ` Taco Hoekwater
2010-05-09 17:55 ` Rogutės Sparnuotos
2010-05-10 7:00 ` Taco Hoekwater
2010-05-10 10:49 ` Matija Šuklje
2010-05-11 8:37 ` Hans Hagen
2010-05-11 8:43 ` Taco Hoekwater [this message]
2010-05-11 9:13 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE918AF.4@elvenkind.com \
--to=taco@elvenkind.com \
--cc=ntg-context@ntg.nl \
--cc=pragma@wxs.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).