Sphinx latexpdf игнорирует части файла - PullRequest
0 голосов
/ 04 октября 2019

Возможно ли, чтобы Sphinx игнорировал часть index.rst при сборке pdf с latexpdf?

Например, мой файл index.rst содержит (но не начинается с) строки


.. 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/....

Они должны появляться в построенном html, но не в PDF. Я ничего не видел здесь: https://www.sphinx -doc.org / ru / master / latex.html

Можно ли сказать sphinx игнорировать эти строки?

1 Ответ

1 голос
/ 04 октября 2019

Я думаю, вы могли бы использовать только директиву :

  • в index.rst
 .. only:: html

     .. image::  https://readthedocs.org/.....
     :target: https://libensemble.readthedocs.org/....
  • в Makefile
 htmldoc:

    make -e SPHINXOPTS="-t html" html
...