summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-05 21:23:07 +0000
committerKarl Berry <karl@freefriends.org>2019-12-05 21:23:07 +0000
commit0ed7b2cd92f7a81334f612df3e37211f8333ae75 (patch)
tree2bcbe01d8e86cbf57d64069a153346da4936b00a /Master/texmf-dist/tex/luatex
parent7f43f3692e1354166c0623faf83c84b23d041ea3 (diff)
barracuda (5dec19)
git-svn-id: svn://tug.org/texlive/trunk@53034 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r--Master/texmf-dist/tex/luatex/barracuda/barracuda.sty21
1 files changed, 21 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/barracuda/barracuda.sty b/Master/texmf-dist/tex/luatex/barracuda/barracuda.sty
new file mode 100644
index 00000000000..7ee6b021040
--- /dev/null
+++ b/Master/texmf-dist/tex/luatex/barracuda/barracuda.sty
@@ -0,0 +1,21 @@
+%
+\NeedsTeXFormat{LaTeX2e}[2009/06/27]
+\ProvidesPackage{barracuda}[2018/12/30 v0.1 a barcode typesetting package]%
+
+\newbox\barracudabox
+\newcommand\barracuda[2]{\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")
+}%
+\box\barracudabox
+}
+
+\endinput