m-barcodes.mkxl /size: 1143 b    last modification: 2023-12-21 09:45
1%D \module
2%D   [       file=m-barcodes,
3%D        version=2010.03.14,
4%D          title=\CONTEXT\ Extra Modules,
5%D       subtitle=Barcodes,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{barcodes}{the 'zint' module is a better choice}
15
16\usemodule[zint]
17
18\unprotect
19
20\pushoverloadmode
21
22\let\normalbarcode\barcode
23
24\permanent\protected\def\barcode[#1]%
25  {\normalbarcode[\c!text=\dummyparameter{code},\c!alternative=\dummyparameter{type},#1]}
26
27\popoverloadmode
28
29\protect
30
31\continueifinputfile{m-barcodes.mkxl}
32
33\starttext
34    \startTEXpage[offset=1dk]
35        \startcombination[2*2]
36            {\barcode[type=isbn,text=978-9490688011,width=3cm]} {}
37            {\barcode[type=isbn,text=9780500518724,width=3cm]}  {}
38            {\barcode[type=datamatrix,text=whatever,width=3cm,option=--square]} {}
39            {\barcode[type=maxicode,text=whatever,width=3cm]} {}
40        \stopcombination
41    \stopTEXpage
42\stoptext
43
44