Questions tagged [noweb]

noweb is a literate programming tool for a variety of languages.

noweb is a literate programming tool written by Norman Ramsey which works for a variety of programming languages. It is a modern alternative to programs like Knuth's CWEB.

noweb takes a single specially formatted file, and generates both code and documentation; in this sense, it is kind of like the reverse of a Javadoc - instead of embedding documentation inside code, noweb embeds code inside documentation. Since "chunks" of code are named, code can even be reordered and repeated.

The documentation parts can be in LaTeX or HTML so that printed output or web pages can be generated from noweb input. noweb is language independent, so it can process any programming language (since noweb respects indentation, it can even process languages like Python and Haskell, and produce valid output).

See Nweb's Home Page for more information and downloads; Wikipedia contains a good example of what noweb's format looks like and how to generate code and documentation from it.

This tag should be used for questions about how to use the noweb program.

35 questions
0
votes
1 answer

Preserving content of source blocks when exporting literate program to HTML with ReadTheOrg

Minimal example I wrote a program in org-mode using literate programming technique with :noweb extension(?). Typical piece of code looks like this: * Section In order to do foo with bar, we define a function ~do_foo~, which initializes object of a…
Reverent Lapwing
  • 283
  • 2
  • 11
0
votes
1 answer

How is the order of execution of code chunks in a Literate Programming tool like noweb or Rmarkdown determined?

I am reading this and it says : Because of the way notangle extracts and assembles its input, the program can be presented and explained in the best order for human understanding. notangle will make sure that the program chunks are in the right…
user2338823
  • 501
  • 1
  • 3
  • 16
0
votes
0 answers

How to pass "shell-escape" option to LaTeX when building the vignette of an R package?

I am currently writing a vignette for an R package (in a quite complicated workflow, since the vignette is primarily written in Org-mode and then translated in .Rnw... okay, I'm not taking the easy way). So the vignette is basically made from a .Rnw…
Philopolis
  • 515
  • 4
  • 13
0
votes
2 answers

Ignoring noweb syntax in html export

I have an org doc that contains: #+BEGIN_SRC org ,#+BEGIN_SRC sh curl -XPOST 'localhost:9200/thing/doc/1' -d'{"body": "foo"}' curl -XPOST 'localhost:9200/thing/doc/2' -d'{"body": "bar"}' <> ,#+END_SRC #+END_SRC And I'd like to…
Lee H
  • 5,147
  • 4
  • 19
  • 22
0
votes
1 answer

How to quote an Rscript call?

My goal is to call Rscript from an .Rnw file via SweavePDF, set up as follows: (add-hook 'Rnw-mode-hook (lambda () (add-to-list 'TeX-command-list '("SweavePDF" "Rscript -e 'patchDVI::SweavePDF('%t', encoding='utf8')'" …
Marius Hofert
  • 6,546
  • 10
  • 48
  • 102
1 2
3