How texhackse/latex-zugferd works
Project type and purpose
• This is an open-source LaTeX package (“zugferd”) to produce ZUGFeRD-compliant electronic invoices by generating an XML invoice and embedding it into a PDF.
• The README clarifies that it provides both a demo template and interfaces for attaching externally generated XML, and uses the LaTeX3/l3build toolchain to compile and test.
File structure
• Top-level source:
• zugferd.dtx (package code + documentation)
• zugferd.ins (installer to extract .sty)
• zugferd-invoice.sty (built style)
• Build/configuration:
• build.lua, config-pdf.lua (l3build scripts)
• .tl_packages, DEPENDS.txt, INSTALL.md
• CI pipelines:
• .github/workflows/l3build.yaml
• .gitlab-ci.yml
• Test assets:
• testfiles/ (LaTeX-to-XML unit tests: .lvt → .tlg)
• testfiles-pdf/ (PDF-to-attachment tests: .pdftex.tpf, .tpf, .pvt)
• support/validate_zugferd.sh (shell validation helper)
• Misc:
• DEMO-rechnung-zugferd.tex (example invoice)
README for additional insights
• Confirms core responsibilities: generate XML, attach to PDF, various profiles (BASIC, MINIMUM, XRechnung), no built-in validation.
• Notes reliance on LaTeX3/pdfmeta interfaces (“l3pdfmeta”) and standard TeX engines.
Diagramming recommendations
• “Source Repo”
• “CI Pipeline”
• “Build & Test (l3build)”
• “LaTeX Engine + zugferd-invoice.sty”
• “Test Harness”
• “Support Scripts”
• “Output Artifacts”
• Repo → CI → Build → LaTeX Engine → Outputs → Validation
• Build → Test Harness → pass/fail → CI
• Blue for code artifacts
• Green for build/test processes
• Orange for external dependencies
• Gray for utilities & scripts
• Rectangles for processes