Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better syntax for images linked to external URLs #1638

Closed
jcea opened this Issue Mar 20, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@jcea
Copy link

jcea commented Mar 20, 2015

After using #1536 I noticed something ugly.
#1536 allows me to translate:

|logo|_

.. |logo| image:: logo.png
    :alt: Logo de la Asociación Python España
    :height: 250

.. _logo: http://www.es.python.org/

To something more intuitive:

.. class:: islink

.. image:: logo.png
   :alt: Logo de la Asociación Python España
   :height: 250
   :target: PythonES_

.. _PythonES: http://www.es.python.org/

That is a nice improvement.

But I would love to move the class statement inside the image details. Something like:

.. image:: logo.png
   :class: islink
   :alt: Logo de la Asociación Python España
   :height: 250
   :target: PythonES_

.. _PythonES: http://www.es.python.org/
@ralsina

This comment has been minimized.

Copy link
Member

ralsina commented Mar 20, 2015

Sadly the image directive doesn't seem to support a class option:

http://docutils.sourceforge.net/docs/ref/rst/directives.html#image

We could monkeypatch this, but it would make our restructured text gratuitously incompatible with docutils...

@ralsina

This comment has been minimized.

Copy link
Member

ralsina commented Apr 24, 2015

@ralsina ralsina closed this Apr 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.