On Aug 7, 9:33 am, Pat LeSmithe <[email protected]> wrote:
> John H Palmieri wrote:
> > So for notebook introspection, we need to replace the old path with
> > the appropriate URL; then the issue is that the images may get renamed
> > when the docs are built. For example, I was imagining that the
> > "pictures" directory would have subdirectories, for example, one from
> > each Sage module. If there are files "pictures/homology/simplex.png"
> > and "pictures/geometry/simplex.png", each used in docstrings somewhere
> > in the Sage library, then these would be copied to something like
> > "reference/_images/simplex.png" and "reference/_images/simplex1.png",
>
> What if we searched for and saved all of the image directives before
> running Sphinx and inserted the correct paths afterward? We could
> verify that the file base names agree on some metric.
That's a good idea. I'm still worried that a few people might use
names like "pic1.png", "pic2.png", etc., and then working out which
one is which could be annoying. Another idea: maybe as part of
building the reference manual, create a symlink from doc/en/reference/
pictures to doc/output/html/en/pictures. Then we can easily access
the images: just change
../../pictures/...path.../blah.png (or /pictures/...path.../
blah.png, which would also be a valid way to specify the file)
to
http://localhost:8000/doc/static/pictures/...path.../blah.png
This is an easy regular expression operation.
> Alternatively, we could extract a path from the "**File:**" field
> inserted by server.support.docstring() or source_code(). But this could
> make it difficult to include images from other modules.
>
> With custom Sphinx directives, we could do the same for, e.g., movies
> and PDF files. It might take a "bit" more work to insert interactive
> output.
>
> Is there an open ticket for this topic?
There is now: <http://trac.sagemath.org/sage_trac/ticket/6685>
John
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---