From: Wolfgang Schuster <wolfgang.schuster@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: New module: simplebib
Date: Sun, 4 Nov 2012 07:38:29 +0100 [thread overview]
Message-ID: <3F5DD3CE-2C20-4E7C-926D-B4A66F136A50@gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.02.1211040017410.11517@ybpnyubfg.ybpnyqbznva>
Am 04.11.2012 um 05:35 schrieb Aditya Mahajan <adityam@umich.edu>:
> 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 bib 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 database, 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 =
>
> %D \module [
> %D file = t-simplebib,
> %D version = 0.8
> %D title = \CONTEXT\ User Module,
> %D subtitle = Simple Bibliography,
> %D author = Zenlima,
> %D date = 2012.11.03
> %D copyright = Henning Haeske,
> %D license = ''
> %D ]
>
> This will fail when you generate the documentation. Use
>
> \module[
> file=t-simplebib,
> version=0.8,
> ...
> ]
>
> that is, no space around the = 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 better to name is \simplebib_labelspace to avoid conflict with other user defined 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
…
\endgroup}
> The same applies for \getparameter[tmp]. It may be better to use something like \getparamenter[simplebib_tmp_]
I would use \getdummyparameters instead because you don’t 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}\doifsomething{\dummyparameter{year}}{ }}%
...
\endgroup}
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2012-11-04 6:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-03 23:14 Zenlima
2012-11-04 4:35 ` Aditya Mahajan
2012-11-04 6:38 ` Wolfgang Schuster [this message]
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=3F5DD3CE-2C20-4E7C-926D-B4A66F136A50@gmail.com \
--to=wolfgang.schuster@gmail.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).