ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bib module/XML
@ 2006-03-29  0:38 Johannes Graumann
  2006-03-29  8:06 ` Taco Hoekwater
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Graumann @ 2006-03-29  0:38 UTC (permalink / raw)


Hello,

I have a couple of questions concerning the bib module, which I'm using in
conjunction with XML document code.
In my header I say:
\usemodule[bib]
\setupbibtex[database={../Bibliography/bibliography.bib}]

1) \completepublications problem
in the xml I say:
<cite id="storz:02" key="authoryears"/>
and use 
\defineXMLargument
  [cite]
  {\cite[\XMLpar{cite}{key}{}][\XMLpar{cite}{id}{}]}
in my mappings.

This works ok, however, I also have the following definition included:
\defineXMLenvironment
  [chapter]
  {
    \defineXMLargument
      [title]
      {\chapter}
    \defineXMLprocess
      [content]
      {}
  }
  {\section{References}\placepublications}
so that a xml chapter definiton like this:
<chapter>
  <title>
    Example
  </title>
  <content>
    <cite id="bibtexkey1" key="authoryears"/>
    <cite id="bibtexkey2" key="authoryears"/>
  </content>
</chapter>
will be read out properly and I get a chapter specific publication list at
the end of each chapter. This does not work. I will get a Reference List,
but it contains the second entry twice and its second copy is indented in
relation to the first ...
Any Idea on how to remedy this?

2) I'm a biologist and author/year citation is usus where I work. The
options 'authoryear' ('Hoekwater (2006)') and 'authoryears' ('(Hoekwater,
2006)') are great, but I would also want to have the option to prepend the
latter with something like 'e.g.' ('(see e.g. Hoekwater, 2006)'). I
understand this is possible to the right of the actual citation
with 'extras', but how difficult would it be to do that on the left?

Thanks for any help,

Joh

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

* Re: bib module/XML
  2006-03-29  0:38 bib module/XML Johannes Graumann
@ 2006-03-29  8:06 ` Taco Hoekwater
  2006-03-29 17:48   ` Johannes Graumann
  0 siblings, 1 reply; 4+ messages in thread
From: Taco Hoekwater @ 2006-03-29  8:06 UTC (permalink / raw)




Johannes Graumann wrote:
> This works ok, however, I also have the following definition included:
> \defineXMLenvironment
>   [chapter]
>   {
>     \defineXMLargument
>       [title]
>       {\chapter}
>     \defineXMLprocess
>       [content]
>       {}

I believe that should be:

     \defineXMLenvironment
       [content]
       {}{}

> 2) I'm a biologist and author/year citation is usus where I work. The
> options 'authoryear' ('Hoekwater (2006)') and 'authoryears' ('(Hoekwater,
> 2006)') are great, but I would also want to have the option to prepend the
> latter with something like 'e.g.' ('(see e.g. Hoekwater, 2006)'). I
> understand this is possible to the right of the actual citation
> with 'extras', but how difficult would it be to do that on the left?

You can use the 'left' parameter, just don't forget to include a '('
at the start of it.

Cheers, Taco

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

* Re: bib module/XML
  2006-03-29  8:06 ` Taco Hoekwater
@ 2006-03-29 17:48   ` Johannes Graumann
  2006-03-30 18:20     ` Johannes Graumann
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Graumann @ 2006-03-29 17:48 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2020 bytes --]

Taco Hoekwater wrote:
> I believe that should be:
> 
>      \defineXMLenvironment
>        [content]
>        {}{}
> 
Thanks for your answer ... this didn't solve my problem see attachment ...
the relevant mapping code is:
\defineXMLenvironment
  [chapter]
  {
    \defineXMLargument
      [title]
      {\chapter}
    \defineXMLenvironment
      [content]
      {}{}
  }
  {\section{References}\placepublications}
\defineXMLenvironment
  [section]
  {
  \defineXMLargument
    [title]
    {\section}
  \defineXMLenvironment
    [content]
    {}{}
  }
  {}
\defineXMLargument
  [cite]
  {\cite[\XMLpar{cite}{key}{}][\XMLpar{cite}{id}{}]}

XML for this bit looks as follows:
<chapter>
  <title>Introduction</title>
  <content>
    <section>
      <title>The problem of the complex protein mixture</title>
      <content>
        <p>
          <cite id="gott:00" key="authoryear"/><cite id="storz:02" 
          key="authoryears"/>
        </p>
      </content>
    </section>
    <section>
      <title>
        Multidimensional Protein Identification Technology
      </title>
      <content>
      </content>
    </section>
    <section>
      <title>The Ubiquitin&endash;Proteasome System</title>
      <content>
      </content>
    </section>
    <section>
      <title>Cdc48p</title>
      <content>
      </content>
    </section>
  </content>
</chapter>

>> 2) I'm a biologist and author/year citation is usus where I work. The
>> options 'authoryear' ('Hoekwater (2006)') and 'authoryears' ('(Hoekwater,
>> 2006)') are great, but I would also want to have the option to prepend
>> the latter with something like 'e.g.' ('(see e.g. Hoekwater, 2006)'). I
>> understand this is possible to the right of the actual citation
>> with 'extras', but how difficult would it be to do that on the left?
> 
> You can use the 'left' parameter, just don't forget to include a '('
> at the start of it.
I see .. thanks for pointing that out!

Joh

[-- Attachment #2: PhD-Thesis.pdf --]
[-- Type: application/pdf, Size: 29194 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: bib module/XML
  2006-03-29 17:48   ` Johannes Graumann
@ 2006-03-30 18:20     ` Johannes Graumann
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Graumann @ 2006-03-30 18:20 UTC (permalink / raw)


Taco provided this solution off-list:
> Try this:
> 
>    \defineXMLargument
>      [cite]
>      {\expanded{\cite[\XMLpar{cite}{key}{}][\XMLpar{cite}{id}{}]}}
> 
> The immediate expansion make sure that the right things are
> remembered.

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

end of thread, other threads:[~2006-03-30 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-29  0:38 bib module/XML Johannes Graumann
2006-03-29  8:06 ` Taco Hoekwater
2006-03-29 17:48   ` Johannes Graumann
2006-03-30 18:20     ` Johannes Graumann

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