comment2tex – Include annotated source files as LaTeX listings
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.
| Sources | /macros/generic/comment2tex |
| Documentation | |
| Bug tracker | https://github.com/Xerdi/comment2tex/issues |
| Repository | https://github.com/Xerdi/comment2tex |
| Version | 1.0 2026-06-08 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Erik Nijenhuis |
| Maintainer | Erik Nijenhuis |
| Topics | Use Lua Documentation support Literate programming Verbatim Use LuaTeX Listing |
Download the contents of this package in one zip archive (131.1k).
Suggestions
Maybe you are interested in the following packages as well.
Community Comments