<?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="molecule" file="chem-ini.mkiv">
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="chem" file="chem-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
            <cd:resolve name="argument-text"/>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupchemical" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="strut">
                    <cd:inherit name="value-strut"/>
                </cd:parameter>
                <cd:parameter name="width">
                    <cd:constant type="fit" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="height">
                    <cd:constant type="fit" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="left">
                    <cd:constant type="fit" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="right">
                    <cd:constant type="fit" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="top">
                    <cd:constant type="fit" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="bottom">
                    <cd:constant type="fit" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="scale">
                    <cd:constant type="small"/>
                    <cd:constant type="medium"/>
                    <cd:constant type="big"/>
                    <cd:constant type="normal" default="yes"/>
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="rotation">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="symalign">
                    <cd:constant type="auto" default="yes"/>
                </cd:parameter>
                <cd:parameter name="axis">
                    <cd:constant type="on"/>
                    <cd:constant type="off" default="yes"/>
                </cd:parameter>
                <cd:parameter name="framecolor">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:parameter name="rulethickness">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="offset">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="unit">
                    <cd:constant type="cd:dimension"/>
                </cd:parameter>
                <cd:parameter name="factor">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="frame">
                    <cd:constant type="on"/>
                    <cd:constant type="off"/>
                </cd:parameter>
                <cd:parameter name="rulecolor">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:parameter name="bodyfont">
                    <cd:inherit name="setupbodyfont"/>
                </cd:parameter>
                <cd:parameter name="size">
                    <cd:constant type="small"/>
                    <cd:constant type="medium" default="yes"/>
                    <cd:constant type="big"/>
                </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="setupchemicals" file="chem-str.mkiv">
            <cd:arguments>
                <cd:resolve name="keyword-name-list-optional"/>
                <cd:assignments list="yes">
                    <cd:inherit name="setupchemical"/>
                </cd:assignments>
            </cd:arguments>
        </cd:command>

    -->

    <cd:command name="setupchemicalframed" file="chem-str.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="definechemical" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definechemicalsymbol" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="chemicalsymbol" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="chemicaltext" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="chemical" type="environment" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupchemical"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <!--

        <cd:command name="structurechemical" type="environment" file="chem-str.mkiv">
            <cd:arguments>
                <cd:resolve name="keyword-name-optional"/>
                <cd:assignments list="yes" optional="yes">
                    <cd:inherit name="setupchemical"/>
                </cd:assignments>
            </cd:arguments>
        </cd:command>

    -->

    <cd:command name="chemical" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
            <cd:resolve name="keyword-text-list"/>
            <cd:resolve name="keyword-text-list-optional"/>
        </cd:arguments>
    </cd:command>

    <!--

        <cd:command name="structurechemical" file="chem-str.mkiv">
            <cd:arguments>
                <cd:resolve name="keyword-name-optional"/>
                <cd:resolve name="keyword-text-list"/>
                <cd:resolve name="keyword-text-list-optional"/>
            </cd:arguments>
        </cd:command>

    -->

    <cd:command name="chemicaltoptext" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="chemicalbottext" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="chemicalmidtext" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <!--

        <cd:command name="toptext" file="chem-str.mkiv">
            <cd:arguments>
                <cd:resolve name="argument-text"/>
            </cd:arguments>
        </cd:command>

        <cd:command name="bottext" file="chem-str.mkiv">
            <cd:arguments>
                <cd:resolve name="argument-text"/>
            </cd:arguments>
        </cd:command>

        <cd:command name="midtext" file="chem-str.mkiv">
            <cd:arguments>
                <cd:resolve name="argument-text"/>
            </cd:arguments>
        </cd:command>

    -->

    <cd:command name="definechemicals" file="chem-str.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupchemical"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

</cd:interface>
