<?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="definemathcases" level="style" category="mathematics" keywords="alignment" 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="setupmathcases"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmathcases" level="style" category="mathematics" keywords="alignment" 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" default="yes"/>
                    <cd:constant type="no"/>
                </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="numberdistance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <!--
                    <cd:parameter name="action">
                        <cd:constant type="..."/>
                    </cd:parameter>
                -->
                <cd:parameter name="simplecommand">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="lefttext">
                    <cd:constant type="cd:text"/>
                </cd:parameter>
                <cd:parameter name="righttext">
                    <cd:constant type="cd:text"/>
                </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="spaceinbetween">
                    <cd:inherit name="setupwhitespace"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

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

</cd:interface>
