UNPKG

myst-spec

Version:

MyST schema, testcases, and typescript types

126 lines (118 loc) 3.13 kB
cases: - title: Invalid equation reference mdast: type: root children: - type: paragraph children: - type: text value: 'see ' - type: mystRole name: eq value: ' matrix ' children: - type: crossReference kind: eq identifier: matrix label: ' matrix ' - type: mystDirective name: figure args: fig.jpg options: name: matrix value: Cool caption! children: - type: container kind: figure identifier: matrix label: matrix children: - type: image url: fig.jpg - type: caption children: - type: paragraph children: - type: text value: Cool caption! myst: |- see {eq}` matrix ` ```{figure} fig.jpg :name: matrix Cool caption! ``` html: |- <p>see <span class="reference role unhandled"><code class="kind">{eq}</code><code>matrix</code></span></p> <figure id="matrix" class="numbered"> <img src="fig.jpg"> <figcaption> <p><span class="caption-number">Figure 1</span>Cool caption!</p> </figcaption> </figure> - title: Default equation reference mdast: type: root children: - type: paragraph children: - type: text value: 'see ' - type: mystRole name: eq value: matrix children: - type: crossReference kind: eq identifier: matrix label: matrix - type: mystDirective name: math options: label: matrix value: Ax = b children: - type: math identifier: matrix label: matrix value: |- Ax = b myst: |- see {eq}`matrix` ```{math} :label: matrix Ax = b ``` html: |- <p>see <a href="#matrix">(1)</a></p> <div id="matrix" class="math-display">Ax = b</div> - title: Link-style equation reference mdast: type: root children: - type: paragraph children: - type: text value: 'see ' - type: link url: matrix children: [] - type: mystDirective name: math options: label: matrix value: Ax = b children: - type: math identifier: matrix label: matrix value: |- Ax = b myst: |- see [](matrix) ```{math} :label: matrix Ax = b ``` html: |- <p>see <a href="#matrix">(1)</a></p> <div id="matrix" class="math-display">Ax = b</div>