Hacker News new | ask | show | jobs
by metaed 931 days ago
I use Noweb <https://www.cs.tufts.edu/~nr/noweb/>, which is, I believe, very much like nuweb. It is also LaTeX-centric, and also allows code sections to be written in any language. Within code sections, instead of depending on Noweb for code formatting, I use a syntax-aware editor. I configure Vim to recognize the language within each code section. This means that, in Vim, I get formatting and syntax highlighting.

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.