You could probably solve this by ignoring the file with bad content, and
then in a new file, using two consecutive `.. include` directives -- one
with a `:end-before:` and the other with a `:start-after:`, after doing
some labeling before and after your RST section to be ignored.

http://docutils.sourceforge.net/docs/ref/rst/directives.html#including-an-external-document-fragment

Eric


On Fri, Oct 4, 2019 at 8:06 AM Jeff Larson <[email protected]> wrote:

> Is it possible to have Sphinx ignore part of index.rst when building the
> pdf with latexpdf?
>
> For example, my index.rst file contains (but does not begin with) the
> lines
>
> .. image:: https://img.shields.io/....
>   :target: https://pypi.org/....
>
> .. image::  https://travis-ci.org/....
>   :target: https://travis-ci.org/...
>
> .. image:: https://coveralls.io/repos/github/....
>   :target: https://coveralls.io/github/....
>
> .. image::  https://readthedocs.org/.....
>   :target: https://libensemble.readthedocs.org/....
>
> These should appear in the html that is built, but not in the PDF. I
> didn't see anything here:
> https://www.sphinx-doc.org/en/master/latex.html
>
> Is it possible to tell sphinx to ignore these lines?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sphinx-users/8cee07ff-5278-45a0-8504-0015f9971cfb%40googlegroups.com
> <https://groups.google.com/d/msgid/sphinx-users/8cee07ff-5278-45a0-8504-0015f9971cfb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/CAGu2niUcvs-SyuVsjFXFXDfiYCLW0QT8-iXUHCOv1HBuprXLTw%40mail.gmail.com.

Reply via email to