From 4b795f65d52cde0d136c0175ce20101946378b54 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Wed, 5 Feb 2020 03:03:08 +0000
Subject: CTAN sync 202002050303

---
 .../barracuda/doc/barracuda-manual-tool.tex        | 34 +++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

(limited to 'macros/luatex/generic/barracuda/doc/barracuda-manual-tool.tex')

diff --git a/macros/luatex/generic/barracuda/doc/barracuda-manual-tool.tex b/macros/luatex/generic/barracuda/doc/barracuda-manual-tool.tex
index 9e5f5f8a47..8b00e1c2b5 100644
--- a/macros/luatex/generic/barracuda/doc/barracuda-manual-tool.tex
+++ b/macros/luatex/generic/barracuda/doc/barracuda-manual-tool.tex
@@ -1,7 +1,39 @@
+% an auxiliary package for the manual
+\directlua{
+    barracuda = require "barracuda"
+    local v = barracuda._VERSION
+    local p = v:find(" ")
+    brcd_data = {
+        version = v:sub(p+1),
+        date = barracuda._DATE
+    }
+}
 
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\brcd}{\code{barracuda}}
 
+\newbox\barracudabox
+\newcommand\barracuda[3][_brcd_empty_=true]{\directlua{
+    local enc_name = [[#2]]
+    local data = [[#3]]
+    local opt = {#1};
+    if opt._brcd_empty_ == true then
+        barracuda:hbox(enc_name, data, "barracudabox")
+    else
+        barracuda:hbox(enc_name, data, "barracudabox", opt)
+    end
+}%
+\leavevmode\box\barracudabox
+}
 
-
+\newcommand{\brcdkey}[1]{\directlua{
+    local key = [===[#1]===]
+    if brcd_data[key] then
+        tex.sprint(brcd_data[key])
+    else
+        error("Key '"..key.."' not found")
+    end
+}}
 
 
 
-- 
cgit v1.2.3

