<?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="setupboxanchor" file="pack-box.mkxl">
        <cd:arguments>
            <cd:assignments list="yes">
                <cd:parameter name="xoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="yoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="target">
                    <cd:resolve name="value-boxpreset"/>
                </cd:parameter>
                <cd:parameter name="source">
                    <cd:resolve name="value-boxpreset"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="defineanchorbox" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="defineanchorboxoverlay" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="namedanchorbox" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="overlayanchorbox" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setanchorbox" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupboxanchor"/>
            </cd:assignments>
            <cd:csname/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="boxanchorpresetcode" file="pack-box.mkxl">
        <cd:arguments>
            <cd:keywords delimiters="braces">
                <cd:resolve name="value-boxpreset"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="boxanchoring" type="environment" file="pack-box.mkxl">
        <cd:arguments>
            <cd:keywords>
                <cd:constant type="+"/>
                <cd:constant type="cd:name"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="registerboxanchor" file="pack-box.mkxl"/>

    <cd:command name="defineboxanchor" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifnotanchorbox" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="namedboxanchor" file="pack-box.mkxl">
        <cd:arguments>
            <cd:keywords delimiters="braces">
                <cd:constant type="cd:name"/>
                <cd:constant type="cd:number"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="namespacedboxanchor" file="pack-box.mkxl">
        <cd:arguments>
            <cd:keywords delimiters="braces">
                <cd:constant type="cd:name"/>
                <cd:constant type="cd:number"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupboxanchorcontent" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="xoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="yoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="corner">
                    <cd:resolve name="value-boxpreset"/>
                </cd:parameter>
                <cd:parameter name="location">
                    <cd:resolve name="value-boxpreset"/>
                </cd:parameter>
                <cd:parameter name="distance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="dash">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="arrow">
                    <cd:constant type="yes"/>
                    <cd:constant type="no"/>
                    <cd:constant type="reverse"/>
                    <cd:constant type="both"/>
                </cd:parameter>
                <cd:parameter name="alternative">
                    <cd:constant type="left"/>
                    <cd:constant type="middle"/>
                    <cd:constant type="right"/>
                    <cd:constant type="top"/>
                    <cd:constant type="bottom"/>
                </cd:parameter>
                <cd:parameter name="text">
                    <cd:constant type="cd:text"/>
                </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="mp">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="page">
                    <cd:constant type="yes"/>
                    <cd:constant type="no" default="yes"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="defineboxanchorcontent" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupboxanchorcontent"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setboxanchor" file="pack-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupboxanchorcontent"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="mathrowanchored" file="pack-box.mkxl">
        <cd:arguments>
            <cd:keywords delimiters="braces">
                <cd:constant type="cd:name"/>
                <cd:constant type="cd:number"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="mathcellanchored" file="pack-box.mkxl">
        <cd:arguments>
            <cd:keywords delimiters="braces">
                <cd:constant type="cd:name"/>
                <cd:constant type="cd:number"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="mathboxanchored" file="pack-box.mkxl">
        <cd:arguments>
            <cd:keywords optional="yes">
                <cd:constant type="nucleus"/>
            </cd:keywords>
            <cd:resolve name="argument-text"/>
            <cd:keywords delimiters="braces">
                <cd:constant type="cd:name"/>
                <cd:constant type="cd:number"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="connectboxanchors" file="anch-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupboxanchorcontent"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupboxanchorcontent"/>
            </cd:assignments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="connectmatrixanchors" file="anch-box.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupboxanchorcontent"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupboxanchorcontent"/>
            </cd:assignments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="matrixanchors" type="environment" file="anch-box.mkxl"/>

</cd:interface>
