ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: New module: simplebib
Date: Sun, 4 Nov 2012 00:35:22 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.02.1211040017410.11517@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <20121104001458.7616e428@zenlima.eu>

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.

The same applies for \getparameter[tmp]. It may be better to use something 
like \getparamenter[simplebib_tmp_]

3. Don't use camelCase for key-values

Most context keys are not camelCase. So, I would suggest "labelspace" 
instead of "labelSpace", "labelleft" instead of "labelLeft", etc.

4. \doifnot {...} {} vs \doifsomething {...}

You can make the code slightly cleaner by using \doifsomething{...} 
instead of the \doifnot {...} {}.


Some UI comments:

1. Dependence on crossref.

Can the dependence of crossref be optional. In particular, what if a user 
does just wants to link to the bibliography without the funny arrows from 
crossref module?

2. Setting style for labels.

You use

\sym{...\sc{\tmplabel}....}

It may be better to define style and color keys for the label rather than 
hardcoding \sc. In fact, all you need to do is set symstyle and symcolor 
for itemgroups.


3. Is it possible to change the format of an bibliographic item based on 
its type (journal paper, conference paper, book, etc.)? Is the current 
default formatting following a particular bibliographic style? If so, 
which one?

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


  reply	other threads:[~2012-11-04  4:35 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 [this message]
2012-11-04  6:38   ` Wolfgang Schuster

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=alpine.LNX.2.02.1211040017410.11517@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).