<?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="definesidebar" file="anch-bar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupsidebar"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupsidebar" file="anch-bar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <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="alternative">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="topoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="bottomoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="distance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="leftmargindistance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="level">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <!--

        <cd:command name="setupsidebars" file="anch-bar.mkiv">
            <cd:arguments>
                <cd:resolve name="keyword-name-list-optional"/>
                <cd:assignments list="yes">
                    <cd:inherit name="setupsidebar"/>
                </cd:assignments>
            </cd:arguments>
        </cd:command>

    -->

    <cd:command name="sidebar" type="environment" file="anch-bar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupsidebar"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmarginrule" file="anch-bar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-number-optional"/>
            <cd:assignments list="yes">
                <cd:inherit name="setupsidebar"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmarginrules" file="anch-bar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-number-optional"/>
            <cd:assignments list="yes">
                <cd:inherit name="setupmarginrule"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="marginrule" type="environment" file="anch-bar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-number-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="marginrule" type="environment" variant="assignment" file="anch-bar.mkiv">
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmarginrule"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

</cd:interface>
