<?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="definemargindata" level="style" category="structure" file="typo-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmargindata"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmargindata" level="style" category="structure" file="typo-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="strut">
                    <cd:resolve name="value-strut"/>
                </cd:parameter>
                <cd:parameter name="command">
                    <cd:constant type="cd:oneargument"/>
                </cd:parameter>
                <cd:parameter name="width">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="align">
                    <cd:inherit name="setupalign"/>
                </cd:parameter>
                <cd:parameter name="anchor">
                    <cd:constant type="region"/>
                    <cd:constant type="text" default="yes"/>
                </cd:parameter>
                <cd:parameter name="location">
                    <cd:constant type="left" default="yes"/>
                    <cd:constant type="right"/>
                    <cd:constant type="inner"/>
                    <cd:constant type="outer"/>
                </cd:parameter>
                <cd:parameter name="method">
                    <cd:constant type="top"/>
                    <cd:constant type="line"/>
                    <cd:constant type="first"/>
                    <cd:constant type="depth"/>
                    <cd:constant type="height"/>
                </cd:parameter>
                <cd:parameter name="category">
                    <cd:constant type="default"/>
                    <cd:constant type="edge"/>
                </cd:parameter>
                <!--
                    <cd:parameter name="name">
                        <cd:constant type="???"/>
                    </cd:parameter>
                -->
                <cd:parameter name="scope">
                    <cd:constant type="local"/>
                    <cd:constant type="global"/>
                </cd:parameter>
                <cd:parameter name="option">
                    <cd:constant type="text"/>
                    <cd:constant type="paragraph"/>
                </cd:parameter>
                <cd:parameter name="margin">
                    <cd:constant type="local"/>
                    <cd:constant type="normal" default="yes"/>
                    <cd:constant type="margin"/>
                    <cd:constant type="edge"/>
                </cd:parameter>
                <cd:parameter name="distance">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="hoffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="voffset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="dy">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="bottomspace">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="threshold">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="line">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="stack">
                    <cd:constant type="yes"/>
                    <cd:constant type="continue"/>
                </cd:parameter>
                <cd:parameter name="style">
                    <cd:resolve name="value-style"/>
                </cd:parameter>
                <cd:parameter name="color">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <!--

        <cd:command name="definemarginframed" level="system" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:resolve name="keyword-name"/>
                <cd:resolve name="keyword-name-optional"/>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
            </cd:arguments>
        </cd:command>

    -->

    <cd:command name="setupmarginframed" level="style" category="structure" file="typo-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:inherit name="setupframed"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="margindata" generated="yes" variant="instance" level="document" category="structure" file="typo-mar.mkiv">
        <cd:sequence>
            <cd:instance value="margindata"/>
        </cd:sequence>
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:parameter name="reference">
                    <cd:constant type="cd:reference"/>
                </cd:parameter>
                <cd:inherit name="setupmargindata"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmarginframed"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
        <cd:instances>
            <cd:resolve name="instance-margindata"/>
        </cd:instances>
    </cd:command>

    <cd:command name="margindata" level="document" category="structure" file="typo-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes" optional="yes">
                <cd:parameter name="reference">
                    <cd:constant type="cd:reference"/>
                </cd:parameter>
                <cd:inherit name="setupmargindata"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmarginframed"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <!--

        <cd:command name="inleftmargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inrightmargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inoutermargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="ininnermargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inleftedge" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inrightedge" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="ininneredge" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inouteredge" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="atleftmargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="atrightmargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inleft" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inright" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="ininner" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inouter" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inmargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inother" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="margintext" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="marginword" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="margintitle" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

        <cd:command name="inothermargin" level="document" category="structure" file="typo-mar.mkiv">
            <cd:arguments>
                <cd:assignments list="yes" optional="yes">
                    <cd:parameter name="reference">
                        <cd:constant type="cd:reference"/>
                    </cd:parameter>
                    <cd:inherit name="setupmargindata"/>
                </cd:assignments>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupmarginframed"/>
                </cd:assignments>
                <cd:content/>
            </cd:arguments>
        </cd:command>

    -->

</cd:interface>