%D \module
%D   [       file=m-barcodes,
%D        version=2010.03.14,
%D          title=\CONTEXT\ Extra Modules,
%D       subtitle=Barcodes,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{barcodes}{the 'zint' module is a better choice}

\usemodule[zint]

\unprotect

\pushoverloadmode

\let\normalbarcode\barcode

\permanent\protected\def\barcode[#1]%
  {\normalbarcode[\c!text=\dummyparameter{code},\c!alternative=\dummyparameter{type},#1]}

\popoverloadmode

\protect

\continueifinputfile{m-barcodes.mkxl}

\starttext
    \startTEXpage[offset=1dk]
        \startcombination[2*2]
            {\barcode[type=isbn,text=978-9490688011,width=3cm]} {}
            {\barcode[type=isbn,text=9780500518724,width=3cm]}  {}
            {\barcode[type=datamatrix,text=whatever,width=3cm,option=--square]} {}
            {\barcode[type=maxicode,text=whatever,width=3cm]} {}
        \stopcombination
    \stopTEXpage
\stoptext

