From 29b1ce020f8fe989726fd7cef4f96155c5ed5b9d Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Mon, 15 Jul 2019 15:40:48 +0100
Subject: [PATCH] DOC: Allow line-wrapping in tables

---
 doc/_static/theme_overrides.css | 10 ++++++++++
 doc/conf.py                     | 13 ++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)
 create mode 100644 doc/_static/theme_overrides.css

diff --git a/doc/_static/theme_overrides.css b/doc/_static/theme_overrides.css
new file mode 100644
index 000000000..7c1a52022
--- /dev/null
+++ b/doc/_static/theme_overrides.css
@@ -0,0 +1,10 @@
+/* override table width restrictions */
+.wy-table-responsive table td, .wy-table-responsive table th {
+    white-space: normal;
+}
+
+.wy-table-responsive {
+    margin-bottom: 24px;
+    max-width: 100%;
+    overflow: visible;
+}
diff --git a/doc/conf.py b/doc/conf.py
index a7fb2b4d2..552cd0b94 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -33,7 +33,7 @@ date = datetime.date.today()
 # ones.
 extensions = [
     'sphinx.ext.autodoc',
-    'sphinx.ext.autosummary', 
+    'sphinx.ext.autosummary',
     'sphinx.ext.mathjax',
     'sphinx.ext.graphviz',
     'sphinx.ext.todo',
@@ -121,6 +121,7 @@ pygments_style = 'sphinx'
 # a list of builtin themes.
 html_theme = 'sphinx_rtd_theme'
 
+
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
@@ -148,7 +149,13 @@ html_theme = 'sphinx_rtd_theme'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = []
+html_static_path = ['_static']
+
+html_context = {
+    'css_files': [
+        '_static/theme_overrides.css',  # overrides for wide tables in RTD theme
+        ],
+    }
 
 # Add any extra paths that contain custom files (such as robots.txt or
 # .htaccess) here, relative to this directory. These files are copied
@@ -368,7 +375,7 @@ def autodoc_skip_member(app, what, name, obj, skip, options):
     if what == 'class':
         attName = name.split('.')[-1]
         return skip or attName.startswith('_sync_')
-    
+
     return skip or False
 
 
-- 
GitLab