ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Bib module in mkiv
Date: Fri, 17 Apr 2009 19:39:30 +0200	[thread overview]
Message-ID: <412F6C5E-7963-47BE-91CE-FDC77D1BA939@gmail.com> (raw)
In-Reply-To: <49E8BCA2.1030705@wxs.nl>


Am 17.04.2009 um 19:30 schrieb Hans Hagen:

> Wolfgang Schuster wrote:
>> Am 17.04.2009 um 19:05 schrieb Hans Hagen:
>>> Wolfgang Schuster wrote:
>>>> Am 17.04.2009 um 12:08 schrieb Hans Hagen:
>>>>> i'll look into it, but then need a zip with a minimal set of  
>>>>> files that i can use for testing
>>>> With the filecontents environment you need only one file: http://wiki.contextgarden.net/Filecontents
>>>
>>> is this related to bibliographies?
>> No but you don't need multiple files for a example.
>
> runs ok here

that's not what I mean, here is a example, the bib entry comes from a  
external
file but you need only one file for the example because the filecontents
environment creates the bib file at compile time.


% defintion of the filecontents environment

\unprotect

\definemessageconstant {filecontents}

\startmessages all library: filecontents
         title: filecontents
             1: Overwriting file --
             2: Writing file --
\stopmessages

\def\startfilecontents
   {\begingroup
    \protectbuffersfalse
    \dostartfilecontents}

\def\dostartfilecontents[#1]%
   {\doiffileexistselse{#1}
      {\showmessage\m!filecontents{1}{#1}}
      {\showmessage\m!filecontents{2}{#1}}%
    \beforesplitstring#1\at.\to\filename
    \aftersplitstring #1\at.\to\extension
    \let\f!temporaryextension\extension
    \dostartbuffer[\filename][startfilecontents][stopfilecontents]}

\def\stopfilecontents
   {\doifmode{mkiv}{\savebuffer[\filename]\ctxlua{file.copy("\jobname- 
\filename.tmp","\filename.\f!temporaryextension")}}%
    \endgroup}

\protect

% start of the real document

\startfilecontents[example.bib]
@manual{me,
     author = "Taco Hoekwater",
     title  = "\CONTEXT\ Publication Module, The user documententation",
     year   = 2006,
     note   = "In case you didn't know: it's the document you are  
reading now",
     pages  = 14
}
\stopfilecontents

\usemodule[bib]
\setupbibtex[database=example]

\starttext
\cite[me]
\placepublications
\stoptext


Wolfgang

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-04-17 17:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  7:55 Taco Hoekwater
2009-04-17  9:32 ` Thomas A. Schmitz
2009-04-17 10:08   ` Hans Hagen
2009-04-17 11:58     ` Wolfgang Schuster
2009-04-17 17:05       ` Hans Hagen
2009-04-17 17:20         ` Wolfgang Schuster
2009-04-17 17:30           ` Hans Hagen
2009-04-17 17:39             ` Wolfgang Schuster [this message]
2009-04-17 17:48               ` Hans Hagen
2009-04-17 17:49             ` Thomas Prochaska
2009-04-20 10:30               ` Thomas Prochaska
2009-04-20 10:55                 ` Taco Hoekwater
2009-04-20 11:43                   ` Thomas A. Schmitz
2009-04-20 11:46                     ` Taco Hoekwater
2009-04-17 20:40       ` Peter Münster
2009-04-18 12:16         ` Hans Hagen
2009-04-17 17:06   ` Hans Hagen
2009-04-17 17:37   ` Hans Hagen
2009-04-17 17:52     ` Taco Hoekwater
2009-04-17 18:28       ` 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=412F6C5E-7963-47BE-91CE-FDC77D1BA939@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.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).