From ad8e6e990387c9f0bbe40a903c72b66b23bfaa6c Mon Sep 17 00:00:00 2001 From: Oliver Jahn Date: Fri, 22 Dec 2017 12:43:44 -0500 Subject: [PATCH] Move equation numbers to the right --- doc/_static/css/custom.css | 17 +++++++++++++++++ doc/conf.py | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 doc/_static/css/custom.css diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css new file mode 100644 index 000000000..10abb4572 --- /dev/null +++ b/doc/_static/css/custom.css @@ -0,0 +1,17 @@ +/* Make equation numbers float to the right */ +.eqno { + margin-left: 5px; + float: right; +} +/* Hide the link... */ +.math .headerlink { + display: none; + visibility: hidden; +} +/* ...unless the equation is hovered */ +.math:hover .headerlink { + display: inline-block; + visibility: visible; + /* Place link in margin and keep equation number aligned with boundary */ + margin-right: -0.7em; +} diff --git a/doc/conf.py b/doc/conf.py index 1209d7d3f..a77ed8709 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -185,5 +185,7 @@ 'Miscellaneous'), ] +def setup(app): + app.add_stylesheet('css/custom.css')