latex - Sphinx latexpdf 忽略文件的一部分
问题描述
使用latexpdf构建pdf时是否可以让Sphinx忽略index.rst的一部分?
例如,我的 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/en/master/latex.html
是否可以告诉 sphinx 忽略这些行?
解决方案
我认为您只能使用指令:
- 在
index.rst
.. only:: html
.. image:: https://readthedocs.org/.....
:target: https://libensemble.readthedocs.org/....
- 在
Makefile
htmldoc:
make -e SPHINXOPTS="-t html" html
推荐阅读
- angular - 使用renderer2 Angular在按键时将字符包裹在span元素中
- excel-formula - Multiple COUNTIFS
- json - VBA compile error: Variable not defined ( JSON )
- angular - How to unit test a method that updates a filter in Angular?
- javascript - How to register Events using Firebase Analytics
- javascript - .then() 的 Javascript/ReactJS 执行执行得太早
- openshift - 使用 voip 号码注册 Openshift Online?
- jquery - 屏幕宽度小于指定尺寸时发出警报
- r - 在 ggplot 中自定义图例的标签
- rest - Magento 2.3 中的 REST API 版本控制(V1 / V2 / V3)