[PYTHON] Sphinx single html suppresses page breaks in the middle of the table

Add the following to index.rst

.. raw:: html
 
  <style type="text/css">
  <!--
  table{page-break-inside:avoid;}
  -->
  </style>

When you want to print a whole document created with sphinx, you can make singlehtml and open it in a browser to print it. However, if that is the case, page breaks will occur in the middle of the table, making it difficult to see.

With the above description, page breaks will not occur in the middle of the table.

I wonder if it's okay to have this setting in conf.py or the theme options, but I didn't find it.

Recommended Posts

Sphinx single html suppresses page breaks in the middle of the table
In the middle of development, we will introduce Alembic
Django + MongoDB development environment maintenance (in the middle of writing)
Make SIP Server as concise as possible (in the middle of explanation)
Output the contents of ~ .xlsx in the folder to HTML with Python
The story of participating in AtCoder
The story of the "hole" in the file
The meaning of ".object" in Django
Get a capture of the entire web page in Selenium Python VBA