[docutils:feature-requests] #44 Add :figname: option to the figure directive

Günter Milde via Docutils-develop <[email protected]> Fri, 30 Aug 2024 12:08:33 -0000
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/feature-requests/44/58ee00eb91d84581e4dee73f643c8b576a1b98bc.feature-requests@docutils.p.sourceforge.net>
- **status**: open --> open-remind
- **Comment**:

The rST syntax for internal [hyperlink targets](https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets) applies a "name/label" to the following element. 

It can be used to name a figure element:
~~~
.. _figure-label:

.. figure:: myfile.png
   :name: imagelabel

   Figure caption.
~~~
creates the HTML snippet:
~~~
<figure id="figure-label">
<img alt="myfile.png" id="imagelabel" src="myfile.png" />
<figcaption>
<p>Figure caption.</p>
</figcaption>
</figure>
~~~

A "figname" directive option would provide an alternative way to name a figure element:

-1 There should be one-- and preferably only one --obvious way to do it.
+1 consistent with the "name" and "figclass" directive options.

So, the jury is still out what is the better choice. Input welcome.



---

**[feature-requests:#44] Add :figname: option to the figure directive**

**Status:** open-remind
**Group:** Default
**Created:** Wed Mar 11, 2015 03:25 PM UTC by Jellby
**Last Updated:** Wed Mar 11, 2015 03:25 PM UTC
**Owner:** nobody


As suggested in https://sourceforge.net/p/docutils/bugs/274/, I fill a feature request for a :figname: option to figure, so I can add a name to a figure and not to the image inside.


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/feature-requests/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.