<?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="digits" level="document" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-number"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="digits" variant="string" level="document" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:resolve name="string-number"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="defineunit" level="style" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupunit"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupunit" level="style" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:resolve name="keyword-name-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="method">
                    <cd:constant type="1"/>
                    <cd:constant type="2"/>
                    <cd:constant type="3"/>
                    <cd:constant type="4"/>
                    <cd:constant type="5"/>
                    <cd:constant type="6"/>
                </cd:parameter>
                <cd:parameter name="language">
                    <cd:constant type="cd:language"/>
                </cd:parameter>
                <cd:parameter name="alternative">
                    <cd:constant type="text"/>
                    <cd:constant type="mathematics"/>
                </cd:parameter>
                <cd:parameter name="order">
                    <cd:constant type="reverse"/>
                    <cd:constant type="normal" default="yes"/>
                </cd:parameter>
                <cd:parameter name="separator">
                    <cd:constant type="small"/>
                    <cd:constant type="medium"/>
                    <cd:constant type="big"/>
                    <cd:constant type="normal" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="space">
                    <cd:constant type="small"/>
                    <cd:constant type="medium"/>
                    <cd:constant type="big"/>
                    <cd:constant type="normal" default="yes"/>
                    <cd:constant type="none"/>
                    <cd:constant type="cd:name"/>
                </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:parameter name="option">
                    <cd:constant type="keep"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="unit" generated="yes" variant="instance" level="document" category="symbols" file="phys-dim.mkxl">
        <cd:sequence>
            <cd:instance value="unit"/>
        </cd:sequence>
        <cd:arguments>
            <cd:content/>
        </cd:arguments>
        <cd:instances>
            <cd:resolve name="instance-unit"/>
        </cd:instances>
    </cd:command>

    <cd:command name="installunitsseparator" level="system" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-command"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="installunitsspace" level="system" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-command"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="registerunit" level="style" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:keywords optional="yes">
                <cd:constant type="prefix"/>
                <cd:constant type="unit" default="yes"/>
                <cd:constant type="operator"/>
                <cd:constant type="suffix"/>
                <cd:constant type="symbol"/>
                <cd:constant type="packaged"/>
            </cd:keywords>
            <cd:resolve name="assignment-userdata-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="registerunitshortcut" level="style" category="symbols" file="phys-dim.mkxl">
        <cd:arguments>
            <cd:keywords optional="yes">
                <cd:constant type="prefix"/>
                <cd:constant type="unit" default="yes"/>
                <cd:constant type="operator"/>
                <cd:constant type="suffix"/>
                <cd:constant type="symbol"/>
                <cd:constant type="packaged"/>
            </cd:keywords>
            <cd:resolve name="assignment-userdata-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="spaceddigitsmethod" level="style" category="symbols" file="core-con.mkxl"/>   <!-- alternative methods   : 1 default, 2 and 3 only when > 4 -->

    <cd:command name="spaceddigitssymbol" level="style" category="symbols" file="core-con.mkxl"/>   <!-- extra splitter symbol : {,} -->

    <cd:command name="spaceddigitsseparator" level="style" category="symbols" file="core-con.mkxl"/><!-- separator symbol      : {\Uchar{"2008}} -->

    <cd:command name="spaceddigits" level="document" category="symbols" file="core-con.mkxl">
        <cd:arguments>
            <cd:resolve name="argument-number"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="lastunitstring" level="document" category="symbols" file="phys-dim.lmt"/>

</cd:interface>
