Hi

On Friday, 4 October 2019 14:06:02 UTC+2, Jeff Larson wrote:
>
> Is it possible to have Sphinx ignore part of index.rst when building the 
> pdf with latexpdf? 
>
Yes, it is, by using the directive only:: html before the lines you don't 
want to include in the (latex)pdf. Remember to indent the content that 
should go only in the HTML, so in your case

>
> 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/....
>
.. only::html
  
   .. image:: https://img.shields.io/.. <https://img.shields.io/>..
      :target: https://pypi.org/.. <https://pypi.org/>..

...and so on. 

As said, make sure that the .. image:: directives and their option be 
indented.

In case you need them in builds other than HTML (for example epub), use .. 
only:: html of epub

HTH,
Stefano

-- 
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/6d6ddc30-a195-4e21-981b-3fdd6e872ac3%40googlegroups.com.

Reply via email to