Guide

Directives

Use QR codes, 1D barcodes, postal codes, and 2D symbologies in Comark markdown with comark-etiket directives.

comark-etiket maps Comark block directives to etiket encoders. Each directive accepts a payload via value=, inline content, or a block body — see Value sources.

Render QR codes and 2D symbologies

qrcode.md
::qrcode{value="https://comark.dev" dot-type="dots" ec-level="H"}
::

Supported 2D symbologies:

qrcode, microqr, rmqr, datamatrix, gs1datamatrix, pdf417, micropdf417, aztec, maxicode, dotcode, hanxin, codablockf, code16k, jabcode

Styling options (dot-type, ec-level, gradients, corners, logo) pass through as attrs. Kebab-case attrs are coerced to camelCase — see Option coercion below.

Encode 1D barcodes

barcode.md
::barcode{value="4006381333931" type="ean13" show-text="true"}
::

The type= attribute selects the 1D symbology (e.g. ean13, code128, upc-a, etc.). See the etiket docs for all supported types.

Render postal codes

postal.md
::postal{value="SN34RD1A" type="rm4scc"}
::

Postal types include RM4SCC, KIX, AusPost, Japan Post, IMb, and others etiket supports.

Coerce option names

Attribute names are automatically converted from kebab-case to camelCase:

Markdown attretiket option
dot-type="dots"{ dotType: 'dots' }
ec-level="H"{ ecLevel: 'H' }
show-text="true"{ showText: true }
bar-width="2"{ barWidth: 2 }
color='{"type":"linear",...}'{ color: { type: 'linear', ... } }

JSON attrs deserialize to objects when the value looks like JSON.

Use QR helper directives

Structured payloads (WiFi, vCard, Swiss QR Bill, …) have dedicated directives. See QR helpers.

Generate batch sheets

Multiple values in one directive — see Batch sheets.

Copyright © 2026