ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* simple bibliography and dots after section numbering
@ 2010-05-05  2:12 rogutes
  2010-05-05  7:25 ` Marius
  2010-05-06 22:52 ` rogutes
  0 siblings, 2 replies; 14+ messages in thread
From: rogutes @ 2010-05-05  2:12 UTC (permalink / raw)
  To: ntg-context

G'Day,

I'm trying out ConTeXt and have come up with 2 questions.

1. How does one add a dot after the numerals in headings, so that
     "\section{First}"
   becomes
     "1. First"
   instead of
     "1 First"
   ?

2. I would like to use something like this for bibliography:
   http://wiki.contextgarden.net/Simple_Bibliography#Another_Approach
   but adapting it seems too hard for me. Perhaps someone could help? A
   very crude example:

   -----------------------------------------------------------
   People are writing about this \cite[ref1], (\cite[ref2] - page 25).

   \startbibliography
     \bibitem[ref1] This is the first reference.
     \bibitem[Daniel, 2004][ref2] This is the second reference.
   \stopbibliography
   -----------------------------------------------------------

   should be rendered as:

   -----------------------------------------------------------
   People are writing about this [1], (Daniel, 2004 - page 25)

   1. This is the first reference.
   2. This is the second reference.
   -----------------------------------------------------------

   That is, I want an environment and 2 commands:
     \startbibliography
     \cite [key]
     \bibitem [label_replacing_\cite[key]_but_not_the_item_number] [key]


Thank you very much,
--  Rogutės Sparnuotos

P.S. Is there a paragraph somewhere describing the logic under the use of
     [] and {} for different commands (it seemed somehow more intuitive in
     LaTeX). What would a ConTeXt developer choose, \cite[x] or \cite{x}
     and why?
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-05  2:12 simple bibliography and dots after section numbering rogutes
@ 2010-05-05  7:25 ` Marius
  2010-05-05  7:39   ` Otared Kavian
  2010-05-06 22:52 ` rogutes
  1 sibling, 1 reply; 14+ messages in thread
From: Marius @ 2010-05-05  7:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 5, 2010 at 5:12 AM,  <rogutes@googlemail.com> wrote:
> G'Day,
>
> I'm trying out ConTeXt and have come up with 2 questions.
>
> 1. How does one add a dot after the numerals in headings, so that
>     "\section{First}"
>   becomes
>     "1. First"
>   instead of
>     "1 First"
>   ?

\setupheads[sectionstopper=.]
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-05  7:25 ` Marius
@ 2010-05-05  7:39   ` Otared Kavian
  2010-05-06 21:31     ` Rogutės Sparnuotos
  0 siblings, 1 reply; 14+ messages in thread
From: Otared Kavian @ 2010-05-05  7:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 5 mai 2010, at 09:25, Marius wrote:

> On Wed, May 5, 2010 at 5:12 AM,  <rogutes@googlemail.com> wrote:
>> G'Day,
>> 
>> I'm trying out ConTeXt and have come up with 2 questions.
>> 
>> 1. How does one add a dot after the numerals in headings, so that
>>     "\section{First}"
>>   becomes
>>     "1. First"
>>   instead of
>>     "1 First"
>>   ?
> 
> \setupheads[sectionstopper=.]

Actually this works only in mkiv, and implies also a dot after the chapter numbers and so on. 
If you want only a dot after the section number you may say
\setuphead[section][sectionstopper={.}]

The same thing is possible in mkii, but I don't remember how to do it right now…

Best regards: OK
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-05  7:39   ` Otared Kavian
@ 2010-05-06 21:31     ` Rogutės Sparnuotos
  0 siblings, 0 replies; 14+ messages in thread
From: Rogutės Sparnuotos @ 2010-05-06 21:31 UTC (permalink / raw)
  To: ntg-context

Otared Kavian <otared <at> gmail.com> writes:
> On 5 mai 2010, at 09:25, Marius wrote:
> > On Wed, May 5, 2010 at 5:12 AM,  <rogutes <at> googlemail.com> wrote:
> >> 
> >> 1. How does one add a dot after the numerals in headings, so that
> >>     "\section{First}"
> >>   becomes
> >>     "1. First"
> >>   instead of
> >>     "1 First"
> >>   ?
> > 
> > \setupheads[sectionstopper=.]
> 
> Actually this works only in mkiv, and implies also a dot after the
> chapter numbers and so on. 
> If you want only a dot after the section number you may say
> \setuphead[section][sectionstopper={.}]
> 
> The same thing is possible in mkii, but I don't remember how to do it
> right now…

Thank you both very much. I have a humble question now: how did you find
out about this setting?

I thought about adding sectionstopper to the Reference in the wiki
(sectionstarter should go with it, no?), but was not sure how to go
about a MKIV-only parameter. Moreover, I was not successful in finding
any documentation about it. There's no more to the new manual than the
chapters on typography, fonts, is there?


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-05  2:12 simple bibliography and dots after section numbering rogutes
  2010-05-05  7:25 ` Marius
@ 2010-05-06 22:52 ` rogutes
  2010-05-07  6:32   ` Marius
  1 sibling, 1 reply; 14+ messages in thread
From: rogutes @ 2010-05-06 22:52 UTC (permalink / raw)
  To: ntg-context

rogutes@googlemail.com (2010-05-05 05:12):
> 2. I would like to use something like this for bibliography:
>    http://wiki.contextgarden.net/Simple_Bibliography#Another_Approach
>    but adapting it seems too hard for me. Perhaps someone could help? A
>    very crude example:
> 
>    -----------------------------------------------------------
>    People are writing about this \cite[ref1], (\cite[ref2] - page 25).
> 
>    \startbibliography
>      \bibitem[ref1] This is the first reference.
>      \bibitem[Daniel, 2004][ref2] This is the second reference.
>    \stopbibliography
>    -----------------------------------------------------------
> 
>    should be rendered as:
> 
>    -----------------------------------------------------------
>    People are writing about this [1], (Daniel, 2004 - page 25)
> 
>    1. This is the first reference.
>    2. This is the second reference.
>    -----------------------------------------------------------
> 
>    That is, I want an environment and 2 commands:
>      \startbibliography
>      \cite [key]
>      \bibitem [label_replacing_\cite[key]_but_not_the_item_number] [key]

A bump to my initial question to add that I am using MKIV and a question:
would this be hard to implement for a total ConTeXt newcommer?  What
should he use? TeX / Lua? Would ConTeXt commands be enough?

-- 
--  Rogutės Sparnuotos
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-06 22:52 ` rogutes
@ 2010-05-07  6:32   ` Marius
  2010-05-09  0:21     ` Rogutės Sparnuotos
  0 siblings, 1 reply; 14+ messages in thread
From: Marius @ 2010-05-07  6:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I think what are you looking for is possible with bib module. Look at
the 3.1 section "Default and explicit citations"

http://dl.contextgarden.net/modules/bibmod-doc-2009.11.04.zip
http://wiki.contextgarden.net/Bibliography

On Fri, May 7, 2010 at 1:52 AM,  <rogutes@googlemail.com> wrote:
> rogutes@googlemail.com (2010-05-05 05:12):
>> 2. I would like to use something like this for bibliography:
>>    http://wiki.contextgarden.net/Simple_Bibliography#Another_Approach
>>    but adapting it seems too hard for me. Perhaps someone could help? A
>>    very crude example:
>>
>>    -----------------------------------------------------------
>>    People are writing about this \cite[ref1], (\cite[ref2] - page 25).
>>
>>    \startbibliography
>>      \bibitem[ref1] This is the first reference.
>>      \bibitem[Daniel, 2004][ref2] This is the second reference.
>>    \stopbibliography
>>    -----------------------------------------------------------
>>
>>    should be rendered as:
>>
>>    -----------------------------------------------------------
>>    People are writing about this [1], (Daniel, 2004 - page 25)
>>
>>    1. This is the first reference.
>>    2. This is the second reference.
>>    -----------------------------------------------------------
>>
>>    That is, I want an environment and 2 commands:
>>      \startbibliography
>>      \cite [key]
>>      \bibitem [label_replacing_\cite[key]_but_not_the_item_number] [key]
>
> A bump to my initial question to add that I am using MKIV and a question:
> would this be hard to implement for a total ConTeXt newcommer?  What
> should he use? TeX / Lua? Would ConTeXt commands be enough?
>
> --
> --  Rogutės Sparnuotos
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-07  6:32   ` Marius
@ 2010-05-09  0:21     ` Rogutės Sparnuotos
  2010-05-09  6:15       ` Taco Hoekwater
  0 siblings, 1 reply; 14+ messages in thread
From: Rogutės Sparnuotos @ 2010-05-09  0:21 UTC (permalink / raw)
  To: ntg-context

Marius (2010-05-07 09:32):
> I think what are you looking for is possible with bib module. Look at
> the 3.1 section "Default and explicit citations"
> 
> http://dl.contextgarden.net/modules/bibmod-doc-2009.11.04.zip
> http://wiki.contextgarden.net/Bibliography

Yes, it looks very interesting and not as complicated as in LaTeX - thank
you.

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 (or easily
done with MKIV)? Intuitively, I would use

  \placepublications[criterium=[type, book]]

for each list...

-- 
--  Rogutės Sparnuotos
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-09  0:21     ` Rogutės Sparnuotos
@ 2010-05-09  6:15       ` Taco Hoekwater
  2010-05-09 17:55         ` Rogutės Sparnuotos
  0 siblings, 1 reply; 14+ messages in thread
From: Taco Hoekwater @ 2010-05-09  6:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

> (or easily done with MKIV)? Intuitively, I would use
> 
>   \placepublications[criterium=[type, book]]
> 
> for each list...
> 

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-09  6:15       ` Taco Hoekwater
@ 2010-05-09 17:55         ` Rogutės Sparnuotos
  2010-05-10  7:00           ` Taco Hoekwater
  0 siblings, 1 reply; 14+ messages in thread
From: Rogutės Sparnuotos @ 2010-05-09 17:55 UTC (permalink / raw)
  To: ntg-context

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?

> >(or easily done with MKIV)? Intuitively, I would use
> >
> >  \placepublications[criterium=[type, book]]
> >
> >for each list...

-- 
--  Rogutės Sparnuotos
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  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
  0 siblings, 2 replies; 14+ messages in thread
From: Taco Hoekwater @ 2010-05-10  7:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen

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 ...).

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-10  7:00           ` Taco Hoekwater
@ 2010-05-10 10:49             ` Matija Šuklje
  2010-05-11  8:37             ` Hans Hagen
  1 sibling, 0 replies; 14+ messages in thread
From: Matija Šuklje @ 2010-05-10 10:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dne ponedeljek 10. maja 2010 ob 09:00:18 je Taco Hoekwater napisal(a):
> Rogutės Sparnuotos wrote:
> > 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 ...).

I would need such an advanced grouping system as well. It's really unfortunate 
it's so hard to do :\


Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suklje@gabbler.org
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Hans Hagen @ 2010-05-11  8:37 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: mailing list for ConTeXt users

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}{/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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-11  8:37             ` Hans Hagen
@ 2010-05-11  8:43               ` Taco Hoekwater
  2010-05-11  9:13                 ` Hans Hagen
  0 siblings, 1 reply; 14+ messages in thread
From: Taco Hoekwater @ 2010-05-11  8:43 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: simple bibliography and dots after section numbering
  2010-05-11  8:43               ` Taco Hoekwater
@ 2010-05-11  9:13                 ` Hans Hagen
  0 siblings, 0 replies; 14+ messages in thread
From: Hans Hagen @ 2010-05-11  9:13 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: mailing list for ConTeXt users

On 11-5-2010 10:43, Taco Hoekwater wrote:
> 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.

it's just the code from hybrid-bibtex.tex (without text) as di didn;t 
want to post an unfinished chapter so in due time there will be an 
explanation ... the xml bit is explained in the xml-mkiv document

Hans

-----------------------------------------------------------------
                                           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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-05-11  9:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-05  2:12 simple bibliography and dots after section numbering 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
2010-05-11  9:13                 ` Hans Hagen

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).