UNPKG

7.33 kBYAMLView Raw
1cases:
2 - title: Simple figure
3 id: container
4 mdast:
5 type: root
6 children:
7 - type: mystDirective
8 name: figure
9 args: https://via.placeholder.com/150
10 value: |-
11 This is the figure caption!
12
13 Something! A legend!?
14 children:
15 - type: container
16 kind: figure
17 children:
18 - type: image
19 url: https://via.placeholder.com/150
20 - type: caption
21 children:
22 - type: paragraph
23 children:
24 - type: text
25 value: This is the figure caption!
26 - type: legend
27 children:
28 - type: paragraph
29 children:
30 - type: text
31 value: Something! A legend!?
32
33 myst: |-
34 ```{figure} https://via.placeholder.com/150
35 This is the figure caption!
36
37 Something! A legend!?
38 ```
39 html: |-
40 <figure class="numbered">
41 <img src="https://via.placeholder.com/150">
42 <figcaption>
43 <p>This is the figure caption!</p>
44 </figcaption>
45 <div class="legend">
46 <p>Something! A legend!?</p>
47 </div>
48 </figure>
49
50 - title: Named figure with a caption in a paragraph
51 mdast:
52 type: root
53 children:
54 - type: mystDirective
55 name: figure
56 args: https://via.placeholder.com/150
57 options:
58 name: myFigure
59 alt: Placeholder
60 value: This is the figure caption!
61 children:
62 - type: container
63 kind: figure
64 identifier: myfigure
65 label: myFigure
66 children:
67 - type: image
68 url: https://via.placeholder.com/150
69 alt: Placeholder
70 - type: caption
71 children:
72 - type: paragraph
73 children:
74 - type: text
75 value: This is the figure caption!
76 myst: |-
77 ```{figure} https://via.placeholder.com/150
78 :name: myFigure
79 :alt: Placeholder
80
81 This is the figure caption!
82 ```
83 html: |-
84 <figure id="myfigure" class="numbered">
85 <img src="https://via.placeholder.com/150" alt="Placeholder">
86 <figcaption>
87 <p><span class="caption-number">Figure 1</span>This is the figure caption!</p>
88 </figcaption>
89 </figure>
90 latex: |-
91 \begin{figure}[!htbp]
92 \centering
93 \includegraphics{https://via.placeholder.com/150}
94 \caption*{This is the figure caption!}
95 \label{fig:myFigure}
96 \end{figure}
97
98 - title: Named figure with a caption in a no alt
99 mdast:
100 type: root
101 children:
102 - type: mystDirective
103 name: figure
104 args: https://via.placeholder.com/150
105 options:
106 name: myFigure
107 value: This is the figure caption!
108 children:
109 - type: container
110 kind: figure
111 identifier: myfigure
112 label: myFigure
113 children:
114 - type: image
115 url: https://via.placeholder.com/150
116 - type: caption
117 children:
118 - type: paragraph
119 children:
120 - type: text
121 value: This is the figure caption!
122 myst: |-
123 ```{figure} https://via.placeholder.com/150
124 :name: myFigure
125
126 This is the figure caption!
127 ```
128 html: |-
129 <figure id="myfigure" class="numbered">
130 <img src="https://via.placeholder.com/150">
131 <figcaption>
132 <p><span class="caption-number">Figure 1</span>This is the figure caption!</p>
133 </figcaption>
134 </figure>
135
136 - title: Named figure with no space between options in directive
137 mdast:
138 type: root
139 children:
140 - type: mystDirective
141 name: figure
142 args: https://via.placeholder.com/150
143 options:
144 name: myFigure
145 value: This is the figure caption!
146 children:
147 - type: container
148 kind: figure
149 identifier: myfigure
150 label: myFigure
151 children:
152 - type: image
153 url: https://via.placeholder.com/150
154 - type: caption
155 children:
156 - type: paragraph
157 children:
158 - type: text
159 value: This is the figure caption!
160 myst: |-
161 ```{figure} https://via.placeholder.com/150
162 :name: myFigure
163 This is the figure caption!
164 ```
165 html: |-
166 <figure id="myfigure" class="numbered">
167 <img src="https://via.placeholder.com/150">
168 <figcaption>
169 <p><span class="caption-number">Figure 1</span>This is the figure caption!</p>
170 </figcaption>
171 </figure>
172
173 - title: Two figures
174 mdast:
175 type: root
176 children:
177 - type: mystDirective
178 name: figure
179 args: https://via.placeholder.com/150
180 options:
181 name: myFigure
182 value: This is the figure caption!
183 children:
184 - type: container
185 kind: figure
186 identifier: myfigure
187 label: myFigure
188 children:
189 - type: image
190 url: https://via.placeholder.com/150
191 - type: caption
192 children:
193 - type: paragraph
194 children:
195 - type: text
196 value: This is the figure caption!
197 - type: mystDirective
198 name: figure
199 args: https://via.placeholder.com/151
200 options:
201 name: myOtherFigure
202 value: This is another caption!
203 children:
204 - type: container
205 kind: figure
206 identifier: myotherfigure
207 label: myOtherFigure
208 children:
209 - type: image
210 url: https://via.placeholder.com/151
211 - type: caption
212 children:
213 - type: paragraph
214 children:
215 - type: text
216 value: This is another caption!
217 myst: |-
218 ```{figure} https://via.placeholder.com/150
219 :name: myFigure
220
221 This is the figure caption!
222 ```
223 ```{figure} https://via.placeholder.com/151
224 :name: myOtherFigure
225
226 This is another caption!
227 ```
228 html: |-
229 <figure id="myfigure" class="numbered">
230 <img src="https://via.placeholder.com/150">
231 <figcaption>
232 <p><span class="caption-number">Figure 1</span>This is the figure caption!</p>
233 </figcaption>
234 </figure>
235 <figure id="myotherfigure" class="numbered">
236 <img src="https://via.placeholder.com/151">
237 <figcaption>
238 <p><span class="caption-number">Figure 2</span>This is another caption!</p>
239 </figcaption>
240 </figure>