software how example code apidoc python documentation python-sphinx

how - sphinx python



Salida condicional en la documentación de Sphinx (1)

No se requiere ninguna extensión. Solo usa la directiva única . Funciona así:

.. only:: latex The stuff in here only appears in the latex output. .. only:: html The stuff in this block only appears in the HTML output. It''s often useful to use this directive with it: .. raw:: html It''s good for embedding stuff, like video.

Estoy escribiendo alguna documentación con Sphinx y me gustaría imprimir un cierto bloque de texto solo para la documentación HTML, no para la documentación de LaTeX. Algo me dice que debería poder hacer esto con sphinx.ext.ifconfig pero no sé cómo. ¿Alguien sabe como hacer esto?