@@ -189,6 +189,39 @@ pub struct FigureElem {
189189 /// supplement: [Atom],
190190 /// )
191191 /// ```
192+ ///
193+ /// If you want to modify a counter to skip a number or reset the counter,
194+ /// you can access the [counter] of each kind of figure with a
195+ /// [`where`]($function.where) selector:
196+ ///
197+ /// - For [tables]($table): `{counter(figure.where(kind: table))}`
198+ /// - For [images]($image): `{counter(figure.where(kind: image))}`
199+ /// - For a custom kind: `{counter(figure.where(kind: kind))}`
200+ ///
201+ /// ```example
202+ /// #figure(
203+ /// table(columns: 2, $n$, $1$),
204+ /// caption: [The first table.],
205+ /// )
206+ ///
207+ /// #counter(
208+ /// figure.where(kind: table)
209+ /// ).update(41)
210+ ///
211+ /// #figure(
212+ /// table(columns: 2, $n$, $42$),
213+ /// caption: [The 42nd table],
214+ /// )
215+ ///
216+ /// #figure(
217+ /// rect[Image],
218+ /// caption: [Does not affect images],
219+ /// )
220+ /// ```
221+ ///
222+ /// To conveniently use the correct counter in a show rule, you can access
223+ /// the `counter` field. There is an example of this in the documentation
224+ /// [of the `figure.caption` element's `body` field]($figure.caption.body).
192225 pub kind : Smart < FigureKind > ,
193226
194227 /// The figure's supplement.
@@ -228,8 +261,8 @@ pub struct FigureElem {
228261 /// Convenience field to get access to the counter for this figure.
229262 ///
230263 /// The counter only depends on the `kind`:
231- /// - For (tables)[@table] : `{counter(figure.where(kind: table))}`
232- /// - For (images)[@image] : `{counter(figure.where(kind: image))}`
264+ /// - For [tables]($table) : `{counter(figure.where(kind: table))}`
265+ /// - For [images]($image) : `{counter(figure.where(kind: image))}`
233266 /// - For a custom kind: `{counter(figure.where(kind: kind))}`
234267 ///
235268 /// These are the counters you'll need to modify if you want to skip a
0 commit comments