diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-05 21:43:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-05 21:43:34 +0000 |
commit | 48805021c5bf259adfb73b376eb2c99dfb968fa6 (patch) | |
tree | 4e08fecdf6504f204c10d38a192862fbadb50187 /Master/texmf-dist/tex/luatex/barracuda | |
parent | 37fdb3c6983d960811ba78a31b01b7f44da425ec (diff) |
barracuda (5feb20)
git-svn-id: svn://tug.org/texlive/trunk@53683 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/barracuda')
-rw-r--r-- | Master/texmf-dist/tex/luatex/barracuda/barracuda.sty | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/luatex/barracuda/barracuda.sty b/Master/texmf-dist/tex/luatex/barracuda/barracuda.sty index 7ee6b021040..4366cbdd223 100644 --- a/Master/texmf-dist/tex/luatex/barracuda/barracuda.sty +++ b/Master/texmf-dist/tex/luatex/barracuda/barracuda.sty @@ -1,21 +1,18 @@ % \NeedsTeXFormat{LaTeX2e}[2009/06/27] -\ProvidesPackage{barracuda}[2018/12/30 v0.1 a barcode typesetting package]% - +\ProvidesPackage{barracuda}[2020/01/15 v0.0.10 a barcode typesetting package]% \newbox\barracudabox -\newcommand\barracuda[2]{\directlua{ +\newcommand\barracuda[3][_brcdempty_=true]{\directlua{ local barracuda = require "barracuda" - local e = [[#1]] - local s = [[#2]] - local enc, err = barracuda:get_barcode_class():new_encoder(e) - assert(enc, err) - local symb, err = enc:from_string(s); assert(symb, err) - local canvas = barracuda:new_canvas() - symb:append_ga(canvas) - local drv = barracuda:get_driver() - drv:ga_to_hbox(canvas, "barracudabox") + local enc_name = [[#2]] + local data = [[#3]] + local opt = {#1}; + if opt._brcdempty_ == true then + barracuda:hbox(enc_name, data, "barracudabox") + else + barracuda:hbox(enc_name, data, "barracudabox", opt) + end }% \box\barracudabox } - \endinput |