Log in Help
Print
Homegatewikicowtestunitgateyamresources 〉 yam-includes.html
 

Inclusion

Contents

A page can include another page like this:

%include(useTitle, yam-first.yam)

Becomes:

1. This is a title.

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(useTitle, yam-first.yam, yam-first.yam)

Becomes:

2. This is a title.

This, by way of contrast, is a paragraph.

This is another paragraph. It contains two lines.

3. This is a title.

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, useTitle, yam-first.yam)

Becomes:

3.1. YAM Heading Increments

3.2. A level 1 heading

3.2.1. A level 2 heading

3.2.1.1. A level 3 heading

3.3. 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).