Please read the following carefully if you plan to use cweb in Leo.
Cweb mode refers to how Leo tangles an outline when @language cweb is in effect or the cweb option in the Preferences Panel is in effect. Like noweb, cweb defines sections and uses section references. Cweb sections start with @<name@>= and cweb section references look like @<name@>
Warning: Please do not use cweb mode in @root trees until version 3.9. At present, Leo attempts to expand cweb sections, and that won't work at all unless you make major changes to the cweb code.
Leo treats cweb code in cweb mode as unevaluated text. That is, Leo treats cweb section definitions, section references, and the @c and @space directives as "raw" text within cweb mode. Leo does not expand cweb section references when writing derived files in cweb mode. However, Leo does expand noweb section references, so you may use noweb sections to organize cweb files! You can create noweb code and doc sections using the @code and @doc directives in place of @c and @space directives.
There are several advantages of this scheme:
This way of handling cweb mode applies to version 3.8 and all later versions. In version 3.9, Leo will handle cweb mode in @root trees in the same way. However, it will probably always be more convenient to use @file trees than @root trees in cweb mode.