From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79038 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: New module: simplebib Date: Sun, 4 Nov 2012 07:38:29 +0100 Message-ID: <3F5DD3CE-2C20-4E7C-926D-B4A66F136A50@gmail.com> References: <20121104001458.7616e428@zenlima.eu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1352011129 1734 80.91.229.3 (4 Nov 2012 06:38:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Nov 2012 06:38:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 04 07:38:59 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TUtrG-00013l-Rl for gctc-ntg-context-518@m.gmane.org; Sun, 04 Nov 2012 07:38:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 766671024B; Sun, 4 Nov 2012 07:38:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id i+snBFUjP-TT; Sun, 4 Nov 2012 07:38:48 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id E69B910221; Sun, 4 Nov 2012 07:38:47 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6214D10221 for ; Sun, 4 Nov 2012 07:38:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4jlXbLHEUDXW for ; Sun, 4 Nov 2012 07:38:45 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 6948A101FC for ; Sun, 4 Nov 2012 07:38:45 +0100 (CET) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qA46ci4d016572 for ; Sun, 4 Nov 2012 07:38:44 +0100 Original-Received: by mail-bk0-f41.google.com with SMTP id jm1so2006192bkc.14 for ; Sat, 03 Nov 2012 23:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=qUpDplNkDlIp28LlOnlEfzMyJ67R2euVSXtQ9Zgmtw8=; b=Kzgb4bUw1lUxxKlXLEPmOBxowy4OO0/dsVi7xeCIracq60Sbyg/gNcZthlJ6yKKURz fm/i3HlZ8LEcLZYfCW4tvoKLgNgxdFySdziL0wiEkWcUR+MCATm9k7XpD4xo30+7JeX9 alpT2T02Mw2Cerl+o93nQZhniSrXprqHChLRWZ4bpNZjK/Q/U2QO5yf3B4a7fqK4MGG4 aMshhKuPlDny/p0CVbVAByEYDEnteeJlpSe5PO2GFSaQ67oRRRmOl9gGdiHG99TY46xv JXq1NhIq/qUoHotezcht9sPtD/pOf2j+9e4QuTUc/R3iuzWA3JZZVAjcWxxAkcU2HPl8 OEeQ== Original-Received: by 10.204.147.153 with SMTP id l25mr1476325bkv.109.1352011123696; Sat, 03 Nov 2012 23:38:43 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4d0577e7.pool.mediaWays.net. [77.5.119.231]) by mx.google.com with ESMTPS id 1sm8044928bks.3.2012.11.03.23.38.37 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 03 Nov 2012 23:38:43 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1499) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07IjiCITM - 4be849de790c - 20121104 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:79038 Archived-At: Am 04.11.2012 um 05:35 schrieb Aditya Mahajan : > On Sun, 4 Nov 2012, Zenlima wrote: > = >> Hallo, >> = >> here is my third module for you guys: a simple bibliography without a >> database but with items: >> = >> http://modules.contextgarden.net/simplebib >> = >> http://wiki.contextgarden.net/Simple_Bibliography >> = >> Please feel free to comment. > = > I don't really understand what is the advantage of this module over the b= ib module (The bib module can be used without a bibtex database by writing = a bibliography in a key-value way. In fact all that when you use a bibtex d= atabase, the first step is to convert the bib file to a key-value file and = then proceed by processing it). > = > Some stylistic comments: > = > 1. Spacing around =3D > = > %D \module [ > %D file =3D t-simplebib, > %D version =3D 0.8 > %D title =3D \CONTEXT\ User Module, > %D subtitle =3D Simple Bibliography, > %D author =3D Zenlima, > %D date =3D 2012.11.03 > %D copyright =3D Henning Haeske, > %D license =3D '' > %D ] > = > This will fail when you generate the documentation. Use > = > \module[ > file=3Dt-simplebib, > version=3D0.8, > ... > ] > = > that is, no space around the =3D sign. > = > 2. Use a internal namespace for macros. > = > For example, you have > = > \def\labelspace{\moduleparameter{simplebib}{labelSpace}} > = > The macro \labelspace is not meant to be used by the user. So, it is bett= er to name is \simplebib_labelspace to avoid conflict with other user defin= ed macros. I would do the same with the \isbn command, define it in the module as \def\simplebib_isbn#1{\hyphenatedurl{#1}} and copy it to the \isbn later \def\bibitem[#1]% {\begingroup \let\isbn\simplebib_isbn =85 \endgroup} > The same applies for \getparameter[tmp]. It may be better to use somethin= g like \getparamenter[simplebib_tmp_] I would use \getdummyparameters instead because you don=92t have to preset = the keys and you can use \dummyparameter to access the values. \def\decodebibitem[#1]% {\begingroup \getdummyparameters[#1]% \doifsomething{\dummyparameter{author}}{\dummyparameter{author}\doifsome= thing{\dummyparameter{year}}{ }}% ... \endgroup} Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________