<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="definemathmatrix" level="style" category="mathematics" keywords="tables" file="math-ali.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmathmatrix"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmathmatrix" level="style" category="mathematics" keywords="tables" file="math-ali.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="left">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="right">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="strut">
                    <cd:constant type="yes"/>
                    <cd:constant type="no"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="align">
                    <cd:constant type="left"/>
                    <cd:constant type="middle" default="yes"/>
                    <cd:constant type="right"/>
                    <cd:constant type="flushleft"/>
                    <cd:constant type="flushright"/>
                    <cd:constant type="normal"/>
                    <cd:constant type="auto"/>
                    <cd:constant type="left" prefix="cd:number" method="range"/>
                    <cd:constant type="middle" prefix="cd:number" method="range"/>
                    <cd:constant type="right" prefix="cd:number" method="range"/>
                    <cd:constant type="flushleft" prefix="cd:number" method="range"/>
                    <cd:constant type="flushright" prefix="cd:number" method="range"/>
                </cd:parameter>
                <cd:parameter name="mathstyle">
                    <cd:resolve name="value-mathstyle"/>
                </cd:parameter>
                <cd:parameter name="distance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="simplecommand">
                    <cd:constant type="cd:text"/>
                </cd:parameter>
                <cd:parameter name="location">
                    <cd:constant type="top"/>
                    <cd:constant type="bottom"/>
                    <cd:constant type="high"/>
                    <cd:constant type="low"/>
                    <cd:constant type="lohi"/>
                    <cd:constant type="center"/>
                    <cd:constant type="normal" default="yes"/>
                </cd:parameter>
                <cd:parameter name="rulethickness">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="rulecolor">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:parameter name="moffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="toffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="boffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="leftmargin">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="rightmargin">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="fences">
                    <cd:resolve name="value-mathfence"/>
                </cd:parameter>
                <cd:parameter name="leftedge">
                    <cd:constant type="none"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="rightedge">
                    <cd:constant type="none"/>
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="mathmatrix" type="environment" generated="yes" variant="instance" level="document" category="mathematics" keywords="tables" file="math-ali.mkxl">
        <cd:sequence>
            <cd:instance value="mathmatrix"/>
        </cd:sequence>
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmathmatrix"/>
            </cd:assignments>
        </cd:arguments>
        <cd:instances>
            <cd:resolve name="instance-mathmatrix"/>
        </cd:instances>
    </cd:command>

    <cd:command name="mathmatrix" generated="yes" variant="instance" level="document" category="mathematics" keywords="tables" file="math-ali.mkxl">
        <cd:sequence>
            <cd:instance value="mathmatrix"/>
        </cd:sequence>
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmathmatrix"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
        <cd:instances>
            <cd:resolve name="instance-simplematrix"/>
        </cd:instances>
    </cd:command>

    <cd:command name="matrices" type="environment" level="document" category="mathematics" keywords="tables" file="math-ali.mkxl">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmathmatrix"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="namedmatrix" type="environment" level="document" category="mathematics" keywords="tables" file="math-ali.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmathmatrix"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setmathmatrixanchoring" level="document" category="mathematics" keywords="tables" file="math-ali.mkxl">
        <cd:arguments>
            <cd:keywords>
                <cd:constant type="yes"/>
                <cd:constant type="both"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="intertext" type="environment" level="document" category="mathematics" file="math-ali.mkxl"/>

    <cd:command name="intertext" level="document" category="mathematics" file="math-ali.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="substack" type="environment" level="document" category="mathematics" file="math-ali.mkxl"/>

    <cd:command name="overset" level="document" category="mathematics" file="math-ali.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="underset" level="document" category="mathematics" file="math-ali.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="bordermatrix" level="document" category="mathematics" keywords="tables" file="math-pln.mkxl">
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="bbordermatrix" level="document" category="mathematics" keywords="tables" file="math-pln.mkxl">
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="bordermatrix" type="environment" level="document" category="mathematics" keywords="tables" file="math-pln.mkxl"/>

    <cd:command name="bbordermatrix" type="environment" level="document" category="mathematics" keywords="tables" file="math-pln.mkxl"/>

    <cd:command name="graphicline" file="node-rul.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords list="yes" optional="yes">
                <cd:constant type="s"/>
                <cd:constant type="m"/>
                <cd:constant type="a"/>
                <cd:constant type="x"/>
                <cd:constant type="h"/>
                <cd:constant type="d"/>
                <cd:constant type="o"/>
                <cd:constant type="e"/>
                <cd:constant type="c"/>
                <cd:constant type="r"/>
                <cd:constant type="t"/>
                <cd:constant type="b"/>
                <cd:constant type="T"/>
                <cd:constant type="B"/>
                <cd:constant type="cd:dimension"/>
                <cd:constant type="cd:number"/>
                <cd:constant type="cd:color"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

</cd:interface>
