c

codetastic

@preview

Generate all sorts of codes in Typst.

v0.2.2
MIT

Package Information

Last Updated

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/codetastic:0.2.2

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/codetastic:0.2.2": *

Version History

0.2.2
ed2c0dac5ace...
0.2.0
e7f563ff4256...
0.1.0
6dafd42a6088...

Codetastic (v0.2.2)

Codetastic is a Typst package for drawing barcodes and 2d codes.

Usage

For Typst 0.6.0 or later, import the package from the Typst preview repository:

#import "@preview/codetastic:0.2.2"

After importing the package call any of the code generation functions:

#import "@preview/codetastic:0.2.2": ean13, qrcode

#ean13(4012345678901)

#qrcode("https://github.com/typst/typst")

The output should look like this:
Example for codes drawn with Codetastic

Further documentation

See manual.pdf for a full manual of the package.

Development

The documentation is created using Mantys, a Typst template for creating package documentation.

To compile the manual, Mantys needs to be available as a local package. Refer to Mantys' manual for instructions on how to do so.

Changelog

Version 0.2.2

  • qrcodes:
    • Fixed issue with alignment pattern placement.
    • Removed minimal borders around modules for sharper edges with small module sizes.

Version 0.2.1

  • qrcodes:
    • Fixed wrong sizing for width key.
      • The code didn't take the quiet zone into account.
    • Moved debug information into quiet zone.

Version 0.2.0

  • Removed CeTZ as a dependecy.
    • Now using native Typst drawing functions.
  • Hugh speed improvements for large QR-Codes.
  • Fixed issue with checksum calculation for gtin/ean codes.

Version 0.1.0