summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/INSTALL.txt8
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/PLANNER.txt151
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/README.md47
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/TODO.txt92
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-ga-asm.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-manual-tool.tex34
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.pdfbin57452 -> 67784 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.tex348
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdfbin3621 -> 3810 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex4
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/02-ord_iter-test.tex73
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua4
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdfbin22044 -> 22132 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex20
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua6
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdfbin22618 -> 22701 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex44
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdfbin19827 -> 19827 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex19
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdfbin15243 -> 15329 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex16
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua2
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdfbin23619 -> 23620 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex40
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdfbin10601 -> 10601 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdfbin3901 -> 3901 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.pdfbin0 -> 19829 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.tex45
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.pdfbin0 -> 14883 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.tex57
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ean/ars.svg110
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdfbin30290 -> 30290 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua2
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdfbin19127 -> 19136 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex22
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.pdfbin0 -> 16052 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.tex53
38 files changed, 848 insertions, 353 deletions
diff --git a/Master/texmf-dist/doc/luatex/barracuda/INSTALL.txt b/Master/texmf-dist/doc/luatex/barracuda/INSTALL.txt
index 0c06f98488f..0209ea4cc3d 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/INSTALL.txt
+++ b/Master/texmf-dist/doc/luatex/barracuda/INSTALL.txt
@@ -21,8 +21,8 @@ It's also possible a manual installation:
a. Grab the sources from CTAN or https://github.com/robitex/barracuda .
b. Unzip it at the root of one or your TDS trees.
- c. You may need to update some filename database after this running `texhash`,
- see your TeX distribution's manual for details.
+ c. You may need to update some filename database after this running the command
+ `texhash` on a terminal, see your TeX distribution's manual for details.
Any TeX Live documentation files can be easily opened on screen with the
`texdoc` command line utility (this way is very handy).
@@ -35,3 +35,7 @@ Installing for Lua
Manually copy the `src` folder content to a suitable directory of your system
that is reachable to a Lua interpreter.
+File List
+---------
+
+<filelist>
diff --git a/Master/texmf-dist/doc/luatex/barracuda/PLANNER.txt b/Master/texmf-dist/doc/luatex/barracuda/PLANNER.txt
new file mode 100644
index 00000000000..ca7a9e041f9
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/PLANNER.txt
@@ -0,0 +1,151 @@
+Development Planner and Task History
+====================================
+
+Basic rules
+-----------
+
++ Every new version will be uploaded to CTAN network
++ For each single task there will be a correspomding commit
+
+Hypothetical development task list:
+-----------------------------------
+
+20__-__-__: [dev] TiKz driver
+20__-__-__: [dev] debug driver, ga stream pretty printing
+20__-__-__: [dev] make thing happen: font property for text
+20__-__-__: [dev] develop LaTeX user package
+20__-__-__: [dev] coherent error management
+20__-__-__: [dev] proportional options
+20__-__-__: [dev] a number parameter can be a string? unit measure...
+20__-__-__: [prj] a command line program to print barcodes
+20__-__-__: [dev] guard text in EAN simbology
+20__-__-__: [dev] UPC support
+20__-__-__: [dev] make optional file name in all the Driver methods
+20__-__-__: [prj] test l3build for testing and CTAN files packaging
+20__-__-__: [dev] load barcode parameters from an external file
+20__-__-__: [dev] new Parameter Class
+
+Scheduled task list for Data Matrix 2D simbology implementation:
+----------------------------------------------------------------
+
+2020-__-__: [dmx] data matrix first run
+2020-__-__: [dmx] ecc200 error correction code
+2020-__-__: [svg] opcode for grids
+2020-__-__: [pdf] opcode for grids
+2020-__-__: [gas] ga-asm grid opcode
+2020-__-__: [geo] grid vector object
+2020-__-__: [dev] init source file encoder for Data Matrix
+2020-__-__: [dev] parameter preset
+
+Dev Planner:
+============
+-------------------------------------------------------------------------------
+2020-__-__: [milestone] version <v0.0.11> completed task/commit list
+2020-__-__: [doc] barcode symbologies reference
+2020-__-__: [doc] put ga-asm-spec together with the manual
+2020-__-__: [dev][barcode] new `alias` feature
+2020-__-__: [dev][barcode] new `preset` feature
+2020-__-__: [dev][i2of5] human readeable text for i2of5
+2020-__-__: [dev][libgeo] new `Vbar_group` class
+2020-__-__: [test] update test files with recent changes
+2020-__-__: [dev][libgeo][breaking change] return `ok, err` instead of `err`
+ for canvas methods
+2020-__-__: [dev] new constructor `Barcode:new()`
+2020-__-__: [project][build] make a Lua script to easily create the CTAN upload
+ : compressed files
+2020-__-__: [dev][ean] fix the `ean:checksum()` to include ISBN and ISSN variant
+2020-__-__: [dev][i2of5] `encoder:_init_parse_state()` adoption for ITF14
+ : variant
+2020-__-__: [dev][ean] new function `encoder:_init_parse_state()`, and EAN
+ : family adoption
+2020-__-__: update version number in preparetion of the next version.
+-------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
+2020-02-04: [milestone] version <v0.0.10> completed task/commit list
+-------------------------------------------------------------------------------
+2020-02-04:*[dev][ean] ISSN support
+2020-02-03: [dev][ean] move out of `_config()` `finalize()` method as in i2of5
+2020-02-02: [dev][i2of5] new ITF14 variant, plan for the next version
+2020-02-01: [dev] new semantic for barcode parameter: alternative family
+ : parameters definition for a variant, via `_par_def_<variant>` field
+2020-02-01: [dev] rewrite code for the filter option in
+ : `Barcode:param_ord_iter()` and execute a test on it
+2020-01-31: [dev] add filter option on `Barcode:param_ord_iter()`
+2020-01-18: [dev][breaking change] rename config() private method to _config(),
+ : encoders can now decide if variant argument is mandatory or not,
+ : update to year 2020 copyright notes
+2020-01-08: [dev][ean family] complete the ISBN support
+2019-12-29: [dev] a new data structure for encoder parameter ordering
+2019-12-29: [dev][ean family] inital ISBN support
+2019-12-28: [api][barcode] new Barcode method `:get_code()`
+2019-12-27: [api][breaking change] rename the `get_barcode_class()` method
+ : to the more simple `barcode()`
+ : [api][breaking change] new encoder naming convention
+ : reuse or create a new encoder object in barracuda:hbox() and
+ : barracuda:save() methods
+
+(*) this commit
+
+Task history and previous version:
+==================================
+
+[🎉] <v0.0.9.1> 2019-12-04: prelude to version v0.1
+09.15: 2019-11-29: [prj] upload to CTAN version v0.0.9.1 (under CTAN rules)
+09.14: 2019-11-29: [prj] upload to CTAN version v0.0.9
+09.13: 2019-11-26: [man] say something about barracuda.sty
+09.12: 2019-11-26: [man] edit the section 'A more deep look' for clearness
+09.11: 2019-11-26: [prj] reformat todo file: no more date at line end
+09.10: 2019-11-26: [svg] take dimensions as scaled point and then mm
+09.09: 2019-11-26: [prj] every dev task ends with a repository commit
+09.08: 2019-11-25: [prj] .gitignore .out file
+09.07: 2019-11-25: [svg] support for text
+09.06: 2019-11-25: [man] time to get an usable manual even if minimal
+09.05: 2019-11-23: [chk] some new test files
+09.04: 2019-11-23: [dev] new barracuda methods save() and hbox()
+09.03: 2019-11-20: [svg] driver first run
+09.02: 2019-11-10: [dev] implement ga opcode for line-join style and line-cap style
+09.01: 2019-11-10: [prj] make lib-parseopt a separated project
+
+<Version 0.0.8> move costructors to the barcode abstract class 🎉 2019-11-09
+Task 8.5: adopted new Barcode costructors in the EAN encoder 2019-11-09
+Task 8.4: adopted new Barcode costructors in the ITF encoder 2019-11-09
+Task 8.3: adopted new Barcode costructors in the Code128 encoder 2019-11-09
+Task 8.2: adopted new Barcode costructors in the Code39 encoder 2019-11-04
+Task 8.1: new costructor method in the barcode superclass 2019-11-04
+
+<Version 0.0.7> code refactoring for ga-canvas 🎉 2019-11-02
+Task 7.5: recompile all the test files 2019-11-02
+Task 7.4: new functions canvas:encode_<obj>() 2019-11-02
+Task 7.3: text position options for Code39 became two indipendent 2019-11-02
+Task 7.2: added a new code39 test file (and bugs fixed) 2019-11-02
+Task 7.1: added subdirectories in the test tree 2019-11-02
+
+<Version 0.0.6> implement Interleaved 2 of 5 encoder 🎉 2019-07-02
+Task 6.4: test files 2019-07-02
+Task 6.3: add bearer bars for itf encoder 2019-07-02
+Task 6.2: check digit capability for itf 2 of 5 encoder 2019-07-02
+Task 6.1: implement basic Interleaved 2 of 5 encoder 2019-06-29
+
+<Version 0.0.5> implement Code128 and EAN family encoders 🎉 2019-01-27
+Task 5.5: test file 2019-01-27
+Task 5.4: implement EAN2 variant 2019-01-26
+Task 5.3: implement EAN5 variant 2019-01-26
+Task 5.2: new family encoder concept 2019-01-25
+Task 5.1: implement EAN13 encoder 2019-01-12
+Task 4.4: refactoring param iterator 2018-12-30
+Task 4.3: test the local system of option set up for Code128 2018-12-30
+Task 4.2: test the local system of option set up for Code39 2018-12-30
+Task 4.1: test for ga-canvas 2018-12-29
+Task 3.3: opt in Code 39 and Code 128 symbol constructors 2018-12-24
+Task 3.2: focus on a new constructor in Barcode Class for
+ better encoder implementation 2018-12-21
+Task 3.1: import and refactoring previous Code128 encoder code 2018-12-16
+
+<Version 0.0.2> 🎉 2018-12-11
+Task 2.5: option text_gap for code39 2018-12-11
+Task 2.4: resolved the horizontal correction in spaced text 2018-12-11
+Task 2.3: further text option for the Code39 encoder 2018-12-06
+Task 2.2: include minimal text ability to the system
+Task 2.1: design and implement a basic framework
+
+<Version 0.0.1> open 0.0.1 alpha dev master branch 🎉 2018-11-30
diff --git a/Master/texmf-dist/doc/luatex/barracuda/README.md b/Master/texmf-dist/doc/luatex/barracuda/README.md
index 6dc3ccb2db0..49bab5cb241 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/README.md
+++ b/Master/texmf-dist/doc/luatex/barracuda/README.md
@@ -1,32 +1,32 @@
# `barracuda` project
-This Lua library is for drawing barcode symbols. The project delivers modules
-to typeset barcode from within a LuaTeX document. Therefore is also possible
-to use `barracuda` with a Lua standalone interpreter to draw barcodes with
-different graphic format such as `SVG` (see an example below).
-This package does not have dependences.
+This a pure Lua library is for drawing barcode symbols. The project components
+are able to typeset barcode from within a LuaTeX document. Therefore is also
+possible to use `barracuda` with a Lua standalone interpreter to draw barcodes
+with different graphic format such as `SVG` (see an example below). This package
+does not have dependences.
-![a SVG formatted Code39 symbol](/test/test-ga-svg/test-code39.svg)
+![a Code39 symbol in SVG format](/test/test-ga-svg/test-code39.svg)
-Internal modules is structured to ensure good performance and to allow a
+Internal modules are structured to ensure good performance and to give a
complete user control over barcode symbol parameters :thumbsup: .
Although development is in beta stage, `barracuda` has a good level of
stability.
-## Current version information
+## Current version
-Version: v0.0.9.1
-Date: 2019-12-04
+Version: v0.0.10
+Date: 2020-02-04
## Barcode symbologies list
-So far, are supported
+So far, the barcode symbologies included in the package are:
- Code 39
- Code 128
- Interleaved 2 of 5
-- EAN family (EAN8, EAN13, and the add-ons EAN5 and EAN2)
+- EAN family (ISBN, ISSN, EAN8, EAN13, and the add-ons EAN5 and EAN2)
Other 1D encoding symbology will be added to the project, then it will be the
turn of 2D barcode types like Datamatrix, QRCode or PDF417.
@@ -36,7 +36,7 @@ turn of 2D barcode types like Datamatrix, QRCode or PDF417.
The LaTeX package `barracuda.sty` under the cover uses Lua code so you need to
compile your source files with LuaTeX or LuajitTeX with the LaTeX format.
-For instance, here there is a minimal example for LuaLaTeX:
+For instance, here is a minimal working example for LuaLaTeX:
```latex
% !TeX program = LuaLaTeX
@@ -50,7 +50,7 @@ For instance, here there is a minimal example for LuaLaTeX:
## Documentation
Details and package reference can be found in the manual delivered in the `doc`
-project directory, even if it is very minimal at the moment.
+project directory, even if actually it is very minimal at the moment.
Directory `test` contains files useful also for code examples.
@@ -66,7 +66,7 @@ If you have installed TeX Live with the `full` schema, `barracuda` is just
available and no further action is required. Please, take into account that
only the tagged version (in the `git` sense) of the package will be sent to
CTAN. This means that intermediate development version between consecutive
-releases can be found only at https://github.com/robitex/barracuda .
+releases can be found only at <https://github.com/robitex/barracuda> .
TeX Live distribution or Lua interpreter executable are available for a very
large number of Operating Systems so it is also for `barracuda`.
@@ -76,20 +76,19 @@ Step by step istruction can be found in the INSTALL.txt file.
## Contribute
Contributes are welcome in any form and for any topics. You can contact me
-directly via email at giaconet.mailbox@gmail.com or via a pull request on the
-repository https://github.com/robitex/barracuda or writing a public message
-via the web page https://github.com/robitex/barracuda/issues for todos, bugs,
-feature requests, and more (press the bottom `New issue`).
+directly via email at giaconet.mailbox@gmail.com or via a pull request direct to
+the repository <https://github.com/robitex/barracuda> or writing a public
+message via the web page <https://github.com/robitex/barracuda/issues> for
+todos, bugs, feature requests, and more (press the bottom `New issue`).
-Anyway, as a starting point take a look of TODO.txt file for the next
-scheduled development tasks.
+Anyway, as a starting point take a look of PLANNER.txt file for the development
+program.
## License
`barracuda` project is released under the
[GNU GPL v2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
Please, for more legal details refer to LICENSE.txt file or visit the web page
-https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-
-Copyright (C) 2019 Roberto Giacomelli
+<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
+Copyright (C) 2020 Roberto Giacomelli
diff --git a/Master/texmf-dist/doc/luatex/barracuda/TODO.txt b/Master/texmf-dist/doc/luatex/barracuda/TODO.txt
deleted file mode 100644
index 5b1970810c2..00000000000
--- a/Master/texmf-dist/doc/luatex/barracuda/TODO.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-Development Program Task Table
-
-Hypothetical developing tasks list:
-
-__.__: 20__-__-__: [dev] TiKz driver
-__.__: 20__-__-__: [dev] debug driver, ga code pretty printing
-__.__: 20__-__-__: [dev] make thing happen: font property for text
-__.__: 20__-__-__: [dev] develop LaTeX user package
-__.__: 20__-__-__: [dev] coherent error management
-__.__: 20__-__-__: [dev] proportional options
-__.__: 20__-__-__: [dev] a number parameter can be a string? unit measure...
-__.__: 20__-__-__: [prj] a command line program to print barcodes
-__.__: 20__-__-__: [man] put ga-asm-spec together with the manual
-__.__: 2019-__-__: [dev] guard text in EAN simbology
-__.__: 2019-__-__: [dev] ISBN support
-__.__: 2019-__-__: [dev] UPC support
-__.__: 2019-__-__: [dev] make optional file name in all the Driver methods
-__.__: 2019-__-__: [prj] use l3build for testing and CTAN files packaging
-
-Scheduled tasks (What we are working on):
-[ ] <v0.1> 2019-__-__: Data Matrix 2D symbology
-
-__.__: 2019-__-__: [dmx] data matrix first run
-__.__: 2019-__-__: [dmx] ecc200 error correction code
-__.__: 2019-__-__: [svg] opcode for grids
-__.__: 2019-__-__: [pdf] opcode for grids
-__.__: 2019-__-__: [gas] ga-asm grid opcode
-__.__: 2019-__-__: [geo] grid vector object
-_1.__: 2019-__-__: [dev] init source file encoder for Data Matrix
-
-[🎉] <v0.0.9.1> 2019-12-04: prelude to version v0.1
-09.15: 2019-11-29: [prj] upload to CTAN version v0.0.9.1 (CTAN conditions)
-09.14: 2019-11-29: [prj] upload to CTAN version v0.0.9
-09.13: 2019-11-26: [man] say something about barracuda.sty
-09.12: 2019-11-26: [man] edit the section 'A more deep look' for clearness
-09.11: 2019-11-26: [prj] reformat todo file: no more date at line end
-09.10: 2019-11-26: [svg] take dimensions as scaled point and then mm
-09.09: 2019-11-26: [prj] every dev task ends with a repository commit
-09.08: 2019-11-25: [prj] .gitignore .out file
-09.07: 2019-11-25: [svg] support for text
-09.06: 2019-11-25: [man] time to get an usable manual even if minimal
-09.05: 2019-11-23: [chk] some new test files
-09.04: 2019-11-23: [dev] new barracuda methods save() and hbox()
-09.03: 2019-11-20: [svg] driver first run
-09.02: 2019-11-10: [dev] implement ga opcode for line-join style and line-cap style
-09.01: 2019-11-10: [prj] make lib-parseopt a separated project
-
-Completed tasks:
-
-<Version 0.0.8> move costructors to the barcode abstract class 🎉 2019-11-09
-Task 8.5: adopted new Barcode costructors in the EAN encoder 2019-11-09
-Task 8.4: adopted new Barcode costructors in the ITF encoder 2019-11-09
-Task 8.3: adopted new Barcode costructors in the Code128 encoder 2019-11-09
-Task 8.2: adopted new Barcode costructors in the Code39 encoder 2019-11-04
-Task 8.1: new costructor method in the barcode superclass 2019-11-04
-
-<Version 0.0.7> code refactoring for ga-canvas 🎉 2019-11-02
-Task 7.5: recompile all the test files 2019-11-02
-Task 7.4: new functions canvas:encode_<obj>() 2019-11-02
-Task 7.3: text position options for Code39 became two indipendent 2019-11-02
-Task 7.2: added a new code39 test file (and bugs fixed) 2019-11-02
-Task 7.1: added subdirectories in the test tree 2019-11-02
-
-<Version 0.0.6> implement Interleaved 2 of 5 encoder 🎉 2019-07-02
-Task 6.4: test files 2019-07-02
-Task 6.3: add bearer bars for itf encoder 2019-07-02
-Task 6.2: check digit capability for itf 2 of 5 encoder 2019-07-02
-Task 6.1: implement basic Interleaved 2 of 5 encoder 2019-06-29
-
-<Version 0.0.5> implement Code128 and EAN family encoders 🎉 2019-01-27
-Task 5.5: test file 2019-01-27
-Task 5.4: implement EAN2 variant 2019-01-26
-Task 5.3: implement EAN5 variant 2019-01-26
-Task 5.2: new family encoder concept 2019-01-25
-Task 5.1: implement EAN13 encoder 2019-01-12
-Task 4.4: refactoring param iterator 2018-12-30
-Task 4.3: test the local system of option set up for Code128 2018-12-30
-Task 4.2: test the local system of option set up for Code39 2018-12-30
-Task 4.1: test for ga-canvas 2018-12-29
-Task 3.3: opt in Code 39 and Code 128 symbol constructors 2018-12-24
-Task 3.2: focus on a new constructor in Barcode Class for
- better encoder implementation 2018-12-21
-Task 3.1: import and refactoring previous Code128 encoder code 2018-12-16
-
-<Version 0.0.2> 🎉 2018-12-11
-Task 2.5: option text_gap for code39 2018-12-11
-Task 2.4: resolved the horizontal correction in spaced text 2018-12-11
-Task 2.3: further text option for the Code39 encoder 2018-12-06
-Task 2.2: include minimal text ability to the system
-Task 2.1: design and implement a basic framework
-
-<Version 0.0.1> open 0.0.1 alpha dev master branch 🎉 2018-11-30
diff --git a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-ga-asm.tex b/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-ga-asm.tex
index 1c403455f86..014cb9d1c41 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-ga-asm.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-ga-asm.tex
@@ -1,5 +1,5 @@
% !TeX program = LuaLaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\documentclass{article}
diff --git a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-manual-tool.tex b/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-manual-tool.tex
index 9e5f5f8a47c..8b00e1c2b5a 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda-manual-tool.tex
+++ b/Master/texmf-dist/doc/luatex/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
+}}
diff --git a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.pdf b/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.pdf
index 6472da10eeb..99d8034ea34 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.tex b/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.tex
index e5d6b6acdba..0fc6fbac28d 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/doc/barracuda.tex
@@ -1,8 +1,8 @@
% !TeX program = LuaLaTeX
-% Copyright (C) 2019 Roberto Giacomelli
-% Barracuda manual main source file
+% Copyright (C) 2020 Roberto Giacomelli
+% Barracuda manual, main TeX source file
-\documentclass[11pt]{article}
+\documentclass[11pt,a4paper]{article}
\usepackage{fontspec}
\usepackage{geometry}
\usepackage{fancyvrb}
@@ -13,40 +13,40 @@
\input{barracuda-manual-tool}
\hypersetup{
+hidelinks,
+linktoc = all,
pdfinfo={
- Title={Barracuda manual},
- Subject={Barcode printing package},
- Author={Roberto Giacomelli},
- Keywords={Barcode EAN Code128 Lua}
+ Title={the Barracuda manual},
+ Subject={Barcode printing package},
+ Author={Roberto Giacomelli},
+ Keywords={Barcode EAN Code128 Lua}
}}
\setmainfont{Libertinus Serif}
-\setmonofont{IBM Plex Sans Condensed}
+\setmonofont[Scale=0.82]{Fira Mono}
\fvset{
fontsize=\small,
frame=single,
labelposition=topline,
- framesep=6pt
+ framesep=5pt
}
\geometry{
left=32mm,
right=40mm,
- top=28mm,
+ top=22mm,
bottom=28mm
}
-\newcommand{\code}[1]{\texttt{#1}}
-\newcommand{\brcd}{\code{barracuda}}
\author{Roberto Giacomelli\\\small email: \url{giaconet.mailbox@gmail.com}}
-\title{\code{barracuda} manual\\[1ex]
+\title{the \code{barracuda} manual\\[1ex]
\small \url{https://github.com/robitex/barracuda}}
-\date{\small 2019-12-04\\Version v0.0.9.1}
+\date{\small Date \brcdkey{date} --- Version \brcdkey{version} --- Beta stage}
\begin{document}
\maketitle
\abstract{%
-Welcome to the \brcd{} software project devoted to barcodes printing.
+Welcome to the \brcd{} software project devoted to barcode printing.
This manual shows you how to print barcodes in your \TeX{} documents and how to
export such graphic content to an external file, using \brcd{}.
@@ -55,8 +55,15 @@ export such graphic content to an external file, using \brcd{}.
under the GPL 2 License.%
}
+\tableofcontents
+\newpage
-\section{Introduction}
+
+\section{Getting started}
+\label{secStart}
+
+\subsection{Introduction}
+\label{secIntro}
Barcode symbols are usually a sequence of vertical lines representing encoded
data that can be retrived with special laser scanner or more simpler with a
@@ -67,80 +74,117 @@ So far, \brcd{} supported symbologies are as the following:
\begin{itemize}
\item Code 39,
\item Code 128,
- \item EAN family (EAN 8, EAN 13, and the add-ons EAN 2 and EAN 5),
+ \item EAN family (ISBN, ISSN, EAN 8, EAN 13, and the add-ons EAN 2 and EAN 5),
\item ITF 2of5, interleaved Two of Five.
\end{itemize}
-The package provides drivers for different graphic format, at the moment are:
+The package provides different output graphic format. At the moment they are:
\begin{itemize}
- \item PDF Portable Document Format (require a modern \TeX{} engine),
+ \item PDF Portable Document Format (a modern \TeX{} engine is required),
\item SVG Scalable Vector Graphic.
\end{itemize}
-The name \brcd{} is an assonance with the name Barcode. I started the project
-back in 2016 for getting barcode in my \TeX{} generated PDF documents, studying
-the Lua\TeX{} technology.
+The name \brcd{} is an assonance to the name Barcode. I started the project back
+in 2016 for getting barcode in my \TeX{} generated PDF documents, studying the
+Lua\TeX{} technology such as direct \emph{pdfliteral node} creation.
+
+At the moment \brcd{} is in \emph{beta} stage. In this phase the Lua API can
+change respect to the result of development research.
\subsection{Manual Content}
-The manual is divided into three parts. At section~\ref{secEnter} the first look
-gives to the user a proof of concept to how to use and how works the package
-while the next parts present details like how to change the \emph{module} width
-of a EAN-13 barcode or how to implement a barcode symbology not already included
-in the package.
+The manual is divided into five part. In part~\ref{secIntro} introduces the
+package and gives to the user a proof of concept to how to use it. The next
+parts present detailed information about option parameter of each barcode
+symbology and methods description to change the \emph{module} width of a EAN-13
+barcode. It's also detailed how the Lua code works internally and how to
+implement a barcode symbology not already included in the package.
The plan of the manual is (but some sections are not completed yet):
\begin{description}
-\item[Part 1:] Get started
+\item[Part 1:] Getting started
+\begin{itemize}
+ \item general introduction \( \to \) \pageref{secIntro}
+ \item print your first barcode \( \to \) \pageref{secEnter}
+ \item installing \brcd{} on your system \( \to \) \pageref{secInstall}
+\end{itemize}
+
+\item[Part 2:] \LaTeX{} packages
+\begin{itemize}
+ \item \brcd{} \LaTeX{} package \( \to \) \pageref{secLaTeXPkg}
+\end{itemize}
+
+\item[Part 3:] Barcode Reference and Parameters
\begin{itemize}
- \item print your first barcode \( \to \) \ref{secEnter}
- \item installing \brcd{} on your system \( \to \) \ref{secInstall}
- \item \brcd{} \LaTeX{} package \( \to \) \ref{secLaTeXPkg}
+ \item encoder identification rule \( \to \) \pageref{secEncName}
+ \item barcode symbologies reference \( \to \) \pageref{secBcRef}
\end{itemize}
-\item[Part 2:] Advanced Work with \brcd{}
+
+\item[Part 4:] Advanced Work with \brcd{}
\begin{itemize}
- \item Lua framework description \( \to \) \ref{secFramework}
- \item working example and use cases \( \to \) \ref{secExample}
+ \item Lua framework description \( \to \) \pageref{secFramework}
+ \item API reference \( \to \) \pageref{secAPI}
+ \item \code{ga} specification \( \to \) \pageref{secGA}
\end{itemize}
-\item[Part 3:] Reference and parameters
+
+\item[Part 5:] Real examples
\begin{itemize}
- \item barcode symbology reference \( \to \) \ref{secBcRef}
- \item \code{ga} specification
- \item API reference \( \to \) \ref{secAPI}
+ \item working example and use cases \( \to \) \pageref{secExample}
\end{itemize}
\end{description}
+
\subsection{Required knowledge and useful resources}
-The \brcd{} is a Lua package that can be executed by any Lua interpreter. To use
-it, it's necessary some knowledge of Lua programming language and a certain
-ability with the terminal of your computer system in order to accomplish command
-tasks or software installations.
+\brcd{} is a Lua package that can be executed by any Lua interpreter. To use it,
+it's necessary a minimal knowledge of Lua programming language and a certain
+ability with the terminal of your computer system in order to run command line
+task or make software installation.
-It's also possible to run \brcd{} directly from within a \TeX{} source file,
-compiled with a suitable typesetting engine like Lua\TeX{}. To do so a minimal
-\TeX{} system knowledge is required. As an example of this workflow you simply
-can look to this manual because itself is typesetted with LuaLa\TeX{}, running
-\brcd{} to include barcodes as a vector graphic object.
+It's also possible to run \brcd{} directly within a \TeX{} source file, and
+compile it with a suitable typesetting engine like Lua\TeX{}. In this case a
+minimal \TeX{} system knowledge is required. As an example of this workflow you
+simply can look to this manual because itself is typesetted with LuaLa\TeX{},
+running \brcd{} to include barcodes as a vector graphic object.
-Here is a collection of useful learning resources\dots
+A third way is to use the \LaTeX{} package \code{barracuda.sty} with its high
+level macros. A minimal knowledge of the \LaTeX{} format is obviously required.
-%
-%
-%
-%
+Here is a collection of useful learning resources:
+\begin{description}
+\item[Lua:] to learn Lua the main reference is the book called PIL, Programming
+in Lua from one of the language's Author Roberto Ierusalimschy.
+\item[\LaTeX:] \dots
+\item[Lua\TeX:] \dots
+\end{description}
-\section{Get Started with Barracuda}
+\subsection{Running Barracuda}
\label{secEnter}
The starting point to work with \brcd{} is always a plain text file with some
-code, late processed by a command line program with a Lua interpreter.
+code processed by a command line program with a Lua interpreter.
-As a practical example producing an EAN-13 barcode, in a text editor of your
-choice on a empty file called \code{first-run.lua}, type the following two lines
-of code:
+The paradigm of \brcd{} is the Object Oriented Programming. Generally speaking
+every object must be created with a function called \emph{costructor} and every
+action must be run calling a \emph{method} of it.
+
+In this section you'll take a taste of \brcd{} coding in three different
+execution context: a Lua script, a Lua\TeX{} document and a \LaTeX{} source file
+using the macro package \code{barracuda.sty} providing an high level interface
+to Lua code.
+
+High level package like \code{barracuda.sty} make to write Lua code unnecessary.
+It will be always possible return to Lua code in order to resolve complex
+barcode requirements.
+
+
+\subsubsection{A Lua script}
+
+As a practical example to produce an EAN~13 barcode, open a text editor of your
+choice on an empty file and save it as \code{first-run.lua} with the content of
+the following two lines of code:
\medskip
\begin{Verbatim}[label=\footnotesize\code{first-run.lua}]
local barracuda = require "barracuda"
@@ -148,97 +192,127 @@ barracuda:save("ean-13", "8006194056290", "my_barcode", "svg")
\end{Verbatim}
What you have done is to write a \emph{script}. If you have installed a Lua
-interpreter and \brcd{}, open a terminal and run the command:
+interpreter along with \brcd{}, open a terminal and run it with the command:
\begin{Verbatim}
$ lua first-run.lua
\end{Verbatim}
-You will see in the same directory of your script, appearing the new file
+You will see in the same directory of your script, appearing a new file called
\code{my\_barcode.svg} with the drawing:
\begin{center}
\includegraphics{image/8006194056290}
\end{center}
-Coming back to the script \code{first-run.lua}, first of all, it's necessary to
-load the library with the standard statement \code{require()}. What that Lua
-function returns is an object---more precisely a table reference---where are
-stored every package features.
+Coming back to the script first of all, it's necessary to load the library
+\brcd{} with the standard Lua function \code{require()} that returns an
+object---more precisely a reference to a table where are stored all the
+package machinery.
-We can now produce the EAN-13 barcode using the method \code{save()} of the
-\brcd{} object. The \code{save()} method takes in order the barcode symbology
-identifier, the data to be encoded as a string or also a whole number, the
-output file name and the optional output format.
+With the second line of code, an EAN~13 barcode is saved as
+\code{my\_barcode.svg} using the method \code{save()} of the \brcd{} object. The
+\code{save()} method takes in order the barcode symbology identifier called
+\emph{treename}, an argument as a string or as a whole number that represents
+data to be encoded, the output file name and the optional output format. With a
+fifth optional argument we can pass options to the barcode encoder as a Lua
+table.
+Each encoder has an own identifier called treename explained at
+section~\ref{secEncName}. In short, in \brcd{} we can build more encoders of the
+same symbology with different parameters.
-\subsection{Running Lua\TeX}
-Barracuda can also running inside Lua\TeX{} and the others Lua powered \TeX{}
-engine. The text source file is a bit difference respect to a Lua script: Lua
-code have to bring place as the argument of directlua primitive... we must use
-a box register of type horizontal...
+\subsubsection{A Lua\TeX{} source file}
+\brcd{} can also runs with Lua\TeX{} and any others Lua powered \TeX{}
+engines. The source file is a bit difference respect to the previuos script: the
+Lua code lives inside the argument of a \verb=\directlua= primitive, moreover we
+must use an horizontal box register as output destination.
\begin{Verbatim}
% !TeX program = LuaTeX
-\nopagenumbers
\newbox\mybox
\directlua{
local require "barracuda"
barracuda:hbox("ean-13", "8006194056290", "mybox")
-}\box\mybox
+}\leavevmode\box\mybox
\bye
\end{Verbatim}
-The method \code{hbox()} works only with Lua\TeX{}.
+The method \code{hbox()} works only with Lua\TeX{}. It takes three\footnote{A
+fourth argment is optional as a table with user defined barcode parameters.}
+arguments: encoder \emph{treename}, encoding data as a string, the \TeX{}
+horizontal box name.
+
+
+\subsubsection{A Lua\LaTeX{} source file}
+
+\LaTeX{} working minimal example would be:
+\begin{Verbatim}
+% !TeX program = LuaLaTeX
+\documentclass{article}
+\usepackage{barracuda}
+\begin{document}
+\barracuda{ean-13}{8006194056290}
+\end{document}
+\end{Verbatim}
\subsection{A more deep look}
-Barracuda is designed to be modular and flexible. For example it is possible
-to draw different barcodes on the same canvas or tune barcode parameters.
+\brcd{} is designed to be modular and flexible. For example it is possible to
+draw different barcodes on the same canvas or tune barcode parameters.
The main workflow to draw a barcode object reveals more details on internal
-structure. In fact, to draw an EAN-13 barcode we must do at least the following
+structure. In fact, to draw an EAN~13 barcode we must do at least the following
steps:
\begin{enumerate}
\item load the library,
-\item get a reference to the \code{Barcode} class,
-\item build an EAN encoder,
-\item build an EAN symbol passing data to a costructor,
+\item get a reference to the \code{Barcode} abstract class,
+\item build an \code{ean} encoder of the variant \code{13},
+\item build an EAN~13 symbol passing data to a costructor,
\item get a reference to a new canvas object,
-\item draw barcode on canvas,
-\item get a reference of driver object,
-\item address canvas toward a driver.
+\item draw barcode on the canvas object,
+\item get a reference of the driver object,
+\item print the graphic material saving an external \code{svg} file.
\end{enumerate}
-Follow that step by step procedure the corresponding code is in the next
-listing:
+Following that step by step procedure the corresponding code is translated in
+the next listing:
\begin{Verbatim}
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+-- lua script
+local barracuda = require "barracuda" -- step 1
+local barcode = barracuda:barcode() -- step 2
-local ean13, err_enc = barcode:new_encoder("ean-13")
+local ean13, err_enc = barcode:new_encoder("ean-13") -- step 3
assert(ean13, err_enc)
-local symb, err_symb = ean13:from_string("8006194056290")
+local symb, err_symb = ean13:from_string("8006194056290") -- step 4
assert(symb, err_symb)
-local canvas = barracuda:new_canvas()
-symb:append_ga(canvas)
+local canvas = barracuda:new_canvas() -- step 5
+symb:append_ga(canvas) -- step 6
-local driver = barracuda:get_driver()
-local ok, err_out = driver:save("svg", canvas, "my_barcode", "svg")
+local driver = barracuda:get_driver() -- step 7
+local ok, err_out = driver:save("svg", canvas, "my_barcode") -- step 8
assert(ok, err_out)
\end{Verbatim}
+Late the manual will give objects and methods references at
+section~\ref{secAPI}.
-\section{Installing}
+
+\subsection{Installing}
\label{secInstall}
-\subsection{Installing `barracuda` for TeX Live}
+\subsubsection{Installing for Lua}
-If you have TeX Live installed from CTAN or from DVD TeX Collection, check
-before any modification to your system if the package is already installed
-looking for \emph{installed} key in the output of the command:
+Manually copy \code{src} folder content to a suitable directory of your system
+that is reachable to the system Lua interpreter.
+
+\subsubsection{Installing for TeX Live}
+
+If you have TeX Live installed from CTAN or from DVD TeX Collection, before any
+modification to your system check if the package is already installed looking
+for \emph{installed} key in the output of the command:
\begin{Verbatim}
$ tlmgr show barracuda
\end{Verbatim}
@@ -249,21 +323,16 @@ $ tlmgr install barracuda
\end{Verbatim}
If you have installed TeX Live via Linux OS repository try your distribution's
-package management system.
+package management system running a software update.
-It's also possible a manual installation:
+It's also possible to install the package manually:
\begin{enumerate}
\item Grab the sources from CTAN or \url{https://github.com/robitex/barracuda}.
-\item Unzip it at the root of one or your TDS trees.
+\item Unzip it at the root of one or your TDS trees (local or personal).
\item You may need to update some filename database after this, see your \TeX{}
distribution's manual for details.
\end{enumerate}
-\subsection{Installing for Lua}
-
-Manually copy \code{src} folder content to a suitable directory of your system
-that is reachable to Lua interpreter.
-
\section{Barracuda \LaTeX{} Package}
\label{secLaTeXPkg}
@@ -282,49 +351,62 @@ A simple example is the following source file for Lua\LaTeX{}:
\end{document}
\end{Verbatim}
-Every macro \verb=\barracuda= typesets a barcode symbol represented with the
-encoder defined in the first argument, the information defined by the second.
+Every macro \verb=\barracuda= typesets a barcode symbol with the encoder defined
+in the first argument, encoding data defined by the second.
+
+
+\section{Barcode parameters}
+\label{secBarcodeReference}
+\subsection{Encoder treename}
+\label{secEncName}
-\section{The Barracuda Framework}
+TODO
+
+\subsection{Barcode Reference}
+\label{secBcRef}
+
+TODO
+
+\section{Developer zone}
+
+\subsection{The Barracuda Framework}
\label{secFramework}
-The \brcd{} package framework consists in indipendet modules: a barcode class
+The \brcd{} package framework consists in indipendent modules: a barcode class
hierarchy encoding a text into a barcode symbology; a geometrical library called
-\code{libgeo} representing several graphic object; an encoding library for the
-\code{ga} format (graphic assembler) several driver to "print" a ga stream
-into a file or a \TeX{} hbox register.
+\code{libgeo} representing several graphic objects; an encoding library for the
+\code{ga} format (graphic assembler) and several driver to \emph{print} a ga
+stream into a file or a \TeX{} hbox register.
-To implement a barcode encoder you need to write a component called
-\emph{encoder} defining every parameters and producing the encoder class, while
-a driver must understand ga opcode stream and print the corresponding graphic
-object.
+To implement a barcode encoder you have to write a component called
+\emph{encoder} defining every parameters and implementing the encoder builder,
+while a driver must understand ga opcode stream and print the corresponding
+graphic object.
Every barcode encoder come with a set of parameters, some of them can be
-reserved and can be setting up by the user only through the encoder.
+reserved and can't be edit after the encoder was build. So, you can create many
+instances of the same encoder for a single barcode type, with its own parameter
+set.
-So, you can create many instances of the same encoder for a single barcode
-type, with its own parameter set.
+The basic idea is getting faster encoders, for which the user may set up
+paramenters at any level: barcode abstract class, encoder globally, down to a
+single symbol object.
-The basic idea is getting faster encoder, for which the user may set up
-paramenters at any level: barcode abstract class, encoder, down to a single
-symbol.
+The Barcode class is completely indipendent from the ouput driver and viceversa.
-Barcode class is completely indipendent from the ouput driver and viceversa.
-
-
-\section{Example and use cases}
-\label{secExample}
+\subsection{Lua API reference}
+\label{secAPI}
TODO
-\section{Barcode Reference}
-\label{secBcRef}
+\subsection{\code{ga} specification}
+\label{secGA}
TODO
-\section{API reference}
-\label{secAPI}
+\section{Example and use cases}
+\label{secExample}
TODO
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdf
index a075d25db11..b05ed417eb8 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex
index 33a81aeb5dd..8932f9eaaf3 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/01-barracuda-latex-test.tex
@@ -1,5 +1,5 @@
% !TeX program = LuaLaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
% test file: make a Code39 barcodes in a LaTeX document
@@ -8,6 +8,8 @@
\begin{document}
A\barracuda{code39}{123QWE}A
+
+B\barracuda[text_vpos='top']{code39}{123QWE}B
\end{document}
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/02-ord_iter-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/02-ord_iter-test.tex
new file mode 100644
index 00000000000..1b5d6509d48
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-barracuda-package/02-ord_iter-test.tex
@@ -0,0 +1,73 @@
+% !TeX program = LuaTeX
+% Copyright (C) 2020 Roberto Giacomelli
+
+\directlua{
+local barracuda = require "barracuda"
+local c39 = assert(barracuda:barcode():new_encoder("code39"))
+print()
+print([[Code39: no filter argument:]])
+for _, tpar in c39:param_ord_iter() do
+ local pid = tpar.pname
+ print(pid, [[ = ]], c39[pid])
+end
+
+print()
+print([[Code39: filter == '*all':]])
+for _, tpar in c39:param_ord_iter([[*all]]) do
+ local pid = tpar.pname
+ print(pid, [[ = ]], c39[pid])
+end
+
+print()
+print([[Code39: filter == '*super':]])
+for _, tpar in c39:param_ord_iter([[*super]]) do
+ local pid = tpar.pname
+ print(pid, [[ = ]], c39[pid])
+end
+
+print()
+print([[Code39: filter == '*enc':]])
+for _, tpar in c39:param_ord_iter([[*enc]]) do
+ local pid = tpar.pname
+ print(pid, [[ = ]], c39[pid])
+end
+
+print()
+local isbn = assert(barracuda:barcode():new_encoder("ean-isbn"))
+
+print([[ISBN: No filter argument:]])
+for _, tpar in isbn:param_ord_iter() do
+ local pid = tpar.pname
+ print(pid, [[ = ]], isbn[pid])
+end
+
+print()
+print([[ISBN: filter == '*all':]])
+for _, tpar in isbn:param_ord_iter([[*all]]) do
+ local pid = tpar.pname
+ print(pid, [[ = ]], isbn[pid])
+end
+
+print()
+print([[ISBN: filter == '*super':]])
+for _, tpar in isbn:param_ord_iter([[*super]]) do
+ local pid = tpar.pname
+ print(pid, [[ = ]], isbn[pid])
+end
+
+print()
+print([[ISBN: filter == '*enc':]])
+for _, tpar in isbn:param_ord_iter([[*enc]]) do
+ local pid = tpar.pname
+ print(pid, [[ = ]], isbn[pid])
+end
+
+local c128 = assert(barracuda:barcode():new_encoder([[code128]]))
+print()
+print([[Code128: filter == '*enc':]])
+for _, tpar in c128:param_ord_iter([[*enc]]) do
+ local pid = tpar.pname
+ print(pid, [[ = ]], c128[pid])
+end
+}
+\bye
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua
index 78645612dca..33dd927dc72 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/001-code128-test.lua
@@ -1,7 +1,7 @@
--- Copyright (C) 2018 Roberto Giacomelli
+-- Copyright (C) 2020 Roberto Giacomelli
local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local c128, err = barcode:new_encoder("code128")
assert(not err, err)
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdf
index c3c8460bc7e..4cf993a396d 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex
index eeaf60e4832..b5c081659e3 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code128/002-code128-test.tex
@@ -1,5 +1,5 @@
% !TeX program = LuaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\newbox\mybox
\nopagenumbers
@@ -13,7 +13,7 @@ barracuda = require "barracuda"
}
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local c128, err = barcode:new_encoder("code128")
assert(not err, err)
@@ -34,7 +34,7 @@ second one) takes the anchor parameters from the super class Barcode, while
the second one takes anchors from itself:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ok, err = barcode:set_param{ax = 1, ay = 1} % super class set up
assert(ok, err)
assert(barcode.ax == 1, "barcode ax is "..tostring(barcode.ax))
@@ -63,8 +63,9 @@ will take to super class Barcode, previously set to 1.0. So, the symbols will
be aligned to the top:
\directlua{
-local c128, err = barracuda:get_barcode_class()
- :enc_by_name "code128"; assert(c128, err)
+local c128, err = barracuda:barcode()
+ :enc_by_name "code128";
+assert(c128, err)
local s, err = c128:from_string("123456"); assert(s, err)
local canvas = barracuda:new_canvas()
@@ -84,7 +85,7 @@ Test 4: set up vertical anchor globally to 0.0, locally to the encoder to 0.5
and locally to 1.0:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
% set ay globally to 0.0
local ok, err = barcode:set_param("ay", 0); assert(ok, err)
@@ -108,8 +109,9 @@ drv:ga_to_hbox(canvas, "mybox")
Test 5: uint() costructor and save a file with PDF literal code:
\directlua{
-local barcode = barracuda:get_barcode_class()
-local c128, err = barcode:enc_by_name("code128"); assert(c128, err)
+local barcode = barracuda:barcode()
+local c128, err = barcode:enc_by_name("code128");
+assert(c128, err)
local s, e = c128:from_uint(1234567890); assert(s, e)
local canvas = barracuda:new_canvas()
local _, errc = s:append_ga(canvas); assert(not errc, errc)
@@ -118,7 +120,7 @@ drv:ga_to_hbox(canvas, "mybox")
drv:save("native", canvas, "02-05-pdfliteral")
}\box\mybox
-That's all folk!
+That's all folks!
\bye
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua
index e4a8569e938..a9d8894ba06 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/001-code39-test.lua
@@ -1,4 +1,4 @@
--- Copyright (C) 2019 Roberto Giacomelli
+-- Copyright (C) 2020 Roberto Giacomelli
-- test Code 39 encoder
local barracuda = require "barracuda"
@@ -7,7 +7,7 @@ for k, v in pairs(barracuda) do
print(k,v)
end
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local c39, err = barcode:new_encoder("code39")
assert(not err, err)
@@ -27,7 +27,7 @@ end
local symb = c39:from_string("123")
print("print internal representation of chars")
-for _, c in ipairs(symb.code) do
+for _, c in ipairs(symb._code_data) do
print(c)
end
print()
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdf
index 060a61e8929..63ced9a3423 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex
index 73f91aac430..eb1693b5ba8 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/002-code39-test.tex
@@ -1,14 +1,17 @@
% !TeX program = LuaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\newbox\mybox
\nopagenumbers
+\directlua{
+barracuda = require "barracuda"
+}
+
Test 1: Code 39 symbol with default parameters:
\directlua{
-local barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
+local c39, err = barracuda:barcode()
:new_encoder("code39")
assert(not err, err)
@@ -19,17 +22,15 @@ local canvas = barracuda:new_canvas()
symbol:append_ga(canvas)
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
Test 2: get the reference of the previous encoder and typeset two
Code 39 symbols on the same canvas, one above to the other:
\directlua{
-local barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
+local c39, err = barracuda:barcode()
:enc_by_name("code39")
- assert(c39, err)
+assert(c39, err)
local s1, err = c39:from_string("ZKPQJ31"); assert(s1, err)
local s2, err = c39:from_string("RTFG746", {text_vpos="top"}); assert(s2, err)
@@ -41,17 +42,15 @@ local h2 = s2:get_param("height")
s2:append_ga(canvas, 0.0, h2 + tex.sp "5pt")
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
Test 3: with the same encoder print a symbol, change globally the height,
and reprint the same symbol again on the same canvas:
\directlua{
-local barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
+local c39, err = barracuda:barcode()
:enc_by_name("code39")
- assert(c39, err)
+assert(c39, err)
local s1, err = c39:from_string("ZKPQJ31"); assert(s1, err)
@@ -66,17 +65,15 @@ s1:append_ga(canvas, 0.0, h + tex.sp "5pt")
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
Test 4: do the same in test 3 but change locally parameters as
height and text properties:
\directlua{
-local barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
+local c39, err = barracuda:barcode()
:enc_by_name("code39")
- assert(c39, err)
+assert(c39, err)
local s1, err = c39:from_string("0123456789"); assert(s1, err)
@@ -95,16 +92,14 @@ s1:append_ga(canvas, 0.0, - tex.sp "5pt")
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
Test 5: create a new encoder with a large module value:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
-local c39, err = barcode:new_encoder("code39", "e2", {module = tex.sp "0.5mm"})
+local c39, err = barcode:new_encoder("code39:e2", {module = tex.sp "0.5mm"})
assert(c39, err)
local s1, err = c39:from_string("02040608"); assert(s1, err)
@@ -114,7 +109,6 @@ s1:append_ga(canvas)
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
\bye
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdf
index 66b04e61e38..544a4b34ff0 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex
index a4ba3d6e81c..884cdd0df49 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/003-code39-test.tex
@@ -1,20 +1,18 @@
% !TeX program = LuaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\newbox\mybox
\nopagenumbers
-Test 3: the same Code 39 symbol drawing multiple time on the same canvas
+Test 1: the same Code 39 symbol drawing multiple time on the same canvas
\directlua{
local barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
- :new_encoder("code39")
-assert(not err, err)
-local err
-local symbol
-symbol, err = c39:from_string("ABCDEF12QJ31+")
-assert(not err, err)
+local c39 = assert(
+ barracuda:barcode()
+ :new_encoder("code39")
+)
+local symbol = assert(c39:from_string("ABCDEF12QJ31+"))
local ok, err = c39:set_param("text_vpos", "top")
assert(ok, err)
@@ -46,8 +44,7 @@ symbol:append_ga(canvas, tex.sp "9.0cm", tex.sp "-2.0cm")
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
\bye
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdf
index 3c96d9233b4..0e5bfa42d09 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex
index 559dc943837..9066d4dee80 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/004-code39-test.tex
@@ -1,14 +1,14 @@
% !TeX program = LuaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\newbox\mybox
\nopagenumbers
-Test 4: check uint costructor:
+Test 1: check uint costructor:
\directlua{
barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
+local c39, err = barracuda:barcode()
:new_encoder("code39")
assert(not err, err)
local err
@@ -21,11 +21,10 @@ symbol:append_ga(canvas)
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
\directlua{
-local c39, err = barracuda:get_barcode_class()
+local c39, err = barracuda:barcode()
:enc_by_name("code39")
assert(c39, err)
local e
@@ -38,9 +37,6 @@ symbol:append_ga(canvas)
local drv = barracuda:get_driver()
drv:ga_to_hbox(canvas, "mybox")
-}
-\box\mybox
+}\box\mybox
\bye
-
-
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua
index d33ad4ffaf1..1b8ee9f4a1b 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-code39/006-code39-test.lua
@@ -2,7 +2,7 @@
local cm = 1864679.8110236 -- sp
local barracuda = require "barracuda"
-local c39, err = barracuda:get_barcode_class()
+local c39, err = barracuda:barcode()
:new_encoder("code39")
assert(not err, err)
local err
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdf
index 0e8abb933f9..12eac36ba17 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex
index c0a4db3894e..7c7b373a6c5 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/001-13-ean-test.tex
@@ -1,5 +1,5 @@
% !TeX program = LuaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\newbox\mybox
\nopagenumbers
@@ -9,8 +9,8 @@ EAN encoder test.
Test 1: one simple barcode EAN13 with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+barracuda = require "barracuda"
+local barcode = barracuda:barcode()
local ean13, err = barcode:new_encoder("ean-13")
assert(not err, err)
@@ -30,8 +30,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 2: one simple EAN8 barcode with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean8, err = barcode:new_encoder("ean-8")
assert(not err, err)
@@ -51,8 +50,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 3: one simple EAN5 barcode with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean5, err = barcode:new_encoder("ean-5")
assert(not err, err)
local symbo, err = ean5:from_string("54495")
@@ -68,8 +66,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 4: one simple EAN2 barcode with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean2, err = barcode:new_encoder("ean-2")
assert(not err, err)
local symbo, err = ean2:from_string("53")
@@ -85,13 +82,11 @@ drv:ga_to_hbox(canvas, "mybox")
Test 5: EAN13 + EAN5 barcode with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean, err = barcode:new_encoder("ean-13+5"); assert(not err, err)
local n = 123456789012
-local c = ean:checksum(n)
-local s = n .. c
-local symbo, err = ean:from_string(s.."12345")
+local c = assert(ean:checksum(n))
+local symbo, err = ean:from_string(n..c.."12345")
assert(not err, err)
local canvas = barracuda:new_canvas()
symbo:append_ga(canvas)
@@ -104,8 +99,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 6: EAN13 + EAN2 barcode with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean, err = barcode:new_encoder("ean-13+2"); assert(not err, err)
local n = 123456789012
local c = ean:checksum(n)
@@ -123,8 +117,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 7: EAN8 + EAN5 barcode with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean, err = barcode:new_encoder("ean-8+5"); assert(not err, err)
local n = 1234567
local c = ean:checksum(n)
@@ -142,8 +135,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 8: EAN8 + EAN2 barcode with default parameter:
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean, err = barcode:new_encoder("ean-8+2"); assert(not err, err)
local n = 7865431
local c = ean:checksum(n)
@@ -167,8 +159,7 @@ to the object symbol.
\smallskip
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean, err = barcode:enc_by_name("ean-13"); assert(not err, err)
local n = 818571884348
local c = ean:checksum(n)
@@ -194,8 +185,7 @@ The parameter height is setting up in the encoder so it will be global.
\smallskip
\directlua{
-local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local ean, err = barcode:enc_by_name("ean-13"); assert(not err, err)
local ok, err = ean:set_param("height", tex.sp "5mm"); assert(ok, err)
local n = 758458535897; local c = ean:checksum(n); local s = n .. c
@@ -213,7 +203,7 @@ drv:ga_to_hbox(canvas, "mybox")
\vrule Test 10\vrule\box\mybox \vrule Test 10\vrule
\medskip
-That's all folk!
+That's all folks!
\bye
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdf
index 568050371c8..796ad29ab03 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/002-ean-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdf
index baa5a5b9cd4..c52c77a8471 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/003-ean-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.pdf
new file mode 100644
index 00000000000..d71e87141de
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.tex
new file mode 100644
index 00000000000..d69ff6fc283
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/005-isbn-test.tex
@@ -0,0 +1,45 @@
+% !TeX program = LuaTeX
+\nopagenumbers
+% load package and store it in a global Lua variable
+\directlua{barracuda = require "barracuda"}
+\newbox\mybox
+
+ISBN test:
+\vskip10pt
+
+\leavevmode
+\directlua{barracuda:hbox("ean-isbn", "978-88-8154-348-9", "mybox")}
+\box\mybox
+\directlua{barracuda:hbox("ean-isbn", "978 88 8154 348 9", "mybox")}
+\box\mybox
+
+\vskip10pt
+\directlua{barracuda:hbox("ean-isbn+5", "978 88 8154 348 9-80026", "mybox")}%
+\box\mybox
+
+\vskip10pt
+ISBN 10 test, the 10-digits code is automatically converted in an ISBN 13 code:
+\vskip10pt
+\directlua{barracuda:hbox("ean-isbn", "1-78474-140-X", "mybox")}%
+\box\mybox
+
+\vskip10pt
+\directlua{barracuda:hbox("ean-isbn+5", "1-78474-140-X 12345", "mybox")}%
+\box\mybox
+
+\vskip10pt
+\directlua{barracuda:hbox("ean-isbn+2", "1-78474-140-X 99", "mybox")}%
+\box\mybox
+
+\vskip5pt
+ISBN Test: the value 'auto' for 'text\_isbn\_enabled' option means that
+the text above the symbol isn't printed if in the provided code does not
+have group chars or the length is not 10:
+\vskip5pt
+\leavevmode
+\directlua{barracuda:hbox("ean-isbn", "9788881543489", "mybox")}
+\box\mybox
+\directlua{barracuda:hbox("ean-isbn", "978-8881543489", "mybox")}
+\box\mybox
+
+\bye \ No newline at end of file
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.pdf
new file mode 100644
index 00000000000..57f3739fb7e
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.tex
new file mode 100644
index 00000000000..576963bd810
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/006-issn-test.tex
@@ -0,0 +1,57 @@
+% !TeX program = LuaTeX
+\nopagenumbers
+% load package and store it in a global Lua variable
+\directlua{barracuda = require "barracuda"}
+\newbox\mybox
+
+ISSN test:
+
+\vskip10pt
+\leavevmode
+\directlua{barracuda:hbox("ean-issn", "9778881543480", "mybox")}
+\box\mybox
+
+\vskip10pt
+\leavevmode
+\directlua{barracuda:hbox("ean-issn+5", "977888154348000028", "mybox")}
+\box\mybox
+
+\vskip10pt
+\leavevmode
+\directlua{
+local ars_issn = {
+ online = "9771828236001",
+ print = "9771828235004",
+}
+
+barracuda:hbox("ean-issn+5", ars_issn.online.."00028", "mybox")
+}
+\box\mybox
+
+\vskip10pt
+\leavevmode
+\directlua{barracuda:hbox("ean-issn", "1828-2350", "mybox")}
+\box\mybox
+
+\vskip10pt
+\leavevmode
+\directlua{barracuda:hbox("ean-issn", "1828-2350 [01]", "mybox")}
+\box\mybox
+
+\vskip10pt
+\leavevmode
+\directlua{barracuda:hbox("ean-issn+5", "1828-2350 [01] 00028", "mybox")}
+\box\mybox
+
+\vskip10pt
+\leavevmode
+\directlua{
+barracuda:hbox("ean-issn+2", "1828-2350 [01] 22", "mybox")
+barracuda:save("ean-issn+2", "1828-2350 [01] 22", "ars")
+}
+\box\mybox
+
+
+\bye
+
+
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/ars.svg b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/ars.svg
new file mode 100644
index 00000000000..5bfc01d0f3c
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ean/ars.svg
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Barracuda package (https://github.com/robitex/barracuda) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="47.189752mm" height="28.039875mm"
+ viewBox="-3.629981 -27.259868 47.189752 28.039875"
+>
+ <g stroke="black">
+ <path d="M0.164999 -24.499871V-0.000000" style="stroke-width:0.329998"/>
+ <path d="M0.824996 -24.499871V-0.000000" style="stroke-width:0.329998"/>
+ </g>
+ <g stroke="black">
+ <path d="M1.814990 -24.499871V-1.649991" style="stroke-width:0.989995"/>
+ <path d="M2.969984 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M4.124978 -24.499871V-1.649991" style="stroke-width:0.329998"/>
+ <path d="M5.444971 -24.499871V-1.649991" style="stroke-width:0.329998"/>
+ </g>
+ <g stroke="black">
+ <path d="M6.269967 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ <path d="M7.589960 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M8.579955 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ <path d="M9.734949 -24.499871V-1.649991" style="stroke-width:0.989995"/>
+ </g>
+ <g stroke="black">
+ <path d="M11.219941 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ <path d="M12.209936 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M13.199931 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ <path d="M14.354924 -24.499871V-1.649991" style="stroke-width:0.989995"/>
+ </g>
+ <g stroke="black">
+ <path d="M15.344919 -24.499871V-0.000000" style="stroke-width:0.329998"/>
+ <path d="M16.004916 -24.499871V-0.000000" style="stroke-width:0.329998"/>
+ </g>
+ <g stroke="black">
+ <path d="M16.829911 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ <path d="M17.819906 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M18.974900 -24.499871V-1.649991" style="stroke-width:0.329998"/>
+ <path d="M20.624891 -24.499871V-1.649991" style="stroke-width:0.329998"/>
+ </g>
+ <g stroke="black">
+ <path d="M21.284888 -24.499871V-1.649991" style="stroke-width:0.329998"/>
+ <path d="M22.604881 -24.499871V-1.649991" style="stroke-width:0.989995"/>
+ </g>
+ <g stroke="black">
+ <path d="M23.924874 -24.499871V-1.649991" style="stroke-width:0.989995"/>
+ <path d="M25.244867 -24.499871V-1.649991" style="stroke-width:0.329998"/>
+ </g>
+ <g stroke="black">
+ <path d="M26.069863 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ <path d="M27.389856 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M28.379851 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ <path d="M29.699844 -24.499871V-1.649991" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M30.524839 -24.499871V-0.000000" style="stroke-width:0.329998"/>
+ <path d="M31.184836 -24.499871V-0.000000" style="stroke-width:0.329998"/>
+ </g>
+ <text x="-3.629981" y="0.780007" font-family="Verdana" font-size="2.877000">
+ 9 </text>
+ <text y="0.780007" font-family="Verdana" font-size="2.877000" text-anchor="middle">
+ <tspan x="2.043326">7</tspan>
+ <tspan x="4.459979">7</tspan>
+ <tspan x="6.876631">1</tspan>
+ <tspan x="9.293284">8</tspan>
+ <tspan x="11.709936">2</tspan>
+ <tspan x="14.126589">8</tspan>
+ </text>
+ <text y="0.780007" font-family="Verdana" font-size="2.877000" text-anchor="middle">
+ <tspan x="17.223246">2</tspan>
+ <tspan x="19.639899">3</tspan>
+ <tspan x="22.056551">5</tspan>
+ <tspan x="24.473204">0</tspan>
+ <tspan x="26.889856">1</tspan>
+ <tspan x="29.306509">1</tspan>
+ </text>
+ <text x="15.674918" y="-25.159868" font-family="Verdana" font-size="2.877000" text-anchor="middle">
+ ISSN 1828-2350 </text>
+ <g stroke="black">
+ <path d="M34.814817 -20.824890V-0.000000" style="stroke-width:0.329998"/>
+ <path d="M35.639812 -20.824890V-0.000000" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M36.959806 -20.824890V-0.000000" style="stroke-width:0.659997"/>
+ <path d="M37.949800 -20.824890V-0.000000" style="stroke-width:0.659997"/>
+ </g>
+ <g stroke="black">
+ <path d="M38.774796 -20.824890V-0.000000" style="stroke-width:0.329998"/>
+ </g>
+ <g stroke="black">
+ <path d="M39.764791 -20.824890V-0.000000" style="stroke-width:0.329998"/>
+ <path d="M40.919785 -20.824890V-0.000000" style="stroke-width:0.659997"/>
+ </g>
+ <text y="-21.154889" font-family="Verdana" font-size="2.877000" text-anchor="middle">
+ <tspan x="36.445645">2</tspan>
+ <tspan x="39.453955">2</tspan>
+ </text>
+</svg>
+
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdf
index b8a7477c7fc..b3f3336f436 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex
index 1a5ed80d0c5..c51fa3dfb09 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-pdfliteral/001-ga-pdfliteral-test.tex
@@ -1,7 +1,7 @@
% !TeX program = LuaTeX
% test for ga-canvas pdfliteral driver
%
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
% see LICENSE.txt file
---ga--- is a binary format as an istruction set similar to
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua
index 8f10d6dfbf7..b5a2e3c4ae2 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-ga-svg/002-ga-svg-test.lua
@@ -1,7 +1,7 @@
-- test SVG driver output
local barracuda = require "barracuda"
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local driver = barracuda:get_driver()
local opt = {module = 15 * 0.0254 * 186467, height = 12 * 186467}
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdf
index 3aa107681c4..f2dbd6f9ea6 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdf
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex
index 43c652d66a8..0062b74d3e4 100644
--- a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/001-i2of5-test.tex
@@ -1,5 +1,5 @@
% !TeX program = LuaTeX
-% Copyright (C) 2019 Roberto Giacomelli
+% Copyright (C) 2020 Roberto Giacomelli
\newbox\mybox
\nopagenumbers
@@ -11,7 +11,7 @@ Interleaved 2 of 5 encoder test.
Test 1: one simple barcode with default parameters:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:new_encoder("i2of5"); assert(not err, err)
local symbo, err = enc:from_uint(54654681); assert(not err, err)
@@ -25,7 +25,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 2: one simple barcode with default parameter:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
local symbo, err = enc:from_uint(1234567895); assert(not err, err)
local canvas = barracuda:new_canvas(); symbo:append_ga(canvas)
@@ -57,7 +57,7 @@ local code = {
5317837,
4117698,
}
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
for _, n in ipairs(code) do
local smbl, err = enc:from_uint(n, {check_digit_policy="verify"})
@@ -86,7 +86,7 @@ local code = {
["531783"] = 7,
["411769"] = 8,
}
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
for sc, ck in pairs(code) do
local n = tonumber(sc)
@@ -100,7 +100,7 @@ end
Test 3: one simple barcode with check digit automatically added:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
local symbo, err = enc:from_uint(454473, {check_digit_policy="add"})
assert(not err, err)
@@ -114,7 +114,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 4: a second simple barcode with check digit automatically added:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
local symbo, err = enc:from_uint(74223, {check_digit_policy="add"})
assert(not err, err)
@@ -128,7 +128,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 5: a symbol with native check digits:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
local symbo, err = enc:from_uint(121891259, {check_digit_policy="verify"})
assert(not err, err)
@@ -142,7 +142,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 6: bearer bars please:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
local symbo, err = enc:from_uint(747867239, {bearer_bars_enabled = true})
assert(not err, err)
@@ -156,7 +156,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 7: bearer bars all around the symbol:
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
local symbo, err = enc:from_uint(986790868, {bearer_bars_enabled = true, bearer_bars_layout="frame"})
assert(not err, err)
@@ -170,7 +170,7 @@ drv:ga_to_hbox(canvas, "mybox")
Test 8: bearer bars all around the symbol (with string costructor):
\directlua{
-local barcode = barracuda:get_barcode_class()
+local barcode = barracuda:barcode()
local enc, err = barcode:enc_by_name("i2of5"); assert(not err, err)
local symbo, err = enc:from_string("986790868", {bearer_bars_enabled = true, bearer_bars_layout="frame"})
assert(not err, err)
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.pdf b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.pdf
new file mode 100644
index 00000000000..79a05eca420
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.tex b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.tex
new file mode 100644
index 00000000000..52784b66bbc
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/barracuda/test/test-i2of5/002-ITF14-test.tex
@@ -0,0 +1,53 @@
+% !TeX program = LuaTeX
+% Copyright (C) 2020 Roberto Giacomelli
+
+\newbox\mybox
+\nopagenumbers
+
+\directlua{barracuda = require "barracuda"}
+
+
+Test 2: Interleaved 2 of 5 encoder test for ITF14 variant.
+
+\directlua{
+local barcode = barracuda:barcode()
+local enc = assert(barcode:new_encoder("i2of5-ITF14"))
+local s1 = assert(enc:from_uint(1234567890123))
+
+local canvas = barracuda:new_canvas()
+s1:append_ga(canvas)
+local drv = barracuda:get_driver()
+drv:ga_to_hbox(canvas, "mybox")
+}
+\vskip 10pt
+12345678901231 is \vrule A\vrule\box\mybox \vrule A\vrule
+
+\directlua{
+local barcode = barracuda:barcode()
+local enc = assert(barcode:enc_by_name("i2of5-ITF14"))
+local s1 = assert(enc:from_string("1234567890123"))
+
+local canvas = barracuda:new_canvas()
+s1:append_ga(canvas)
+local drv = barracuda:get_driver()
+drv:ga_to_hbox(canvas, "mybox")
+}
+\vskip 10pt
+12345678901231 is \vrule A\vrule\box\mybox \vrule A\vrule
+
+\directlua{
+local barcode = barracuda:barcode()
+local enc = assert(barcode:enc_by_name("i2of5-ITF14"))
+local s1 = assert(enc:from_string("(12) 34 56 78 90 12 3"))
+
+local canvas = barracuda:new_canvas()
+s1:append_ga(canvas)
+local drv = barracuda:get_driver()
+drv:ga_to_hbox(canvas, "mybox")
+}
+\vskip 10pt
+12345678901231 is \vrule A\vrule\box\mybox \vrule A\vrule
+
+\bye
+
+