# Porting LaTeX packages to ConTeXt modules

From seeing quite a few questions here, it seems ConTeXt is often able to easily address problems that LaTeX has a hard time with. I'd be willing to give it a try, but there is one package that I depend heavily on, which is `bibleref` and is not ported to ConTeXt (that I know of).

How hard is it to port LaTeX packages to ConTeXt modules? What are the things to know when doing so?

-
Very close: tex.stackexchange.com/questions/28013/… –  Andrey Vihrov Sep 16 '11 at 6:07
@Andrey: Yes, I saw this one. It is close indeed, but it doesn't answer my question. –  ℝaphink Sep 16 '11 at 6:14
There are no LaTeX modules, just LaTeX packages. ConTeXt calls them modules. So it should be "Porting LaTeX packages to ConTeXt modules" –  Martin Scharrer Sep 16 '11 at 6:29
@Martin: thanks, fixed. –  ℝaphink Sep 16 '11 at 6:39

Porting interface is trickier. One of the strongest point of ConTeXt is the consistent interface of all commands and if you want a new ConTeXt module to fit in with the rest of ecosystem, the interface should follow ConTeXt idioms. For example, for bibleref, this will mean having a key-value driven setup command `\setupbiblereferences` rather than macro driven configuration; using ConTeXt style for references `\inbible[book=...,chapter={list}, verse={list}]` (or some such variant) rather than "smart" encoding, using full names, for example `separator` instead of `sep`, providing standard features like `style` and `color` keys to change the style and color of output, having proper multi-lingual support so that the interface (names of keys and values) and the output (name of say the book) changes with change of main language (this is not as difficult as it sounds), etc.