Hi again, I thought I’d include a “GiroCode” (https://en.wikipedia.org/wiki/EPC_QR_code) in our publishing house’s invoices. While \qrcode[text=something] works, I’d like to use a Lua call, but I didn’t understand the code (meta-imp-qrcodes.mkxl) far enough. I don’t need colors, but the code must include CR characters (\n), since EPC is defined as a multi-line dataset; the TeX macro converts them to spaces (\par is deleted). With the zint module, it looks better (vectors instead of bytemap), but I still can’t get proper linebreaks. (If this works, I suggest to include this also in CG invoices.) Hraban
Am 17.11.25 um 20:17 schrieb Henning Hraban Ramm:
Hi again, I thought I’d include a “GiroCode” (https://en.wikipedia.org/wiki/ EPC_QR_code) in our publishing house’s invoices.
While \qrcode[text=something] works, I’d like to use a Lua call, but I didn’t understand the code (meta-imp-qrcodes.mkxl) far enough.
I don’t need colors, but the code must include CR characters (\n), since EPC is defined as a multi-line dataset; the TeX macro converts them to spaces (\par is deleted).
Arrgh, me stupid: context.qrcode{text=[[BCD 002 1 SCT … ]]} works. Sorry for the noise. Hraban
On 11/17/2025 8:38 PM, Henning Hraban Ramm wrote:
Am 17.11.25 um 20:17 schrieb Henning Hraban Ramm:
Hi again, I thought I’d include a “GiroCode” (https://en.wikipedia.org/wiki/ EPC_QR_code) in our publishing house’s invoices.
While \qrcode[text=something] works, I’d like to use a Lua call, but I didn’t understand the code (meta-imp-qrcodes.mkxl) far enough.
I don’t need colors, but the code must include CR characters (\n), since EPC is defined as a multi-line dataset; the TeX macro converts them to spaces (\par is deleted).
Arrgh, me stupid:
One learns best from self-discovering (assuming you could resist asking some chatty ai).
context.qrcode{text=[[BCD 002 1 SCT … ]]}
works.
Sorry for the noise.\startTEXpage
Real low level: \startTEXpage \startluacode context(figures.qrcode( "this also works", -- "darkgray", tex.sp("4cm") )) \stopluacode \stopTEXpage a metapost variant is described in the upcoming MAPS. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Am 17.11.25 um 21:38 schrieb Hans Hagen via ntg-context:
One learns best from self-discovering (assuming you could resist asking some chatty ai).
I don’t let any AIs near my computers.
Real low level:
\startTEXpage \startluacode context(figures.qrcode( "this also works", -- "darkgray", tex.sp("4cm") )) \stopluacode \stopTEXpage
a metapost variant is described in the upcoming MAPS.
Thank you! I was missing the size option. Now I hope my GiroCode is correct – all three of us publishers don’t use banking apps… Well, customers will complain. Hraban
participants (2)
-
Hans Hagen -
Henning Hraban Ramm