diff --git a/doc/sphinx/_static/custom.css b/doc/sphinx/_static/custom.css new file mode 100644 index 00000000000..4178fd50844 --- /dev/null +++ b/doc/sphinx/_static/custom.css @@ -0,0 +1,11 @@ +div.math { + /* Fix equations to be centered instead of right aligned */ + padding-right: unset; + flex-direction: unset; + justify-content: center; +} + +p + div.math { + /* Remove post-paragraph space ahead of equation to center vertically */ + margin-top: -1.15em; +} diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 5ae0ca8ddd8..3069963a4a3 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -245,6 +245,10 @@ def escape_splats(app, what, name, obj, options, lines): # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +html_css_files = [ + 'custom.css', +] + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y'