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. H.
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
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 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
participants (3)
-
Aditya Mahajan
-
Wolfgang Schuster
-
Zenlima