[docutils:patches] #170 Patch proposal to parsers/rst/directives/images.py
Günter Milde via Docutils-develop <[email protected]> Wed, 19 Feb 2025 20:38:58 -0000
| Newsgroups | gmane.text.docutils.devel |
|---|---|
| Message-ID | </p/docutils/patches/170/cd07fdfee493edcda0c0544c24d4dce6530cd4cf.patches@docutils.p.sourceforge.net> |
- **status**: pending-remind --> closed-rejected
- **Comment**:
The use-case is too special to merit an additional option for the "image" directive and an additional attribute for the ´<image>` Doctree element.
We may help if you are interested implementing it in a custom parser and writer.
Thank you for sharing your idea.
---
**[patches:#170] Patch proposal to parsers/rst/directives/images.py**
**Status:** closed-rejected
**Group:** None
**Created:** Mon Aug 24, 2020 02:55 PM UTC by Fernando Libonati
**Last Updated:** Wed Aug 26, 2020 09:33 AM UTC
**Owner:** nobody
**Attachments:**
- [images.patch](https://sourceforge.net/p/docutils/patches/170/attachment/images.patch) (988 Bytes; application/octet-stream)
There Docutils' team, I want to propose a patch to add a new "ascii" option to the image directive, to replace a "not-found" image file with an "ascii-art" image. This could be useful for make the documentation clearer, when using the image or figure directives, adding an 'ascii-art' representation of the final image.
Example of a docstring for a Cython extensión class, the :ascii: option could include any ascii-art version of the final image.
"""
.. code:: python
b = module.Math2d(name: str, function: str)
.. _fig_NonLinear_Math2d:
.. figure:: ./images/Math2d.png
:align: center
:alt: Non-Linear / Math2d block
:ascii:
Math2d
+---------+
> X |
| f(X,Y)>
> Y |
+---------+
Non-Linear / Math2d
Properties:
- function: name of the function (read-only)
.. warning::
This block does not accept initial conditions propagation (yet).
"""
If the "./images/Math2d.png" is not available, it will be replaced with the text version of the image, that is not all, but something.
---
Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/patches/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.