{% if gcode.category contains 'in-review' %} {% alert info %}This page is marked for review. The following information may be outdated or incorrect.{% endalert %} {% elsif gcode.category contains 'wip' %} {% alert info %}This page is under construction and may not have complete or up-to-date information.{% endalert %} {% endif %}
{% assign matter = gcode %}{% include authors.html %}

{{ gcode.codes | codes_desc }} - {{ gcode.title }}

{% if gcode.experimental %} {% endif %} {% if gcode.since %} {{ gcode.since }} {% endif %} {% if gcode.group %} {{ gcode.group }} {% endif %} {% if gcode.brief %} {{gcode.brief}} {% endif %} {% if gcode.requires %} {% assign list = (gcode.requires | split: ',') %} {% for item in list %} {{item}} {% endfor %} {% endif %}
{% if gcode.related %} {% endif %}

Description

{% if page.content %}{{ page.content | markdownify }}{% endif %}
{% if gcode.notes %}

Notes

{% for line in gcode.notes %}{{ line | markdownify }}{% endfor %}
{% endif %} {% if gcode.devnotes %}

Developer Notes

{% for line in gcode.devnotes %}{{ line | markdownify }}{% endfor %}
{% endif %} {% if gcode.pagetype != 'toc' %}

Usage

{% for code in gcode.codes %}
{{ code }} {% if gcode.parameters %} {% assign list = ('' | split: '|') %} {% for parm in gcode.parameters %} {% if parm.tag %}{% assign list = list | push: parm %}{% endif %} {% endfor %} {% if list.size > 0 %} {% assign list = (list | sort: 'tag') %} {% for parm in list -%} {%- if parm.optional %}[{% endif -%} {{- parm.tag -}} {%- if parm.values.size > 0 -%} {%- if parm.values.size == 1 -%} {%- assign pv = parm.values[0] -%} {%- if pv.type != 'flag' -%} {%- if pv.optional %}[{% else -%}<{%- endif -%} {%- if pv.tag -%} {{ pv.tag }}{%- if pv.unit -%} ({{ pv.unit }}){%- endif -%} {%- elsif pv.unit -%} {{ pv.unit }} {%- elsif pv.type -%} {{ pv.type }} {%- else -%} Unknown {%- endif -%} {%- if pv.optional %}]{% else -%}>{%- endif -%} {%- endif -%} {%- else -%} < {%- for pv in parm.values -%} {{- pv.tag -}} {%- if forloop.last != true %}|{% endif -%} {%- endfor -%} > {%- endif -%} {%- endif -%} {%- if parm.optional -%}]{% endif -%} {% endfor %} {% endif %} {% endif %}
{% endfor %}
{% endif %} {% if gcode.parameters %} {% assign list = ('' | split: '|') %} {% for parm in gcode.parameters %}{% if parm.tag %}{% assign list = list | push: parm %}{% endif %}{% endfor %} {% if list.size > 0 %}

Parameters

{% assign list = (list | sort: 'tag') %} {% for parm in list %} {%- endfor -%}
{%- if parm.experimental %} {% endif -%} {%- if parm.optional %}[{% endif -%} {{ parm.tag }} {%- if parm.values.size > 0 -%} {%- if parm.values.size == 1 -%} {%- assign pv = parm.values[0] -%} {%- if pv.type != 'flag' -%} {%- if pv.optional -%}[{%- else -%}<{%- endif -%} {%- if pv.tag -%} {{- pv.tag }}{%- if pv.unit -%}({{ pv.unit }}){%- endif -%} {%- elsif pv.unit -%} {{- pv.unit -}} {%- elsif pv.type -%} {{- pv.type -}} {%- else -%} Unknown {%- endif -%} {%- if pv.optional -%}]{%- else -%}>{%- endif -%} {%- endif -%} {%- else -%} < {%- for pv in parm.values -%} {{ pv.tag }} {%- if forloop.last != true -%}|{%- endif -%} {%- endfor -%} > {%- endif -%} {%- endif -%} {%- if parm.optional %}]{% endif -%} {%- if parm.since %}
{{ parm.since }}
{% endif -%} {%- if parm.requires %}{% assign list = (parm.requires | split: ',') -%}
{%- for item in list %}{{item}}{% endfor -%}
{%- endif -%}
{{- parm.description | markdownify -}} {%- if parm.values.size > 0 %}
    {%- for pv in parm.values -%} {%- if pv.description -%}
  • {%- if pv.since %} {{ pv.since }}{% endif %} {{ parm.tag }}{{ pv.tag }}: {{ pv.description | markdownify -}}
  • {%- endif -%} {%- endfor -%}
{%- endif -%}
{% endif %} {%- endif %} {% if gcode.images %} {% endif %} {% if gcode.videos %}

Related Media

{% for videoid in gcode.videos %} {% endfor %}
{% endif %} {% if gcode.examples %}{% assign ex = gcode.examples %} {% elsif gcode.example %}{% assign ex = gcode.example %} {% else %}{% assign ex = false %}{% endif %} {% if ex -%}

Example{% if ex[1] %}s{% endif %}

{%- for item in ex -%} {% if item.since %} {{ item.since }} {% endif %} {%- if item.pre -%} {%- for line in item.pre -%}{{ line | markdownify }}{%- endfor -%} {%- endif -%} {%- highlight gcode -%}{% for line in item.code %}{{ line }} {% endfor %}{% endhighlight -%} {%- if item.post -%}
{%- for line in item.post -%}{{ line | markdownify }}{%- endfor -%}
{%- endif -%} {%- endfor -%}
{%- endif %}