Skip to content

Commit

Permalink
Fix alignment of equations in Sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Aug 8, 2023
1 parent d6b1623 commit e47f2aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/sphinx/_static/custom.css
Original file line number Diff line number Diff line change
@@ -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;
}
4 changes: 4 additions & 0 deletions doc/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e47f2aa

Please sign in to comment.