by rus20376 · 3y ago · 0 comments
My favorite is nuweb https://nuweb.sourceforge.net/ which allows for LP in virtually any language and provides documentation in LaTeX. The main trade off being that with wide language support the code sections are as-is, without special formatting. Since mostly people write the code sections to their own tastes already this is not a significant problem.
Vim is also able to export syntax highlighted code as HTML markup. Because Noweb is modular and supports plugin filter stages, it might be possible to write a Noweb filter stage that calls Vim, translates the markup to LaTeX, and adds syntax highlighting to the document. This is something I haven't tried.