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

Show absolute and relative (to the current file in Editor) images in Object inspector #2213

Closed
nicoguaro opened this issue Feb 28, 2015 · 6 comments

Comments

@nicoguaro
Copy link

First, congratulations for the excellent job done with spyder.

The Object inspector is really useful when you want to see the documentation of some functions. It would be really useful if one can show images (as sphinx does) in it.

@ccordoba12 ccordoba12 added this to the v2.4 milestone Feb 28, 2015
@ccordoba12
Copy link
Member

@blink1073 I think you solved this one in one of the last PRs merged on Bitbucket, right?

@blink1073
Copy link
Contributor

Yep, in this PR we added the ability to view images in the current directory. I'm pretty sure absolute paths to images always worked.

@nicoguaro
Copy link
Author

I just tried absolute paths to images. It worked for images from internet but not locally, at least in Windows. I tried different ways of giving the absolute path... but didn't succeed.

def absolute_path_test():
    r"""Test for image rendering in Object inspector.

    Math rendering

    .. math::
            \sin\left(\frac{1}{x}\right)

    This is an image from internet

    .. image:: https://upload.wikimedia.org/wikipedia/commons/d/d2/Sine_one_period.svg 

    This is a local file

    .. image:: D:/lena512.png    

    """

@blink1073
Copy link
Contributor

@nicoguaro, absolute paths must be URIs, in this case: file:///D:/lena512.png. See http://en.wikipedia.org/wiki/File_URI_scheme.

@nicoguaro
Copy link
Author

@blink1073, it works, thanks!! I couldn't find that information in the documentation of Sphinx, though :-/. I will be waiting for the option of relative paths then :).

@ccordoba12 ccordoba12 changed the title Images in Object inspector. Show absolute and relative (to the current file in Editor) images in Object inspector Mar 4, 2015
@ccordoba12
Copy link
Member

Ok, I think this is solved in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants