Developer Docs

Template Errors & Sanitization

Diagnose LaTeX and sty validation failures, sanitization errors, and safe correction workflows.

Template content is validated and sanitized before compilation. This protects system stability and prevents unsafe LaTeX behavior.

Validation layers

  • Template content presence and mode compatibility checks
  • LaTeX sanitizer denylist enforcement
  • .sty placeholder mapping validation

Common error patterns

Error matrix

StatusLikely causeHow to fixRetry?
422LaTeX sanitize validation failedRemove disallowed primitives and re-validate contentno
422Invalid .sty named placeholder mappingCorrect placeholder declarations and command signaturesno
500Compilation failure during renderInspect latest template changes and preview output incrementallydepends

Troubleshooting flow

  1. Revert to last known-good version
  2. Apply smallest failing diff and test
  3. Preview with multiple candidate profiles
  4. Republish only after stable outputs across profile extremes

Security note

Do not attempt to bypass sanitizer behavior. The compile pipeline intentionally constrains unsafe LaTeX execution patterns.