comment2tex

Include annotated source files as LaTeX listings

Version:
1.1
Copyright:
Erik Nijenhuis
License:
lppl1.3c
Packaged on:
07/26/2026 14:40:45
Number of files:
2
Size on disk:
5.1 kB

This package typesets source files that keep their documentation in special comments: doc-comment lines become ordinary LaTeX, everything else becomes a listing. A Lua converter handles the transformation, and two TeX wrappers, one for LaTeX/LuaLaTeX and one for plain TeX, provide \includebash and \includelua to pull annotated Bash or Lua sources into the document. Under LuaLaTeX the conversion runs in process; under pdfLaTeX it uses shell escape or a separate pre-build run.