encyclopegia.org

Noweb

Noweb, stylised in lowercase as noweb, is a literate programming tool, created in 1989–1999 by Norman Ramsey, and designed to be simple, easily extensible and language independent. As in WEB and CWEB, the main components of Noweb are two programs: "notangle", which extracts 'machine' source code from the source texts, and "noweave", which produces nicely-formatted printable documentation. Noweb supports TeX, LaTeX, HTML, and troff back ends and works with any programming language. Besides simplicity, this is the main advantage over WEB, which needs different versions to support programming languages other than Pascal. (Thus the necessity of CWEB, which supports C and similar languages.)

Noweb, stylised in lowercase as noweb, is a literate programming tool, created in 1989–1999 by Norman Ramsey, and designed to be simple, easily extensible and language independent. As in WEB and CWEB, the main components of Noweb are two programs: "notangle", which extracts 'machine' source code from the source texts, and "noweave", which produces nicely-formatted printable documentation. Noweb supports TeX, LaTeX, HTML, and troff back ends and works with any programming language. Besides simplicity, this is the main advantage over WEB, which needs different versions to support programming languages other than Pascal. (Thus the necessity of CWEB, which supports C and similar languages.) ==Noweb's input== A Noweb input text contains program source code interleaved with documentation. It consists of so-called chunks that are either documentation chunks or code chunks. A documentation chunk begins with a line that starts with an at sign (@) followed by a space or newline. A documentation chunk has no name. Documentation chunks normally contain LaTeX, but Noweb is also used with HTML, plain TeX, and troff. Code chunks are named. A code chunk begins with >= on a line by itself. The double left angle bracket ( \section{Hello world} Today I awoke and decided to write some code, so I started to write Hello World in \textsf C. >= /* > / include int main(int argc, char *argv[]) { printf("Hello World!\n"); return 0; } @ \noindent \ldots then I did the same in PHP. >= > */ echo "Hello world!\n"; ?> @ \section{License} Later the same day some lawyer reminded me about licenses. So, here it is: >= This work is placed in the public domain. Assuming that the above code is placed in a file named 'hello.nw', the command to extract the human-readable document in HTML format is: noweave -filter l2h -index -html hello.nw | htmltoc > hello.html ... and in LaTeX format: noweave -index -latex hello.nw > hello.tex To extract machine source code: notangle -R hello.c hello.nw > hello.c notangle -R hello.php hello.nw > hello.php ==Compatibility== Noweb defines a specific file format and a file is likely to interleave three different formats (Noweb, LaTeX and the language used for the software). This is not recognised by other software development tools and consequently using Noweb excludes the use of UML or code documentation tools. ==Notes== ==External links== Norman Ramsey's home page noweb.py – an open-source noweb clone written in Python noweb.php – noweb clone in PHP

References

No reference rows published for this article.

Cite this article

MLA

"Noweb." encyclopegia.org, 2026, https://encyclopegia.org/wiki/noweb. Accessed 24 November 2026.

Chicago

"Noweb." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/noweb.

APA

encyclopegia.org. (2026). Noweb. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/noweb

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1372234331 · 0.5 · snapshot enwiki-001372234331

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.