Log in Help
Print
Homegatewikicowtestunitgateyamresources 〉 yam-includes2.html
 

Inclusion

Contents

A page can include another page like this:

%include(yam-first.yam)

Becomes:

This, by way of contrast, is a paragraph.

This is another paragraph. It contains two lines.

An include directive can reference more than one file, e.g.

%include(yam-first.yam, yam-first.yam)

Becomes:

This, by way of contrast, is a paragraph.

This is another paragraph. It contains two lines.

This, by way of contrast, is a paragraph.

This is another paragraph. It contains two lines.

The first argument of an include directive can be an integer specifying an increment to add to the heading levels in the included file(s), e.g.:

%include(1, yam-first.yam)

Becomes:

0.1. A level 1 heading

0.1.1. A level 2 heading

0.1.1.1. A level 3 heading

0.2. A level 1 heading

Recursive includes are a bad idea:

%include(yam-includes.yam)

Will result in this file being included 1000 times (this is the include depth recursion limit).