<macro-file>

The <macro-file> tag names an external macro library to load instead of writing all macros inline. It is most commonly used inside <pg-macros> so a <webwork> problem can reuse shared WeBWorK macro files.

List one filename per <macro-file> element, using a path your build can resolve.

Syntax

Attributes

This tag has no attributes.

Children

The following may appear as children: Text

Parents

This element may appear as an immediate child of the following elements: <pg-macros>

Examples

<exercise>
    <webwork>
        <pg-macros>
            <macro-file>PGstandard.pl</macro-file>
        </pg-macros>
        <statement>
            <p>Solve the equation <m>x + 3 = 7</m>.</p>
        </statement>
    </webwork>
</exercise>
<exercise>
    <webwork>
        <pg-macros>
            <macro-file>PGstandard.pl</macro-file>
            <macro-file>MathObjects.pl</macro-file>
        </pg-macros>
        <statement>
            <p>Evaluate <m>2+2</m>.</p>
        </statement>
    </webwork>
</exercise>